Bug 762454 - File filtering @ operator doesn't search for functions; r=past
authorVictor Porof <vporof@mozilla.com>
Fri, 08 Jun 2012 12:14:33 +0300
changeset 95968 b1338c3c89b23a5448e76f669860874e0af79e4d
parent 95967 7305a888bb307675a523c79018bbf8ed4a2c02e9
child 96188 2f324831c02d88768f0d49a39d7c381704dfb4d4
push id840
push userpastithas@mozilla.com
push dateFri, 08 Jun 2012 13:09:05 +0000
treeherderfx-team@b1338c3c89b2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspast
bugs762454
milestone16.0a1
Bug 762454 - File filtering @ operator doesn't search for functions; r=past
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
@@ -401,17 +401,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,