Bug 1102042 - Fix the test to not have a race between the binding and the test bits. r=terrence, a=test-only
authorBoris Zbarsky <bzbarsky@mit.edu>
Fri, 06 Mar 2015 16:33:30 -0500
changeset 250344 aa133901be39
parent 250343 803ed9fc9507
child 250345 e41d9d701e13
push id4555
push userryanvm@gmail.com
push date2015-03-11 19:14 +0000
treeherdermozilla-beta@7949e470a547 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersterrence, test-only
bugs1102042
milestone37.0
Bug 1102042 - Fix the test to not have a race between the binding and the test bits. r=terrence, a=test-only
dom/xbl/test/test_bug1098628_throw_from_construct.xhtml
--- a/dom/xbl/test/test_bug1098628_throw_from_construct.xhtml
+++ b/dom/xbl/test/test_bug1098628_throw_from_construct.xhtml
@@ -1,16 +1,28 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=1098628
 -->
 <head>
   <title>Test for Bug 1098628</title>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+  <script class="testbody" type="text/javascript">
+  <![CDATA[
+
+  /** Test for Bug 1098628 **/
+  SimpleTest.waitForExplicitFinish();
+  SimpleTest.expectUncaughtException();
+  SimpleTest.monitorConsole(SimpleTest.finish, [{errorMessage: new RegExp('flimfniffle')}]);
+  addLoadEvent(function() {
+    SimpleTest.executeSoon(SimpleTest.endMonitorConsole);
+  });
+  ]]>
+  </script>
   <bindings xmlns="http://www.mozilla.org/xbl">
     <binding id="test">
       <implementation>
         <constructor><![CDATA[
           throw "flimfniffle";
         ]]></constructor>
       </implementation>
     </binding>
@@ -18,24 +30,12 @@ https://bugzilla.mozilla.org/show_bug.cg
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1098628">Mozilla Bug 1098628</a>
 <p id="display" style="-moz-binding: url(#test)"></p>
 <div id="content" style="display: none">
 
 </div>
 <pre id="test">
-<script class="testbody" type="text/javascript">
-<![CDATA[
-
-/** Test for Bug 1098628 **/
-SimpleTest.waitForExplicitFinish();
-SimpleTest.expectUncaughtException();
-SimpleTest.monitorConsole(SimpleTest.finish, [{errorMessage: new RegExp('flimfniffle')}]);
-addLoadEvent(function() {
-  SimpleTest.executeSoon(SimpleTest.endMonitorConsole);
-});
-]]>
-</script>
 </pre>
 </body>
 </html>