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

Side by Side Diff: LayoutTests/fast/css/disabled-form-control-elements-should-not-be-active.html

Issue 340143002: Disabled form control elements should not be active (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review Comments Created 6 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/disabled-form-control-elements-should-not-be-active-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 <style>
3 #outbox {
4 background-color: #00ff00;
5 width: 100px;
6 height: 100px;
7 }
8 #outbox:active {
9 background-color: #ff0000;
10 }
11 </style>
12 <script src='../../resources/js-test.js'></script>
13 <div id='outbox'>
14 <button disabled>Click Me!</button>
15 </div>
16
17 <script>
18 function shouldHaveBackground(element, bg) {
19 background = getComputedStyle(element, null).getPropertyValue('background-co lor');
20 shouldBeEqualToString('background', bg);
21 }
22 description('Style :active should not be applied for disabled Form Control eleme nts');
23 if (window.testRunner) {
24 var box = document.getElementById('outbox');
25
26 eventSender.dragMode = false;
27
28 var button = document.querySelector('button');
29 var buttonRect = button.getBoundingClientRect();
30 // Click the button.
31 eventSender.mouseMoveTo(buttonRect.left + 5, buttonRect.top + 5);
32 eventSender.mouseDown();
33 shouldHaveBackground(box, 'rgb(0, 255, 0)');
34 eventSender.mouseUp();
35 }
36 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/css/disabled-form-control-elements-should-not-be-active-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698