diff options
author | cdn@chromium.org <cdn@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-29 21:43:24 +0000 |
---|---|---|
committer | cdn@chromium.org <cdn@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-29 21:43:24 +0000 |
commit | 52a26894a92e0d8b756bcce2bc96cd741f135329 (patch) | |
tree | ca0400410e8585e469bdb0593467d87d341762f9 /chrome/test | |
parent | ab6627371cb52d504cdc0bb33ca6ead8a7f8ac70 (diff) | |
download | chromium_src-52a26894a92e0d8b756bcce2bc96cd741f135329.zip chromium_src-52a26894a92e0d8b756bcce2bc96cd741f135329.tar.gz chromium_src-52a26894a92e0d8b756bcce2bc96cd741f135329.tar.bz2 |
Add Access-Control-Allow-Origin: * header for extension resources specifically listed as web accessible.
BUG=109686
Review URL: http://codereview.chromium.org/9152022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119646 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
2 files changed, 30 insertions, 0 deletions
diff --git a/chrome/test/data/extensions/api_test/extension_resource_request_policy/web_accessible/xhr_accessible_resource.html b/chrome/test/data/extensions/api_test/extension_resource_request_policy/web_accessible/xhr_accessible_resource.html new file mode 100644 index 0000000..3e1f037 --- /dev/null +++ b/chrome/test/data/extensions/api_test/extension_resource_request_policy/web_accessible/xhr_accessible_resource.html @@ -0,0 +1,15 @@ +<script> + // Copyright (c) 2012 The Chromium Authors. All rights reserved. + // Use of this source code is governed by a BSD-style license that can be + // found in the LICENSE file. + try { + req = new XMLHttpRequest; + req.open("GET", + "chrome-extension://ggmldgjhdenlnjjjmehkomheglpmijnf/test.png", + false); + req.send(); + document.title = 'XHR completed with status: ' + req.status; + } catch (e) { + document.title='XHR failed to load resource'; + } +</script>
\ No newline at end of file diff --git a/chrome/test/data/extensions/api_test/extension_resource_request_policy/web_accessible/xhr_inaccessible_resource.html b/chrome/test/data/extensions/api_test/extension_resource_request_policy/web_accessible/xhr_inaccessible_resource.html new file mode 100644 index 0000000..90e861e --- /dev/null +++ b/chrome/test/data/extensions/api_test/extension_resource_request_policy/web_accessible/xhr_inaccessible_resource.html @@ -0,0 +1,15 @@ +<script> + // Copyright (c) 2012 The Chromium Authors. All rights reserved. + // Use of this source code is governed by a BSD-style license that can be + // found in the LICENSE file. + try { + req = new XMLHttpRequest; + req.open("GET", + "chrome-extension://ggmldgjhdenlnjjjmehkomheglpmijnf/test2.png", + false); + req.send(); + document.title = 'XHR completed with status: ' + req.status; + } catch (e) { + document.title='XHR failed to load resource'; + } +</script>
\ No newline at end of file |