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

Unified Diff: content/browser/frame_host/navigation_handle_impl_unittest.cc

Issue 2499313003: Set user_gesture bit at NavigationHandle creation time. (Closed)
Patch Set: comments Created 4 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
Index: content/browser/frame_host/navigation_handle_impl_unittest.cc
diff --git a/content/browser/frame_host/navigation_handle_impl_unittest.cc b/content/browser/frame_host/navigation_handle_impl_unittest.cc
index ff2f74896b714d699edd58909c65ccb3510d2011..7b3ddceee4f3e6c3dcbec1dd2ed9033eb7256bf9 100644
--- a/content/browser/frame_host/navigation_handle_impl_unittest.cc
+++ b/content/browser/frame_host/navigation_handle_impl_unittest.cc
@@ -67,9 +67,14 @@ class NavigationHandleImplTest : public RenderViewHostImplTestHarness {
void SetUp() override {
RenderViewHostImplTestHarness::SetUp();
- test_handle_ = NavigationHandleImpl::Create(
- GURL(), main_test_rfh()->frame_tree_node(), true, false, false,
- base::TimeTicks::Now(), 0, false);
+ test_handle_ =
+ NavigationHandleImpl::Create(GURL(), main_test_rfh()->frame_tree_node(),
+ true, // is_renderer_initiated
+ false, // is_same_page
+ false, // is_srcdoc
+ base::TimeTicks::Now(), 0,
+ false, // has_user_gesture
+ false); // started_from_context_menu
EXPECT_EQ(REQUEST_CONTEXT_TYPE_UNSPECIFIED,
test_handle_->request_context_type_);
contents()->GetMainFrame()->InitializeRenderFrameIfNeeded();
@@ -108,7 +113,7 @@ class NavigationHandleImplTest : public RenderViewHostImplTestHarness {
// It's safe to use base::Unretained since the NavigationHandle is owned by
// the NavigationHandleImplTest.
test_handle_->WillStartRequest(
- "GET", nullptr, Referrer(), false, ui::PAGE_TRANSITION_LINK, false,
+ "GET", nullptr, Referrer(), ui::PAGE_TRANSITION_LINK, false,
REQUEST_CONTEXT_TYPE_LOCATION,
base::Bind(&NavigationHandleImplTest::UpdateThrottleCheckResult,
base::Unretained(this)));

Powered by Google App Engine
This is Rietveld 408576698