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

Unified Diff: LayoutTests/fast/text-autosizing/empty-document-crash.html

Issue 182443004: [FastTextAutosizer] Do not inflate blocks with no children (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/text-autosizing/empty-document-crash-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/text-autosizing/empty-document-crash.html
diff --git a/LayoutTests/fast/text-autosizing/empty-document-crash.html b/LayoutTests/fast/text-autosizing/empty-document-crash.html
new file mode 100644
index 0000000000000000000000000000000000000000..094af576021d3966e3c29cac1cb15bb90dcf23cc
--- /dev/null
+++ b/LayoutTests/fast/text-autosizing/empty-document-crash.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta name="viewport" content="width=800">
+<style>
+ body {
+ width: 800px;
+ margin: 0;
+ overflow-y: hidden;
+ }
+</style>
+
+<script src="resources/autosizingTest.js"></script>
+</head>
+<body>
+
+Test for crbug.com/348458: this test passes if it does not crash.
+<script>
+ // Create an iframe with no content (html, body) except for the document.
+ // Note: splitting the end script tag is requried to prevent closing the script we are in.
+ document.body.innerHTML += "<iframe src='data:text/html,<body><script>document.removeChild(document.body.parentElement)</s" + "cript>'></body></iframe>";
+ var forceLayout = document.getElementsByTagName('iframe')[0].offsetWidth;
+ document.write("PASS");
+ if (testRunner)
+ testRunner.dumpAsText();
+</script>
+
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/text-autosizing/empty-document-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698