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

Side by Side Diff: LayoutTests/paint/invalidation/spv2/hover-pseudo-borders.html

Issue 1302183007: Convert some text-based-repaint tests for spv2 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
OLDNEW
1 <!-- Based on fast/repaint/hover-pseudo-borders.html -->
1 <!DOCTYPE html> 2 <!DOCTYPE html>
2 <html> 3 <html>
3 <head> 4 <head>
4 <style> 5 <style>
5 .hitregion { 6 .hitregion {
6 width: 100px; 7 width: 100px;
7 height: 100px; 8 height: 100px;
8 background-color: red; 9 background-color: red;
9 } 10 }
10 .hitregion:after { 11 .hitregion:after {
11 content: ""; 12 content: "";
12 border: 40px solid; 13 border: 40px solid;
13 outline: 10px solid; 14 outline: 10px solid;
14 position: absolute; 15 position: absolute;
15 width: 0; 16 width: 0;
16 height: 0; 17 height: 0;
17 margin-left: 140px; 18 margin-left: 140px;
18 margin-top: 10px; 19 margin-top: 10px;
19 } 20 }
20 .hitregion:hover { 21 .hitregion:hover {
21 background-color: green; /* Changes the left box's color. */ 22 background-color: green; /* Changes the left box's color. */
22 } 23 }
23 .hitregion:hover:after { 24 .hitregion:hover:after {
24 color: green; /* Changes the right box's color. */ 25 color: green; /* Changes the right box's color. */
25 } 26 }
26 </style> 27 </style>
27 <script src="resources/text-based-repaint.js"></script> 28 <script src="resources/paint-invalidation-test.js"></script>
28 <script> 29 <script>
29 function repaintTest() { 30 window.expectedPaintInvalidationObjects = [
31 "LayoutBlockFlow DIV class='hitregion'",
32 "LayoutBlockFlow (positioned) \u003Cpseudo:after\u003E",
33 "LayoutTextFragment (anonymous)",
34 ];
35 function paintInvalidationTest() {
30 if (!window.testRunner) 36 if (!window.testRunner)
31 return; 37 return;
32 eventSender.mouseMoveTo(50, 50); 38 eventSender.mouseMoveTo(50, 50);
33 eventSender.mouseDown(); 39 eventSender.mouseDown();
34 eventSender.mouseUp(); 40 eventSender.mouseUp();
35 } 41 }
36 window.addEventListener("load", runRepaintTest); 42 window.addEventListener("load", runPaintInvalidationTest);
37 </script> 43 </script>
38 </head> 44 </head>
39 <body> 45 <body>
40 <!-- 46 <!--
41 REGRESSION: :hover doesn't work on :after content with borders or outlines. 47 REGRESSION: :hover doesn't work on :after content with borders or outlines.
42 To test this bug outside DRT, hover on the square below. 48 To test this bug outside DRT, hover on the square below.
43 This test passes if there are two green squares. 49 This test passes if there are two green squares.
44 --> 50 -->
45 <div class="hitregion"></div> 51 <div class="hitregion"></div>
46 </body> 52 </body>
47 </html> 53 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698