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

Unified Diff: content/renderer/render_view_browsertest.cc

Issue 1409883008: (Reland) set navigationStart based on CommonNavigationParams (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « content/renderer/render_frame_impl.cc ('k') | third_party/WebKit/Source/core/loader/DocumentLoadTiming.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_browsertest.cc
diff --git a/content/renderer/render_view_browsertest.cc b/content/renderer/render_view_browsertest.cc
index 3f1250f1827d91ab1f29353b54af4902bd316be6..3783e905dec877e5290a037b27410839a66608b9 100644
--- a/content/renderer/render_view_browsertest.cc
+++ b/content/renderer/render_view_browsertest.cc
@@ -2257,30 +2257,10 @@ TEST_F(RenderViewImplTest, ScreenMetricsEmulation) {
// Don't disable here to test that emulation is being shutdown properly.
}
-// Sanity checks for the Navigation Timing API |navigationStart| override. We
+// Sanity check for the Navigation Timing API |navigationStart| override. We
// are asserting only most basic constraints, as TimeTicks (passed as the
// override) are not comparable with the wall time (returned by the Blink API).
TEST_F(RenderViewImplTest, NavigationStartOverride) {
- // Verify that a navigation that claims to have started at the earliest
- // possible TimeTicks is indeed reported as one that started before
- // OnNavigate() is called.
- base::Time before_navigation = base::Time::Now();
- CommonNavigationParams early_common_params;
- StartNavigationParams early_start_params;
- early_common_params.url = GURL("data:text/html,<div>Page</div>");
- early_common_params.navigation_type = FrameMsg_Navigate_Type::NORMAL;
- early_common_params.transition = ui::PAGE_TRANSITION_TYPED;
- early_common_params.navigation_start = base::TimeTicks::FromInternalValue(1);
- early_start_params.is_post = true;
-
- frame()->Navigate(early_common_params, early_start_params,
- RequestNavigationParams());
- ProcessPendingMessages();
-
- base::Time early_nav_reported_start =
- base::Time::FromDoubleT(GetMainFrame()->performance().navigationStart());
- EXPECT_LT(early_nav_reported_start, before_navigation);
-
// Verify that a navigation that claims to have started in the future - 42
// days from now is *not* reported as one that starts in the future; as we
// sanitize the override allowing a maximum of ::Now().
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | third_party/WebKit/Source/core/loader/DocumentLoadTiming.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698