Bug 760082 - Move the last checkForm test so it comes before SimpleTest.finish(). Use info() for log messages that aren't tests. r=mounir
authorMats Palmgren <matspal@gmail.com>
Fri, 01 Jun 2012 20:52:37 +0200
changeset 95558 ac3642f73f24f939c9481d3b321026eb88dc4b14
parent 95557 1b230e42358e1f1b5d11efcb5f7e0e0e4e00833e
child 95559 defd9a933da51e3f3d6525561b04e8e02b9d4de6
push id22819
push usereakhgari@mozilla.com
push dateSat, 02 Jun 2012 18:40:08 +0000
treeherdermozilla-central@f4a7c1a1f514 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmounir
bugs760082
milestone15.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 760082 - Move the last checkForm test so it comes before SimpleTest.finish(). Use info() for log messages that aren't tests. r=mounir
toolkit/components/satchel/test/test_form_autocomplete_with_list.html
--- a/toolkit/components/satchel/test/test_form_autocomplete_with_list.html
+++ b/toolkit/components/satchel/test/test_form_autocomplete_with_list.html
@@ -86,17 +86,17 @@ function nextTest(aTestNum) {
 * This is a bit hacky, because the events are either being sent or
 * processed asynchronously, so we need to interrupt our flow with lots of
 * setTimeout() calls. The case statements are executed in order, one per
 * timeout.
 */
 function runTest(testNum) {
     // Seems we need to enable this again, or sendKeyEvent() complaints.
     netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
-    ok(true, "Starting test #" + testNum);
+    info("Starting test #" + testNum);
 
     switch(testNum) {
     case 1:
         // Make sure initial form is empty.
         checkForm("");
         // Trigger autocomplete popup
         restoreForm();
         doKey("down");
@@ -395,23 +395,23 @@ function runTest(testNum) {
 
     case 400:
       // Check that the input event is fired.
       input.addEventListener("input", function(event) {
         input.removeEventListener("input", arguments.callee, false);
         ok(true, "oninput should have been received");
         ok(event.bubbles, "input event should bubble");
         ok(event.cancelable, "input event should be cancelable");
+        checkForm("Google");
         SimpleTest.finish();
       }, false);
 
       doKey("down");
       checkForm("");
       doKey("return");
-      checkForm("Google");
       return;
 
     default:
         ok(false, "Unexpected invocation of test #" + testNum);
         SimpleTest.finish();
         return;
     }