OLD | NEW |
| 1 <!-- Based on fast/repaint/no-caret-repaint-in-non-content-editable-element.html
--> |
1 <html> | 2 <html> |
2 <head> | 3 <head> |
3 <script src="resources/text-based-repaint.js"></script> | 4 <script src="resources/paint-invalidation-test.js"></script> |
4 <script> | 5 <script> |
5 if (window.testRunner) { | 6 if (window.testRunner) { |
6 // By definition, when caret browsing is enabled we always paint the caret. | 7 // By definition, when caret browsing is enabled we always paint the caret. |
7 // So, this test is only applicable when caret browsing is disabled because | 8 // So, this test is only applicable when caret browsing is disabled because |
8 // non-content-editable elements won't cause the caret to be drawn since the
y | 9 // non-content-editable elements won't cause the caret to be drawn since the
y |
9 // are not editable. | 10 // are not editable. |
10 testRunner.overridePreference("WebKitEnableCaretBrowsing", false); | 11 testRunner.overridePreference("WebKitEnableCaretBrowsing", false); |
11 } | 12 } |
12 function repaintTest() | 13 window.expectedPaintInvalidationObjects = [ |
| 14 ]; |
| 15 function paintInvalidationTest() |
13 { | 16 { |
14 if (!window.eventSender) | 17 if (!window.eventSender) |
15 return; | 18 return; |
16 | 19 |
17 var target = document.getElementById("target"); | 20 var target = document.getElementById("target"); |
18 eventSender.mouseMoveTo(target.offsetLeft, target.offsetTop); | 21 eventSender.mouseMoveTo(target.offsetLeft, target.offsetTop); |
19 eventSender.mouseDown(); | 22 eventSender.mouseDown(); |
20 eventSender.mouseUp(); | 23 eventSender.mouseUp(); |
21 } | 24 } |
22 window.onload = runRepaintTest; | 25 window.onload = runPaintInvalidationTest; |
23 </script> | 26 </script> |
24 </head> | 27 </head> |
25 <body> | 28 <body> |
26 <p>This tests that clicking on a non-content editable element does not cause
a repaint of it in whole or in part.</p> | 29 <p>This tests that clicking on a non-content editable element does not cause
a repaint of it in whole or in part.</p> |
27 <p id="target">This element is not content editable.</p> | 30 <p id="target">This element is not content editable.</p> |
28 </body> | 31 </body> |
29 </html> | 32 </html> |
OLD | NEW |