Bug 811102: bustage fix #3 :(, a=sigh
authorGavin Sharp <gavin@gavinsharp.com>
Mon, 12 Nov 2012 23:28:54 -0800
changeset 116864 0fd81b763e5093357ee21ae4460c7ff81fff501d
parent 116863 dd94d4d674aabbbdbc65888b36e9f648f4ddd60e
child 116865 ba24c11992cbbf80e3d0ec3e924d41d82e7c3dc9
push id1708
push userakeybl@mozilla.com
push dateMon, 19 Nov 2012 21:10:21 +0000
treeherdermozilla-beta@27b14fe50103 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssigh
bugs811102
milestone18.0a2
Bug 811102: bustage fix #3 :(, a=sigh
toolkit/components/social/test/browser/browser_frameworker.js
--- a/toolkit/components/social/test/browser/browser_frameworker.js
+++ b/toolkit/components/social/test/browser/browser_frameworker.js
@@ -507,29 +507,29 @@ let tests = {
     }, 'social:frameworker-error', false);
     worker.port.onmessage = function(e) {
       ok(false, "social:frameworker-error was handled");
       cbnext();
     }
   },
 
   testWorkerConnectError: function(cbnext) {
+    let run = function () {
+      onconnect = function(e) {
+        throw new Error("worker failure");
+      }
+    }
     let worker = getFrameWorkerHandle(makeWorkerUrl(run),
                                       undefined, "testWorkerConnectError");
     Services.obs.addObserver(function handleError() {
       Services.obs.removeObserver(handleError, "social:frameworker-error");
         ok(true, "social:frameworker-error was handled");
         worker.terminate();
         cbnext();
     }, 'social:frameworker-error', false);
-    let run = function () {
-      onconnect = function(e) {
-        throw new Error("worker failure");
-      }
-    }
     worker.port.onmessage = function(e) {
       ok(false, "social:frameworker-error was handled");
       cbnext();
     }
   },
 
   testReloadAndNewPort: function(cbnext) {
     let run = function () {