Auto merge of #13145 - ashrko619:nav-cookie-enabled, r=nox

Implemented Navigator.cookieEnabled

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #13124 (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13145)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-09-01 05:25:52 -05:00 committed by GitHub
commit f787e8ed65
3 changed files with 13 additions and 7 deletions

View file

@ -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
}
}

View file

@ -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;
};