diff options
-rw-r--r-- | components/script/dom/navigator.rs | 6 | ||||
-rw-r--r-- | components/script/dom/webidls/Navigator.webidl | 7 | ||||
-rw-r--r-- | tests/wpt/metadata/html/dom/interfaces.html.ini | 7 |
3 files changed, 13 insertions, 7 deletions
diff --git a/components/script/dom/navigator.rs b/components/script/dom/navigator.rs index 75bd2c13c23..61936c59e5f 100644 --- a/components/script/dom/navigator.rs +++ b/components/script/dom/navigator.rs @@ -107,4 +107,10 @@ impl NavigatorMethods for Navigator { fn ServiceWorker(&self) -> Root<ServiceWorkerContainer> { self.serviceWorker.or_init(|| ServiceWorkerContainer::new(self.global().r())) } + + // https://html.spec.whatwg.org/multipage/#dom-navigator-cookieenabled + fn CookieEnabled(&self) -> bool { + true + } + } diff --git a/components/script/dom/webidls/Navigator.webidl b/components/script/dom/webidls/Navigator.webidl index 493c4ba34e4..ba24348b7f8 100644 --- a/components/script/dom/webidls/Navigator.webidl +++ b/components/script/dom/webidls/Navigator.webidl @@ -14,6 +14,7 @@ Navigator implements NavigatorLanguage; //Navigator implements NavigatorContentUtils; //Navigator implements NavigatorStorageUtils; Navigator implements NavigatorPlugins; +Navigator implements NavigatorCookies; // https://html.spec.whatwg.org/multipage/#navigatorid [NoInterfaceObject, Exposed=(Window,Worker)] @@ -52,3 +53,9 @@ interface NavigatorPlugins { [SameObject] readonly attribute MimeTypeArray mimeTypes; boolean javaEnabled(); }; + +// https://html.spec.whatwg.org/multipage/#navigatorcookies +[NoInterfaceObject, Exposed=(Window,Worker)] +interface NavigatorCookies { + readonly attribute boolean cookieEnabled; +}; diff --git a/tests/wpt/metadata/html/dom/interfaces.html.ini b/tests/wpt/metadata/html/dom/interfaces.html.ini index 0898618fa9f..dd76d5dcadb 100644 --- a/tests/wpt/metadata/html/dom/interfaces.html.ini +++ b/tests/wpt/metadata/html/dom/interfaces.html.ini @@ -5304,9 +5304,6 @@ [Navigator interface: operation unregisterContentHandler(DOMString,DOMString)] expected: FAIL - [Navigator interface: attribute cookieEnabled] - expected: FAIL - [Navigator interface: operation yieldForStorageUpdates()] expected: FAIL @@ -5355,9 +5352,6 @@ [Navigator interface: calling unregisterContentHandler(DOMString,DOMString) on window.navigator with too few arguments must throw TypeError] expected: FAIL - [Navigator interface: window.navigator must inherit property "cookieEnabled" with the proper type (16)] - expected: FAIL - [Navigator interface: window.navigator must inherit property "yieldForStorageUpdates" with the proper type (17)] expected: FAIL @@ -9008,4 +9002,3 @@ [Event interface: calling initEvent(DOMString,boolean,boolean) on new TrackEvent("addtrack", {track:document.createElement("track").track}) with too few arguments must throw TypeError] expected: FAIL - |