Skip to content

Commit

Permalink
Chrome/Edge 130
Browse files Browse the repository at this point in the history
  • Loading branch information
rbri committed Oct 27, 2024
1 parent 4b0ea4a commit 2f6612d
Show file tree
Hide file tree
Showing 20 changed files with 476 additions and 446 deletions.
16 changes: 8 additions & 8 deletions src/main/java/org/htmlunit/BrowserVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ public final class BrowserVersion implements Serializable {
public static final BrowserVersion FIREFOX_ESR = new BrowserVersion(FIREFOX_ESR_NUMERIC, "FF-ESR");

/** Latest Edge. */
public static final BrowserVersion EDGE = new BrowserVersion(129, "Edge");
public static final BrowserVersion EDGE = new BrowserVersion(130, "Edge");

/** Latest Chrome. */
public static final BrowserVersion CHROME = new BrowserVersion(129, "Chrome");
public static final BrowserVersion CHROME = new BrowserVersion(130, "Chrome");

/**
* Array with all supported browsers.
Expand Down Expand Up @@ -217,9 +217,9 @@ public final class BrowserVersion implements Serializable {
CHROME.imgAcceptHeader_ = "image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8";
CHROME.cssAcceptHeader_ = "text/css,*/*;q=0.1";
CHROME.scriptAcceptHeader_ = "*/*";
CHROME.secClientHintUserAgentHeader_ = "\"Google Chrome\";v=\""
+ CHROME.getBrowserVersionNumeric() + "\", \"Not=A?Brand\";v=\"8\", \"Chromium\";v=\""
+ CHROME.getBrowserVersionNumeric() + "\"";
CHROME.secClientHintUserAgentHeader_ = "\"Chromium\";v=\""
+ CHROME.getBrowserVersionNumeric() + "\", \"Google Chrome\";v=\""
+ CHROME.getBrowserVersionNumeric() + "\", \"Not?A_Brand\";v=\"99\"";
CHROME.fontHeights_ = new int[] {
0, 1, 2, 4, 5, 5, 6, 8, 9, 10, 11, 12, 15, 16, 16, 17, 18, 20, 21, 22, 23, 25, 26, 26,
27, 28, 30, 31, 32, 33, 34, 36, 37, 37, 38, 40, 42, 43, 44, 45, 47, 48, 48, 49, 51, 52, 53, 54, 55, 57,
Expand Down Expand Up @@ -263,9 +263,9 @@ public final class BrowserVersion implements Serializable {
EDGE.imgAcceptHeader_ = "image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8";
EDGE.cssAcceptHeader_ = "text/css,*/*;q=0.1";
EDGE.scriptAcceptHeader_ = "*/*";
EDGE.secClientHintUserAgentHeader_ = "\"Microsoft Edge\";v=\""
+ EDGE.getBrowserVersionNumeric() + "\", \"Not=A?Brand\";v=\"8\", \"Chromium\";v=\""
+ EDGE.getBrowserVersionNumeric() + "\"";
EDGE.secClientHintUserAgentHeader_ = "\"Chromium\";v=\""
+ EDGE.getBrowserVersionNumeric() + "\", \"Microsoft Edge\";v=\""
+ EDGE.getBrowserVersionNumeric() + "\", \"Not?A_Brand\";v=\"99\"";
EDGE.fontHeights_ = new int[] {
0, 1, 2, 4, 5, 5, 6, 8, 9, 10, 11, 12, 15, 16, 16, 17, 18, 20, 21, 22, 23, 25, 26, 26,
27, 28, 30, 31, 32, 33, 34, 36, 37, 37, 38, 40, 42, 43, 44, 45, 47, 48, 48, 49, 51, 52, 53, 54, 55, 57,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
*/
package org.htmlunit.javascript.host.event;

import static org.htmlunit.javascript.configuration.SupportedBrowser.FF;
import static org.htmlunit.javascript.configuration.SupportedBrowser.FF_ESR;

import org.htmlunit.corejs.javascript.ScriptableObject;
import org.htmlunit.javascript.JavaScriptEngine;
import org.htmlunit.javascript.configuration.JsxClass;
Expand All @@ -27,8 +30,9 @@
* DOM Level 2 Events</a>.
*
* @author Ahmed Ashour
* @author Ronald Brill
*/
@JsxClass
@JsxClass({FF, FF_ESR})
public class MutationEvent extends Event {

/** Modification. */
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/htmlunit/BrowserVersionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ public class BrowserVersionTest {
public void getBrowserVersionNumeric() {
assertEquals(131, BrowserVersion.FIREFOX.getBrowserVersionNumeric());
assertEquals(128, BrowserVersion.FIREFOX_ESR.getBrowserVersionNumeric());
assertEquals(129, BrowserVersion.CHROME.getBrowserVersionNumeric());
assertEquals(129, BrowserVersion.EDGE.getBrowserVersionNumeric());
assertEquals(130, BrowserVersion.CHROME.getBrowserVersionNumeric());
assertEquals(130, BrowserVersion.EDGE.getBrowserVersionNumeric());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6546,7 +6546,9 @@ public void rtcConfiguration() throws Exception {
* @throws Exception if the test fails
*/
@Test
@Alerts("exception")
@Alerts(DEFAULT = "function RTCDataChannel() { [native code] }",
FF = "exception",
FF_ESR = "exception")
public void rtcDataChannel() throws Exception {
test("RTCDataChannel");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6543,7 +6543,9 @@ public void rtcConfiguration() throws Exception {
* @throws Exception if the test fails
*/
@Test
@Alerts("undefined")
@Alerts(DEFAULT = "function",
FF = "undefined",
FF_ESR = "undefined")
public void rtcDataChannel() throws Exception {
test("RTCDataChannel");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15911,12 +15911,8 @@ public void gamepadEvent() throws Exception {
* @throws Exception if the test fails
*/
@Test
@Alerts(CHROME = "ADDITION[E],attrChange[GCE],attrName[GCE],constructor(),initMutationEvent(),MODIFICATION[E],"
+ "newValue[GCE],prevValue[GCE],relatedNode[GCE],"
+ "REMOVAL[E]",
EDGE = "ADDITION[E],attrChange[GCE],attrName[GCE],constructor(),initMutationEvent(),MODIFICATION[E],"
+ "newValue[GCE],prevValue[GCE],relatedNode[GCE],"
+ "REMOVAL[E]",
@Alerts(CHROME = "exception",
EDGE = "exception",
FF = "ADDITION[E],attrChange[GCE],attrName[GCE],constructor(),initMutationEvent(),MODIFICATION[E],"
+ "newValue[GCE],prevValue[GCE],relatedNode[GCE],"
+ "REMOVAL[E]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2589,7 +2589,9 @@ public void gamepadEvent() throws Exception {
* @throws Exception if the test fails
*/
@Test
@Alerts("Symbol(Symbol.toStringTag) [C] [MutationEvent]")
@Alerts(DEFAULT = "exception",
FF = "Symbol(Symbol.toStringTag) [C] [MutationEvent]",
FF_ESR = "Symbol(Symbol.toStringTag) [C] [MutationEvent]")
public void mutationEvent() throws Exception {
testString("", "document.createEvent('MutationEvent')");
}
Expand Down
Loading

0 comments on commit 2f6612d

Please sign in to comment.