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

Unified Diff: chrome/test/data/chrome_extension_resource.html

Issue 12457042: Non-web-accessible extension URLs should not load in non-extension processes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing nits. Created 7 years, 9 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 | « chrome/renderer/extensions/resource_request_policy.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/chrome_extension_resource.html
diff --git a/chrome/test/data/chrome_extension_resource.html b/chrome/test/data/chrome_extension_resource.html
new file mode 100644
index 0000000000000000000000000000000000000000..34c996ce8b1d719e0085defd85b4bf58d684b281
--- /dev/null
+++ b/chrome/test/data/chrome_extension_resource.html
@@ -0,0 +1,33 @@
+<html>
+<head>
+<script>
+var xhrStatus = -1;
+var imgUrl = 'chrome-extension://eemcgdkfndhakfknompkggombfjjjeno/images/bookmark_manager_recent.png';
+
+window.onload = function() {
+ // The call to pushState with chrome-extension:// URL will succeed, since the
+ // test uses --disable-web-security.
+ history.pushState('', '',
+ 'chrome-extension://eemcgdkfndhakfknompkggombfjjjeno/main.html');
+ var xhr = new XMLHttpRequest();
+ xhr.onreadystatechange = function() {
+ if (xhr.readyState == 4) {
+ xhrStatus = xhr.status;
+ if (xhrStatus == 200) {
+ document.getElementById('star').src =
+ window.URL.createObjectURL(this.response);
+ }
+ domAutomationController.setAutomationId(0);
+ domAutomationController.send(xhr.status);
+ }
+ }
+ xhr.open('GET', imgUrl);
+ xhr.responseType = 'blob';
+ xhr.send();
+}
+</script>
+</head>
+<body>
+<img id='star'>
+</body>
+</html>
« no previous file with comments | « chrome/renderer/extensions/resource_request_policy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698