mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
778e86b208
We update the tests to cover this case. There was also a bug in the tests where we were accidentally testing non-writable Location properties against window rather than window.location. :-(
60 lines
1.1 KiB
HTML
60 lines
1.1 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<!--
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=326337
|
|
-->
|
|
<head>
|
|
<title>Inner file for Bug 326337</title>
|
|
</head>
|
|
<body>
|
|
<script>
|
|
|
|
document.domain = "example.com";
|
|
|
|
runTest1();
|
|
|
|
var xhr;
|
|
|
|
function runTest1() {
|
|
xhr = new XMLHttpRequest();
|
|
xhr.open("GET", "file_bug326337.xml", true);
|
|
xhr.onreadystatechange = function() {
|
|
if (xhr.readyState == 4) {
|
|
check(xhr.responseXML.documentElement.getAttribute("root"));
|
|
runTest2();
|
|
}
|
|
}
|
|
xhr.send(null);
|
|
}
|
|
|
|
function runTest2() {
|
|
var secondDoc = false;
|
|
xhr = new XMLHttpRequest();
|
|
xhr.multipart = true;
|
|
xhr.open("GET", "file_bug326337_multipart.txt", true);
|
|
xhr.onreadystatechange = function() {
|
|
if (xhr.readyState == 4) {
|
|
check(xhr.responseXML.documentElement.getAttribute("root"));
|
|
if (secondDoc) {
|
|
SpecialPowers.wrap(parent).location.hash = "#done";
|
|
}
|
|
else {
|
|
secondDoc = true;
|
|
}
|
|
}
|
|
}
|
|
xhr.send(null);
|
|
}
|
|
|
|
function check(attr) {
|
|
if (attr != "yes") {
|
|
SpeciaPowers.wrap(parent).location.hash = "#fail";
|
|
throw 1;
|
|
}
|
|
}
|
|
|
|
</script>
|
|
</pre>
|
|
</body>
|
|
</html>
|