Bug 685788 - Test for bug 593174 conceals its location after it's done; r=ted,jlebar
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 23 Sep 2011 15:59:22 -0400
changeset 78744 c53b5ca8fde35fdadc01b6baff6e21e720e7eaa3
parent 78743 7226c37145cdf20bb3c1bad26593d5c2b9f28a4f
child 78745 eadc362c79291197357478b4e081b934e37be4a8
push id78
push userclegnitto@mozilla.com
push dateFri, 16 Dec 2011 17:32:24 +0000
treeherdermozilla-release@79d24e644fdd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted, jlebar
bugs685788, 593174
milestone9.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 685788 - Test for bug 593174 conceals its location after it's done; r=ted,jlebar
dom/tests/mochitest/bugs/test_bug593174.html
--- a/dom/tests/mochitest/bugs/test_bug593174.html
+++ b/dom/tests/mochitest/bugs/test_bug593174.html
@@ -13,16 +13,18 @@ https://bugzilla.mozilla.org/show_bug.cg
 
 <script>
 
 SimpleTest.waitForExplicitFinish();
 
 var loadCount = 0;
 var popup = null;
 
+const kOriginalLocation = location.href;
+
 function iframeLoaded(identifier) {
   loadCount++;
   dump("iframeLoaded. loadCount=" + loadCount +
                     " identifier='" + identifier + "'\n");
 
   var iframe = document.getElementById('iframe');
   var iframeCw = iframe.contentWindow;
 
@@ -65,16 +67,17 @@ function iframeLoaded(identifier) {
   }
   else if (loadCount == 5) {
     is(popup.document.referrer, document.location, 'popup referrer after replaceState');
     popup.navigateInnerIframe();
   }
   else if (loadCount == 6) {
     is(popup.getInnerIframeReferrer(), popup.location, 'popup/inner iframe referrer');
     popup.close();
+    history.replaceState('', '', kOriginalLocation);
     SimpleTest.finish();
   }
 }
 
 </script>
 
 <iframe onload='iframeLoaded("outer")' id='iframe' src='file_bug593174_1.html'></iframe>