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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/xmlhttprequest/null-document-xmlhttprequest-open.html

Issue 1920873002: Enable error pages for layout tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: TEST. Created 4 years, 7 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 <p>This test checks for a NULL document crash that can happen when calling
2 XMLHttpRequest.open. If the test passes, you'll see a PASS message below.</p>
3 <hr>
4 <pre id="pre"></pre>
5 <iframe name="iframe" style="visibility:hidden" src="does-not-exist.bogus"></ifr ame> <!-- forces asynchronous load -->
6 <script>
7 <!--
8 function log(s)
9 {
10 document.getElementById("pre").appendChild(document.createTextNode(s));
11 }
12
13 function test()
14 {
15 var request = new XMLHttpRequest();
16 request.onreadystatechange = function(event) { if (event.target.readyState = = 1) parent.pass(); };
17 request.open("GET", window.location);
18 }
19
20 function pass()
21 {
22 log("PASS: You didn't crash.");
23
24 if (window.testRunner)
25 testRunner.notifyDone();
26 }
27
28 function main()
29 {
30 if (window.testRunner) {
31 testRunner.dumpAsText();
32 testRunner.waitUntilDone();
33 }
34
35 // setTimeout forces execution in the context of the frame
36 frames[0].setTimeout(test, 0);
37 }
38
39 main();
40 -->
41 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698