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

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

Issue 2472213005: DevTools: introduce "Track CSS Usage" experiment (Closed)
Patch Set: Unused CSS highlight in sources panel 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/tracing/highlight-in-source-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/timeline-test.js"></script>
5 <script src="../../http/tests/inspector/debugger-test.js"></script>
6 <script src="../../http/tests/inspector/sources-test.js"></script>
7
8 <link rel="stylesheet" type="text/css" href="resources/highlight-in-source.css">
9 <script>
10
11 function test()
12 {
13 Runtime.experiments.enableForTest("timelineRuleUsageRecording");
14
15 var panel = WebInspector.panels.timeline;
16 panel._markUnusedCSS.set(true);
17
18 InspectorTest.runTestSuite([
19 function testMarking(next)
20 {
21 InspectorTest.startTimeline(timelineStarted);
22
23 function timelineStarted()
24 {
25 InspectorTest.stopTimeline(printResults);
26 }
27
28 function printResults()
29 {
30 WebInspector.inspectorView.showPanel("sources").then(showSource) ;
31 }
32
33 function showSource()
34 {
35 InspectorTest.showScriptSource("highlight-in-source.css", waitFo rDecorations);
36 }
37
38 function waitForDecorations()
39 {
40 InspectorTest.addSniffer(WebInspector.CoverageProfile.LineDecora tor.prototype, "decorate", didShowDecorations);
41 }
42
43 function didShowDecorations(sourceFrame)
44 {
45 var lines = Array.prototype.map.call(document.querySelectorAll(" .text-editor-line-marker-coverage"),
46 e => e.parentElement.pre viousSibling.textContent);
47
48 InspectorTest.addResult(lines);
49 next();
50 }
51 }
52 ]);
53 }
54 </script>
55 </head>
56 <p id="id">PASS</p>
57 <body onload="runTest()">
58 <p>Tests the CSS highlight in sources after the timeline recording finishes.</p>
59 </body>
60 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/tracing/highlight-in-source-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698