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

Side by Side Diff: third_party/WebKit/LayoutTests/paint/invalidation/text-match-pre-wrapped-text.html

Issue 2802543002: Update window.internals.addTextMatchMarker() to take enum instead of bool (Closed)
Patch Set: Fix one more test, add k prefix Created 3 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../fast/../resources/ahem.js"></script> 2 <script src="../../fast/../resources/ahem.js"></script>
3 <script src="../../fast/../resources/run-after-layout-and-paint.js"></script> 3 <script src="../../fast/../resources/run-after-layout-and-paint.js"></script>
4 <pre id="demo" style="font-family: Ahem; width: 2em; white-space: pre-wrap">a b </pre> 4 <pre id="demo" style="font-family: Ahem; width: 2em; white-space: pre-wrap">a b </pre>
5 <p>Test for crbug.com/521047. Passes if find-in-page marker highlight is visible in both lines above. 5 <p>Test for crbug.com/521047. Passes if find-in-page marker highlight is visible in both lines above.
6 <script> 6 <script>
7 function highlightRange(id, start, end, active) { 7 function highlightRange(id, start, end, active) {
8 var range = document.createRange(); 8 var range = document.createRange();
9 var elem = document.getElementById(id).firstChild; 9 var elem = document.getElementById(id).firstChild;
10 range.setStart(elem, start); 10 range.setStart(elem, start);
11 range.setEnd(elem, end); 11 range.setEnd(elem, end);
12 if (window.internals) { 12 if (window.internals) {
13 window.internals.addTextMatchMarker(range, active); 13 window.internals.addTextMatchMarker(range, active);
14 window.internals.setMarkedTextMatchesAreHighlighted(document, true); 14 window.internals.setMarkedTextMatchesAreHighlighted(document, true);
15 } 15 }
16 } 16 }
17 17
18 runAfterLayoutAndPaint(function() { 18 runAfterLayoutAndPaint(function() {
19 highlightRange('demo', 0, 4, true); 19 highlightRange('demo', 0, 4, 'kActive');
20 }, true); 20 }, true);
21 </script> 21 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698