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

Side by Side Diff: LayoutTests/fast/repaint/4774354.html

Issue 207383002: Remove repaint.js from layout tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More expectations Created 6 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
OLDNEW
1 <script src="resources/repaint.js" type="text/javascript"></script> 1 <script src="../../resources/run-after-display.js" type="text/javascript"></scri pt>
2 <script type="text/javascript"> 2 <script type="text/javascript">
3 3
4 function step1() { 4 function step1() {
5 if (window.testRunner) 5 if (window.testRunner)
6 window.testRunner.waitUntilDone(); 6 window.testRunner.waitUntilDone();
7 // Wait for the frame to load. 7 // Wait for the frame to load.
8 window.setTimeout(step2, 100); 8 window.setTimeout(step2, 100);
9 } 9 }
10 10
11 function step2() { 11 function step2() {
12 var frame = frames[0]; 12 var frame = frames[0];
13 var doc = frame.document; 13 var doc = frame.document;
14 var body = doc.body; 14 var body = doc.body;
15 var sel = frame.getSelection(); 15 var sel = frame.getSelection();
16 frame.focus(); 16 frame.focus();
17 sel.setPosition(body, 0); 17 sel.setPosition(body, 0);
18 doc.execCommand("InsertText", false, "You should not see a caret in this tex t."); 18 doc.execCommand("InsertText", false, "You should not see a caret in this tex t.");
19 var text = body.firstChild; 19 var text = body.firstChild;
20 sel.setPosition(text, text.length); 20 sel.setPosition(text, text.length);
21 // Wait for the caret to paint. 21 // Wait for the caret to paint.
22 window.setTimeout(runRepaintTest, 100); 22 runAfterDisplay(repaintTest);
23 } 23 }
24 24
25 function repaintTest() { 25 function repaintTest() {
26 var frame = frames[0]; 26 var frame = frames[0];
27 var doc = frame.document; 27 var doc = frame.document;
28 var body = doc.body; 28 var body = doc.body;
29 var text = body.firstChild; 29 var text = body.firstChild;
30 var sel = frame.getSelection(); 30 var sel = frame.getSelection();
31
32 sel.setBaseAndExtent(text, 5, text, text.length); 31 sel.setBaseAndExtent(text, 5, text, text.length);
33
34 if (window.testRunner) 32 if (window.testRunner)
35 window.testRunner.notifyDone(); 33 window.testRunner.notifyDone();
36 } 34 }
37 </script> 35 </script>
38 36
39 <body onload="step1();"> 37 <body onload="step1();">
40 <iframe src="resources/contenteditable-iframe-src.html"></iframe> 38 <iframe src="resources/contenteditable-iframe-src.html"></iframe>
41 </body> 39 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698