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

Unified Diff: chrome/browser/tab_contents/navigation_metrics_recorder_browsertest.cc

Issue 2713273002: Increase test coverage for Navigation.MainFrameSchemeDifferentPage (Closed)
Patch Set: Increase test coverage for Navigation.MainFrameSchemeDifferentPage Created 3 years, 9 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 | « no previous file | components/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/navigation_metrics_recorder_browsertest.cc
diff --git a/chrome/browser/tab_contents/navigation_metrics_recorder_browsertest.cc b/chrome/browser/tab_contents/navigation_metrics_recorder_browsertest.cc
index a192d04520f92ec5ea7602f7e4ac63341b1709bb..02a38d54eed1d7cec341c8ea186ebade22167648 100644
--- a/chrome/browser/tab_contents/navigation_metrics_recorder_browsertest.cc
+++ b/chrome/browser/tab_contents/navigation_metrics_recorder_browsertest.cc
@@ -41,6 +41,9 @@ IN_PROC_BROWSER_TEST_F(NavigationMetricsRecorderBrowserTest, TestMetrics) {
GURL("data:text/html, <html></html>"));
histograms.ExpectTotalCount("Navigation.MainFrameScheme", 1);
histograms.ExpectBucketCount("Navigation.MainFrameScheme", 5 /* data: */, 1);
+ histograms.ExpectTotalCount("Navigation.MainFrameSchemeDifferentPage", 1);
+ histograms.ExpectBucketCount("Navigation.MainFrameSchemeDifferentPage",
+ 5 /* data: */, 1);
// Since there was no previous URL, Rappor shouldn't record anything.
EXPECT_EQ(0, rappor_service.GetReportsCount());
@@ -70,6 +73,9 @@ IN_PROC_BROWSER_TEST_F(NavigationMetricsRecorderBrowserTest, DataURLMimeTypes) {
RedirectToUrl(web_contents, GURL("data:text/html, <html></html>"));
histograms.ExpectTotalCount("Navigation.MainFrameScheme", 1);
histograms.ExpectBucketCount("Navigation.MainFrameScheme", 5 /* data: */, 1);
+ histograms.ExpectTotalCount("Navigation.MainFrameSchemeDifferentPage", 1);
+ histograms.ExpectBucketCount("Navigation.MainFrameSchemeDifferentPage",
+ 5 /* data: */, 1);
histograms.ExpectTotalCount("Navigation.MainFrameScheme.DataUrl.MimeType", 1);
histograms.ExpectBucketCount("Navigation.MainFrameScheme.DataUrl.MimeType",
NavigationMetricsRecorder::MIME_TYPE_HTML, 1);
@@ -80,6 +86,9 @@ IN_PROC_BROWSER_TEST_F(NavigationMetricsRecorderBrowserTest, DataURLMimeTypes) {
"xmlns=\"http://www.w3.org/2000/svg\"></svg>"));
histograms.ExpectTotalCount("Navigation.MainFrameScheme", 2);
histograms.ExpectBucketCount("Navigation.MainFrameScheme", 5 /* data: */, 2);
+ histograms.ExpectTotalCount("Navigation.MainFrameSchemeDifferentPage", 2);
+ histograms.ExpectBucketCount("Navigation.MainFrameSchemeDifferentPage",
+ 5 /* data: */, 2);
histograms.ExpectTotalCount("Navigation.MainFrameScheme.DataUrl.MimeType", 2);
histograms.ExpectBucketCount("Navigation.MainFrameScheme.DataUrl.MimeType",
NavigationMetricsRecorder::MIME_TYPE_SVG, 1);
@@ -89,6 +98,9 @@ IN_PROC_BROWSER_TEST_F(NavigationMetricsRecorderBrowserTest, DataURLMimeTypes) {
GURL("data:text/html;base64, PGh0bWw+YmFzZTY0PC9odG1sPg=="));
histograms.ExpectTotalCount("Navigation.MainFrameScheme", 3);
histograms.ExpectBucketCount("Navigation.MainFrameScheme", 5 /* data: */, 3);
+ histograms.ExpectTotalCount("Navigation.MainFrameSchemeDifferentPage", 3);
+ histograms.ExpectBucketCount("Navigation.MainFrameSchemeDifferentPage",
+ 5 /* data: */, 3);
histograms.ExpectTotalCount("Navigation.MainFrameScheme.DataUrl.MimeType", 3);
histograms.ExpectBucketCount("Navigation.MainFrameScheme.DataUrl.MimeType",
NavigationMetricsRecorder::MIME_TYPE_HTML, 2);
@@ -97,6 +109,9 @@ IN_PROC_BROWSER_TEST_F(NavigationMetricsRecorderBrowserTest, DataURLMimeTypes) {
RedirectToUrl(web_contents, GURL("data:text/plain, test"));
histograms.ExpectTotalCount("Navigation.MainFrameScheme", 4);
histograms.ExpectBucketCount("Navigation.MainFrameScheme", 5 /* data: */, 4);
+ histograms.ExpectTotalCount("Navigation.MainFrameSchemeDifferentPage", 4);
+ histograms.ExpectBucketCount("Navigation.MainFrameSchemeDifferentPage",
+ 5 /* data: */, 4);
histograms.ExpectTotalCount("Navigation.MainFrameScheme.DataUrl.MimeType", 4);
histograms.ExpectBucketCount("Navigation.MainFrameScheme.DataUrl.MimeType",
NavigationMetricsRecorder::MIME_TYPE_OTHER, 1);
@@ -109,6 +124,9 @@ IN_PROC_BROWSER_TEST_F(NavigationMetricsRecorderBrowserTest, DataURLMimeTypes) {
"9TXL0Y4OHwAAAABJRU5ErkJggg=="));
histograms.ExpectTotalCount("Navigation.MainFrameScheme", 5);
histograms.ExpectBucketCount("Navigation.MainFrameScheme", 5 /* data: */, 5);
+ histograms.ExpectTotalCount("Navigation.MainFrameSchemeDifferentPage", 5);
+ histograms.ExpectBucketCount("Navigation.MainFrameSchemeDifferentPage",
+ 5 /* data: */, 5);
histograms.ExpectTotalCount("Navigation.MainFrameScheme.DataUrl.MimeType", 5);
histograms.ExpectBucketCount("Navigation.MainFrameScheme.DataUrl.MimeType",
NavigationMetricsRecorder::MIME_TYPE_OTHER, 2);
« no previous file with comments | « no previous file | components/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698