| Index: LayoutTests/inspector/debugger/scripts-sorting.html
|
| ===================================================================
|
| --- LayoutTests/inspector/debugger/scripts-sorting.html (revision 97058)
|
| +++ LayoutTests/inspector/debugger/scripts-sorting.html (working copy)
|
| @@ -4,34 +4,44 @@
|
| <script src="../../http/tests/inspector/debugger-test.js"></script>
|
|
|
| <script>
|
| -var scripts = [
|
| - "block.js?block=foo",
|
| - "ga.js",
|
| - "lenta.ban?pg=4883&ifr=1",
|
| - "lenta.ban?pg=5309&ifr=1",
|
| - "top100.jcn?80674",
|
| - "_js/production/motor.js?1308927432",
|
| - "i/xgemius.js",
|
| - "i/js/jquery-1.5.1.min.js",
|
| - "i/js/jquery.cookie.js",
|
| - "foo/path/bar.js?file=bar/zzz.js",
|
| - "foo/path/foo.js?file=bar/aaa.js" ];
|
| -
|
| -for (var i = 0; i < scripts.length; ++i)
|
| - window.eval("function func" + i + "() {} //@ sourceURL=http://foo.com/" + scripts[i]);
|
| -
|
| -window.eval("function funcNonURL() {} //@ sourceURL=*Non*URL*path");
|
| -
|
| -</script>
|
| -
|
| -<script>
|
| function test()
|
| {
|
| - var scripts = [];
|
| + // Always use indentation in scripts drop box
|
| + WebInspector._isMac = false;
|
| +
|
| InspectorTest.startDebuggerTest(step1);
|
|
|
| function step1()
|
| {
|
| + var scripts = [
|
| + "block.js?block=foo",
|
| + "ga.js",
|
| + "lenta.ban?pg=4883&ifr=1",
|
| + "lenta.ban?pg=5309&ifr=1",
|
| + "top100.jcn?80674",
|
| + "_js/production/motor.js?1308927432",
|
| + "i/xgemius.js",
|
| + "i/js/jquery-1.5.1.min.js",
|
| + "i/js/jquery.cookie.js",
|
| + "foo/path/bar.js?file=bar/zzz.js",
|
| + "foo/path/foo.js?file=bar/aaa.js" ];
|
| + for (var i = 0; i < scripts.length; ++i)
|
| + addOption("http://foo.com/" + scripts[i]);
|
| +
|
| + var scripts2 = [
|
| + "foo/path/bar.js?file=bar/zzz.js",
|
| + "foo/path/foo.js?file=bar/aaa.js" ];
|
| + for (var i = 0; i < scripts2.length; ++i)
|
| + addOption("http://bar.com/" + scripts2[i]);
|
| + addOption("*Non*URL*path");
|
| +
|
| + var extensions = [
|
| + "extension-schema://extension-name/bar.js",
|
| + "extension-schema://extension-name/folder/baz.js" ];
|
| + for (var i = 0; i < extensions.length; ++i)
|
| + addOption(extensions[i], true);
|
| + addOption("*Non*URL*path", true);
|
| +
|
| try {
|
| dumpScriptsList();
|
| WebInspector.settings.showScriptFolders.set(false);
|
| @@ -43,16 +53,24 @@
|
| InspectorTest.completeDebuggerTest();
|
| }
|
|
|
| + var nextId = 1;
|
| +
|
| + function addOption(url, isContentScript)
|
| + {
|
| + WebInspector.panels.scripts._addOptionToFilesSelect({ id: nextId++, url: url, isContentScript: isContentScript });
|
| + }
|
| +
|
| function dumpScriptsList()
|
| {
|
| InspectorTest.addResult("");
|
| InspectorTest.addResult("WebInspector.settings.showScriptFolders = " + WebInspector.settings.showScriptFolders.get());
|
| var select = WebInspector.panels.scripts._filesSelectElement;
|
| for (var i = 0; i < select.length; ++i) {
|
| - var text = select[i].textContent.replace(/\u00a0/g, " ");
|
| - if (select[i].nameForSorting.indexOf("LayoutTests/") !== -1)
|
| + if (select[i]._uiSourceCode && select[i]._uiSourceCode.url.indexOf("LayoutTests/") !== -1)
|
| continue;
|
| - InspectorTest.addResult(text);
|
| + if (select[i].textContent.indexOf("LayoutTests/") !== -1)
|
| + continue;
|
| + InspectorTest.addResult(select[i].textContent.replace(/\u00a0/g, " "));
|
| }
|
| }
|
| }
|
|
|