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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/text-autosizing/empty-document-crash.html

Issue 2295653002: Use window.testRunner in if-clause (Closed)
Patch Set: a 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <meta name="viewport" content="width=800"> 4 <meta name="viewport" content="width=800">
5 <style> 5 <style>
6 body { 6 body {
7 width: 800px; 7 width: 800px;
8 margin: 0; 8 margin: 0;
9 overflow-y: hidden; 9 overflow-y: hidden;
10 } 10 }
11 </style> 11 </style>
12 12
13 <script src="resources/autosizingTest.js"></script> 13 <script src="resources/autosizingTest.js"></script>
14 </head> 14 </head>
15 <body> 15 <body>
16 16
17 Test for crbug.com/348458: this test passes if it does not crash. 17 Test for crbug.com/348458: this test passes if it does not crash.
18 <script> 18 <script>
19 // Create an iframe with no content (html, body) except for the document. 19 // Create an iframe with no content (html, body) except for the document.
20 // Note: splitting the end script tag is requried to prevent closing the scrip t we are in. 20 // Note: splitting the end script tag is requried to prevent closing the scrip t we are in.
21 document.body.innerHTML += "<iframe src='data:text/html,<body><script>document .removeChild(document.body.parentElement)</s" + "cript>'></body></iframe>"; 21 document.body.innerHTML += "<iframe src='data:text/html,<body><script>document .removeChild(document.body.parentElement)</s" + "cript>'></body></iframe>";
22 var forceLayout = document.getElementsByTagName('iframe')[0].offsetWidth; 22 var forceLayout = document.getElementsByTagName('iframe')[0].offsetWidth;
23 document.write("PASS"); 23 document.write("PASS");
24 if (testRunner) 24 if (window.testRunner)
25 testRunner.dumpAsText(); 25 testRunner.dumpAsText();
26 </script> 26 </script>
27 27
28 </body> 28 </body>
29 </html> 29 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698