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

Side by Side Diff: LayoutTests/fast/forms/date-multiple-fields/date-clearbutton-preventdefault-mousecapture-status.html

Issue 594093002: Fix for mouse capture and release on ClearButtonElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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/forms/date-multiple-fields/date-clearbutton-preventdefault-mousecapture-status-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>
2 <html>
3 <head>
4 <script src="../resources/common.js"></script>
5 <script src="../../../resources/js-test.js"></script>
6 </head>
7 <body>
8
9 <input id="input" type="date" style="font-family:ahem; font-size:16px;">
10 <button id="js-btn-test" type="button"></button>
11
12 <script>
13 description('Tests, after clicking mouse on clearInputButton of date input type, will release mouse capture in case of preventdefault.');
14
15 var input = document.getElementById('input');
16 input.value = '2345-07-19';
17
18 var btn = document.getElementById('js-btn-test');
19 var output = '';
20
21 btn.addEventListener('click', function ()
22 {
23 output = 'Clicked';
24 });
25
26 document.addEventListener('mouseup', function (evt)
27 {
28 evt.preventDefault();
29 });
30
31 var clearButton = getElementByPseudoId(internals.oldestShadowRoot(input),'-webki t-clear-button');
32 clickElement(clearButton);
33 shouldBeEqualToString('input.value', '');
34
35 clickElement(btn);
36 shouldBeEqualToString('output', 'Clicked');
37 </script>
38 </body>
39 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/forms/date-multiple-fields/date-clearbutton-preventdefault-mousecapture-status-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698