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

Unified Diff: chrome/browser/metrics/plugin_metrics_provider_unittest.cc

Issue 1259493003: Treat PPAPI disconnect as a crash for plugin metrics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more realistic test Created 5 years, 4 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
« no previous file with comments | « chrome/browser/metrics/plugin_metrics_provider.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cd4afa7800355434ada252bf9ae63fb8d2971a9c..78e6b6550372d870edc55d88323809974eb6678a 100644
--- a/chrome/browser/metrics/plugin_metrics_provider_unittest.cc
+++ b/chrome/browser/metrics/plugin_metrics_provider_unittest.cc
@@ -170,6 +170,10 @@ TEST_F(PluginMetricsProviderTest, ProvideStabilityMetricsWhenPendingTask) {
content::ChildProcessData child_process_data(content::PROCESS_TYPE_PLUGIN);
child_process_data.name = base::UTF8ToUTF16("p1");
provider.BrowserChildProcessInstanceCreated(child_process_data);
+ provider.BrowserChildProcessCrashed(child_process_data, 1);
+
+ provider.BrowserChildProcessInstanceCreated(child_process_data);
+ provider.BrowserChildProcessHostDisconnected(child_process_data);
// Call ProvideStabilityMetrics to check that it will force pending tasks to
// be executed immediately.
@@ -178,5 +182,6 @@ TEST_F(PluginMetricsProviderTest, ProvideStabilityMetricsWhenPendingTask) {
// Check current number of instances created.
const metrics::SystemProfileProto_Stability& stability =
system_profile.stability();
- EXPECT_EQ(1, stability.plugin_stability(0).instance_count());
+ EXPECT_EQ(2, stability.plugin_stability(0).instance_count());
+ EXPECT_EQ(2, stability.plugin_stability(0).crash_count());
}
« no previous file with comments | « chrome/browser/metrics/plugin_metrics_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698