b=716031 and probably 752808 and 759254; fix test_selection_move_commands by driving RefreshDriver directly; r=ehsan
authorVladimir Vukicevic <vladimir@pobox.com>
Tue, 02 Oct 2012 14:41:04 -0400
changeset 109396 e28ab3e5e961333b88f978ceffd7f27c360d19ca
parent 109395 cf7a9685b8d8c6db111dfff3a375fd5034f7c594
child 109397 4e4f65c5f43b893ea1e097760496d0e609758985
push id23630
push useremorley@mozilla.com
push dateSat, 06 Oct 2012 19:35:27 +0000
treeherdermozilla-central@9f677c2bb33d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs716031, 752808, 759254
milestone18.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
b=716031 and probably 752808 and 759254; fix test_selection_move_commands by driving RefreshDriver directly; r=ehsan
editor/libeditor/base/tests/test_selection_move_commands.xul
--- a/editor/libeditor/base/tests/test_selection_move_commands.xul
+++ b/editor/libeditor/base/tests/test_selection_move_commands.xul
@@ -8,21 +8,27 @@
 
 <script class="testbody" type="application/javascript">
 <![CDATA[
 
 var prefs = Components.classes["@mozilla.org/preferences-service;1"]
                       .getService(Components.interfaces.nsIPrefBranch);
 prefs.setBoolPref("general.smoothScroll", false);
 
+var winUtils = SpecialPowers.getDOMWindowUtils(window);
+winUtils.advanceTimeAndRefresh(100);
+
 function runTest() {
   var tests = execTests();
   function execNext() {
     try {
+      winUtils.advanceTimeAndRefresh(100);
       tests.next();
+      
+      winUtils.advanceTimeAndRefresh(100);
       setTimeout(execNext, 20);
     } catch (e) {}
   }
   execNext();
 }
 
 function execTests() {
   var e = document.getElementById("edit");
@@ -195,16 +201,17 @@ function execTests() {
     runSelectionTests(body, 1);
     prefs.setBoolPref("layout.word_select.eat_space_to_next_word", true);
     runSelectionTests(node(2), 0);
   } finally {
     prefs.clearUserPref("general.smoothScroll");
     prefs.clearUserPref("layout.word_select.eat_space_to_next_word");
   }
 
+  winUtils.restoreNormalRefresh();
   SimpleTest.finish();
 }
 
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(runTest);
 ]]>
 </script>