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

Unified Diff: Source/web/WebFrame.cpp

Issue 516753002: Only set fake UserGestureIndicator for tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Only set for tests Created 6 years, 4 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
« no previous file with comments | « no previous file | Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebFrame.cpp
diff --git a/Source/web/WebFrame.cpp b/Source/web/WebFrame.cpp
index 00aa7c811989467160fa767fee15ba5d3b0ec7bf..b6832d30b735811ea7c4940a581f6364b0182073 100644
--- a/Source/web/WebFrame.cpp
+++ b/Source/web/WebFrame.cpp
@@ -7,6 +7,7 @@
#include "core/frame/RemoteFrame.h"
#include "core/html/HTMLFrameOwnerElement.h"
+#include "platform/UserGestureIndicator.h"
#include "web/OpenedFrameTracker.h"
#include "web/WebLocalFrameImpl.h"
#include "web/WebRemoteFrameImpl.h"
@@ -75,6 +76,16 @@ void WebFrame::swap(WebFrame* frame)
}
}
+v8::Handle<v8::Value> WebFrame::executeScriptAndReturnValueForTests(const WebScriptSource& source)
+{
+ // FIXME: This fake UserGestureIndicator is required for a bunch of browser
+ // tests to pass. We should update the tests to simulate input and get rid
+ // of this.
+ // http://code.google.com/p/chromium/issues/detail?id=86397
+ UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture);
+ return executeScriptAndReturnValue(source);
+}
+
WebFrame* WebFrame::opener() const
{
return m_opener;
« no previous file with comments | « no previous file | Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698