Bug 992270 - ignoreAllUncaughtExceptions in the about:home test of browser_google_behavior.js. r=gavin, a=test-only
authorMatthew Noorenberghe <mozilla@noorenberghe.ca>
Thu, 10 Apr 2014 21:54:30 -0400
changeset 183701 0e107cfcd3fdd70b936bc217bb2af63d1938c281
parent 183700 b1e9827af66f5d3ac892c523702c38d151d0557e
child 183702 f91bdb05883bc2db23e76ea61c79b91759de895c
push id3452
push userryanvm@gmail.com
push dateFri, 11 Apr 2014 12:53:53 +0000
treeherdermozilla-beta@f91bdb05883b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgavin, test-only
bugs992270
milestone29.0
Bug 992270 - ignoreAllUncaughtExceptions in the about:home test of browser_google_behavior.js. r=gavin, a=test-only
browser/components/search/test/browser_google_behavior.js
--- a/browser/components/search/test/browser_google_behavior.js
+++ b/browser/components/search/test/browser_google_behavior.js
@@ -105,16 +105,19 @@ function test() {
         });
         EventUtils.synthesizeKey("VK_RETURN", {});
       }
     },
     {
       name: "home page search",
       searchURL: base + "&channel=np&source=hp",
       run: function () {
+        // Bug 992270: Ignore uncaught about:home exceptions (related to snippets from IndexedDB)
+        ignoreAllUncaughtExceptions(true);
+
         // load about:home, but remove the listener first so it doesn't
         // get in the way
         gBrowser.removeProgressListener(listener);
         gBrowser.loadURI("about:home");
         info("Waiting for about:home load");
         tab.linkedBrowser.addEventListener("load", function load(event) {
           if (event.originalTarget != tab.linkedBrowser.contentDocument ||
               event.target.location.href == "about:blank") {
@@ -137,16 +140,19 @@ function test() {
           });
           mutationObserver.observe(doc.documentElement, { attributes: true });
         }, true);
       }
     }
   ];
 
   function nextTest() {
+    // Make sure we listen again for uncaught exceptions in the next test or cleanup.
+    ignoreAllUncaughtExceptions(false);
+
     if (gTests.length) {
       gCurrTest = gTests.shift();
       info("Running : " + gCurrTest.name);
       executeSoon(gCurrTest.run);
     } else {
       finish();
     }
   }