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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/tracing/highlight-in-source.html

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots Created 4 years, 1 month 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/timeline-test.js"></script> 4 <script src="../../http/tests/inspector/timeline-test.js"></script>
5 <script src="../../http/tests/inspector/debugger-test.js"></script> 5 <script src="../../http/tests/inspector/debugger-test.js"></script>
6 <script src="../../http/tests/inspector/sources-test.js"></script> 6 <script src="../../http/tests/inspector/sources-test.js"></script>
7 7
8 <link rel="stylesheet" type="text/css" href="resources/highlight-in-source.css"> 8 <link rel="stylesheet" type="text/css" href="resources/highlight-in-source.css">
9 <script> 9 <script>
10 10
11 function test() 11 function test()
12 { 12 {
13 Runtime.experiments.enableForTest("timelineRuleUsageRecording"); 13 Runtime.experiments.enableForTest("timelineRuleUsageRecording");
14 14
15 var panel = WebInspector.panels.timeline; 15 var panel = UI.panels.timeline;
16 panel._markUnusedCSS.set(true); 16 panel._markUnusedCSS.set(true);
17 17
18 InspectorTest.runTestSuite([ 18 InspectorTest.runTestSuite([
19 function testMarking(next) 19 function testMarking(next)
20 { 20 {
21 InspectorTest.startTimeline(timelineStarted); 21 InspectorTest.startTimeline(timelineStarted);
22 22
23 function timelineStarted() 23 function timelineStarted()
24 { 24 {
25 InspectorTest.stopTimeline(printResults); 25 InspectorTest.stopTimeline(printResults);
26 } 26 }
27 27
28 function printResults() 28 function printResults()
29 { 29 {
30 WebInspector.inspectorView.showPanel("sources").then(showSource) ; 30 UI.inspectorView.showPanel("sources").then(showSource);
31 } 31 }
32 32
33 function showSource() 33 function showSource()
34 { 34 {
35 InspectorTest.showScriptSource("highlight-in-source.css", waitFo rDecorations); 35 InspectorTest.showScriptSource("highlight-in-source.css", waitFo rDecorations);
36 } 36 }
37 37
38 function waitForDecorations() 38 function waitForDecorations()
39 { 39 {
40 InspectorTest.addSniffer(WebInspector.CoverageProfile.LineDecora tor.prototype, "decorate", didShowDecorations); 40 InspectorTest.addSniffer(Components.CoverageProfile.LineDecorato r.prototype, "decorate", didShowDecorations);
41 } 41 }
42 42
43 function didShowDecorations(sourceFrame) 43 function didShowDecorations(sourceFrame)
44 { 44 {
45 var lines = Array.prototype.map.call(document.querySelectorAll(" .text-editor-line-marker-coverage"), 45 var lines = Array.prototype.map.call(document.querySelectorAll(" .text-editor-line-marker-coverage"),
46 e => e.parentElement.pre viousSibling.textContent); 46 e => e.parentElement.pre viousSibling.textContent);
47 47
48 InspectorTest.addResult(lines); 48 InspectorTest.addResult(lines);
49 next(); 49 next();
50 } 50 }
51 } 51 }
52 ]); 52 ]);
53 } 53 }
54 </script> 54 </script>
55 </head> 55 </head>
56 <p id="id">PASS</p> 56 <p id="id">PASS</p>
57 <body onload="runTest()"> 57 <body onload="runTest()">
58 <p>Tests the CSS highlight in sources after the timeline recording finishes.</p> 58 <p>Tests the CSS highlight in sources after the timeline recording finishes.</p>
59 </body> 59 </body>
60 </html> 60 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698