diff -r ec628289d8b4 devtools/client/debugger/test/mochitest/browser_dbg_watch-expressions-02.js
--- a/devtools/client/debugger/test/mochitest/browser_dbg_watch-expressions-02.js	Fri Nov 20 13:13:07 2015 +0100
+++ b/devtools/client/debugger/test/mochitest/browser_dbg_watch-expressions-02.js	Tue Nov 24 01:24:42 2015 +0200
@@ -34,6 +34,12 @@
   });
 
   function addExpressions() {
+    // https://bugzilla.mozilla.org/show_bug.cgi?id=1205353
+    // BZ#1205353 - wrong result for string replace with backslash-dollar.
+    gWatch.addExpression("'$$$'.replace(/\\$/, 'foo')");
+    // gWatch.addExpression("'$$$'.replace(/\\$/, 'foo')");
+    // gWatch.addExpression("'$$$'.replace(/\\\\$/, 'foo')");
+    // gWatch.addExpression("'fff'.replace(/f/, 'foo')");
     gWatch.addExpression("'a'");
     gWatch.addExpression("\"a\"");
     gWatch.addExpression("'a\"\"'");
@@ -61,6 +67,8 @@
     gWatch.addExpression("throw new Error(\"bazinga\")");
     gWatch.addExpression("({ get error() { throw new Error(\"bazinga\") } }).error");
     gWatch.addExpression("throw { get name() { throw \"bazinga\" } }");
+
+    // info("getAllStrings() == ««" + gWatch.getAllStrings().join('<foo>') + "»»");
   }
 
   function performTest() {
@@ -68,8 +76,8 @@
 
     is(gDebugger.document.querySelectorAll(".dbg-expression[hidden=true]").length, 0,
       "There should be 0 hidden nodes in the watch expressions container");
-    is(gDebugger.document.querySelectorAll(".dbg-expression:not([hidden=true])").length, 27,
-      "There should be 27 visible nodes in the watch expressions container");
+    is(gDebugger.document.querySelectorAll(".dbg-expression:not([hidden=true])").length, 28,
+      "There should be 28 visible nodes in the watch expressions container");
 
     test1(function() {
       test2(function() {
@@ -97,13 +105,13 @@
   function finishTest() {
     is(gDebugger.document.querySelectorAll(".dbg-expression[hidden=true]").length, 0,
       "There should be 0 hidden nodes in the watch expressions container");
-    is(gDebugger.document.querySelectorAll(".dbg-expression:not([hidden=true])").length, 27,
-      "There should be 27 visible nodes in the watch expressions container");
+    is(gDebugger.document.querySelectorAll(".dbg-expression:not([hidden=true])").length, 28,
+      "There should be 28 visible nodes in the watch expressions container");
   }
 
   function test1(aCallback) {
     gDebugger.once(gDebugger.EVENTS.FETCHED_WATCH_EXPRESSIONS, () => {
-      checkWatchExpressions(26, {
+      checkWatchExpressions(27, {
         a: "ReferenceError: a is not defined",
         this: { type: "object", class: "Object" },
         prop: { type: "object", class: "String" },
@@ -117,7 +125,7 @@
 
   function test2(aCallback) {
     gDebugger.once(gDebugger.EVENTS.FETCHED_WATCH_EXPRESSIONS, () => {
-      checkWatchExpressions(26, {
+      checkWatchExpressions(27, {
         a: { type: "undefined" },
         this: { type: "object", class: "Window" },
         prop: { type: "undefined" },
@@ -133,7 +141,7 @@
 
   function test3(aCallback) {
     gDebugger.once(gDebugger.EVENTS.FETCHED_WATCH_EXPRESSIONS, () => {
-      checkWatchExpressions(26, {
+      checkWatchExpressions(27, {
         a: { type: "object", class: "Object" },
         this: { type: "object", class: "Window" },
         prop: { type: "undefined" },
@@ -149,7 +157,7 @@
 
   function test4(aCallback) {
     gDebugger.once(gDebugger.EVENTS.FETCHED_WATCH_EXPRESSIONS, () => {
-      checkWatchExpressions(27, {
+      checkWatchExpressions(28, {
         a: 5,
         this: { type: "object", class: "Window" },
         prop: { type: "undefined" },
@@ -164,7 +172,7 @@
 
   function test5(aCallback) {
     gDebugger.once(gDebugger.EVENTS.FETCHED_WATCH_EXPRESSIONS, () => {
-      checkWatchExpressions(27, {
+      checkWatchExpressions(28, {
         a: 5,
         this: { type: "object", class: "Window" },
         prop: { type: "undefined" },
@@ -179,7 +187,7 @@
 
   function test6(aCallback) {
     gDebugger.once(gDebugger.EVENTS.FETCHED_WATCH_EXPRESSIONS, () => {
-      checkWatchExpressions(27, {
+      checkWatchExpressions(28, {
         a: 5,
         this: { type: "object", class: "Window" },
         prop: { type: "undefined" },
@@ -194,7 +202,7 @@
 
   function test7(aCallback) {
     gDebugger.once(gDebugger.EVENTS.FETCHED_WATCH_EXPRESSIONS, () => {
-      checkWatchExpressions(27, {
+      checkWatchExpressions(28, {
         a: 5,
         this: { type: "object", class: "Window" },
         prop: { type: "undefined" },
@@ -209,7 +217,7 @@
 
   function test8(aCallback) {
     gDebugger.once(gDebugger.EVENTS.FETCHED_WATCH_EXPRESSIONS, () => {
-      checkWatchExpressions(27, {
+      checkWatchExpressions(28, {
         a: 5,
         this: { type: "object", class: "Window" },
         prop: { type: "undefined" },
@@ -278,6 +286,7 @@
     let w25 = scope.get("throw new Error(\"bazinga\")");
     let w26 = scope.get("({ get error() { throw new Error(\"bazinga\") } }).error");
     let w27 = scope.get("throw { get name() { throw \"bazinga\" } }");
+    let w28 = scope.get("'$$$'.replace(/\\$/, 'foo')");
 
     ok(w1, "The first watch expression should be present in the scope.");
     ok(w2, "The second watch expression should be present in the scope.");
@@ -306,6 +315,7 @@
     ok(w25, "The 25th watch expression should be present in the scope.");
     ok(w26, "The 26th watch expression should be present in the scope.");
     ok(!w27, "The 27th watch expression should not be present in the scope.");
+    ok(w28, "The 28th watch expression should be present in the scope.");
 
     is(w1.value, "a", "The first value is correct.");
     is(w2.value, "a", "The second value is correct.");
@@ -367,5 +377,6 @@
     is(w24.value, "RangeError: precision -4 out of range", "The 24th value is correct.");
     is(w25.value, "Error: bazinga", "The 25th value is correct.");
     is(w26.value, "Error: bazinga", "The 26th value is correct.");
+    is(w28.value, 'foo$$', "The 28th value is correct.");
   }
 }
