Bug 934062 - Add waitForExplicitFinish to stop intermittent CSP test errors. r=sstamm, a=test-only
authorGarrett Robinson <grobinson@mozilla.com>
Mon, 11 Nov 2013 14:20:16 -0800
changeset 167448 ba2c8a25709286762bfe77dceab8d37321b3aa9c
parent 167447 2a3c20049190caf7151ef68283a9d80f9ac9761f
child 167449 1e9034137b68846d46dd44248b855b17c487e6dd
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssstamm, test-only
bugs934062
milestone27.0a2
Bug 934062 - Add waitForExplicitFinish to stop intermittent CSP test errors. r=sstamm, a=test-only
content/base/test/csp/test_policyuri_regression_from_multipolicy.html
--- a/content/base/test/csp/test_policyuri_regression_from_multipolicy.html
+++ b/content/base/test/csp/test_policyuri_regression_from_multipolicy.html
@@ -10,20 +10,22 @@
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <iframe style="width:200px;height:200px;" id='testframe'></iframe>
 <script class="testbody" type="text/javascript">
 SpecialPowers.pushPrefEnv(
   {'set':[["security.csp.speccompliant", true]]},
   function() {
+    SimpleTest.waitForExplicitFinish();
     var testframe = document.getElementById('testframe');
     testframe.src = 'file_policyuri_regression_from_multipolicy.html';
     testframe.addEventListener('load', function checkInlineScriptExecuted () {
       is(this.contentDocument.getElementById('testdiv').innerHTML,
          'Inline Script Executed',
          'Inline script should execute (it would be blocked by the policy, but the policy is report-only)');
+      SimpleTest.finish();
     });
   }
 );
 </script>
 </body>
 </html>