Auto merge of #15354 - cynicaldevil:manual-redirect, r=jdm

Redirect document loads manually

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

r? @jdm

I ran some tests at random from the `navigating-across-documents` folder, and they are passing.

<!-- 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/15354)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-06-02 14:49:21 -07:00 committed by GitHub
commit eac4f407e2
17 changed files with 376 additions and 52 deletions

View file

@ -13352,6 +13352,12 @@
{}
]
],
"mozilla/multiple_redirects.html": [
[
"/_mozilla/mozilla/multiple_redirects.html",
{}
]
],
"mozilla/navigator.html": [
[
"/_mozilla/mozilla/navigator.html",
@ -26021,6 +26027,10 @@
"f8f9adebe09f9473a52e5ec4f075540b10b32d7e",
"testharness"
],
"mozilla/multiple_redirects.html": [
"db0ffd3db5b23204b91f332915d938cfc85ec46c",
"testharness"
],
"mozilla/navigator.html": [
"939f453fecfb28a36cb93057382b56439b00b136",
"testharness"

View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Multiple redirects</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<iframe src=""></iframe>
<script>
async_test(function(t) {
var iframe = document.getElementsByTagName("iframe")[0];
var base_url = "/common/redirect.py?location=/common/dummy.xhtml";
var second = "/common/redirect.py?location=" + base_url;
var third = "/common/redirect.py?location=" + second;
iframe.src = third;
iframe.onload = t.step_func(function() {
if(iframe.contentWindow.location.href === new URL('/common/dummy.xhtml', location.href).href) {
this.done();
}
});
});
</script>
</body>
</html>