diff --git a/Libraries/LibWeb/HTML/Window.idl b/Libraries/LibWeb/HTML/Window.idl index 26ba6f977fb..37c546ac635 100644 --- a/Libraries/LibWeb/HTML/Window.idl +++ b/Libraries/LibWeb/HTML/Window.idl @@ -50,7 +50,7 @@ interface Window : EventTarget { // the user agent readonly attribute Navigator navigator; - [ImplementedAs=navigator] readonly attribute Navigator clientInformation; // legacy alias of .navigator + [Replaceable, ImplementedAs=navigator] readonly attribute Navigator clientInformation; // legacy alias of .navigator // user prompts undefined alert(); diff --git a/Tests/LibWeb/Text/expected/wpt-import/html/webappapis/system-state-and-capabilities/the-navigator-object/clientinformation.window.txt b/Tests/LibWeb/Text/expected/wpt-import/html/webappapis/system-state-and-capabilities/the-navigator-object/clientinformation.window.txt new file mode 100644 index 00000000000..73dd68afa9f --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/html/webappapis/system-state-and-capabilities/the-navigator-object/clientinformation.window.txt @@ -0,0 +1,7 @@ +Harness status: OK + +Found 2 tests + +2 Pass +Pass window.clientInformation exists and equals window.navigator +Pass window.clientInformation is Replaceable \ No newline at end of file diff --git a/Tests/LibWeb/Text/input/wpt-import/html/webappapis/system-state-and-capabilities/the-navigator-object/clientinformation.window.html b/Tests/LibWeb/Text/input/wpt-import/html/webappapis/system-state-and-capabilities/the-navigator-object/clientinformation.window.html new file mode 100644 index 00000000000..0d67d9b889f --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/html/webappapis/system-state-and-capabilities/the-navigator-object/clientinformation.window.html @@ -0,0 +1,8 @@ + + + + + + +
+ diff --git a/Tests/LibWeb/Text/input/wpt-import/html/webappapis/system-state-and-capabilities/the-navigator-object/clientinformation.window.js b/Tests/LibWeb/Text/input/wpt-import/html/webappapis/system-state-and-capabilities/the-navigator-object/clientinformation.window.js new file mode 100644 index 00000000000..197a3b13e93 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/html/webappapis/system-state-and-capabilities/the-navigator-object/clientinformation.window.js @@ -0,0 +1,8 @@ +test(() => { + assert_equals(window.clientInformation, window.navigator); +}, "window.clientInformation exists and equals window.navigator"); + +test(() => { + window.clientInformation = 1; + assert_equals(window.clientInformation, 1); +}, "window.clientInformation is Replaceable");