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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/svg/use-contenttype-blocked.html

Issue 1706243002: Don't use SVG resource documents with an unrecognized MIME-type (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use testharness; add unit test for extractMIMETypeFromMediaType Created 4 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
Index: third_party/WebKit/LayoutTests/http/tests/svg/use-contenttype-blocked.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/svg/use-contenttype-blocked.html b/third_party/WebKit/LayoutTests/http/tests/svg/use-contenttype-blocked.html
new file mode 100644
index 0000000000000000000000000000000000000000..5c2fab17623fafe4926ce1e7a83f00e4f4cd9911
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/svg/use-contenttype-blocked.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<svg>
+ <rect width="100" height="100" fill="green"/>
+ <use xlink:href="resources/echo-query.php?type=application/json&payload=%3C%3Fxml%20version%3D%271.0%27%3F%3E%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%3E%3Crect%20id%3D%27rectangle%27%20width%3D%27100%27%20height%3D%27100%27%20fill%3D%27red%27/%3E%3C/svg%3E#rectangle">
+ <script>
+ var t = async_test("Unrecognized Content-Type for external &lt;use> is blocked.");
+ var useElement = document.querySelector('use');
+ useElement.onerror = t.step_func_done();
+ useElement.onload = t.unreached_func();
+ </script>
+ </use>
+</svg>

Powered by Google App Engine
This is Rietveld 408576698