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

Unified Diff: LayoutTests/fast/dom/HTMLImageElement/image-srcset-invalid-url-no-crash.html

Issue 1142523002: MemoryCache::resourceForURL(): add argument validation. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/dom/HTMLImageElement/image-srcset-invalid-url-no-crash-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/HTMLImageElement/image-srcset-invalid-url-no-crash.html
diff --git a/LayoutTests/fast/dom/HTMLImageElement/image-srcset-invalid-url-no-crash.html b/LayoutTests/fast/dom/HTMLImageElement/image-srcset-invalid-url-no-crash.html
new file mode 100644
index 0000000000000000000000000000000000000000..d00f23bdb91948068a227fb936ae547c359d09e3
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLImageElement/image-srcset-invalid-url-no-crash.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<script src="../../../resources/js-test.js"></script>
+<script>
+ description("Invalid img.srcset URL should not crash");
+ window.jsTestIsAsync = true;
+ if (testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+ }
+ function done() {
+ testPassed("no crash.");
+ finishJSTest();
+ }
+</script>
+<img src="1x.png" srcset="//&%dE,; 1.2x" onerror="done()">
« no previous file with comments | « no previous file | LayoutTests/fast/dom/HTMLImageElement/image-srcset-invalid-url-no-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698