Bug 1453396 - Tests splitted into two to fix intermittent test timed out. r=ckerschb, a=test-only
authorVinothkumar Nagasayanan <cegvinoth@gmail.com>
Fri, 25 May 2018 16:20:32 +0300
changeset 473473 f94fff29d17cf53aa1390df917de4f5e428a1a3f
parent 473472 0d07a98841eb42aa31e19c8d6a8cac0e2a9adbd7
child 473474 84df66c7e5457a1e93b9b92a9f1987494c0148bb
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersckerschb, test-only
bugs1453396
milestone61.0
Bug 1453396 - Tests splitted into two to fix intermittent test timed out. r=ckerschb, a=test-only
dom/base/test/mochitest.ini
dom/base/test/test_bug704320-1.html
dom/base/test/test_bug704320-2.html
dom/base/test/test_bug704320.html
--- a/dom/base/test/mochitest.ini
+++ b/dom/base/test/mochitest.ini
@@ -516,17 +516,18 @@ skip-if = toolkit == 'android' #bug 6870
 [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-1.html]
+[test_bug704320-2.html]
 [test_bug704320_policyset.html]
 [test_bug704320_policyset2.html]
 [test_bug704320_preload.html]
 [test_bug707142.html]
 [test_bug708620.html]
 [test_bug711047.html]
 [test_bug711180.html]
 [test_bug719533.html]
rename from dom/base/test/test_bug704320.html
rename to dom/base/test/test_bug704320-1.html
--- a/dom/base/test/test_bug704320.html
+++ b/dom/base/test/test_bug704320-1.html
@@ -1,16 +1,17 @@
 <!DOCTYPE HTML>
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=704320
+This Test is split into two for Bug 1453396
 -->
 <head>
   <meta charset="utf-8">
-  <title>Test for Bug 704320</title>
+  <title>Test for Bug 704320-Part1</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">
 
 //generates URLs to test
 var generateURLArray = (function(from, to){
@@ -25,32 +26,29 @@ var generateURLArray = (function(from, t
     from + baseURL + from + schemeTo + to + '&policy=origin-when-cross-origin',
     from + baseURL + from + schemeTo + to + '&policy=same-origin',
     from + baseURL + from + schemeTo + to + '&policy=strict-origin',
     from + baseURL + from + schemeTo + to + '&policy=strict-origin-when-cross-origin',
   ];
 });
 
 let testIframeUrls = [generateURLArray('http', 'http'),
-                      generateURLArray('https', 'https'),
-                      generateURLArray('http', 'https'),
-                      generateURLArray('https', 'http')];
+                      generateURLArray('https', 'https')];
 
 SimpleTest.waitForExplicitFinish();
 let advance = function(testName) {
   testsGenerator[testName].next();
 };
 
-let testNames = ['testframeone', 'testframetwo', 'testframethree',
-                 'testframefour'];
+let testNames = ['testframeone', 'testframetwo'];
 let isTestFinished = 0;
 
 function checkTestsCompleted() {
   isTestFinished++;
-  if (isTestFinished == 4) {
+  if (isTestFinished == 2) {
     SimpleTest.finish();
   }
 }
 let testsGenerator = {};
 SimpleTest.requestLongerTimeout(4);
 /**
  * This is the main test routine -- serialized by use of a generator.
  * It performs all tests in sequence using four iframes.
@@ -77,20 +75,16 @@ function startTests(testName, testIframe
 for (i = 0; i < testIframeUrls.length; i++) {
   startTests(testNames[i], testIframeUrls[i]);
 }
 
 </script>
 </head>
 
 <body onload="testsGenerator[testNames[0]].next();
-              testsGenerator[testNames[1]].next();
-              testsGenerator[testNames[2]].next();
-              testsGenerator[testNames[3]].next();">
+              testsGenerator[testNames[1]].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="testframeone"></iframe>
   <iframe id="testframetwo"></iframe>
-  <iframe id="testframethree"></iframe>
-  <iframe id="testframefour"></iframe>
 </body>
copy from dom/base/test/test_bug704320.html
copy to dom/base/test/test_bug704320-2.html
--- a/dom/base/test/test_bug704320.html
+++ b/dom/base/test/test_bug704320-2.html
@@ -1,16 +1,17 @@
 <!DOCTYPE HTML>
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=704320
+This Test is split into two for Bug 1453396
 -->
 <head>
   <meta charset="utf-8">
-  <title>Test for Bug 704320</title>
+  <title>Test for Bug 704320-Part2</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">
 
 //generates URLs to test
 var generateURLArray = (function(from, to){
@@ -24,33 +25,30 @@ var generateURLArray = (function(from, t
     from + baseURL + from + schemeTo + to + '&policy=origin',
     from + baseURL + from + schemeTo + to + '&policy=origin-when-cross-origin',
     from + baseURL + from + schemeTo + to + '&policy=same-origin',
     from + baseURL + from + schemeTo + to + '&policy=strict-origin',
     from + baseURL + from + schemeTo + to + '&policy=strict-origin-when-cross-origin',
   ];
 });
 
-let testIframeUrls = [generateURLArray('http', 'http'),
-                      generateURLArray('https', 'https'),
-                      generateURLArray('http', 'https'),
+let testIframeUrls = [generateURLArray('http', 'https'),
                       generateURLArray('https', 'http')];
 
 SimpleTest.waitForExplicitFinish();
 let advance = function(testName) {
   testsGenerator[testName].next();
 };
 
-let testNames = ['testframeone', 'testframetwo', 'testframethree',
-                 'testframefour'];
+let testNames = ['testframeone', 'testframetwo'];
 let isTestFinished = 0;
 
 function checkTestsCompleted() {
   isTestFinished++;
-  if (isTestFinished == 4) {
+  if (isTestFinished == 2) {
     SimpleTest.finish();
   }
 }
 let testsGenerator = {};
 SimpleTest.requestLongerTimeout(4);
 /**
  * This is the main test routine -- serialized by use of a generator.
  * It performs all tests in sequence using four iframes.
@@ -77,20 +75,16 @@ function startTests(testName, testIframe
 for (i = 0; i < testIframeUrls.length; i++) {
   startTests(testNames[i], testIframeUrls[i]);
 }
 
 </script>
 </head>
 
 <body onload="testsGenerator[testNames[0]].next();
-              testsGenerator[testNames[1]].next();
-              testsGenerator[testNames[2]].next();
-              testsGenerator[testNames[3]].next();">
+              testsGenerator[testNames[1]].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="testframeone"></iframe>
   <iframe id="testframetwo"></iframe>
-  <iframe id="testframethree"></iframe>
-  <iframe id="testframefour"></iframe>
 </body>