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

Side by Side Diff: LayoutTests/fast/forms/submit-onFocus-invalidForm.html

Issue 199633017: Blink doesnt respect the form.submit() when called on "focus" event for invalid form (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Adding Layout Test Created 6 years, 8 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/submit-onFocus-invalidForm-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 html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <form method="GET" target="target" id="form">
8 <input name="query" value="AAA" pattern="banana|cherry" onfocus="onFocus(e vent)"/>
9 <input type="submit" id="submitButton"/>
10 </form>
11 <iframe id="target" name="target"></iframe>
12 <script>
13 description('Test that form.submit() when called on "focus" event for invalid fo rm should submit the form');
14 var count = 1;
15
16 function asyncTest(query) {
tkent 2014/04/01 02:23:15 This function and 'count' are unnecessary. We can
harpreet.sk 2014/04/01 05:46:07 Done.
17 if (query === '?query=AAA') {
18 if (--count == 0) {
19 testPassed('Form is successfully submitted and content is loaded in the frame');
20 finishJSTest();
21 }
22 }
23 }
24
25 function onFocus(event) {
26 var form = document.getElementById('form');
27 form.action = '#foo';
28 form.submit();
29 }
30
31 document.getElementById('target').onload = function(event) {
32 // This should return back query AAA
33 asyncTest(event.target.contentWindow.location.search);
34 }
35
36 window.onload = function() {
37 document.getElementById('submitButton').click();
38 }
39
40 if (window.testRunner)
41 window.jsTestIsAsync = true;
42 </script>
43 </body>
44 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/forms/submit-onFocus-invalidForm-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698