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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/repaint/text-match-document-change.html

Issue 2321183002: Move repaint tests (except for svg/) to paint/invalidation (Closed)
Patch Set: - Created 4 years, 3 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
(Empty)
1 <!DOCTYPE html>
2 <script src="resources/text-based-repaint.js"></script>
3 <script>
4 function highlightRange(id, start, end) {
5 var frameWindow = document.getElementById('iframe').contentWindow;
6 var range = frameWindow.document.createRange();
7 var elem = frameWindow.document.getElementById(id).firstChild;
8 range.setStart(elem, start);
9 range.setEnd(elem, end);
10 frameWindow.internals.addTextMatchMarker(range, false);
11 }
12
13 function repaintTest() {
14 document.getElementById('iframe').contentDocument.getElementById('to-be-change d').textContent = 'After change';
15 }
16
17 if (window.internals) {
18 onload = function() {
19 highlightRange('unchanged', 11, 17);
20 highlightRange('to-be-changed', 15, 21);
21 runRepaintAndPixelTest();
22 };
23 }
24 </script>
25 Tests paint invalidation of the scrollbar (to repaint tickmarks) on document cha nge when there are text match markers.
26 Passes if the tickmarks are updated on document change.<br>
27 <!-- Currently paint invalidation of main frame scrollbar is not tracked,
28 so use a frame to show the invalidation of tickmarks. -->
29 <iframe id="iframe" style="position: absolute; top: 100px; height: 400px" srcdoc ="
30 <div id='unchanged'>
31 Unchanged: findme
32 </div>
33 <div id='to-be-changed' onclick='this.textContent=&amp;quot;After change&amp;q uot;'>
34 To be changed: findme (Manual testing: Find-in-page 'findme', then click her e)
35 </div>
36 <div style='height: 1000px'><!-- To show the scrollbar --></div>">
37 </iframe>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698