Index: chrome/browser/plugins/plugin_info_message_filter_unittest.cc |
diff --git a/chrome/browser/plugins/plugin_info_message_filter_unittest.cc b/chrome/browser/plugins/plugin_info_message_filter_unittest.cc |
index 1fa4a104afccbaac4ae614a911a14cfa97946335..28f29395b63c3de10009ad028b4ca9f93cd3d4bd 100644 |
--- a/chrome/browser/plugins/plugin_info_message_filter_unittest.cc |
+++ b/chrome/browser/plugins/plugin_info_message_filter_unittest.cc |
@@ -26,6 +26,7 @@ |
#include "content/public/test/test_browser_thread_bundle.h" |
#include "testing/gmock/include/gmock/gmock.h" |
#include "testing/gtest/include/gtest/gtest.h" |
+#include "url/origin.h" |
using content::PluginService; |
@@ -45,7 +46,7 @@ class FakePluginServiceFilter : public content::PluginServiceFilter { |
int render_view_id, |
const void* context, |
const GURL& url, |
- const GURL& policy_url, |
+ const url::Origin& policy_url, |
content::WebPluginInfo* plugin) override; |
bool CanLoadPlugin(int render_process_id, |
@@ -64,7 +65,7 @@ bool FakePluginServiceFilter::IsPluginAvailable( |
int render_view_id, |
const void* context, |
const GURL& url, |
- const GURL& policy_url, |
+ const url::Origin& policy_url, |
content::WebPluginInfo* plugin) { |
std::map<base::FilePath, bool>::iterator it = |
plugin_state_.find(plugin->path); |
@@ -151,9 +152,9 @@ class PluginInfoMessageFilterTest : public ::testing::Test { |
base::ASCIIToUTF16(content::kFlashPluginName), base::FilePath(), |
base::ASCIIToUTF16("1"), base::ASCIIToUTF16("Fake Flash")); |
- PluginUtils::GetPluginContentSetting(host_content_settings_map_, |
- plugin_info, url, url, plugin, |
- &setting, &is_default, &is_managed); |
+ PluginUtils::GetPluginContentSetting( |
+ host_content_settings_map_, plugin_info, url::Origin(url), url, plugin, |
+ &setting, &is_default, &is_managed); |
EXPECT_EQ(expected_setting, setting); |
EXPECT_EQ(expected_is_default, is_default); |
EXPECT_EQ(expected_is_managed, is_managed); |
@@ -178,9 +179,9 @@ TEST_F(PluginInfoMessageFilterTest, FindEnabledPlugin) { |
ChromeViewHostMsg_GetPluginInfo_Status status; |
content::WebPluginInfo plugin; |
std::string actual_mime_type; |
- EXPECT_TRUE(context()->FindEnabledPlugin( |
- 0, GURL(), GURL(), "foo/bar", &status, &plugin, &actual_mime_type, |
- NULL)); |
+ EXPECT_TRUE(context()->FindEnabledPlugin(0, GURL(), url::Origin(), |
+ "foo/bar", &status, &plugin, |
+ &actual_mime_type, NULL)); |
EXPECT_EQ(ChromeViewHostMsg_GetPluginInfo_Status::kAllowed, status); |
EXPECT_EQ(foo_plugin_path_.value(), plugin.path.value()); |
} |
@@ -190,9 +191,9 @@ TEST_F(PluginInfoMessageFilterTest, FindEnabledPlugin) { |
ChromeViewHostMsg_GetPluginInfo_Status status; |
content::WebPluginInfo plugin; |
std::string actual_mime_type; |
- EXPECT_TRUE(context()->FindEnabledPlugin( |
- 0, GURL(), GURL(), "foo/bar", &status, &plugin, &actual_mime_type, |
- NULL)); |
+ EXPECT_TRUE(context()->FindEnabledPlugin(0, GURL(), url::Origin(), |
+ "foo/bar", &status, &plugin, |
+ &actual_mime_type, NULL)); |
EXPECT_EQ(ChromeViewHostMsg_GetPluginInfo_Status::kAllowed, status); |
EXPECT_EQ(bar_plugin_path_.value(), plugin.path.value()); |
} |
@@ -204,9 +205,9 @@ TEST_F(PluginInfoMessageFilterTest, FindEnabledPlugin) { |
std::string actual_mime_type; |
std::string identifier; |
base::string16 plugin_name; |
- EXPECT_FALSE(context()->FindEnabledPlugin( |
- 0, GURL(), GURL(), "foo/bar", &status, &plugin, &actual_mime_type, |
- NULL)); |
+ EXPECT_FALSE(context()->FindEnabledPlugin(0, GURL(), url::Origin(), |
+ "foo/bar", &status, &plugin, |
+ &actual_mime_type, NULL)); |
EXPECT_EQ(ChromeViewHostMsg_GetPluginInfo_Status::kDisabled, status); |
EXPECT_EQ(foo_plugin_path_.value(), plugin.path.value()); |
} |
@@ -214,9 +215,9 @@ TEST_F(PluginInfoMessageFilterTest, FindEnabledPlugin) { |
ChromeViewHostMsg_GetPluginInfo_Status status; |
content::WebPluginInfo plugin; |
std::string actual_mime_type; |
- EXPECT_FALSE(context()->FindEnabledPlugin( |
- 0, GURL(), GURL(), "baz/blurp", &status, &plugin, &actual_mime_type, |
- NULL)); |
+ EXPECT_FALSE(context()->FindEnabledPlugin(0, GURL(), url::Origin(), |
+ "baz/blurp", &status, &plugin, |
+ &actual_mime_type, NULL)); |
EXPECT_EQ(ChromeViewHostMsg_GetPluginInfo_Status::kNotFound, status); |
EXPECT_EQ(FILE_PATH_LITERAL(""), plugin.path.value()); |
} |