Bug 932854 - Test fixup: Reset the test plugin state only after the UI has finished checking plugin state. r=gfritzsche, a=lsblakk
authorBenjamin Smedberg <benjamin@smedbergs.us>
Tue, 12 Nov 2013 09:45:11 -0500
changeset 161107 76fc8e53c51433cd0f81cdf34e040154c8c8f40c
parent 161106 02d3ec08c22d4523101bbbc809c829744f9fab3e
child 161108 61fc6330e610556085a8a4b5ce68e6c691558a2a
push id3029
push userryanvm@gmail.com
push dateThu, 21 Nov 2013 13:34:16 +0000
treeherdermozilla-beta@cc56c23e6663 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgfritzsche, lsblakk
bugs932854
milestone26.0
Bug 932854 - Test fixup: Reset the test plugin state only after the UI has finished checking plugin state. r=gfritzsche, a=lsblakk
dom/plugins/test/mochitest/test_bug479979.xul
--- a/dom/plugins/test/mochitest/test_bug479979.xul
+++ b/dom/plugins/test/mochitest/test_bug479979.xul
@@ -23,15 +23,18 @@ function runTests() {
   try {
     rv = pluginElement1.setUndefinedValueTest();
   } catch (e) {
     exceptionThrown = true;
   }
   is(exceptionThrown, false, "Exception thrown setting undefined variable.");
   is(rv, false, "Setting undefined variable succeeded.");
 
-  SimpleTest.finish();
+  // give the UI a chance to settle with the current enabled plugin state
+  // before we finish the test and reset the state to disabled. Otherwise
+  // the UI shows the plugin infobar!
+  SimpleTest.executeSoon(SimpleTest.finish);
 }
 ]]>
 </script>
 <embed id="plugin1" type="application/x-test" width="300" height="300"></embed>
 </body>
 </window>