Index: chrome/browser/metrics/plugin_metrics_provider_unittest.cc |
diff --git a/chrome/browser/metrics/plugin_metrics_provider_unittest.cc b/chrome/browser/metrics/plugin_metrics_provider_unittest.cc |
index 76151d2c5a9cb6c412b3b24b4b098d39c54936b9..fefa2532890d52c93500a69e4cc7f9683d10ea3e 100644 |
--- a/chrome/browser/metrics/plugin_metrics_provider_unittest.cc |
+++ b/chrome/browser/metrics/plugin_metrics_provider_unittest.cc |
@@ -27,16 +27,12 @@ namespace { |
content::WebPluginInfo CreateFakePluginInfo( |
const std::string& name, |
const base::FilePath::CharType* path, |
- const std::string& version, |
- bool is_pepper) { |
+ const std::string& version) { |
content::WebPluginInfo plugin(base::UTF8ToUTF16(name), |
base::FilePath(path), |
base::UTF8ToUTF16(version), |
base::string16()); |
- if (is_pepper) |
- plugin.type = content::WebPluginInfo::PLUGIN_TYPE_PEPPER_IN_PROCESS; |
- else |
- plugin.type = content::WebPluginInfo::PLUGIN_TYPE_NPAPI; |
+ plugin.type = content::WebPluginInfo::PLUGIN_TYPE_PEPPER_IN_PROCESS; |
return plugin; |
} |
@@ -61,8 +57,6 @@ class PluginMetricsProviderTest : public ::testing::Test { |
TEST_F(PluginMetricsProviderTest, IsPluginProcess) { |
EXPECT_TRUE(PluginMetricsProvider::IsPluginProcess( |
- content::PROCESS_TYPE_PLUGIN)); |
- EXPECT_TRUE(PluginMetricsProvider::IsPluginProcess( |
content::PROCESS_TYPE_PPAPI_PLUGIN)); |
EXPECT_FALSE(PluginMetricsProvider::IsPluginProcess( |
content::PROCESS_TYPE_GPU)); |
@@ -75,9 +69,9 @@ TEST_F(PluginMetricsProviderTest, Plugins) { |
std::vector<content::WebPluginInfo> plugins; |
plugins.push_back(CreateFakePluginInfo("p1", FILE_PATH_LITERAL("p1.plugin"), |
- "1.5", true)); |
+ "1.5")); |
plugins.push_back(CreateFakePluginInfo("p2", FILE_PATH_LITERAL("p2.plugin"), |
- "2.0", false)); |
+ "2.0")); |
provider.SetPluginsForTesting(plugins); |
metrics::SystemProfileProto system_profile; |
@@ -91,7 +85,7 @@ TEST_F(PluginMetricsProviderTest, Plugins) { |
EXPECT_EQ("p2", system_profile.plugin(1).name()); |
EXPECT_EQ("p2.plugin", system_profile.plugin(1).filename()); |
EXPECT_EQ("2.0", system_profile.plugin(1).version()); |
- EXPECT_FALSE(system_profile.plugin(1).is_pepper()); |
+ EXPECT_TRUE(system_profile.plugin(1).is_pepper()); |
// Now set some plugin stability stats for p2 and verify they're recorded. |
scoped_ptr<base::DictionaryValue> plugin_dict(new base::DictionaryValue); |
@@ -171,23 +165,24 @@ TEST_F(PluginMetricsProviderTest, ProvideStabilityMetricsWhenPendingTask) { |
// Increase number of created instances which should also start a delayed |
// task. |
- content::ChildProcessData child_process_data1(content::PROCESS_TYPE_PLUGIN); |
+ content::ChildProcessData child_process_data1( |
+ content::PROCESS_TYPE_PPAPI_PLUGIN); |
child_process_data1.name = base::UTF8ToUTF16("p1"); |
- provider.BrowserChildProcessInstanceCreated(child_process_data1); |
+ provider.BrowserChildProcessHostConnected(child_process_data1); |
provider.BrowserChildProcessCrashed(child_process_data1, 1); |
// A disconnect should not generate a crash event. |
- provider.BrowserChildProcessInstanceCreated(child_process_data1); |
+ provider.BrowserChildProcessHostConnected(child_process_data1); |
provider.BrowserChildProcessHostDisconnected(child_process_data1); |
content::ChildProcessData child_process_data2( |
content::PROCESS_TYPE_PPAPI_PLUGIN); |
child_process_data2.name = base::UTF8ToUTF16("p2"); |
- provider.BrowserChildProcessInstanceCreated(child_process_data2); |
+ provider.BrowserChildProcessHostConnected(child_process_data2); |
provider.BrowserChildProcessCrashed(child_process_data2, 1); |
// A kill should generate a crash event |
- provider.BrowserChildProcessInstanceCreated(child_process_data2); |
+ provider.BrowserChildProcessHostConnected(child_process_data2); |
provider.BrowserChildProcessKilled(child_process_data2, 1); |
// Call ProvideStabilityMetrics to check that it will force pending tasks to |