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

Side by Side Diff: LayoutTests/fast/css/focus-display-block-inline.html

Issue 16599003: :hover style not applied on hover if its display property is different from original style's (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch (fixed test that was expected to fail and is now passing) Created 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/css/focus-display-block-inline-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!doctype html>
2 <html lang="en">
3 <head>
4 <title>Switch between display block and none on :focus</title>
5 <style>
6 .box {
7 width: 100px;
8 height: 100px;
9 background-color: blue;
10 color: white;
11 padding: 10px;
12 }
13 #button {
14 display: block;
15 width: 200px;
16 height: 50px;
17 }
18 #button:focus {
19 display: none;
20 }
21 </style>
22
23 <script src="../js/resources/js-test-pre.js"></script>
24 </head>
25
26 <script type="text/javascript">
27 if (window.testRunner)
28 testRunner.waitUntilDone();
29
30 function beginTest() {
31 if (window.eventSender) {
32 var button = document.getElementById("button");
33 button.focus();
34
35 release();
36 }
37 }
38
39 function release() {
40 if (window.eventSender) {
41 var button = document.getElementById("button");
42 var displayMode = window.getComputedStyle(button).getPro pertyValue("display");
43
44 if (displayMode == "none")
45 testPassed("Setting display to none on focus pro cessed OK.");
46 else
47 testFailed("Setting display to none on focus FAI LED." + " (expected 'none', got '" + displayMode + "')");
48
49 var elementsToHide = document.getElementsByClassName('bo x');
50 for (var element, i = 0; element = elementsToHide[i]; i+ +)
51 element.style.visibility = "hidden";
52
53 if (window.testRunner)
54 testRunner.notifyDone();
55 }
56 }
57
58 </script>
59
60 <body onload="beginTest()">
61 <button type="button" id="button">When you hit TAB, this button should d isappear.</button>
62 <div class="box">This is here to show the layout being recomputed</div>
63 </body>
64 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/css/focus-display-block-inline-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698