servo: Merge #15536 - Implement setter for document.domain (from asajeffrey:script-document-domain-setter); r=nox

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

This PR implements the setter for `document.domain`.

It builds on #15438 and #15478, only the last commit is part of this PR.

It includes tests for similar-origin security checks.

---
<!-- 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 #934.
- [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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: e600e0495ce4ab0f1bb798689f8ebeab84258ec3
This commit is contained in:
Alan Jeffrey
2017-03-15 08:35:41 -07:00
parent 682e1144a9
commit c9f3ef23e6
14 changed files with 260 additions and 102 deletions

View File

@@ -28,6 +28,8 @@ use std::path::Path;
use std::sync::Arc;
use url::{Url, Position};
pub use url::Host;
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
pub struct ServoUrl(Arc<Url>);