diff options
author | jianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-11 17:46:07 +0000 |
---|---|---|
committer | jianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-11 17:46:07 +0000 |
commit | 5039b7a3c5ba113c73ad0aca238c164c67a8805a (patch) | |
tree | 6ca9757e7a454a60f258a0b2f55814096307e2e9 /chrome/browser/browser_uitest.cc | |
parent | 8e7ca37ada1ac495ab24df9ae2cd762a33397826 (diff) | |
download | chromium_src-5039b7a3c5ba113c73ad0aca238c164c67a8805a.zip chromium_src-5039b7a3c5ba113c73ad0aca238c164c67a8805a.tar.gz chromium_src-5039b7a3c5ba113c73ad0aca238c164c67a8805a.tar.bz2 |
Support running tests under LayoutTests/http/tests/local as local file, in order to mimic what run-webkit-tests does.
Search "http/tests/local/" in http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/run-webkit-tests for what it does.
This is needed by http/tests/local/resources/send-dragged-file.js.
Turn on file URL universal access in the test_shell. Delete rebaseline results of those layout tests that pass due to this change. Also add a UI test to make sure it is not on for the browser.
BUG=9275,12882
TEST=none
Review URL: http://codereview.chromium.org/201048
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25985 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_uitest.cc')
-rw-r--r-- | chrome/browser/browser_uitest.cc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/chrome/browser/browser_uitest.cc b/chrome/browser/browser_uitest.cc index 4c2ed05..a9d93b7 100644 --- a/chrome/browser/browser_uitest.cc +++ b/chrome/browser/browser_uitest.cc @@ -236,4 +236,25 @@ TEST_F(ShowModalDialogTest, BasicTest) { } #endif +class SecurityTest : public UITest { + protected: + static const int kTestIntervalMs = 250; + static const int kTestWaitTimeoutMs = 60 * 1000; +}; + +TEST_F(SecurityTest, DisallowFileUrlUniversalAccessTest) { + scoped_refptr<TabProxy> tab(GetActiveTab()); + ASSERT_TRUE(tab.get()); + + FilePath test_file(test_data_directory_); + test_file = test_file.AppendASCII("fileurl_universalaccess.html"); + + GURL url = net::FilePathToFileURL(test_file); + ASSERT_TRUE(tab->NavigateToURL(url)); + + std::string value = WaitUntilCookieNonEmpty(tab.get(), url, + "status", kTestIntervalMs, kTestWaitTimeoutMs); + ASSERT_STREQ("Disallowed", value.c_str()); +} + } // namespace |