Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Side by Side Diff: third_party/WebKit/LayoutTests/inspector-enabled/sources/debugger/linkifier.html

Issue 2795193003: DevTools: carefully cleanup script UISourceCodes (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/debugger-test.js"></script> 4 <script src="../../../http/tests/inspector/debugger-test.js"></script>
5 <script>// It is important that script starts on line 5 (zero-based 4) 5 <script>// It is important that script starts on line 5 (zero-based 4)
6 6
7 function nonFormattedFunction() { var i = 2 + 2; var a = 4; return a + i; } 7 function nonFormattedFunction() { var i = 2 + 2; var a = 4; return a + i; }
8 8
9 function dummyScript() 9 function dummyScript()
10 { 10 {
(...skipping 25 matching lines...) Expand all
36 InspectorTest.startDebuggerTest(waitForScripts); 36 InspectorTest.startDebuggerTest(waitForScripts);
37 } 37 }
38 38
39 function waitForScripts() 39 function waitForScripts()
40 { 40 {
41 InspectorTest.showScriptSource("linkifier.html", debuggerTest); 41 InspectorTest.showScriptSource("linkifier.html", debuggerTest);
42 } 42 }
43 43
44 function debuggerTest() 44 function debuggerTest()
45 { 45 {
46 var scripts = InspectorTest.debuggerModel.scripts; 46 for (var scriptCandidate of InspectorTest.debuggerModel.scripts()) {
47 for (var scriptId in scripts) {
48 var scriptCandidate = scripts[scriptId];
49 if (scriptCandidate.sourceURL === InspectorTest.mainTarget.inspected URL() && scriptCandidate.lineOffset === 4) { 47 if (scriptCandidate.sourceURL === InspectorTest.mainTarget.inspected URL() && scriptCandidate.lineOffset === 4) {
50 script = scriptCandidate; 48 script = scriptCandidate;
51 break; 49 break;
52 } 50 }
53 } 51 }
54 52
55 uiSourceCode = Workspace.workspace.uiSourceCodeForURL(InspectorTest.main Target.inspectedURL()); 53 uiSourceCode = Workspace.workspace.uiSourceCodeForURL(InspectorTest.main Target.inspectedURL());
56 var linkifyMe = "at triggerError (http://localhost/show/:22:11)"; 54 var linkifyMe = "at triggerError (http://localhost/show/:22:11)";
57 var fragment = Components.linkifyStringAsFragment(linkifyMe); 55 var fragment = Components.linkifyStringAsFragment(linkifyMe);
58 var anchor = fragment.querySelector('.devtools-link'); 56 var anchor = fragment.querySelector('.devtools-link');
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 </script> 95 </script>
98 </head> 96 </head>
99 97
100 <body onload="onload()"> 98 <body onload="onload()">
101 <p> 99 <p>
102 Tests that Linkifier works correctly. 100 Tests that Linkifier works correctly.
103 <p> 101 <p>
104 102
105 </body> 103 </body>
106 </html> 104 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698