Skip to content

Commit 1de2d0f

Browse files
committed
Geolocation.ctor() throws a TypeError
1 parent 5d34208 commit 1de2d0f

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

src/changes/changes.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
<body>
1010
<release version="4.10.0" date="February xx, 2025" description="Bugfixes">
11+
<action type="fix" dev="rbri">
12+
Geolocation.ctor() throws a TypeError.
13+
</action>
1114
<action type="fix" dev="rbri">
1215
TreeWalker.ctor() throws a TypeError.
1316
</action>

src/main/java/org/htmlunit/javascript/host/geo/Geolocation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public class Geolocation extends HtmlUnitScriptable {
4747
*/
4848
@JsxConstructor
4949
public void jsConstructor() {
50-
throw JavaScriptEngine.reportRuntimeError("Illegal constructor.");
50+
throw JavaScriptEngine.typeError("Illegal constructor.");
5151
}
5252

5353
/**

src/test/java/org/htmlunit/javascript/host/event/KeyboardEventTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,10 +446,10 @@ public void initKeyEvent() throws Exception {
446446
FF_ESR = {"NotSupportedError",
447447
"keydown, true, true, Fn, 0, true, true, true, true, 0, 0",
448448
"keyup, false, false, , 7, false, false, false, false, 0, 0"})
449-
@HtmlUnitNYI(CHROME = {"exception",
449+
@HtmlUnitNYI(CHROME = {"NotSupportedError",
450450
"keydown, true, true, Fn, 0, true, true, true, true, 0, 0",
451451
"keyup, false, false, , 7, false, false, false, false, 0, 0"},
452-
EDGE = {"exception",
452+
EDGE = {"NotSupportedError",
453453
"keydown, true, true, Fn, 0, true, true, true, true, 0, 0",
454454
"keyup, false, false, , 7, false, false, false, false, 0, 0"})
455455
public void initKeyboardEvent() throws Exception {

src/test/java/org/htmlunit/javascript/host/intl/DateTimeFormat2Test.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1335,7 +1335,7 @@ public void format_no_no() throws Exception {
13351335
* @throws Exception if the test fails
13361336
*/
13371337
@Test
1338-
@Alerts("exception")
1338+
@Alerts("RangeError")
13391339
public void format_no_no_ny() throws Exception {
13401340
test("new Intl.DateTimeFormat('no-NO-NY').format(date)");
13411341
}

src/test/java/org/htmlunit/javascript/host/intl/NumberFormat2Test.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1201,7 +1201,7 @@ public void format_no_no() throws Exception {
12011201
* @throws Exception if the test fails
12021202
*/
12031203
@Test
1204-
@Alerts("exception")
1204+
@Alerts("RangeError")
12051205
public void format_no_no_ny() throws Exception {
12061206
test("new Intl.NumberFormat('no-NO-NY').format(number)");
12071207
}

0 commit comments

Comments
 (0)