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 |