OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../../resources/js-test.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
5 <script src="../resources/common.js"></script> | 5 <script src="../resources/common.js"></script> |
6 </head> | 6 </head> |
7 <body> | 7 <body> |
8 <p id="description"></p> | 8 <p id="description"></p> |
9 <div id="console"></div> | 9 <div id="console"></div> |
10 <input type="color" id="input" value="#ffffff"> | 10 <input type="color" id="input" value="#ffffff"> |
11 <script> | 11 <script> |
12 description('Test if change event fires when the user selects the default value
after the value was changed by JS.'); | 12 description('Test if change event fires when the user selects the default value
after the value was changed by JS.'); |
| 13 jsTestIsAsync = true; |
13 | 14 |
14 var input = document.getElementById('input'); | 15 var input = document.getElementById('input'); |
15 | 16 |
16 input.onchange = function() { | 17 input.onchange = function() { |
17 debug("onchange fired: " + input.value); | 18 debug("onchange fired: " + input.value); |
| 19 finishJSTest(); |
18 }; | 20 }; |
19 | 21 |
20 clickElement(input); | 22 clickElement(input); |
21 input.value = '#ff0000'; | 23 input.value = '#ff0000'; |
22 shouldBe('input.value', '"#ff0000"'); | 24 shouldBe('input.value', '"#ff0000"'); |
23 internals.selectColorInColorChooser(input, '#ffffff'); | 25 internals.selectColorInColorChooser(input, '#ffffff'); |
24 shouldBe('input.value', '"#ffffff"'); | 26 shouldBe('input.value', '"#ffffff"'); |
25 internals.endColorChooser(input); | 27 internals.endColorChooser(input); |
26 </script> | 28 </script> |
27 </body> | 29 </body> |
28 </html> | 30 </html> |
OLD | NEW |