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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/email-format-warning.html

Issue 2339493002: Remove useless validation check for email type. (Closed)
Patch Set: Remove noisy value validation warnings for email input type. Created 4 years, 3 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <body>
3 <script src="../../resources/js-test.js"></script>
4 <div id="container">
5 <input type="email">
6 <input type="email" style="visibility: hidden;">
7 <input type="email" style="display: none;">
8 <input type="email" value="parsing&#x263A;"><!-- This should show one warning. - ->
9 <input value="value-before-type&#x263A;" type="email"><!-- This should show one warning. -->
10 <input value="valid@example.com, invalid-in-multiple&#x263A;" type="email" multi ple><!-- This should show one warning. -->
11 </div>
12 <script>
13 var inputs = document.querySelectorAll('input');
14 var visibleInput = inputs[0];
15 var invisibleInput2 = inputs[1];
16 var invisibleInput3 = inputs[2];
17 // Force layout. The warning message behavior depends on computed style.
18 visibleInput.offsetWidth;
19
20 debug('Invisible INPUT element should not show a format warning.');
21 invisibleInput2.value = ':)';
22 invisibleInput3.value = ':)';
23 debug('');
24
25 debug('Visible INPUT element should show a format warning. We\'ll see three warn ings.');
26 visibleInput.setAttribute('value', 'Invalid attribute value'); // This shows a w arning.
27 visibleInput.type = 'text';
28 visibleInput.type = 'email'; // This shows a warning again.
29
30 visibleInput.offsetWidth;
31 visibleInput.value = 'Invalid IDL value'; // This shows a warning.
32 visibleInput.type = 'text';
33 visibleInput.type = 'email'; // This doesn't show a warning.
34
35 document.querySelector('#container').remove();
36 </script>
37 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698