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 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <p id="description"></p> | 7 <p id="description"></p> |
8 <div id="console"></div> | 8 <div id="console"></div> |
9 <script> | 9 <script> |
10 description('Test if change event fires properly when color chooser changes. Bug
66848 <br> To manually test this, click on the input color element in the top l
eft corner and change the value from the color chooser. See if the number of "va
lue changed" messages matches the number of times you changed the color.'); | 10 description('Test if change event fires properly when color chooser changes. Bug
66848 <br> To manually test this, click on the input color element in the top l
eft corner and change the value from the color chooser. See if the number of "va
lue changed" messages matches the number of times you changed the color.'); |
(...skipping 10 matching lines...) Expand all Loading... |
21 input.style.height = '20px'; | 21 input.style.height = '20px'; |
22 | 22 |
23 input.onchange = function() { | 23 input.onchange = function() { |
24 debug("value changed to " + input.value); | 24 debug("value changed to " + input.value); |
25 }; | 25 }; |
26 | 26 |
27 eventSender.mouseMoveTo(10, 10); | 27 eventSender.mouseMoveTo(10, 10); |
28 eventSender.mouseDown(); | 28 eventSender.mouseDown(); |
29 eventSender.mouseUp(); | 29 eventSender.mouseUp(); |
30 | 30 |
| 31 // Test that incorrect element arguments are (not) handled. |
| 32 shouldThrow("internals.selectColorInColorChooser({}, '#ff0000');"); |
| 33 shouldThrow("internals.selectColorInColorChooser(document, '#ff0000');"); |
| 34 |
31 // input.onchange should be called | 35 // input.onchange should be called |
32 internals.selectColorInColorChooser(input, '#ff0000'); | 36 internals.selectColorInColorChooser(input, '#ff0000'); |
33 // input.onchange should not be called | 37 // input.onchange should not be called |
34 internals.selectColorInColorChooser(input, '#ff0000'); | 38 internals.selectColorInColorChooser(input, '#ff0000'); |
35 | 39 |
36 shouldBe('input.value', '"#ff0000"'); | 40 shouldBe('input.value', '"#ff0000"'); |
37 </script> | 41 </script> |
38 </body> | 42 </body> |
39 </html> | 43 </html> |
OLD | NEW |