Auto merge of #13467 - JanZerebecki:rm-same-origin-data-url, r=KiChjang

Remove same-origin-data-url flag from fetch implementation

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

The spec removed it. Check the scheme instead, data is always same origin now,
except for workers.
Closes #13362

---
<!-- 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 #13362 .

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they only remove code.

<!-- 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/13467)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-10-01 05:19:05 -05:00 committed by GitHub
commit e494dedce5
7 changed files with 18 additions and 34 deletions

View file

@ -144,7 +144,6 @@ fn test_fetch_data() {
let url = Url::parse("data:text/html,<p>Servo</p>").unwrap();
let origin = Origin::Origin(url.origin());
let request = Request::new(url, Some(origin), false, None);
request.same_origin_data.set(true);
let expected_resp_body = "<p>Servo</p>".to_owned();
let fetch_response = fetch_sync(request, None);
@ -173,7 +172,6 @@ fn test_fetch_file() {
let url = Url::from_file_path(path.clone()).unwrap();
let origin = Origin::Origin(url.origin());
let request = Request::new(url, Some(origin), false, None);
request.same_origin_data.set(true);
let fetch_response = fetch_sync(request, None);
assert!(!fetch_response.is_network_error());