diff --git a/components/script/dom/navigator.rs b/components/script/dom/navigator.rs index f7747f37973..07abebe667f 100644 --- a/components/script/dom/navigator.rs +++ b/components/script/dom/navigator.rs @@ -6,6 +6,7 @@ use crate::dom::bindings::codegen::Bindings::NavigatorBinding::NavigatorMethods; use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; use crate::dom::bindings::root::{DomRoot, MutNullableDom}; use crate::dom::bindings::str::DOMString; +use crate::dom::bindings::utils::to_frozen_array; use crate::dom::bluetooth::Bluetooth; use crate::dom::gamepadlist::GamepadList; use crate::dom::gpu::GPU; @@ -18,7 +19,9 @@ use crate::dom::pluginarray::PluginArray; use crate::dom::serviceworkercontainer::ServiceWorkerContainer; use crate::dom::window::Window; use crate::dom::xrsystem::XRSystem; +use crate::script_runtime::JSContext; use dom_struct::dom_struct; +use js::jsval::JSVal; #[dom_struct] pub struct Navigator { @@ -122,6 +125,12 @@ impl NavigatorMethods for Navigator { navigatorinfo::Language() } + // https://html.spec.whatwg.org/multipage/#dom-navigator-languages + #[allow(unsafe_code)] + fn Languages(&self, cx: JSContext) -> JSVal { + to_frozen_array(&[self.Language()], cx) + } + // https://html.spec.whatwg.org/multipage/#dom-navigator-plugins fn Plugins(&self) -> DomRoot { self.plugins.or_init(|| PluginArray::new(&self.global())) diff --git a/components/script/dom/webidls/Navigator.webidl b/components/script/dom/webidls/Navigator.webidl index 77a54993cf2..4ebb5ad20be 100644 --- a/components/script/dom/webidls/Navigator.webidl +++ b/components/script/dom/webidls/Navigator.webidl @@ -44,8 +44,7 @@ partial interface Navigator { [Exposed=(Window,Worker)] interface mixin NavigatorLanguage { readonly attribute DOMString language; - // https://github.com/servo/servo/issues/10073 - //readonly attribute DOMString[] languages; + readonly attribute any languages; }; // https://html.spec.whatwg.org/multipage/#navigatorplugins diff --git a/components/script/dom/workernavigator.rs b/components/script/dom/workernavigator.rs index 2ff09c48807..7f7b656068f 100644 --- a/components/script/dom/workernavigator.rs +++ b/components/script/dom/workernavigator.rs @@ -6,11 +6,14 @@ use crate::dom::bindings::codegen::Bindings::WorkerNavigatorBinding::WorkerNavig use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector}; use crate::dom::bindings::root::{DomRoot, MutNullableDom}; use crate::dom::bindings::str::DOMString; +use crate::dom::bindings::utils::to_frozen_array; use crate::dom::gpu::GPU; use crate::dom::navigatorinfo; use crate::dom::permissions::Permissions; use crate::dom::workerglobalscope::WorkerGlobalScope; +use crate::script_runtime::JSContext; use dom_struct::dom_struct; +use js::jsval::JSVal; // https://html.spec.whatwg.org/multipage/#workernavigator #[dom_struct] @@ -90,6 +93,12 @@ impl WorkerNavigatorMethods for WorkerNavigator { navigatorinfo::Language() } + // https://html.spec.whatwg.org/multipage/#dom-navigator-languages + #[allow(unsafe_code)] + fn Languages(&self, cx: JSContext) -> JSVal { + to_frozen_array(&[self.Language()], cx) + } + // https://w3c.github.io/permissions/#navigator-and-workernavigator-extension fn Permissions(&self) -> DomRoot { self.permissions diff --git a/tests/wpt/metadata/html/dom/idlharness.https.html.ini b/tests/wpt/metadata/html/dom/idlharness.https.html.ini index 6f4b20ee287..30dfefb59c5 100644 --- a/tests/wpt/metadata/html/dom/idlharness.https.html.ini +++ b/tests/wpt/metadata/html/dom/idlharness.https.html.ini @@ -77,9 +77,6 @@ [SVGSVGElement interface: attribute onstorage] expected: FAIL - [Navigator interface: window.navigator must inherit property "languages" with the proper type] - expected: FAIL - [Navigator interface: attribute oscpu] expected: FAIL @@ -152,9 +149,6 @@ [OffscreenCanvasRenderingContext2D interface: operation restore()] expected: FAIL - [Navigator interface: attribute languages] - expected: FAIL - [Path2D interface: operation bezierCurveTo(unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double, unrestricted double)] expected: FAIL diff --git a/tests/wpt/metadata/html/dom/idlharness.worker.js.ini b/tests/wpt/metadata/html/dom/idlharness.worker.js.ini index 6ce0aa10184..9175e384f08 100644 --- a/tests/wpt/metadata/html/dom/idlharness.worker.js.ini +++ b/tests/wpt/metadata/html/dom/idlharness.worker.js.ini @@ -59,9 +59,6 @@ [WorkerGlobalScope interface: self must inherit property "onlanguagechange" with the proper type] expected: FAIL - [WorkerNavigator interface: attribute languages] - expected: FAIL - [OffscreenCanvasRenderingContext2D interface: operation strokeText(DOMString, unrestricted double, unrestricted double, unrestricted double)] expected: FAIL @@ -476,9 +473,6 @@ [OffscreenCanvas interface: existence and properties of interface prototype object's @@unscopables property] expected: FAIL - [WorkerNavigator interface: self.navigator must inherit property "languages" with the proper type] - expected: FAIL - [OffscreenCanvasRenderingContext2D interface: operation fillRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double)] expected: FAIL diff --git a/tests/wpt/metadata/html/webappapis/system-state-and-capabilities/__dir__.ini b/tests/wpt/metadata/html/webappapis/system-state-and-capabilities/__dir__.ini deleted file mode 100644 index 163ca23a12f..00000000000 --- a/tests/wpt/metadata/html/webappapis/system-state-and-capabilities/__dir__.ini +++ /dev/null @@ -1 +0,0 @@ -disabled: for now diff --git a/tests/wpt/metadata/html/webappapis/system-state-and-capabilities/the-navigator-object/historical.https.window.js.ini b/tests/wpt/metadata/html/webappapis/system-state-and-capabilities/the-navigator-object/historical.https.window.js.ini new file mode 100644 index 00000000000..28f62390271 --- /dev/null +++ b/tests/wpt/metadata/html/webappapis/system-state-and-capabilities/the-navigator-object/historical.https.window.js.ini @@ -0,0 +1,4 @@ +[historical.https.window.html] + [registerProtocolHandler has no third argument] + expected: FAIL + diff --git a/tests/wpt/metadata/html/webappapis/system-state-and-capabilities/the-navigator-object/navigator.any.js.ini b/tests/wpt/metadata/html/webappapis/system-state-and-capabilities/the-navigator-object/navigator.any.js.ini new file mode 100644 index 00000000000..46ddab94020 --- /dev/null +++ b/tests/wpt/metadata/html/webappapis/system-state-and-capabilities/the-navigator-object/navigator.any.js.ini @@ -0,0 +1,9 @@ +[navigator.any.html] + [oscpu] + expected: FAIL + + +[navigator.any.worker.html] + [taintEnabled] + expected: FAIL + diff --git a/tests/wpt/metadata/html/webappapis/system-state-and-capabilities/the-navigator-object/navigator_user_agent.https.html.ini b/tests/wpt/metadata/html/webappapis/system-state-and-capabilities/the-navigator-object/navigator_user_agent.https.html.ini new file mode 100644 index 00000000000..edb6013f99a --- /dev/null +++ b/tests/wpt/metadata/html/webappapis/system-state-and-capabilities/the-navigator-object/navigator_user_agent.https.html.ini @@ -0,0 +1,7 @@ +[navigator_user_agent.https.html] + [navigator.userAgentData returns a UserAgentMetadata object.] + expected: FAIL + + [navigator.userAgentData is exposed.] + expected: FAIL + diff --git a/tests/wpt/metadata/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.https.html.ini b/tests/wpt/metadata/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.https.html.ini new file mode 100644 index 00000000000..9ad7ca73fe9 --- /dev/null +++ b/tests/wpt/metadata/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.https.html.ini @@ -0,0 +1,631 @@ +[protocol.https.html] + [registerProtocolHandler: overriding the "TEL" protocol should work] + expected: FAIL + + [unregisterProtocolHandler: Valid URL "https://web-platform.test:8443/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.https.html/%s" should work.] + expected: FAIL + + [unregisterProtocolHandler: Invalid URL "http://example.com/%s" should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "mid" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: overriding the "webcal" protocol should work] + expected: FAIL + + [registerProtocolHandler: Valid URL "https://web-platform.test:8443/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.https.html#%s" should work.] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "web+1" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "ssh:/" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "vbscript" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Valid URL "https://web-platform.test:8443/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.https.html/%s" should work.] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "moz-icon" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "ftp" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: overriding the "WEB+seeabove" protocol should work] + expected: FAIL + + [unregisterProtocolHandler: overriding the "nntp" protocol should work] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "web+" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "chrome" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: overriding the "web+UpperCasedIsLowercased" protocol should work] + expected: FAIL + + [unregisterProtocolHandler: overriding the "web+myprotocol" protocol should work] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "wyciwyg" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "https" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Invalid URL "https://example.com/%s" should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Invalid URL "http://%s.com" should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "fweb+oo" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "view-source" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "mailto:" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Invalid URL "https://web-platform.test:8443/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.https.html/%a" should throw (but after scheme)] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "ssh:/" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Invalid URL "mailto:%s" should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Valid URL "https://web-platform.test:8443/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.https.html?foo=%s&bar" should work.] + expected: FAIL + + [registerProtocolHandler: overriding the "mailto" protocol should work] + expected: FAIL + + [registerProtocolHandler: Invalid URL "http://[v8.:::\]//url=%s" should throw (but after scheme)] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "http" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: overriding the "smsto" protocol should work] + expected: FAIL + + [unregisterProtocolHandler: Invalid URL "https://web-platform.test:8443/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.https.html/%" should throw (but after scheme)] + expected: FAIL + + [registerProtocolHandler: Invalid URL "https://test:test/" should throw (but after scheme)] + expected: FAIL + + [unregisterProtocolHandler: overriding the "im" protocol should work] + expected: FAIL + + [registerProtocolHandler: Valid URL "%s" should work.] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "web+" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "mailto\x00" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "fweb+oo" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "mаilto" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "mocha" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "web+dashes-are-forbidden" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: overriding the "WeB+SeEaBoVe" protocol should work] + expected: FAIL + + [registerProtocolHandler: overriding the "Irc" protocol should work] + expected: FAIL + + [unregisterProtocolHandler: overriding the "BitcoIn" protocol should work] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "livescript" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Invalid URL "http://example.com" should throw (but after scheme)] + expected: FAIL + + [registerProtocolHandler: Invalid URL "blob: URL" should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "javascript" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: overriding the "bitcoin" protocol should work] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "operamail" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: overriding the "geo" protocol should work] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "res" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Valid URL "https://web-platform.test:8443/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.https.html/%s/bar/baz/" should work.] + expected: FAIL + + [registerProtocolHandler: overriding the "magnet" protocol should work] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "web+digits123areforbidden" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Invalid URL "http://foobar.example.com/%s" should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Invalid URL "https://test:test/" should throw (but after scheme)] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "about" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "data" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Invalid URL "http://example.com/%s" should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "mid" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: overriding the "teL" protocol should work] + expected: FAIL + + [unregisterProtocolHandler: Invalid URL "%S" should throw (but after scheme)] + expected: FAIL + + [unregisterProtocolHandler: Invalid URL "ftp://web-platform.test:8443/%s" should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "mocha" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: overriding the "MagneT" protocol should work] + expected: FAIL + + [unregisterProtocolHandler: Valid URL "https://web-platform.test:8443/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.https.html/%s/foo/%s/" should work.] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "ws" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "tel:sip" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: overriding the "news" protocol should work] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "wss" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "unrecognized" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: overriding the "ircs" protocol should work] + expected: FAIL + + [registerProtocolHandler: overriding the "irc" protocol should work] + expected: FAIL + + [registerProtocolHandler: overriding the "urn" protocol should work] + expected: FAIL + + [registerProtocolHandler: overriding the "BitcoIn" protocol should work] + expected: FAIL + + [unregisterProtocolHandler: Valid URL "https://web-platform.test:8443/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.https.html?foo=%s" should work.] + expected: FAIL + + [the unregisterProtocolHandler method should exist on the navigator object] + expected: FAIL + + [unregisterProtocolHandler: Invalid URL "blob: URL" should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: overriding the "openpgp4fpr" protocol should work] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "blob" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: overriding the "WTAI" protocol should work] + expected: FAIL + + [unregisterProtocolHandler: overriding the "sms" protocol should work] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "ftp" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Invalid URL "" should throw (but after scheme)] + expected: FAIL + + [unregisterProtocolHandler: overriding the "irc" protocol should work] + expected: FAIL + + [unregisterProtocolHandler: Invalid URL "mailto:%s@example.com" should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Invalid URL "%S" should throw (but after scheme)] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "shttp" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Invalid URL "https://web-platform.test:8443/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.https.html/%" should throw (but after scheme)] + expected: FAIL + + [registerProtocolHandler: Invalid URL "mailto:%s" should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "res" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "mailto://" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Invalid URL "https://web-platform.test:8443/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.https.html" should throw (but after scheme)] + expected: FAIL + + [unregisterProtocolHandler: Invalid URL "http://example.com" should throw (but after scheme)] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "web+dots.are.forbidden" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "resource" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "operamail" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Valid URL "%s" should work.] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "http" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: overriding the "webcal" protocol should work] + expected: FAIL + + [registerProtocolHandler: overriding the "im" protocol should work] + expected: FAIL + + [registerProtocolHandler: Invalid URL "ftp://web-platform.test:8443/%s" should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "tcl" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Valid URL "https://web-platform.test:8443/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.https.html/%s/foo/%s/" should work.] + expected: FAIL + + [registerProtocolHandler: Invalid URL "chrome://web-platform.test:8443/%s" should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Invalid URL "" should throw (but after scheme)] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "mailtoo\x08" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: overriding the "geo" protocol should work] + expected: FAIL + + [unregisterProtocolHandler: overriding the "WebCAL" protocol should work] + expected: FAIL + + [registerProtocolHandler: Valid URL "https://web-platform.test:8443/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.https.html/%s/bar/baz/?foo=1337&bar#baz" should work.] + expected: FAIL + + [the registerProtocolHandler method should exist on the navigator object] + expected: FAIL + + [unregisterProtocolHandler: Invalid URL "foo://web-platform.test:8443/%s" should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "wss" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Valid URL "foo/%s" should work.] + expected: FAIL + + [unregisterProtocolHandler: Invalid URL "chrome://web-platform.test:8443/%s" should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Valid URL "https://web-platform.test:8443/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.https.html/%s/bar/baz/" should work.] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "vbscript" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "foo" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: overriding the "mms" protocol should work] + expected: FAIL + + [registerProtocolHandler: overriding the "WEB+seeabove" protocol should work] + expected: FAIL + + [unregisterProtocolHandler: overriding the "ssh" protocol should work] + expected: FAIL + + [registerProtocolHandler: overriding the "WTAI" protocol should work] + expected: FAIL + + [unregisterProtocolHandler: Invalid URL "https://web-platform.test:8443/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.https.html/%a" should throw (but after scheme)] + expected: FAIL + + [unregisterProtocolHandler: overriding the "magnet" protocol should work] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "cid" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: overriding the "teL" protocol should work] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "tcl" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "http://" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "ws" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "web+dots.are.forbidden" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "resource" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: overriding the "sms" protocol should work] + expected: FAIL + + [unregisterProtocolHandler: overriding the "mms" protocol should work] + expected: FAIL + + [unregisterProtocolHandler: overriding the "Irc" protocol should work] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "attachment" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "livescript" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: overriding the "bitcoin" protocol should work] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "magnet:+" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "opera" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Valid URL "https://web-platform.test:8443/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.https.html/%s/bar/baz/?foo=1337&bar#baz" should work.] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "opera" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "web+digits123areforbidden" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: overriding the "MagneT" protocol should work] + expected: FAIL + + [registerProtocolHandler: overriding the "WeB+SeEaBoVe" protocol should work] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "mailto://" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Invalid URL "mailto:%s@example.com" should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: overriding the "mailto" protocol should work] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "magnet:+" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: overriding the "xmpp" protocol should work] + expected: FAIL + + [unregisterProtocolHandler: overriding the "wtai" protocol should work] + expected: FAIL + + [registerProtocolHandler: Valid URL "https://web-platform.test:8443/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.https.html?foo=%s" should work.] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "tel:sip" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Invalid URL "foo://web-platform.test:8443/%s" should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "chrome" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Invalid URL "http://[v8.:::\]//url=%s" should throw (but after scheme)] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "javascript" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "unrecognized" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "blob" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "web+1" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "http://" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: overriding the "WebCAL" protocol should work] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "https" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "mailto:" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "file" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: overriding the "ssh" protocol should work] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "attachment" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "file" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "mаilto" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: overriding the "openpgp4fpr" protocol should work] + expected: FAIL + + [unregisterProtocolHandler: Invalid URL "https://web-platform.test:8443/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.https.html" should throw (but after scheme)] + expected: FAIL + + [registerProtocolHandler: Invalid URL "http://%s.example.com" should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "mailto\x00" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "mailto\n" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: overriding the "sip" protocol should work] + expected: FAIL + + [registerProtocolHandler: Invalid URL "http://%s.com" should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "mailtoo\x08" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Invalid URL "https://example.com/%s" should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "data" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: overriding the "wtai" protocol should work] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "shttp" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: overriding the "TEL" protocol should work] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "about" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Invalid URL "http://foobar.example.com/%s" should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "wyciwyg" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "view-source" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "cid" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: overriding the "sip" protocol should work] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "mailto\n" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: overriding the "SmsTo" protocol should work] + expected: FAIL + + [registerProtocolHandler: overriding the "nntp" protocol should work] + expected: FAIL + + [unregisterProtocolHandler: overriding the "web+UpperCasedIsLowercased" protocol should work] + expected: FAIL + + [registerProtocolHandler: overriding the "SmsTo" protocol should work] + expected: FAIL + + [unregisterProtocolHandler: overriding the "ircs" protocol should work] + expected: FAIL + + [registerProtocolHandler: Valid URL "foo/%s" should work.] + expected: FAIL + + [unregisterProtocolHandler: Valid URL "https://web-platform.test:8443/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.https.html?foo=%s&bar" should work.] + expected: FAIL + + [registerProtocolHandler: overriding the "xmpp" protocol should work] + expected: FAIL + + [registerProtocolHandler: overriding the "web+myprotocol" protocol should work] + expected: FAIL + + [registerProtocolHandler: overriding the "news" protocol should work] + expected: FAIL + + [unregisterProtocolHandler: Attempting to override the "web+dashes-are-forbidden" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: overriding the "tel" protocol should work] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "moz-icon" protocol should throw SECURITY_ERR.] + expected: FAIL + + [registerProtocolHandler: Attempting to override the "foo" protocol should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: Invalid URL "http://%s.example.com" should throw SECURITY_ERR.] + expected: FAIL + + [unregisterProtocolHandler: overriding the "urn" protocol should work] + expected: FAIL + + [unregisterProtocolHandler: Valid URL "https://web-platform.test:8443/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.https.html#%s" should work.] + expected: FAIL + + [unregisterProtocolHandler: overriding the "smsto" protocol should work] + expected: FAIL + + [unregisterProtocolHandler: overriding the "tel" protocol should work] + expected: FAIL +