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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/tracing/timeline-paint/timeline-paint-with-style-recalc-invalidations.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 <!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 document.body.style.backgroundColor = "blue"; 9 document.body.style.backgroundColor = "blue";
10 document.getElementById("testElement").style.backgroundColor = "salmon"; 10 document.getElementById("testElement").style.backgroundColor = "salmon";
11 return waitForFrame(); 11 return waitForFrame();
12 } 12 }
13 13
14 function updateSubframeAndDisplay() 14 function updateSubframeAndDisplay()
15 { 15 {
16 frames[0].document.body.children[0].style.backgroundColor = "green"; 16 frames[0].document.body.children[0].style.backgroundColor = "green";
17 return waitForFrame(); 17 return waitForFrame();
18 } 18 }
19 19
20 function test() 20 function test()
21 { 21 {
22 Runtime.experiments.enableForTest("timelineInvalidationTracking"); 22 Runtime.experiments.enableForTest("timelineInvalidationTracking");
23 23
24 InspectorTest.runTestSuite([ 24 InspectorTest.runTestSuite([
25 function testLocalFrame(next) 25 function testLocalFrame(next)
26 { 26 {
27 InspectorTest.invokeAsyncWithTimeline("display", function() { 27 InspectorTest.invokeAsyncWithTimeline("display", function() {
28 InspectorTest.dumpInvalidations(WebInspector.TimelineModel.Recor dType.Paint, 0, "first paint invalidations"); 28 InspectorTest.dumpInvalidations(TimelineModel.TimelineModel.Reco rdType.Paint, 0, "first paint invalidations");
29 next(); 29 next();
30 }); 30 });
31 }, 31 },
32 32
33 function testSubframe(next) 33 function testSubframe(next)
34 { 34 {
35 InspectorTest.invokeAsyncWithTimeline("updateSubframeAndDisplay", fu nction() { 35 InspectorTest.invokeAsyncWithTimeline("updateSubframeAndDisplay", fu nction() {
36 // The first paint corresponds to the local frame and should hav e no invalidations. 36 // The first paint corresponds to the local frame and should hav e no invalidations.
37 var firstPaintRecord = InspectorTest.findFirstTimelineRecord(Web Inspector.TimelineModel.RecordType.Paint); 37 var firstPaintRecord = InspectorTest.findFirstTimelineRecord(Tim elineModel.TimelineModel.RecordType.Paint);
38 var firstInvalidations = WebInspector.InvalidationTracker.invali dationEventsFor(firstPaintRecord._event); 38 var firstInvalidations = TimelineModel.InvalidationTracker.inval idationEventsFor(firstPaintRecord._event);
39 InspectorTest.assertEquals(firstInvalidations, null); 39 InspectorTest.assertEquals(firstInvalidations, null);
40 40
41 // The second paint corresponds to the subframe and should have our style invalidations. 41 // The second paint corresponds to the subframe and should have our style invalidations.
42 InspectorTest.dumpInvalidations(WebInspector.TimelineModel.Recor dType.Paint, 1, "second paint invalidations"); 42 InspectorTest.dumpInvalidations(TimelineModel.TimelineModel.Reco rdType.Paint, 1, "second paint invalidations");
43 next(); 43 next();
44 }); 44 });
45 } 45 }
46 ]); 46 ]);
47 } 47 }
48 </script> 48 </script>
49 </head> 49 </head>
50 <body onload="runTest()"> 50 <body onload="runTest()">
51 <p>Tests the Timeline API instrumentation of paint events with style recalc inva lidations.</p> 51 <p>Tests the Timeline API instrumentation of paint events with style recalc inva lidations.</p>
52 <div id="testElement">PASS</div> 52 <div id="testElement">PASS</div>
53 <iframe src="../resources/timeline-iframe-paint.html" style="position: absolute; left: 40px; top: 40px; width: 100px; height: 100px; border: none"></iframe> 53 <iframe src="../resources/timeline-iframe-paint.html" style="position: absolute; left: 40px; top: 40px; width: 100px; height: 100px; border: none"></iframe>
54 </body> 54 </body>
55 </html> 55 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698