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

Unified Diff: third_party/WebKit/Source/web/tests/WebFrameTest.cpp

Issue 2408333004: Move persistent gesture state to Document, add DocumentUserGestureToken (Closed)
Patch Set: a Created 4 years, 2 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
Index: third_party/WebKit/Source/web/tests/WebFrameTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
index a056554db30a05b2b45a44569a2491b10d5ebbd6..e578481a451d6fa850e2875eef880b16e99378e7 100644
--- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
@@ -39,6 +39,7 @@
#include "core/css/resolver/StyleResolver.h"
#include "core/css/resolver/ViewportStyleResolver.h"
#include "core/dom/Document.h"
+#include "core/dom/DocumentUserGestureToken.h"
#include "core/dom/Fullscreen.h"
#include "core/dom/NodeComputedStyle.h"
#include "core/dom/Range.h"
@@ -6676,7 +6677,7 @@ TEST_P(ParameterizedWebFrameTest, ModifiedClickNewWindow) {
PlatformMouseEvent::RealOrIndistinguishable, String(), nullptr);
FrameLoadRequest frameRequest(document, ResourceRequest(destination));
frameRequest.setTriggeringEvent(event);
- UserGestureIndicator gesture(UserGestureToken::create());
+ UserGestureIndicator gesture(DocumentUserGestureToken::create(document));
toLocalFrame(webViewHelper.webView()->page()->mainFrame())
->loader()
.load(frameRequest);
@@ -7398,7 +7399,7 @@ TEST_P(ParameterizedWebFrameTest, FullscreenLayerSize) {
webViewImpl->updateAllLifecyclePhases();
Document* document = webViewImpl->mainFrameImpl()->frame()->document();
- UserGestureIndicator gesture(UserGestureToken::create());
+ UserGestureIndicator gesture(DocumentUserGestureToken::create(document));
Element* divFullscreen = document->getElementById("div1");
Fullscreen::requestFullscreen(*divFullscreen, Fullscreen::PrefixedRequest);
webViewImpl->didEnterFullscreen();
@@ -7433,7 +7434,7 @@ TEST_F(WebFrameTest, FullscreenLayerNonScrollable) {
webViewImpl->updateAllLifecyclePhases();
Document* document = webViewImpl->mainFrameImpl()->frame()->document();
- UserGestureIndicator gesture(UserGestureToken::create());
+ UserGestureIndicator gesture(DocumentUserGestureToken::create(document));
Element* divFullscreen = document->getElementById("div1");
Fullscreen::requestFullscreen(*divFullscreen, Fullscreen::PrefixedRequest);
webViewImpl->didEnterFullscreen();
@@ -7477,7 +7478,7 @@ TEST_P(ParameterizedWebFrameTest, FullscreenMainFrame) {
webViewImpl->updateAllLifecyclePhases();
Document* document = webViewImpl->mainFrameImpl()->frame()->document();
- UserGestureIndicator gesture(UserGestureToken::create());
+ UserGestureIndicator gesture(DocumentUserGestureToken::create(document));
Fullscreen::requestFullscreen(*document->documentElement(),
Fullscreen::PrefixedRequest);
webViewImpl->didEnterFullscreen();
@@ -7518,7 +7519,7 @@ TEST_P(ParameterizedWebFrameTest, FullscreenSubframe) {
toWebLocalFrameImpl(webViewHelper.webView()->mainFrame()->firstChild())
->frame()
->document();
- UserGestureIndicator gesture(UserGestureToken::create());
+ UserGestureIndicator gesture(DocumentUserGestureToken::create(document));
Element* divFullscreen = document->getElementById("div1");
Fullscreen::requestFullscreen(*divFullscreen, Fullscreen::PrefixedRequest);
webViewImpl->didEnterFullscreen();
@@ -7562,7 +7563,7 @@ TEST_P(ParameterizedWebFrameTest, FullscreenWithTinyViewport) {
EXPECT_FLOAT_EQ(5.0, webViewImpl->maximumPageScaleFactor());
Document* document = webViewImpl->mainFrameImpl()->frame()->document();
- UserGestureIndicator gesture(UserGestureToken::create());
+ UserGestureIndicator gesture(DocumentUserGestureToken::create(document));
Fullscreen::requestFullscreen(*document->documentElement(),
Fullscreen::PrefixedRequest);
webViewImpl->didEnterFullscreen();
@@ -7599,7 +7600,7 @@ TEST_P(ParameterizedWebFrameTest, FullscreenResizeWithTinyViewport) {
LayoutViewItem layoutViewItem =
webViewHelper.webView()->mainFrameImpl()->frameView()->layoutViewItem();
Document* document = webViewImpl->mainFrameImpl()->frame()->document();
- UserGestureIndicator gesture(UserGestureToken::create());
+ UserGestureIndicator gesture(DocumentUserGestureToken::create(document));
Fullscreen::requestFullscreen(*document->documentElement(),
Fullscreen::PrefixedRequest);
webViewImpl->didEnterFullscreen();
@@ -7661,7 +7662,7 @@ TEST_P(ParameterizedWebFrameTest, FullscreenRestoreScaleFactorUponExiting) {
{
Document* document = webViewImpl->mainFrameImpl()->frame()->document();
- UserGestureIndicator gesture(UserGestureToken::create());
+ UserGestureIndicator gesture(DocumentUserGestureToken::create(document));
Fullscreen::requestFullscreen(*document->body(),
Fullscreen::PrefixedRequest);
}
@@ -7723,7 +7724,7 @@ TEST_P(ParameterizedWebFrameTest, ClearFullscreenConstraintsOnNavigation) {
Document* document = webViewImpl->mainFrameImpl()->frame()->document();
UserGestureIndicator gesture(
- UserGestureToken::create(UserGestureToken::NewGesture));
+ DocumentUserGestureToken::create(document, UserGestureToken::NewGesture));
Fullscreen::requestFullscreen(*document->documentElement(),
Fullscreen::PrefixedRequest);
webViewImpl->didEnterFullscreen();

Powered by Google App Engine
This is Rietveld 408576698