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

Side by Side Diff: third_party/WebKit/Source/core/dom/DocumentUserGestureTokenTest.cpp

Issue 2814703004: Make blink::ResourceRequest ctors explicit (Closed)
Patch Set: simplify Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/RemoteFrame.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/dom/DocumentUserGestureToken.h" 5 #include "core/dom/DocumentUserGestureToken.h"
6 6
7 #include "core/testing/DummyPageHolder.h" 7 #include "core/testing/DummyPageHolder.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace blink { 10 namespace blink {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 UserGestureToken::kNewGesture); 43 UserGestureToken::kNewGesture);
44 EXPECT_TRUE(GetDocument().GetFrame()->HasReceivedUserGesture()); 44 EXPECT_TRUE(GetDocument().GetFrame()->HasReceivedUserGesture());
45 } 45 }
46 46
47 TEST_F(DocumentUserGestureTokenTest, Navigate) { 47 TEST_F(DocumentUserGestureTokenTest, Navigate) {
48 DocumentUserGestureToken::Create(&GetDocument()); 48 DocumentUserGestureToken::Create(&GetDocument());
49 ASSERT_TRUE(GetDocument().GetFrame()->HasReceivedUserGesture()); 49 ASSERT_TRUE(GetDocument().GetFrame()->HasReceivedUserGesture());
50 50
51 // Navigate to a different Document. In the main frame, user gesture state 51 // Navigate to a different Document. In the main frame, user gesture state
52 // will get reset. 52 // will get reset.
53 GetDocument().GetFrame()->Loader().Load(FrameLoadRequest(nullptr, KURL())); 53 GetDocument().GetFrame()->Loader().Load(
54 FrameLoadRequest(nullptr, ResourceRequest()));
54 EXPECT_FALSE(GetDocument().GetFrame()->HasReceivedUserGesture()); 55 EXPECT_FALSE(GetDocument().GetFrame()->HasReceivedUserGesture());
55 } 56 }
56 57
57 } // namespace blink 58 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/RemoteFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698