Bug 890555 - Fix silent bugs in some toolkit/devtools/server xpcshell tests; r=dcamp
authorJim Blandy <jimb>
Wed, 07 Aug 2013 15:44:00 -0700
changeset 142616 acd6f7fec0e1b8c9a06f62d684c837a2e3de502a
parent 142615 5b9c5de825c6cd553512dbb98555f9550a904d78
child 142617 135c0ebda47b350c40e46cbb4684e6208f1afa90
push id32454
push usergszorc@mozilla.com
push dateWed, 14 Aug 2013 16:47:01 +0000
treeherdermozilla-inbound@135c0ebda47b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdcamp
bugs890555
milestone26.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 890555 - Fix silent bugs in some toolkit/devtools/server xpcshell tests; r=dcamp
toolkit/devtools/server/tests/unit/test_blackboxing-04.js
toolkit/devtools/server/tests/unit/test_blackboxing-05.js
toolkit/devtools/server/tests/unit/test_stepping-06.js
--- a/toolkit/devtools/server/tests/unit/test_blackboxing-04.js
+++ b/toolkit/devtools/server/tests/unit/test_blackboxing-04.js
@@ -48,17 +48,17 @@ function test_black_box()
     BLACK_BOXED_URL,
     1
   );
 
   Components.utils.evalInSandbox(
     "" + function runTest() { // line 1
       doStuff(                // line 2
         function (n) {        // line 3
-          n;                  // line 4
+          return n;           // line 4
         }                     // line 5
       );                      // line 6
     }                         // line 7
     + "\n runTest();",        // line 8
     gDebuggee,
     "1.8",
     SOURCE_URL,
     1
--- a/toolkit/devtools/server/tests/unit/test_blackboxing-05.js
+++ b/toolkit/devtools/server/tests/unit/test_blackboxing-05.js
@@ -42,25 +42,25 @@ function test_black_box()
     },                                                           // line 4
     gDebuggee,
     "1.8",
     BLACK_BOXED_URL,
     1
   );
 
   Components.utils.evalInSandbox(
-    "" + function runTest() { // line 1
-      doStuff(                // line 2
-        function (n) {        // line 3
-          debugger;           // line 4
-        }                     // line 5
-      );                      // line 6
-    }                         // line 7
-    + "\ndebugger;\n"         // line 8
-    + "runTest()",            // line 9
+    "" + function runTest() {                   // line 1
+      doStuff(                                  // line 2
+        function (n) {                          // line 3
+          debugger;                             // line 4
+        }                                       // line 5
+      );                                        // line 6
+    }                                           // line 7
+    + "\ndebugger;\n"                           // line 8
+    + "try { runTest() } catch (ex) { }",       // line 9
     gDebuggee,
     "1.8",
     SOURCE_URL,
     1
   );
 }
 
 function test_black_box_exception() {
--- a/toolkit/devtools/server/tests/unit/test_stepping-06.js
+++ b/toolkit/devtools/server/tests/unit/test_stepping-06.js
@@ -66,25 +66,25 @@ function test_simple_stepping()
       });
       gThreadClient.resume();
     });
     gThreadClient.stepOut();
 
   });
 
   gDebuggee.eval("var line0 = Error().lineNumber;\n" +
-                 "function f() {\n" + // line0 + 1
-                 "  debugger;\n" +    // line0 + 2
-                 "  var a = 10;\n" +  // line0 + 3
-                 "  return a;\n" +    // line0 + 4
-                 "}\n" +              // line0 + 5
-                 "function g() {\n" + // line0 + 6
-                 "  debugger;\n" +    // line0 + 7
-                 "}\n" +              // line0 + 8
-                 "function h() {\n" + // line0 + 9
-                 "  debugger;\n" +    // line0 + 10
-                 "  throw 'ah';\n" +  // line0 + 11
-                 "  return 2;\n" +    // line0 + 12
-                 "}\n" +              // line0 + 13
-                 "f();\n" +           // line0 + 14
-                 "g();\n" +           // line0 + 15
-                 "h();\n");           // line0 + 16
+                 "function f() {\n" +                   // line0 + 1
+                 "  debugger;\n" +                      // line0 + 2
+                 "  var a = 10;\n" +                    // line0 + 3
+                 "  return a;\n" +                      // line0 + 4
+                 "}\n" +                                // line0 + 5
+                 "function g() {\n" +                   // line0 + 6
+                 "  debugger;\n" +                      // line0 + 7
+                 "}\n" +                                // line0 + 8
+                 "function h() {\n" +                   // line0 + 9
+                 "  debugger;\n" +                      // line0 + 10
+                 "  throw 'ah';\n" +                    // line0 + 11
+                 "  return 2;\n" +                      // line0 + 12
+                 "}\n" +                                // line0 + 13
+                 "f();\n" +                             // line0 + 14
+                 "g();\n" +                             // line0 + 15
+                 "try { h() } catch (ex) { };\n");      // line0 + 16
 }