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

Unified Diff: chrome/test/data/extensions/api_test/extension_resource_request_policy/extension2/about_blank_iframe.html

Issue 6478019: Temporarily disable restrictions on who can request chrome-extension:// (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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: chrome/test/data/extensions/api_test/extension_resource_request_policy/extension2/about_blank_iframe.html
diff --git a/chrome/test/data/extensions/api_test/extension_resource_request_policy/extension2/about_blank_iframe.html b/chrome/test/data/extensions/api_test/extension_resource_request_policy/extension2/about_blank_iframe.html
new file mode 100644
index 0000000000000000000000000000000000000000..2c40cddc61c085ff61c3829418a0d530569e55bd
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/extension_resource_request_policy/extension2/about_blank_iframe.html
@@ -0,0 +1,16 @@
+<script>
+var frame = document.createElement("iframe");
+document.documentElement.appendChild(frame);
+
+// At this point, the frame has the location "about:blank", but it should
+// inherit its security origin from this document, so the following should work.
+var img = document.createElement("img");
+frame.contentDocument.body.appendChild(img);
+img.onload = function() {
+ chrome.test.notifyPass();
+}
+img.onerror = function() {
+ chrome.test.notifyFail("Could not load image");
+}
+img.src = chrome.extension.getURL("test.png");
+</script>

Powered by Google App Engine
This is Rietveld 408576698