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

Unified Diff: chrome/browser/browser_uitest.cc

Issue 201048: Support running tests under LayoutTests/http/tests/local as local file, in or... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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
Index: chrome/browser/browser_uitest.cc
===================================================================
--- chrome/browser/browser_uitest.cc (revision 25942)
+++ chrome/browser/browser_uitest.cc (working copy)
@@ -236,4 +236,25 @@
}
#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
« no previous file with comments | « no previous file | chrome/test/data/fileurl_universalaccess.html » ('j') | webkit/tools/layout_tests/layout_package/path_utils.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698