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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/tracing/timeline-misc/timeline-grouped-invalidations.html

Issue 2412023002: DevTools: migrate InspectorView to tabbed view location. (Closed)
Patch Set: made layers panel closeable. Created 4 years, 2 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 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../../http/tests/inspector/inspector-test.js"></script> 4 <script src="../../../http/tests/inspector/inspector-test.js"></script>
5 <script src="../../../http/tests/inspector/timeline-test.js"></script> 5 <script src="../../../http/tests/inspector/timeline-test.js"></script>
6 <script> 6 <script>
7 function display() 7 function display()
8 { 8 {
9 var callback; 9 var callback;
10 var promise = new Promise((fulfill) => callback = fulfill); 10 var promise = new Promise((fulfill) => callback = fulfill);
11 requestAnimationFrame(function() { 11 requestAnimationFrame(function() {
12 var testElements = document.body.getElementsByClassName("testElement"); 12 var testElements = document.body.getElementsByClassName("testElement");
13 for (var i = 0; i < testElements.length; i++) { 13 for (var i = 0; i < testElements.length; i++) {
14 testElements[i].style.color = "red"; 14 testElements[i].style.color = "red";
15 testElements[i].style.backgroundColor = "blue"; 15 testElements[i].style.backgroundColor = "blue";
16 } 16 }
17 if (window.testRunner) 17 if (window.testRunner)
18 testRunner.layoutAndPaintAsyncThen(callback); 18 testRunner.layoutAndPaintAsyncThen(callback);
19 }); 19 });
20 return promise; 20 return promise;
21 } 21 }
22 22
23 function test() 23 function test()
24 { 24 {
25 var currentPanel = WebInspector.inspectorView.currentPanel();
26 InspectorTest.assertEquals(currentPanel._panelName, "timeline", "Current pan el should be the timeline.");
27 Runtime.experiments.enableForTest("timelineInvalidationTracking"); 25 Runtime.experiments.enableForTest("timelineInvalidationTracking");
28 26
29 InspectorTest.invokeAsyncWithTimeline("display", function() { 27 InspectorTest.invokeAsyncWithTimeline("display", function() {
30 var record = InspectorTest.findFirstTimelineRecord(WebInspector.Timeline Model.RecordType.Paint); 28 var record = InspectorTest.findFirstTimelineRecord(WebInspector.Timeline Model.RecordType.Paint);
31 InspectorTest.addArray(record._event.invalidationTrackingEvents, Inspect orTest.InvalidationFormatters, "", "paint invalidations"); 29 InspectorTest.addArray(record._event.invalidationTrackingEvents, Inspect orTest.InvalidationFormatters, "", "paint invalidations");
32 30
33 var linkifier = new WebInspector.Linkifier(); 31 var linkifier = new WebInspector.Linkifier();
34 var event = record.traceEvent(); 32 var event = record.traceEvent();
35 var target = InspectorTest.timelineModel().targetByEvent(event); 33 var target = InspectorTest.timelineModel().targetByEvent(event);
36 var contentHelper = new WebInspector.TimelineDetailsContentHelper(target , linkifier, true); 34 var contentHelper = new WebInspector.TimelineDetailsContentHelper(target , linkifier, true);
(...skipping 13 matching lines...) Expand all
50 } 48 }
51 } 49 }
52 </script> 50 </script>
53 </head> 51 </head>
54 <body onload="runTest()"> 52 <body onload="runTest()">
55 <p>Tests grouped invalidations on the timeline.</p> 53 <p>Tests grouped invalidations on the timeline.</p>
56 <div class="testElement">P</div><div class="testElement">A</div> 54 <div class="testElement">P</div><div class="testElement">A</div>
57 <div class="testElement">S</div><div class="testElement">S</div> 55 <div class="testElement">S</div><div class="testElement">S</div>
58 </body> 56 </body>
59 </html> 57 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698