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

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

Issue 1048663002: [invalidations] Convert invalidations to use TreeOutline (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix failing test to to shadowRoot.getElementsByClassName going away Created 5 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/inspector/tracing/timeline-grouped-invalidations-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
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(callback) 7 function display(callback)
8 { 8 {
9 requestAnimationFrame(function() { 9 requestAnimationFrame(function() {
10 var testElements = document.body.getElementsByClassName("testElement"); 10 var testElements = document.body.getElementsByClassName("testElement");
(...skipping 13 matching lines...) Expand all
24 Runtime.experiments.enableForTest("timelineInvalidationTracking"); 24 Runtime.experiments.enableForTest("timelineInvalidationTracking");
25 25
26 InspectorTest.invokeAsyncWithTimeline("display", function() { 26 InspectorTest.invokeAsyncWithTimeline("display", function() {
27 var record = InspectorTest.findFirstTimelineRecord(WebInspector.Timeline Model.RecordType.Paint); 27 var record = InspectorTest.findFirstTimelineRecord(WebInspector.Timeline Model.RecordType.Paint);
28 InspectorTest.addArray(record._event.invalidationTrackingEvents, Inspect orTest.InvalidationFormatters, "", "paint invalidations"); 28 InspectorTest.addArray(record._event.invalidationTrackingEvents, Inspect orTest.InvalidationFormatters, "", "paint invalidations");
29 29
30 var linkifier = new WebInspector.Linkifier(); 30 var linkifier = new WebInspector.Linkifier();
31 var target = InspectorTest.timelineModel().target(); 31 var target = InspectorTest.timelineModel().target();
32 var contentHelper = new WebInspector.TimelineDetailsContentHelper(target , linkifier, null, true); 32 var contentHelper = new WebInspector.TimelineDetailsContentHelper(target , linkifier, null, true);
33 WebInspector.TimelineUIUtils._generateCauses(record.traceEvent(), target , contentHelper); 33 WebInspector.TimelineUIUtils._generateCauses(record.traceEvent(), target , contentHelper);
34 var invalidationGroups = contentHelper.element.getElementsByClassName("i nvalidations-group"); 34 var invalidationsTree = contentHelper.element.getElementsByClassName("in validations-tree")[0];
35 35 var invalidations = invalidationsTree.shadowRoot.textContent;
36 InspectorTest.assertEquals(invalidationGroups.length, 2); 36 checkStringContains(invalidations, "Inline CSS style declaration was mut ated for [ DIV class='testElement' ], [ DIV class='testElement' ], and 2 others. (anonymous function) @ timeline-grouped-invalidations.html:12");
37 InspectorTest.assertEquals(invalidationGroups[0].textContent, 37 checkStringContains(invalidations, "Inline CSS style declaration was mut ated for [ DIV class='testElement' ], [ DIV class='testElement' ], and 2 others. (anonymous function) @ timeline-grouped-invalidations.html:13");
38 "Inline CSS style declaration was mutated for [ DIV class='testEleme nt' ], [ DIV class='testElement' ], and 2 others. (anonymous function) @ timelin e-grouped-invalidations.html:12");
39 InspectorTest.assertEquals(invalidationGroups[1].textContent,
40 "Inline CSS style declaration was mutated for [ DIV class='testEleme nt' ], [ DIV class='testElement' ], and 2 others. (anonymous function) @ timelin e-grouped-invalidations.html:13");
41 InspectorTest.completeTest(); 38 InspectorTest.completeTest();
42 }); 39 });
40
41 function checkStringContains(string, contains)
42 {
43 var doesContain = string.indexOf(contains) >= 0;
44 InspectorTest.check(doesContain, contains + " should be present in " + s tring);
45 InspectorTest.addResult("PASS - record contained " + contains);
46 }
43 } 47 }
44 </script> 48 </script>
45 </head> 49 </head>
46 <body onload="runTest()"> 50 <body onload="runTest()">
47 <p>Tests grouped invalidations on the timeline.</p> 51 <p>Tests grouped invalidations on the timeline.</p>
48 <div class="testElement">P</div><div class="testElement">A</div> 52 <div class="testElement">P</div><div class="testElement">A</div>
49 <div class="testElement">S</div><div class="testElement">S</div> 53 <div class="testElement">S</div><div class="testElement">S</div>
50 </body> 54 </body>
51 </html> 55 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector/tracing/timeline-grouped-invalidations-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698