Bug 866764 - Fix mochitest from bug 861605 to work on Android. r=bz
authorAndrea Marchesini <amarchesini@mozilla.com>
Mon, 29 Apr 2013 13:04:47 -0400
changeset 141175 b06a734d735b52e1f073acf0a3edb19c31a36eba
parent 141174 20d62a6629f529508e58e3963a008dd428d4affb
child 141176 dd0c611a0a27f6e0fa5baae72ba4e1573fd64a63
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs866764, 861605
milestone23.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 866764 - Fix mochitest from bug 861605 to work on Android. r=bz
toolkit/components/prompts/test/test_bug861605.html
--- a/toolkit/components/prompts/test/test_bug861605.html
+++ b/toolkit/components/prompts/test/test_bug861605.html
@@ -25,20 +25,23 @@ function hasTabModalPrompts() {
                               .Services;
   return Services.prefs.getPrefType(prefName) == Services.prefs.PREF_BOOL &&
          Services.prefs.getBoolPref(prefName);
 }
 
 function runtest()
 {
   isTabModal = hasTabModalPrompts();
-  if (!isTabModal)
+  if (!isTabModal) {
     todo(false, "Test is run with tab modal prompts disabled.");
-  else
-    ok(true, "Test is run with tab modal prompts enabled.");
+    SimpleTest.finish();
+    return;
+  }
+
+  ok(true, "Test is run with tab modal prompts enabled.");
 
   startCallbackTimer();
 
   try {
     alert();
     ok(true, "alert() without arguments should not throw!");
   } catch(e) {
     ok(false, "alert() without arguments should not throw!");