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

Side by Side Diff: LayoutTests/fast/images/image-page-injected-script-crash.html

Issue 25417007: Handle crash when submitting an injected form on an "image page". (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Test cleanup and rebase code. Created 7 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/images/image-page-injected-script-crash-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 <script>
4
5 if (window.testRunner) {
6 testRunner.dumpAsText();
7 testRunner.setCanOpenWindows();
8 testRunner.waitUntilDone();
9 }
10
11 function log(message)
12 {
13 var console = document.getElementById("console");
14 console.appendChild(document.createTextNode(message + "\n"));
15 }
16
17 function zoomPage()
18 {
19 var newwindow = window.open("resources/dice.png");
20 newwindow.onload = function() {
21 o = newwindow.document.createElement("div");
22 o.setAttribute("id", "overlay");
23 o.innerHTML = '<form name="testForm" action="" enctype="multipart/form-da ta" method="get" id="ajaxform" name="pin_form" class="form-horizontal"><input ty pe="text" name="url" id="id_url" /><button id="btnsubmit" type="submit" class="b tn btn-primary">Submit</button></form>';
24 newwindow.document.body.appendChild(o);
25 if (window.eventSender) {
26 newwindow.document.forms["testForm"]["url"].value = "some-url";
27 newwindow.document.forms["testForm"].submit();
28
29 setTimeout(function(){
30 if(newwindow.location.search == "?url=some-url")
31 log("Test Success");
32 else
33 log("Test failed: URL passed: " + newwindow.location.sea rch);
34 testRunner.notifyDone();
35 },3000);
36
37 }
38
39 };
40 }
41 </script>
42 <body onload="zoomPage()">
43 <p>This tests that submitting an injected form on an "image page" doesn't crash the tab. This test requires testRunner to run. To test manually, open <a href=" resources/dice.png">this image</a> in a browser window, and inject script from t he page source and fill the form and press submit. It must not crash and the url must have ?url=some-url as the parameter.</p>
44 <pre id="console"></pre>
45 </body>
46 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/images/image-page-injected-script-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698