Skip to content

Commit

Permalink
Geolocation.ctor() throws a TypeError
Browse files Browse the repository at this point in the history
  • Loading branch information
rbri committed Feb 2, 2025
1 parent 5d34208 commit 1de2d0f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions src/changes/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

<body>
<release version="4.10.0" date="February xx, 2025" description="Bugfixes">
<action type="fix" dev="rbri">
Geolocation.ctor() throws a TypeError.
</action>
<action type="fix" dev="rbri">
TreeWalker.ctor() throws a TypeError.
</action>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class Geolocation extends HtmlUnitScriptable {
*/
@JsxConstructor
public void jsConstructor() {
throw JavaScriptEngine.reportRuntimeError("Illegal constructor.");
throw JavaScriptEngine.typeError("Illegal constructor.");
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -446,10 +446,10 @@ public void initKeyEvent() throws Exception {
FF_ESR = {"NotSupportedError",
"keydown, true, true, Fn, 0, true, true, true, true, 0, 0",
"keyup, false, false, , 7, false, false, false, false, 0, 0"})
@HtmlUnitNYI(CHROME = {"exception",
@HtmlUnitNYI(CHROME = {"NotSupportedError",
"keydown, true, true, Fn, 0, true, true, true, true, 0, 0",
"keyup, false, false, , 7, false, false, false, false, 0, 0"},
EDGE = {"exception",
EDGE = {"NotSupportedError",
"keydown, true, true, Fn, 0, true, true, true, true, 0, 0",
"keyup, false, false, , 7, false, false, false, false, 0, 0"})
public void initKeyboardEvent() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1335,7 +1335,7 @@ public void format_no_no() throws Exception {
* @throws Exception if the test fails
*/
@Test
@Alerts("exception")
@Alerts("RangeError")
public void format_no_no_ny() throws Exception {
test("new Intl.DateTimeFormat('no-NO-NY').format(date)");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1201,7 +1201,7 @@ public void format_no_no() throws Exception {
* @throws Exception if the test fails
*/
@Test
@Alerts("exception")
@Alerts("RangeError")
public void format_no_no_ny() throws Exception {
test("new Intl.NumberFormat('no-NO-NY').format(number)");
}
Expand Down

0 comments on commit 1de2d0f

Please sign in to comment.