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

Unified Diff: third_party/WebKit/LayoutTests/fast/images/size-failure.html

Issue 1549253002: Make fast/images/size-failure.html not crash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « third_party/WebKit/LayoutTests/fast/images/resources/size-failure.gif ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/images/size-failure.html
diff --git a/third_party/WebKit/LayoutTests/fast/images/size-failure.html b/third_party/WebKit/LayoutTests/fast/images/size-failure.html
index 6f76a22ca4310f50e4b60070e12a564f54dc2523..b4da4b568c1bad08da7166f81b0cd937afff54bf 100644
--- a/third_party/WebKit/LayoutTests/fast/images/size-failure.html
+++ b/third_party/WebKit/LayoutTests/fast/images/size-failure.html
@@ -1,25 +1,26 @@
<html>
- <head>
- <script>
- if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
+<head>
+<script>
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
- // Force a pixel dump to cover raterization issues if any.
- onload = function() {
- testRunner.capturePixelsAsyncThen(function() {
- testRunner.notifyDone();
- });
- };
- }
- </script>
-
- </head>
- <body>
- <!-- This previously tried to read the size of the image when
- ImageDecoder::m_failed was true, triggering either an assert or a
- read of random memory. Thanks to Robert Swiecki for the test case. -->
- <img src="resources/size-failure.gif">
- <p>PASS</p>
- </body>
- </html>
+window.onload = function() {
+ if (!window.testRunner)
+ return;
+ // Force a pixel dump to cover raterization issues if any.
+ window.testRunner.capturePixelsAsyncThen(function() {
+ window.testRunner.notifyDone();
+ });
+};
+</script>
+</head>
+<body>
+ <!-- This previously tried to read the size of the image when
+ ImageDecoder::m_failed was true, triggering either an assert or a
+ read of random memory. Thanks to Robert Swiecki for the test case. -->
+ <img src="resources/size-failure.gif">
+ <p>PASS</p>
+</body>
+</html>
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/images/resources/size-failure.gif ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698