diff options
author | joth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-04 11:12:43 +0000 |
---|---|---|
committer | joth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-04 11:12:43 +0000 |
commit | 10e59f313e152793f810ac60288e9a3516aba8a3 (patch) | |
tree | 092a11226e8d577aa77721efe57926e729d58fdc /chrome/test/data | |
parent | c65769622ed9c97688cf0662f2cd2da77a7f5bc2 (diff) | |
download | chromium_src-10e59f313e152793f810ac60288e9a3516aba8a3.zip chromium_src-10e59f313e152793f810ac60288e9a3516aba8a3.tar.gz chromium_src-10e59f313e152793f810ac60288e9a3516aba8a3.tar.bz2 |
Fix crash when permission request received from extension.
BUG=http://crbug.com/37196
TEST=TODO
Review URL: http://codereview.chromium.org/667006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40621 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/data')
-rw-r--r-- | chrome/test/data/extensions/api_test/geolocation/background.html | 22 | ||||
-rw-r--r-- | chrome/test/data/extensions/api_test/geolocation/manifest.json | 7 |
2 files changed, 29 insertions, 0 deletions
diff --git a/chrome/test/data/extensions/api_test/geolocation/background.html b/chrome/test/data/extensions/api_test/geolocation/background.html new file mode 100644 index 0000000..553fec5 --- /dev/null +++ b/chrome/test/data/extensions/api_test/geolocation/background.html @@ -0,0 +1,22 @@ +<script> + // These API calls should fail since geolocation is not allowed from + // extensions. + chrome.test.runTests([ + function geolocation_getCurrentPosition() { + try { + navigator.geolocation.getCurrentPosition(chrome.test.fail, + chrome.test.succeed); + } catch (e) { + chrome.test.fail(); + } + }, + function geolocation_watchPosition() { + try { + navigator.geolocation.watchPosition(chrome.test.fail, + chrome.test.succeed); + } catch (e) { + chrome.test.fail(); + } + } +]); +</script>
\ No newline at end of file diff --git a/chrome/test/data/extensions/api_test/geolocation/manifest.json b/chrome/test/data/extensions/api_test/geolocation/manifest.json new file mode 100644 index 0000000..3c7ff3f --- /dev/null +++ b/chrome/test/data/extensions/api_test/geolocation/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "geolocation access apitest", + "description": "tests geolocation is not accessible from extensions", + "version": "0.1", + "background_page": "background.html", + "permissions": [ ] +} |