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

Side by Side Diff: third_party/WebKit/LayoutTests/paint/invalidation/spv2/text-match-highlight.html

Issue 1366763002: Text expectations of paint/invalidation/spv2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 <!-- Based on compositing/overflow/text-match-highlight.html --> 1 <!-- Based on compositing/overflow/text-match-highlight.html -->
2 <!DOCTYPE HTML> 2 <!DOCTYPE HTML>
3 <script src="resources/paint-invalidation-test.js"></script> 3 <script src="resources/paint-invalidation-test.js"></script>
4 <script> 4 <script>
5 if (window.testRunner)
6 testRunner.dumpAsTextWithPixelResults();
7
8 function highlightRange(id, start, end, active) { 5 function highlightRange(id, start, end, active) {
9 var range = document.createRange(); 6 var range = document.createRange();
10 var elem = document.getElementById(id).firstChild; 7 var elem = document.getElementById(id).firstChild;
11 range.setStart(elem, start); 8 range.setStart(elem, start);
12 range.setEnd(elem, end); 9 range.setEnd(elem, end);
13 internals.addTextMatchMarker(range, active); 10 internals.addTextMatchMarker(range, active);
14 } 11 }
15 window.expectedPaintInvalidationObjects = [
16 "LayoutText #text",
17 "InlineTextBox 'findme'",
18 "LayoutText #text",
19 "InlineTextBox 'findme'",
20 "LayoutText #text",
21 "InlineTextBox 'findme'",
22 "LayoutText #text",
23 "InlineTextBox 'findme'",
24 "LayoutText #text",
25 "InlineTextBox 'findme'",
26 "LayoutSVGInlineText #text",
27 "InlineTextBox 'Can you findme in this boring text?'",
28 "LayoutSVGInlineText #text",
29 "InlineTextBox 'Findme in a typewriter!'",
30 "LayoutSVGInlineText #text",
31 "InlineTextBox 'Findme on a path! Did you findme?'",
32 ];
33 function paintInvalidationTest() { 12 function paintInvalidationTest() {
34 highlightRange('1', 0, 6, false); 13 highlightRange('1', 0, 6, false);
35 highlightRange('2', 0, 6, false); 14 highlightRange('2', 0, 6, false);
36 highlightRange('3', 0, 6, false); 15 highlightRange('3', 0, 6, false);
37 highlightRange('4', 0, 6, false); 16 highlightRange('4', 0, 6, false);
38 highlightRange('5', 0, 6, false); 17 highlightRange('5', 0, 6, false);
39 highlightRange('svg1', 8, 14, true); 18 highlightRange('svg1', 8, 14, true);
40 highlightRange('svg2', 0, 6, false); 19 highlightRange('svg2', 0, 6, false);
41 highlightRange('svg3', 0, 6, false); 20 highlightRange('svg3', 0, 6, false);
42 highlightRange('svg3', 26, 32, false); 21 highlightRange('svg3', 26, 32, false);
(...skipping 23 matching lines...) Expand all
66 <text x="10" y="100" style="font-size: 10px; font-family: monospace;" id="sv g2">Findme in a typewriter!</text> 45 <text x="10" y="100" style="font-size: 10px; font-family: monospace;" id="sv g2">Findme in a typewriter!</text>
67 <g transform="scale(0.3) translate(0 400)"> 46 <g transform="scale(0.3) translate(0 400)">
68 <text font-family="Verdana" font-size="42.5" fill="blue" > 47 <text font-family="Verdana" font-size="42.5" fill="blue" >
69 <textPath xlink:href="#textpath" id="svg3">Findme on a path! Did you fin dme?</textPath> 48 <textPath xlink:href="#textpath" id="svg3">Findme on a path! Did you fin dme?</textPath>
70 </text> 49 </text>
71 </g> 50 </g>
72 </svg> 51 </svg>
73 <div style="height: 1000px"></div> 52 <div style="height: 1000px"></div>
74 </div> 53 </div>
75 54
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698