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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/pseudo-active-display-none.html

Issue 2095833003: :active pseudo class is not applied for element with display none. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added testcase Created 4 years, 5 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 <html>
3 <head>
rune 2016/06/24 12:28:51 Drop html and head.
ramya.v 2016/06/27 06:28:01 Done.
4 <script src="../../resources/testharness.js"></script>
5 <script src="../../resources/testharnessreport.js"></script>
6 <style>
7 label {
8 background-color: black;
9 }
10 input:active + label {
11 background-color: red;
12 }
13 #nodisplay {
14 display: none;
15 }
16 </style>
17 </head>
18 <body>
rune 2016/06/24 12:28:51 drop </head> and <body>
ramya.v 2016/06/27 06:28:01 Done.
19 <input id="nodisplay" type="checkbox"/>
20 <label id="label1" for="nodisplay">The target input has its display set to none. </label>
21 <script>
22 if (window.eventSender) {
rune 2016/06/24 12:28:51 I'd convert this if into a test. E.g.: test(f
ramya.v 2016/06/27 06:28:01 Done.
23 test(function() {
24 var l1 = document.getElementById("label1");
25 var x = l1.offsetLeft + l1.offsetWidth/2;
26 var y = l1.offsetTop + l1.offsetHeight/2;
27 eventSender.mouseMoveTo(x, y);
28 eventSender.mouseDown();
29 assert_equals(getComputedStyle(l1).backgroundColor, 'rgb(255, 0, 0)');
30 eventSender.mouseUp();
31 assert_equals(getComputedStyle(l1).backgroundColor, 'rgb(0, 0, 0)');
32 }, "This test performs a check for active pseudo class to be applied for eleme nt when its display is set to none.");
33 }
34 </script>
35 </body>
36 </html>
rune 2016/06/24 12:28:51 Drop </body> and </html>
ramya.v 2016/06/27 06:28:01 Done.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698