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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/color/input-color-choose-default-value-after-set-value.html

Issue 2447653002: INPUT element: Do not dispatch events in detachLayoutTree(). (Closed)
Patch Set: Created 4 years, 1 month 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
OLDNEW
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698