ajuma@chromium.org | 1464d28 | 2018-10-26 13:16:03 +0000 | [diff] [blame] | 1 | <!DOCTYPE html> |
2 | <script src="resources/text-based-repaint.js" type="text/javascript"></script> | ||||
3 | <style> | ||||
4 | #test { | ||||
5 | background-color: red; | ||||
6 | color: white; | ||||
7 | overflow: hidden; | ||||
8 | } | ||||
9 | |||||
10 | #test::selection { | ||||
11 | background-color: green; | ||||
12 | } | ||||
13 | </style> | ||||
14 | <script> | ||||
15 | function repaintTest() { | ||||
16 | getSelection().setBaseAndExtent(test, 0, test, 1); | ||||
17 | }; | ||||
18 | </script> | ||||
19 | |||||
20 | <body onload="runRepaintTest()"> | ||||
21 | <p id="test">Should have green background</p> | ||||
22 | </body> |