Merge m-c to f-t
authorPhil Ringnalda <philringnalda@gmail.com>
Tue, 06 Sep 2016 07:37:56 -0700
changeset 312815 37c9349b4e8167a61b08b7e119c21ea177b98942
parent 312813 97633d930c8f10ca5b8c9a7986bc390900f5970a (current diff)
parent 312814 394f02edb7cb33ad70074c77b523451749c5ed0b (diff)
child 312816 ae2144aa4356b65c2f8c0de8c9082dcb7e330e24
child 312849 91c2b9d5c1354ca79e5b174591dbb03b32b15bbf
push id20464
push userphilringnalda@gmail.com
push dateTue, 06 Sep 2016 14:38:02 +0000
treeherderfx-team@37c9349b4e81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone51.0a1
Merge m-c to f-t
dom/base/test/test_bug704320.html
--- a/dom/base/test/mochitest.ini
+++ b/dom/base/test/mochitest.ini
@@ -538,17 +538,21 @@ skip-if = buildapp == 'b2g'
 [test_bug693615.html]
 [test_bug693875.html]
 [test_bug694754.xhtml]
 [test_bug696301-1.html]
 [test_bug696301-2.html]
 [test_bug698381.html]
 [test_bug698384.html]
 [test_bug704063.html]
-[test_bug704320.html]
+[test_bug704320_http_http.html]
+[test_bug704320_http_https.html]
+[test_bug704320_https_http.html]
+skip-if = buildapp == 'b2g'  # b2g (https://example.com not working bug 1162353)
+[test_bug704320_https_https.html]
 skip-if = buildapp == 'b2g'  # b2g (https://example.com not working bug 1162353)
 [test_bug704320_policyset.html]
 [test_bug704320_policyset2.html]
 [test_bug704320_preload.html]
 [test_bug707142.html]
 [test_bug708620.html]
 [test_bug711047.html]
 [test_bug711180.html]
deleted file mode 100644
--- a/dom/base/test/test_bug704320.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=704320
--->
-<head>
-  <meta charset="utf-8">
-  <title>Test for Bug 704320</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">
-
-//generates URLs to test
-var generateURLArray = (function(from, to){
-  const baseURL = '://example.com/tests/dom/base/test/bug704320.sjs?action=create-1st-level-iframe&scheme-from=';
-  const schemeTo = '&scheme-to=';
-
-  return [
-    from + baseURL + from + schemeTo + to + '&policy=no-referrer-when-downgrade',
-    from + baseURL + from + schemeTo + to + '&policy=no-referrer',
-    from + baseURL + from + schemeTo + to + '&policy=unsafe-url',
-    from + baseURL + from + schemeTo + to + '&policy=origin',
-    from + baseURL + from + schemeTo + to + '&policy=origin-when-cross-origin',
-  ];
-});
-
-var testIframeUrls = generateURLArray('http', 'http');
-testIframeUrls = testIframeUrls.concat(generateURLArray('https', 'https'));
-testIframeUrls = testIframeUrls.concat(generateURLArray('http', 'https'));
-testIframeUrls = testIframeUrls.concat(generateURLArray('https', 'http'));
-
-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 - HTTP/HTTPS to HTTPS/HTTP</a>
-<p id="display"></p>
-<pre id="content">
-</pre>
-  <iframe id="testframe"></iframe>
-
-</body>
-</html>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/dom/base/test/test_bug704320_http_http.html
@@ -0,0 +1,62 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=704320
+-->
+<head>
+  <meta charset="utf-8">
+  <title>Test for Bug 704320 - HTTP to HTTP</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 = [
+  // HTTP to HTTP
+  'http://example.com/tests/dom/base/test/bug704320.sjs?action=create-1st-level-iframe&scheme-from=http&scheme-to=http&policy=no-referrer-when-downgrade',
+  'http://example.com/tests/dom/base/test/bug704320.sjs?action=create-1st-level-iframe&scheme-from=http&scheme-to=http&policy=no-referrer',
+  'http://example.com/tests/dom/base/test/bug704320.sjs?action=create-1st-level-iframe&scheme-from=http&scheme-to=http&policy=unsafe-url',
+  'http://example.com/tests/dom/base/test/bug704320.sjs?action=create-1st-level-iframe&scheme-from=http&scheme-to=http&policy=origin',
+  'http://example.com/tests/dom/base/test/bug704320.sjs?action=create-1st-level-iframe&scheme-from=http&scheme-to=http&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 - HTTP to HTTP</a>
+<p id="display"></p>
+<pre id="content">
+</pre>
+  <iframe id="testframe"></iframe>
+
+</body>
+</html>
+
new file mode 100644
--- /dev/null
+++ b/dom/base/test/test_bug704320_http_https.html
@@ -0,0 +1,62 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=704320
+-->
+<head>
+  <meta charset="utf-8">
+  <title>Test for Bug 704320 - HTTP 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 = [
+  // HTTP to HTTPS
+  'http://example.com/tests/dom/base/test/bug704320.sjs?action=create-1st-level-iframe&scheme-from=http&scheme-to=https&policy=no-referrer-when-downgrade',
+  'http://example.com/tests/dom/base/test/bug704320.sjs?action=create-1st-level-iframe&scheme-from=http&scheme-to=https&policy=no-referrer',
+  'http://example.com/tests/dom/base/test/bug704320.sjs?action=create-1st-level-iframe&scheme-from=http&scheme-to=https&policy=unsafe-url',
+  'http://example.com/tests/dom/base/test/bug704320.sjs?action=create-1st-level-iframe&scheme-from=http&scheme-to=https&policy=origin',
+  'http://example.com/tests/dom/base/test/bug704320.sjs?action=create-1st-level-iframe&scheme-from=http&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 - HTTP to HTTPS</a>
+<p id="display"></p>
+<pre id="content">
+</pre>
+  <iframe id="testframe"></iframe>
+
+</body>
+</html>
+
new file mode 100644
--- /dev/null
+++ b/dom/base/test/test_bug704320_https_http.html
@@ -0,0 +1,62 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=704320
+-->
+<head>
+  <meta charset="utf-8">
+  <title>Test for Bug 704320 - HTTPS to HTTP</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 HTTP
+  'https://example.com/tests/dom/base/test/bug704320.sjs?action=create-1st-level-iframe&scheme-from=https&scheme-to=http&policy=no-referrer-when-downgrade',
+  'https://example.com/tests/dom/base/test/bug704320.sjs?action=create-1st-level-iframe&scheme-from=https&scheme-to=http&policy=no-referrer',
+  'https://example.com/tests/dom/base/test/bug704320.sjs?action=create-1st-level-iframe&scheme-from=https&scheme-to=http&policy=unsafe-url',
+  'https://example.com/tests/dom/base/test/bug704320.sjs?action=create-1st-level-iframe&scheme-from=https&scheme-to=http&policy=origin',
+  'https://example.com/tests/dom/base/test/bug704320.sjs?action=create-1st-level-iframe&scheme-from=https&scheme-to=http&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 HTTP</a>
+<p id="display"></p>
+<pre id="content">
+</pre>
+  <iframe id="testframe"></iframe>
+
+</body>
+</html>
+
new file mode 100644
--- /dev/null
+++ b/dom/base/test/test_bug704320_https_https.html
@@ -0,0 +1,62 @@
+<!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>
+