Bug 762454 - File filtering @ operator doesn't search for functions; r=past a=akeybl
authorVictor Porof <vporof@mozilla.com>
Fri, 08 Jun 2012 12:14:33 +0300
changeset 98084 b1094da581a6e55720941c5ad20480e28219b9c5
parent 98083 7eb0c6f9937b7ca51a1203143197bf23d3f0b4e8
child 98085 6a51d098fc1fcdbf099042c83f11c3b636fcdc1e
push id1485
push userpastithas@mozilla.com
push dateTue, 12 Jun 2012 11:42:41 +0000
treeherdermozilla-aurora@210f12d591a7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspast, akeybl
bugs762454
milestone15.0a2
Bug 762454 - File filtering @ operator doesn't search for functions; r=past a=akeybl
browser/devtools/debugger/debugger-view.js
browser/devtools/debugger/test/browser_dbg_scripts-searching-01.js
browser/devtools/debugger/test/browser_dbg_scripts-searching-02.js
--- a/browser/devtools/debugger/debugger-view.js
+++ b/browser/devtools/debugger/debugger-view.js
@@ -376,17 +376,17 @@ ScriptsView.prototype = {
    */
   _onScriptsSearch: function DVS__onScriptsSearch(e) {
     let editor = DebuggerView.editor;
     let scripts = this._scripts;
     let rawValue = this._searchbox.value.toLowerCase();
 
     let rawLength = rawValue.length;
     let lastColon = rawValue.lastIndexOf(":");
-    let lastAt = rawValue.lastIndexOf("@");
+    let lastAt = rawValue.lastIndexOf("#");
 
     let fileEnd = lastColon != -1 ? lastColon : lastAt != -1 ? lastAt : rawLength;
     let lineEnd = lastAt != -1 ? lastAt : rawLength;
 
     let file = rawValue.slice(0, fileEnd);
     let line = window.parseInt(rawValue.slice(fileEnd + 1, lineEnd)) || -1;
     let token = rawValue.slice(lineEnd + 1);
 
--- a/browser/devtools/debugger/test/browser_dbg_scripts-searching-01.js
+++ b/browser/devtools/debugger/test/browser_dbg_scripts-searching-01.js
@@ -51,17 +51,17 @@ function testScriptSearching() {
     gSearchBox = gScripts._searchbox;
     gMenulist = gScripts._scripts;
 
     write(":12");
     ok(gEditor.getCaretPosition().line == 11 &&
        gEditor.getCaretPosition().col == 0,
       "The editor didn't jump to the correct line.");
 
-    write("@debugger");
+    write("#debugger");
     ok(gEditor.getCaretPosition().line == 2 &&
        gEditor.getCaretPosition().col == 44,
       "The editor didn't jump to the correct token. (1)");
 
     EventUtils.sendKey("RETURN");
     ok(gEditor.getCaretPosition().line == 8 &&
        gEditor.getCaretPosition().col == 2,
       "The editor didn't jump to the correct token. (2)");
@@ -77,59 +77,59 @@ function testScriptSearching() {
       "The editor didn't jump to the correct token. (4)");
 
     EventUtils.sendKey("RETURN");
     ok(gEditor.getCaretPosition().line == 2 &&
        gEditor.getCaretPosition().col == 44,
       "The editor didn't jump to the correct token. (5)");
 
 
-    write(":bogus@debugger;");
+    write(":bogus#debugger;");
     ok(gEditor.getCaretPosition().line == 8 &&
        gEditor.getCaretPosition().col == 2,
       "The editor didn't jump to the correct token. (7)");
 
-    write(":13@debugger;");
+    write(":13#debugger;");
     ok(gEditor.getCaretPosition().line == 8 &&
        gEditor.getCaretPosition().col == 2,
       "The editor didn't jump to the correct token. (7)");
 
-    write(":@debugger;");
+    write(":#debugger;");
     ok(gEditor.getCaretPosition().line == 8 &&
        gEditor.getCaretPosition().col == 2,
       "The editor didn't jump to the correct token. (8)");
 
-    write("::@debugger;");
+    write("::#debugger;");
     ok(gEditor.getCaretPosition().line == 8 &&
        gEditor.getCaretPosition().col == 2,
       "The editor didn't jump to the correct token. (9)");
 
-    write(":::@debugger;");
+    write(":::#debugger;");
     ok(gEditor.getCaretPosition().line == 8 &&
        gEditor.getCaretPosition().col == 2,
       "The editor didn't jump to the correct token. (10)");
 
 
     write(":i am not a number");
     ok(gEditor.getCaretPosition().line == 8 &&
        gEditor.getCaretPosition().col == 2,
       "The editor didn't remain at the correct token. (11)");
 
-    write("@__i do not exist__");
+    write("#__i do not exist__");
     ok(gEditor.getCaretPosition().line == 8 &&
        gEditor.getCaretPosition().col == 2,
       "The editor didn't remain at the correct token. (12)");
 
 
     write(":1:2:3:a:b:c:::12");
     ok(gEditor.getCaretPosition().line == 11 &&
        gEditor.getCaretPosition().col == 0,
       "The editor didn't jump to the correct line. (13)");
 
-    write("@don't@find@me@instead@find@debugger");
+    write("#don't#find#me#instead#find#debugger");
     ok(gEditor.getCaretPosition().line == 2 &&
        gEditor.getCaretPosition().col == 44,
       "The editor didn't jump to the correct token. (14)");
 
     EventUtils.sendKey("RETURN");
     ok(gEditor.getCaretPosition().line == 8 &&
        gEditor.getCaretPosition().col == 2,
       "The editor didn't jump to the correct token. (15)");
--- a/browser/devtools/debugger/test/browser_dbg_scripts-searching-02.js
+++ b/browser/devtools/debugger/test/browser_dbg_scripts-searching-02.js
@@ -100,17 +100,17 @@ function secondSearch() {
           "The editor didn't jump to the correct line. (2)");
         is(gScripts.visibleItemsCount, 1,
           "Not all the correct scripts are shown after the search. (2)");
 
         finalCheck();
       });
     }
   });
-  write(".*-02\.js@debugger;");
+  write(".*-02\.js#debugger;");
 }
 
 function finalCheck() {
   clear();
   ok(gEditor.getCaretPosition().line == 5 &&
      gEditor.getCaretPosition().col == 8,
     "The editor didn't remain at the correct token. (3)");
   is(gScripts.visibleItemsCount, 2,