From 38c0ef45b0c723cad2a42100bcd082dcb8e4c170 Mon Sep 17 00:00:00 2001 From: Ronald Brill Date: Tue, 17 Oct 2023 12:06:47 +0200 Subject: [PATCH] chrome 118 --- .../org/htmlunit/BrowserVersionFeatures.java | 4 +- src/main/java/org/htmlunit/WebWindowImpl.java | 6 +-- .../org/htmlunit/javascript/host/URLTest.java | 52 +++++++++++++++++++ .../host/html/HTMLAnchorElement2Test.java | 2 + 4 files changed, 59 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/htmlunit/BrowserVersionFeatures.java b/src/main/java/org/htmlunit/BrowserVersionFeatures.java index fcd1426c897..8193cac5705 100644 --- a/src/main/java/org/htmlunit/BrowserVersionFeatures.java +++ b/src/main/java/org/htmlunit/BrowserVersionFeatures.java @@ -1517,10 +1517,10 @@ public enum BrowserVersionFeatures { JS_WINDOW_OUTER_INNER_HEIGHT_DIFF_131, /** - * Difference of window.outer/inner height is 139. + * Difference of window.outer/inner height is 138. */ @BrowserFeature(CHROME) - JS_WINDOW_OUTER_INNER_HEIGHT_DIFF_139, + JS_WINDOW_OUTER_INNER_HEIGHT_DIFF_138, /** * Difference of window.outer/inner height is 86. diff --git a/src/main/java/org/htmlunit/WebWindowImpl.java b/src/main/java/org/htmlunit/WebWindowImpl.java index e88638b2391..82997c56ae7 100644 --- a/src/main/java/org/htmlunit/WebWindowImpl.java +++ b/src/main/java/org/htmlunit/WebWindowImpl.java @@ -16,7 +16,7 @@ import static org.htmlunit.BrowserVersionFeatures.JS_WINDOW_COMPUTED_STYLE_PSEUDO_ACCEPT_WITHOUT_COLON; import static org.htmlunit.BrowserVersionFeatures.JS_WINDOW_OUTER_INNER_HEIGHT_DIFF_131; -import static org.htmlunit.BrowserVersionFeatures.JS_WINDOW_OUTER_INNER_HEIGHT_DIFF_139; +import static org.htmlunit.BrowserVersionFeatures.JS_WINDOW_OUTER_INNER_HEIGHT_DIFF_138; import static org.htmlunit.BrowserVersionFeatures.JS_WINDOW_OUTER_INNER_HEIGHT_DIFF_86; import static org.htmlunit.BrowserVersionFeatures.JS_WINDOW_OUTER_INNER_HEIGHT_DIFF_91; @@ -99,8 +99,8 @@ else if (webClient.getBrowserVersion().hasFeature(JS_WINDOW_OUTER_INNER_HEIGHT_D outerHeight_ = innerHeight_ + 131; outerWidth_ = innerWidth_ + 71; } - else if (webClient.getBrowserVersion().hasFeature(JS_WINDOW_OUTER_INNER_HEIGHT_DIFF_139)) { - outerHeight_ = innerHeight_ + 139; + else if (webClient.getBrowserVersion().hasFeature(JS_WINDOW_OUTER_INNER_HEIGHT_DIFF_138)) { + outerHeight_ = innerHeight_ + 138; outerWidth_ = innerWidth_ + 16; } else { diff --git a/src/test/java/org/htmlunit/javascript/host/URLTest.java b/src/test/java/org/htmlunit/javascript/host/URLTest.java index 529a71a13ec..d640f10a615 100644 --- a/src/test/java/org/htmlunit/javascript/host/URLTest.java +++ b/src/test/java/org/htmlunit/javascript/host/URLTest.java @@ -612,6 +612,25 @@ public void port() throws Exception { "http:", "http://mydomain.com/svn/Repos/", "ex-unknown"}, IE = {}) + @HtmlUnitNYI( + CHROME = {"https:", + "http:", "http://mydomain.com/svn/Repos/", + "http:", "http://mydomain.com/svn/Repos/", + "axdeg:", "axdeg://mydomain.com/svn/Repos/", + "http:", "http://mydomain.com/svn/Repos/", + "http:", "http://mydomain.com/svn/Repos/", + "http:", "http://mydomain.com/svn/Repos/", + "null:", "null://mydomain.com/svn/Repos/", + "ex-unknown"}, + EDGE = {"https:", + "http:", "http://mydomain.com/svn/Repos/", + "http:", "http://mydomain.com/svn/Repos/", + "axdeg:", "axdeg://mydomain.com/svn/Repos/", + "http:", "http://mydomain.com/svn/Repos/", + "http:", "http://mydomain.com/svn/Repos/", + "http:", "http://mydomain.com/svn/Repos/", + "null:", "null://mydomain.com/svn/Repos/", + "ex-unknown"}) public void protocol() throws Exception { final String html = "\n" @@ -694,6 +713,39 @@ public void protocol() throws Exception { "wss:", "wss://mydomain.com/svn/Repos/", "file:", "file:///svn/Repos/"}, IE = {}) + @HtmlUnitNYI( + CHROME = {"https:", + "http:", "http://mydomain.com/svn/Repos/", + "https:", "https://mydomain.com/svn/Repos/", + "ftp:", "ftp://mydomain.com/svn/Repos/", + "ftps:", "ftps://mydomain.com/svn/Repos/", + "ws:", "ws://mydomain.com/svn/Repos/", + "wss:", "wss://mydomain.com/svn/Repos/", + "file:", "file://mydomain.com/svn/Repos/"}, + EDGE = {"https:", + "http:", "http://mydomain.com/svn/Repos/", + "https:", "https://mydomain.com/svn/Repos/", + "ftp:", "ftp://mydomain.com/svn/Repos/", + "ftps:", "ftps://mydomain.com/svn/Repos/", + "ws:", "ws://mydomain.com/svn/Repos/", + "wss:", "wss://mydomain.com/svn/Repos/", + "file:", "file://mydomain.com/svn/Repos/"}, + FF = {"https:", + "http:", "http://mydomain.com/svn/Repos/", + "https:", "https://mydomain.com/svn/Repos/", + "ftp:", "ftp://mydomain.com/svn/Repos/", + "ftps:", "ftps://mydomain.com/svn/Repos/", + "ws:", "ws://mydomain.com/svn/Repos/", + "wss:", "wss://mydomain.com/svn/Repos/", + "file:", "file://mydomain.com/svn/Repos/"}, + FF_ESR = {"https:", + "http:", "http://mydomain.com/svn/Repos/", + "https:", "https://mydomain.com/svn/Repos/", + "ftp:", "ftp://mydomain.com/svn/Repos/", + "ftps:", "ftps://mydomain.com/svn/Repos/", + "ws:", "ws://mydomain.com/svn/Repos/", + "wss:", "wss://mydomain.com/svn/Repos/", + "file:", "file://mydomain.com/svn/Repos/"}) public void specialScheme() throws Exception { final String html = "\n" diff --git a/src/test/java/org/htmlunit/javascript/host/html/HTMLAnchorElement2Test.java b/src/test/java/org/htmlunit/javascript/host/html/HTMLAnchorElement2Test.java index d5b52ad6316..62fa4922c06 100644 --- a/src/test/java/org/htmlunit/javascript/host/html/HTMLAnchorElement2Test.java +++ b/src/test/java/org/htmlunit/javascript/host/html/HTMLAnchorElement2Test.java @@ -1426,6 +1426,8 @@ public void readWriteProtocol() throws Exception { @Alerts(DEFAULT = {"http:", "axdeg:", "axdeg://§§URL§§/foo.html#O"}, CHROME = {"http:", "http:", "http://§§URL§§/foo.html#O"}, EDGE = {"http:", "http:", "http://§§URL§§/foo.html#O"}) + @HtmlUnitNYI(CHROME = {"http:", "axdeg:", "axdeg://§§URL§§/foo.html#O"}, + EDGE = {"http:", "axdeg:", "axdeg://§§URL§§/foo.html#O"}) public void readWriteProtocolUnknown() throws Exception { final String html = "\n"