OLD | NEW |
---|---|
(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 | |
13 <div id="outbox"> | |
14 <button disabled>Click Me!</button> | |
15 </div> | |
16 <pre id="description"></pre> | |
tkent
2014/06/18 23:53:36
This element is unnecessary. js-test.js generates
spartha
2014/06/19 07:57:18
Done.
| |
17 <pre id="console"></pre> | |
tkent
2014/06/18 23:53:37
Ditto.
spartha
2014/06/19 07:57:18
Done.
| |
18 | |
19 <script src="../../resources/js-test.js"></script> | |
20 <script> | |
21 function shouldHaveBackground(element, bg) { | |
tkent
2014/06/18 23:53:37
Do not indent the top-level code.
<script>
functi
spartha
2014/06/19 07:57:18
Done.
| |
22 background = getComputedStyle(element, null).getPropertyValue("background-co lor"); | |
23 shouldBeEqualToString('background', bg); | |
24 } | |
25 | |
26 description("Style :active should not be applied for disabled Form Control ele ments"); | |
tkent
2014/06/18 23:53:37
Inconsistent quotes. Other code use single-quotes
spartha
2014/06/19 07:57:18
Done.
| |
27 | |
28 if (window.testRunner) { | |
29 var box = document.getElementById('outbox'); | |
30 | |
31 eventSender.dragMode = false; | |
32 | |
33 var button = document.querySelector('button'); | |
34 var buttonRect = button.getBoundingClientRect(); | |
35 // Click the button. | |
36 eventSender.mouseMoveTo(buttonRect.left + 5, buttonRect.top + 5); | |
37 eventSender.mouseDown(); | |
38 shouldHaveBackground(box, 'rgb(0, 255, 0)'); | |
39 eventSender.mouseUp(); | |
40 } | |
41 </script> | |
OLD | NEW |