Chromium Code Reviews| Index: content/browser/frame_host/render_frame_host_manager_unittest.cc |
| diff --git a/content/browser/frame_host/render_frame_host_manager_unittest.cc b/content/browser/frame_host/render_frame_host_manager_unittest.cc |
| index b23ecc97c42afdce13cb883c2ecd2120e086a4a8..4e09b9b46bd22325c65e75628917ea1d9109e1df 100644 |
| --- a/content/browser/frame_host/render_frame_host_manager_unittest.cc |
| +++ b/content/browser/frame_host/render_frame_host_manager_unittest.cc |
| @@ -5,6 +5,7 @@ |
| #include "base/command_line.h" |
| #include "base/files/file_path.h" |
| #include "base/strings/utf_string_conversions.h" |
| +#include "base/test/histogram_tester.h" |
| #include "base/time/time.h" |
| #include "content/browser/frame_host/cross_site_transferring_request.h" |
| #include "content/browser/frame_host/navigation_before_commit_info.h" |
| @@ -1860,4 +1861,24 @@ TEST_F(RenderFrameHostManagerTest, |
| EXPECT_EQ(kUrl2_site, main_test_rfh()->GetSiteInstance()->GetSiteURL()); |
| } |
| +// PlzNavigate: test that the navigation histograms are being correctly tracked |
| +// both for regular and PlzNavigate navigations. |
| +// Note that as the IO thread is not really running the |
|
nasko
2014/09/24 00:48:07
nit: Usually the format of notes is "Note: "
carlosk
2014/09/24 18:35:50
Done.
|
| +// Navigation.TimeToURLJobStart histogram cannot be tracked here. |
|
nasko
2014/09/24 00:48:07
This comment reads strangely. Break needed between
carlosk
2014/09/24 18:35:50
I rephrased it to hopefully make it clearer.
nasko
2014/09/24 23:11:21
Much better. Since it is a sentence, I'd start wit
carlosk
2014/09/25 17:26:06
Done: beginning with a capitalized "Tests".
|
| +TEST_F(RenderFrameHostManagerTest, |
|
clamy
2014/09/23 21:54:07
You could test that two navigation commits result
carlosk
2014/09/24 18:35:50
Done, added that case to the test. IMO this one is
nasko
2014/09/24 23:11:21
I don't quite follow. If PlzNavigate is disabled,
carlosk
2014/09/25 17:26:06
To better clarify what I'm testing with Patch Set
|
| + BrowserSideNavigationHistogramTest) { |
| + const GURL kUrl0("http://www.google.com/"); |
| + const GURL kUrl1("http://www.chromium.org/"); |
| + base::HistogramTester histo_tester; |
| + |
| + // Performs a "normal" non-PlzNavigate navigation |
| + contents()->NavigateAndCommit(kUrl0); |
| + histo_tester.ExpectTotalCount("Navigation.TimeToNavigationFinished", 1); |
| + |
| + // Performs a PlzNavigate navigation |
| + EnableBrowserSideNavigation(); |
| + contents()->NavigateAndCommit(kUrl1); |
| + histo_tester.ExpectTotalCount("Navigation.TimeToNavigationFinished", 2); |
| +} |
| + |
| } // namespace content |