mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-05 16:46:26 +00:00
63 lines
2.3 KiB
HTML
63 lines
2.3 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<!--
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=704320
|
|
-->
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Test for Bug 704320 - HTTPS to HTTPS</title>
|
|
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
<script type="application/javascript" src="referrerHelper.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
|
|
|
<script type="application/javascript;version=1.7">
|
|
|
|
var testIframeUrls = [
|
|
// HTTPS to HTTPS
|
|
'https://example.com/tests/dom/base/test/bug704320.sjs?action=create-1st-level-iframe&scheme-from=https&scheme-to=https&policy=no-referrer-when-downgrade',
|
|
'https://example.com/tests/dom/base/test/bug704320.sjs?action=create-1st-level-iframe&scheme-from=https&scheme-to=https&policy=no-referrer',
|
|
'https://example.com/tests/dom/base/test/bug704320.sjs?action=create-1st-level-iframe&scheme-from=https&scheme-to=https&policy=unsafe-url',
|
|
'https://example.com/tests/dom/base/test/bug704320.sjs?action=create-1st-level-iframe&scheme-from=https&scheme-to=https&policy=origin',
|
|
'https://example.com/tests/dom/base/test/bug704320.sjs?action=create-1st-level-iframe&scheme-from=https&scheme-to=https&policy=origin-when-cross-origin'
|
|
];
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
var advance = function() { tests.next(); };
|
|
|
|
/**
|
|
* This is the main test routine -- serialized by use of a generator.
|
|
* It performs all tests in sequence using in the same iframe.
|
|
*/
|
|
var tests = (function() {
|
|
var iframe = document.getElementById("testframe");
|
|
iframe.onload = function() {
|
|
advance();
|
|
}
|
|
|
|
// load the test frame from testIframeUrls[url]
|
|
// it will call back into this function via postMessage when it finishes loading.
|
|
// and continue beyond the yield.
|
|
for(url in testIframeUrls) {
|
|
yield iframe.src = testIframeUrls[url];
|
|
// run test and check result for loaded test URL
|
|
yield checkExpectedGlobalResults();
|
|
}
|
|
|
|
// complete. Be sure to yield so we don't call this twice.
|
|
yield SimpleTest.finish();
|
|
})();
|
|
|
|
</script>
|
|
</head>
|
|
|
|
<body onload="tests.next();">
|
|
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=704320">Mozilla Bug 704320 - HTTPS to HTTPS</a>
|
|
<p id="display"></p>
|
|
<pre id="content">
|
|
</pre>
|
|
<iframe id="testframe"></iframe>
|
|
|
|
</body>
|
|
</html>
|
|
|