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

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

Issue 2486853002: Timeline: remove TimelineModel inferred properties from TracingModel.Event (Closed)
Patch Set: 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").className = "red"; 9 document.getElementById("testElementOne").className = "red";
10 document.getElementById("testElementTwo").className = "red"; 10 document.getElementById("testElementTwo").className = "red";
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 } 48 }
49 49
50 function test() 50 function test()
51 { 51 {
52 Runtime.experiments.enableForTest("timelineInvalidationTracking"); 52 Runtime.experiments.enableForTest("timelineInvalidationTracking");
53 53
54 InspectorTest.runTestSuite([ 54 InspectorTest.runTestSuite([
55 function testLocalFrame(next) 55 function testLocalFrame(next)
56 { 56 {
57 InspectorTest.invokeAsyncWithTimeline("changeStylesAndDisplay", func tion() { 57 InspectorTest.invokeAsyncWithTimeline("changeStylesAndDisplay", func tion() {
58 var record = InspectorTest.findFirstTimelineRecord(WebInspector. TimelineModel.RecordType.UpdateLayoutTree); 58 InspectorTest.dumpInvalidations(WebInspector.TimelineModel.Recor dType.UpdateLayoutTree, 0, "first recalculate styles");
59 InspectorTest.addArray(record._event.invalidationTrackingEvents, InspectorTest.InvalidationFormatters, "", "first recalculate styles");
60 next(); 59 next();
61 }); 60 });
62 }, 61 },
63 62
64 function multipleStyleRecalcs(next) 63 function multipleStyleRecalcs(next)
65 { 64 {
66 InspectorTest.invokeAsyncWithTimeline("changeMultipleStylesAndDispla y", function() { 65 InspectorTest.invokeAsyncWithTimeline("changeMultipleStylesAndDispla y", function() {
67 var firstRecord = InspectorTest.findTimelineRecord(WebInspector. TimelineModel.RecordType.UpdateLayoutTree, 0); 66 InspectorTest.dumpInvalidations(WebInspector.TimelineModel.Recor dType.UpdateLayoutTree, 0, "first recalculate styles");
68 InspectorTest.addArray(firstRecord._event.invalidationTrackingEv ents, InspectorTest.InvalidationFormatters, "", "first recalculate styles"); 67 InspectorTest.dumpInvalidations(WebInspector.TimelineModel.Recor dType.UpdateLayoutTree, 1, "second recalculate styles");
69 68 InspectorTest.dumpInvalidations(WebInspector.TimelineModel.Recor dType.UpdateLayoutTree, 2, "third recalculate styles");
70 var secondRecord = InspectorTest.findTimelineRecord(WebInspector .TimelineModel.RecordType.UpdateLayoutTree, 1);
71 InspectorTest.addArray(secondRecord._event.invalidationTrackingE vents, InspectorTest.InvalidationFormatters, "", "second recalculate styles");
72
73 var thirdRecord = InspectorTest.findTimelineRecord(WebInspector. TimelineModel.RecordType.UpdateLayoutTree, 2);
74 InspectorTest.addArray(thirdRecord._event.invalidationTrackingEv ents, InspectorTest.InvalidationFormatters, "", "third recalculate styles");
75 next(); 69 next();
76 }); 70 });
77 }, 71 },
78 72
79 function testSubframe(next) 73 function testSubframe(next)
80 { 74 {
81 InspectorTest.invokeAsyncWithTimeline("changeMultipleSubframeStylesA ndDisplay", function() { 75 InspectorTest.invokeAsyncWithTimeline("changeMultipleSubframeStylesA ndDisplay", function() {
82 var firstRecord = InspectorTest.findTimelineRecord(WebInspector. TimelineModel.RecordType.UpdateLayoutTree, 0); 76 InspectorTest.dumpInvalidations(WebInspector.TimelineModel.Recor dType.UpdateLayoutTree, 0, "first recalculate styles");
83 InspectorTest.addArray(firstRecord._event.invalidationTrackingEv ents, InspectorTest.InvalidationFormatters, "", "first recalculate styles"); 77 InspectorTest.dumpInvalidations(WebInspector.TimelineModel.Recor dType.UpdateLayoutTree, 1, "second recalculate styles");
84 78 InspectorTest.dumpInvalidations(WebInspector.TimelineModel.Recor dType.UpdateLayoutTree, 2, "third recalculate styles");
85 var secondRecord = InspectorTest.findTimelineRecord(WebInspector .TimelineModel.RecordType.UpdateLayoutTree, 1);
86 InspectorTest.addArray(secondRecord._event.invalidationTrackingE vents, InspectorTest.InvalidationFormatters, "", "second recalculate styles");
87
88 var thirdRecord = InspectorTest.findTimelineRecord(WebInspector. TimelineModel.RecordType.UpdateLayoutTree, 2);
89 InspectorTest.addArray(thirdRecord._event.invalidationTrackingEv ents, InspectorTest.InvalidationFormatters, "", "third recalculate styles");
90 next(); 79 next();
91 }); 80 });
92 } 81 }
93 ]); 82 ]);
94 } 83 }
95 </script> 84 </script>
96 <style> 85 <style>
97 .testHolder > .red { background-color: red; } 86 .testHolder > .red { background-color: red; }
98 .testHolder > .green { background-color: green; } 87 .testHolder > .green { background-color: green; }
99 .testHolder > .blue { background-color: blue; } 88 .testHolder > .blue { background-color: blue; }
100 .testHolder > .snow { background-color: snow; } 89 .testHolder > .snow { background-color: snow; }
101 .testHolder > .red .dummy { } 90 .testHolder > .red .dummy { }
102 .testHolder > .green .dummy { } 91 .testHolder > .green .dummy { }
103 .testHolder > .blue .dummy { } 92 .testHolder > .blue .dummy { }
104 .testHolder > .snow .dummy { } 93 .testHolder > .snow .dummy { }
105 </style> 94 </style>
106 </head> 95 </head>
107 <body onload="runTest()"> 96 <body onload="runTest()">
108 <p>Tests the Timeline API instrumentation of style recalc events with invalidati ons.</p> 97 <p>Tests the Timeline API instrumentation of style recalc events with invalidati ons.</p>
109 <div class="testHolder"> 98 <div class="testHolder">
110 <div id="testElementOne">PASS</div><div id="testElementTwo">PASS</div><div id="t estElementThree">PASS</div> 99 <div id="testElementOne">PASS</div><div id="testElementTwo">PASS</div><div id="t estElementThree">PASS</div>
111 </div> 100 </div>
112 <iframe src="../resources/timeline-iframe-with-style.html" style="position: abso lute; left: 40px; top: 40px; width: 100px; height: 100px; border: none"></iframe > 101 <iframe src="../resources/timeline-iframe-with-style.html" style="position: abso lute; left: 40px; top: 40px; width: 100px; height: 100px; border: none"></iframe >
113 </body> 102 </body>
114 </html> 103 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698