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

Unified 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: Updated test case which require LocalStyleChange calculation from both setActive and setHover Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/pseudo-hover-active-display-none.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/css/pseudo-active-display-none.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/pseudo-active-display-none.html b/third_party/WebKit/LayoutTests/fast/css/pseudo-active-display-none.html
new file mode 100644
index 0000000000000000000000000000000000000000..d154cca1e3f9397325784c224eff54b619eb26d0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/pseudo-active-display-none.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<style>
+label {
+ background-color: black;
+}
+input:active + label {
+ background-color: red;
+}
+#nodisplay {
+ display: none;
+}
+</style>
+<input id="nodisplay" type="checkbox"/>
+<label id="label1" for="nodisplay">The target input has its display set to none.</label>
+<script>
+test(function() {
+ assert_true(window.eventSender !== null);
+}, "window.eventSender is required for the test to run");
+
+test(function() {
+ var l1 = document.getElementById("label1");
+ var x = l1.offsetLeft + l1.offsetWidth/2;
+ var y = l1.offsetTop + l1.offsetHeight/2;
+ eventSender.mouseMoveTo(x, y);
+ eventSender.mouseDown();
+ assert_equals(getComputedStyle(l1).backgroundColor, 'rgb(255, 0, 0)');
+ eventSender.mouseUp();
+ assert_equals(getComputedStyle(l1).backgroundColor, 'rgb(0, 0, 0)');
+}, "This test performs a check for active pseudo class to be applied for element when its display is set to none.");
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/pseudo-hover-active-display-none.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698