summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/stubs_apitest.cc
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-18 03:21:13 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-18 03:21:13 +0000
commit5f8681f6e104c322166e4bb860e242a86a601e13 (patch)
treed8e1516961fc938178e46ebdc2df9e7d5458a67c /chrome/browser/extensions/stubs_apitest.cc
parenta3d46f7e58274fc65cb89628a8e89fc49bca2750 (diff)
downloadchromium_src-5f8681f6e104c322166e4bb860e242a86a601e13.zip
chromium_src-5f8681f6e104c322166e4bb860e242a86a601e13.tar.gz
chromium_src-5f8681f6e104c322166e4bb860e242a86a601e13.tar.bz2
Don't allow content scripts to execute on file:// urls.
This requires a command line flag for the page cycler tests, since those load file:// urls. BUG=27877 TEST=Bunch of tests affected. Review URL: http://codereview.chromium.org/402029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32271 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/stubs_apitest.cc')
-rw-r--r--chrome/browser/extensions/stubs_apitest.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/chrome/browser/extensions/stubs_apitest.cc b/chrome/browser/extensions/stubs_apitest.cc
index 4ba81c7..bdbf69c 100644
--- a/chrome/browser/extensions/stubs_apitest.cc
+++ b/chrome/browser/extensions/stubs_apitest.cc
@@ -15,15 +15,15 @@
// should be available in content scripts) or update the list of privileged APIs
// in renderer_extension_bindings.js.
IN_PROC_BROWSER_TEST_F(ExtensionApiTest, Stubs) {
+ HTTPTestServer* server = StartHTTPServer();
+
ASSERT_TRUE(RunExtensionTest("stubs")) << message_;
- // Navigate to a simple file:// page, which should get the content script
+ // Navigate to a simple http:// page, which should get the content script
// injected and run the rest of the test.
- FilePath test_dir;
- ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir));
- FilePath simple_html_path = test_dir.AppendASCII("simple.html");
- ui_test_utils::NavigateToURL(browser(),
- GURL(simple_html_path.value()));
+ GURL url = server->TestServerPage("file/extensions/test_file.html");
+ ui_test_utils::NavigateToURL(browser(), url);
+
ResultCatcher catcher;
ASSERT_TRUE(catcher.GetNextResult());
}