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

Unified Diff: chrome/renderer/chrome_content_renderer_client_unittest.cc

Issue 13923007: Remove --allow-request-os-file-handle option (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove unnecessary #include Created 7 years, 8 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/renderer/chrome_content_renderer_client_unittest.cc
diff --git a/chrome/renderer/chrome_content_renderer_client_unittest.cc b/chrome/renderer/chrome_content_renderer_client_unittest.cc
index 1387ff077c75051f9a0cdbabe9552f550f7a05aa..1194f01c93d7c47d9e2c9d43c0a4d5952a9db8d8 100644
--- a/chrome/renderer/chrome_content_renderer_client_unittest.cc
+++ b/chrome/renderer/chrome_content_renderer_client_unittest.cc
@@ -287,59 +287,4 @@ TEST_F(ChromeContentRendererClientTest, NaClRestriction) {
}
}
-TEST_F(ChromeContentRendererClientTest, IsRequestOSFileHandleAllowedForURL) {
- ChromeContentRendererClient client;
- const std::string& kWhitelistedExtensionID =
- "dolnidnbiendbodmklboojlnlpdeeipo";
- const std::string& kRandomExtensionID =
- "abcdefghijklmnopqrstuvwxyzabcdef";
- EXPECT_FALSE(client.IsRequestOSFileHandleAllowedForURL(GURL()));
- EXPECT_FALSE(client.IsRequestOSFileHandleAllowedForURL(
- GURL("http://example.com/")));
- EXPECT_FALSE(client.IsRequestOSFileHandleAllowedForURL(
- GURL("chrome-extension://" + kWhitelistedExtensionID)));
- EXPECT_TRUE(client.IsRequestOSFileHandleAllowedForURL(
- GURL("filesystem:chrome-extension://" +
- kWhitelistedExtensionID + "/foo")));
- EXPECT_FALSE(client.IsRequestOSFileHandleAllowedForURL(
- GURL("filesystem:http://" +
- kWhitelistedExtensionID + "/foo")));
- EXPECT_FALSE(client.IsRequestOSFileHandleAllowedForURL(
- GURL("filesystem:chrome-extension://" +
- kRandomExtensionID + "/foo")));
- EXPECT_FALSE(client.IsRequestOSFileHandleAllowedForURL(
- GURL("filesystem:http://127.0.0.1/foo")));
-
- client.RegisterRequestOSFileHandleAllowedHosts(
- "127.0.0.1," + kRandomExtensionID);
- EXPECT_TRUE(client.IsRequestOSFileHandleAllowedForURL(
- GURL("filesystem:chrome-extension://" +
- kRandomExtensionID + "/foo")));
- EXPECT_TRUE(client.IsRequestOSFileHandleAllowedForURL(
- GURL("filesystem:http://127.0.0.1/foo")));
- EXPECT_FALSE(client.IsRequestOSFileHandleAllowedForURL(
- GURL("http://127.0.0.1/foo")));
- EXPECT_FALSE(client.IsRequestOSFileHandleAllowedForURL(
- GURL("filesystem:http://192.168.0.1/foo")));
-
- client.RegisterRequestOSFileHandleAllowedHosts("127.0.0.?");
- EXPECT_TRUE(client.IsRequestOSFileHandleAllowedForURL(
- GURL("filesystem:http://127.0.0.1/foo")));
- EXPECT_TRUE(client.IsRequestOSFileHandleAllowedForURL(
- GURL("filesystem:http://127.0.0.2/foo")));
- EXPECT_FALSE(client.IsRequestOSFileHandleAllowedForURL(
- GURL("filesystem:http://127.0.1.0/foo")));
-
- client.RegisterRequestOSFileHandleAllowedHosts("*");
- EXPECT_TRUE(client.IsRequestOSFileHandleAllowedForURL(
- GURL("filesystem:chrome-extension://" +
- kRandomExtensionID + "/foo")));
- EXPECT_TRUE(client.IsRequestOSFileHandleAllowedForURL(
- GURL("filesystem:http://127.0.0.1/foo")));
- EXPECT_FALSE(client.IsRequestOSFileHandleAllowedForURL(
- GURL("http://127.0.0.1/foo")));
- EXPECT_TRUE(client.IsRequestOSFileHandleAllowedForURL(
- GURL("filesystem:http://192.168.0.1/foo")));
-}
-
} // namespace chrome
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | content/public/renderer/content_renderer_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698