Bug 1092388 - Remove cross-origin document.write test. r=bz, a=lsblakk
authorBobby Holley <bobbyholley@gmail.com>
Thu, 13 Nov 2014 11:13:36 -0800
changeset 235224 f0e0ea2e07343976fa9c97631904129d0566982c
parent 235223 d099a38d5ce9dc4dfefd61b05af0c9f28586d13a
child 235225 0671ae35933f2b8916ce702f33355bef4df9536e
push id611
push userraliiev@mozilla.com
push dateMon, 05 Jan 2015 23:23:16 +0000
treeherdermozilla-release@345cd3b9c445 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz, lsblakk
bugs1092388
milestone35.0a2
Bug 1092388 - Remove cross-origin document.write test. r=bz, a=lsblakk This test is pretty bogus. It uses enablePrivilege and then tries to test various document.write behaviors across origins. This test in general is pretty terrible. I spent a while trying to improve it, got frustrated, was tempted to remove the whole thing, and then finally settled on this as the path of least resistance.
dom/tests/mochitest/bugs/test_bug346659.html
--- a/dom/tests/mochitest/bugs/test_bug346659.html
+++ b/dom/tests/mochitest/bugs/test_bug346659.html
@@ -16,17 +16,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 </div>
 <pre id="test">
 <script type="application/javascript">
 
 /** Test for Bug 346659 **/
 // do the tests in two batches, because otherwise the popup blocker kills off
 // our test because it opens too many windows.
 var numTestsSet1 = 6;
-var numTestsSet2 = 4;
+var numTestsSet2 = 2;
 var numTestsSet3 = 2;
 var complete = 0;
 SimpleTest.waitForExplicitFinish();
 
 var wins = [];
 
 function r(base, tail) {
   return base.replace(/\/[^\/]*$/, "/" + tail);
@@ -168,19 +168,17 @@ wins[4] = window.open('bug346659-opener.
 wins[5] = window.open('bug346659-parent.html?{"load":5}');
 wins[6] = window.open('bug346659-parent.html?{"write":6}');
 
 is(location.host, "mochi.test:8888", "Unexpected host");
 
 function startSecondBatch() {
   var baseurl = window.location.href.replace(/mochi\.test:8888/, "example.com");
   wins[7] = window.open(r(baseurl, 'bug346659-opener.html?{"load":7}'));
-  wins[8] = window.open(r(baseurl, 'bug346659-opener.html?{"write":8}'));
   wins[9] = window.open(r(baseurl, 'bug346659-parent.html?{"load":9}'));
-  wins[10] = window.open(r(baseurl, 'bug346659-parent.html?{"write":10}'));
 }
 
 function startThirdBatch() {
   var baseurl = window.location.href.replace(/mochi\.test:8888/, "example.com");
   wins[11] = window.open(r(baseurl, 'bug346659-opener.html?{"load":11,"xsite":true}'));
   wins[12] = window.open(r(baseurl, 'bug346659-parent.html?{"load":12,"xsite":true}'));
 }
 </script>