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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/tracing/timeline-style/timeline-style-recalc-with-invalidations.html

Issue 2486853002: Timeline: remove TimelineModel inferred properties from TracingModel.Event (Closed)
Patch Set: addressed comments and rebased 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 changeStylesAndDisplay() 7 function changeStylesAndDisplay()
8 { 8 {
9 document.getElementById("testElementOne").style.color = "red"; 9 document.getElementById("testElementOne").style.color = "red";
10 document.getElementById("testElementTwo").style.color = "blue"; 10 document.getElementById("testElementTwo").style.color = "blue";
(...skipping 28 matching lines...) Expand all
39 } 39 }
40 40
41 function test() 41 function test()
42 { 42 {
43 Runtime.experiments.enableForTest("timelineInvalidationTracking"); 43 Runtime.experiments.enableForTest("timelineInvalidationTracking");
44 44
45 InspectorTest.runTestSuite([ 45 InspectorTest.runTestSuite([
46 function testLocalFrame(next) 46 function testLocalFrame(next)
47 { 47 {
48 InspectorTest.invokeAsyncWithTimeline("changeStylesAndDisplay", func tion() { 48 InspectorTest.invokeAsyncWithTimeline("changeStylesAndDisplay", func tion() {
49 var record = InspectorTest.findFirstTimelineRecord(WebInspector. TimelineModel.RecordType.UpdateLayoutTree); 49 InspectorTest.dumpInvalidations(WebInspector.TimelineModel.Recor dType.UpdateLayoutTree, 0, "first recalc style invalidations");
50 InspectorTest.addArray(record._event.invalidationTrackingEvents, InspectorTest.InvalidationFormatters, "", "first recalc style invalidations");
51
52 next(); 50 next();
53 }); 51 });
54 }, 52 },
55 53
56 function multipleStyleRecalcs(next) 54 function multipleStyleRecalcs(next)
57 { 55 {
58 InspectorTest.invokeAsyncWithTimeline("changeMultipleStylesAndDispla y", function() { 56 InspectorTest.invokeAsyncWithTimeline("changeMultipleStylesAndDispla y", function() {
59 var firstRecord = InspectorTest.findTimelineRecord(WebInspector. TimelineModel.RecordType.UpdateLayoutTree, 0); 57 InspectorTest.dumpInvalidations(WebInspector.TimelineModel.Recor dType.UpdateLayoutTree, 0, "first recalc style invalidations");
60 InspectorTest.addArray(firstRecord._event.invalidationTrackingEv ents, InspectorTest.InvalidationFormatters, "", "first recalc style invalidation s"); 58 InspectorTest.dumpInvalidations(WebInspector.TimelineModel.Recor dType.UpdateLayoutTree, 1, "second recalc style invalidations");
61 59 InspectorTest.dumpInvalidations(WebInspector.TimelineModel.Recor dType.UpdateLayoutTree, 2, "third recalc style invalidations");
62 var secondRecord = InspectorTest.findTimelineRecord(WebInspector .TimelineModel.RecordType.UpdateLayoutTree, 1);
63 InspectorTest.addArray(secondRecord._event.invalidationTrackingE vents, InspectorTest.InvalidationFormatters, "", "second recalc style invalidati ons");
64
65 var thirdRecord = InspectorTest.findTimelineRecord(WebInspector. TimelineModel.RecordType.UpdateLayoutTree, 2);
66 InspectorTest.addArray(thirdRecord._event.invalidationTrackingEv ents, InspectorTest.InvalidationFormatters, "", "third recalc style invalidation s");
67
68 next(); 60 next();
69 }); 61 });
70 }, 62 },
71 63
72 function testSubframe(next) 64 function testSubframe(next)
73 { 65 {
74 InspectorTest.invokeAsyncWithTimeline("changeSubframeStylesAndDispla y", function() { 66 InspectorTest.invokeAsyncWithTimeline("changeSubframeStylesAndDispla y", function() {
75 var record = InspectorTest.findFirstTimelineRecord(WebInspector. TimelineModel.RecordType.UpdateLayoutTree); 67 InspectorTest.dumpInvalidations(WebInspector.TimelineModel.Recor dType.UpdateLayoutTree, 0, "first recalc style invalidations");
76 InspectorTest.addArray(record._event.invalidationTrackingEvents, InspectorTest.InvalidationFormatters, "", "first recalc style invalidations");
77
78 next(); 68 next();
79 }); 69 });
80 } 70 }
81 ]); 71 ]);
82 } 72 }
83 </script> 73 </script>
84 </head> 74 </head>
85 <body onload="runTest()"> 75 <body onload="runTest()">
86 <p>Tests the Timeline API instrumentation of style recalc events with invalidati ons.</p> 76 <p>Tests the Timeline API instrumentation of style recalc events with invalidati ons.</p>
87 <div id="testElementOne">PASS</div><div id="testElementTwo">PASS</div><div id="t estElementThree">PASS</div> 77 <div id="testElementOne">PASS</div><div id="testElementTwo">PASS</div><div id="t estElementThree">PASS</div>
88 <iframe src="../resources/timeline-iframe-paint.html" style="position: absolute; left: 40px; top: 40px; width: 100px; height: 100px; border: none"></iframe> 78 <iframe src="../resources/timeline-iframe-paint.html" style="position: absolute; left: 40px; top: 40px; width: 100px; height: 100px; border: none"></iframe>
89 </body> 79 </body>
90 </html> 80 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698