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

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: Removed unnecessary lines from 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
15 function onFocus(event) {
16 var form = document.getElementById('form');
17 form.action = '#foo';
18 form.submit();
19 }
20
21 document.getElementById('target').onload = function(event) {
22 // This should return back query AAA
23 var query = event.target.contentWindow.location.search;
24 if (query === '?query=AAA') {
25 testPassed('Form is successfully submitted and content is loaded in the frame');
26 finishJSTest();
27 }
28 }
29
30 window.onload = function() {
31 document.getElementById('submitButton').click();
32 }
33
34 if (window.testRunner)
35 window.jsTestIsAsync = true;
36 </script>
37 </body>
38 </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