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

Unified Diff: Tools/DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp

Issue 15535005: Added window.testRunner.isChooserShown() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Moved things to WebTestProxy Created 7 years, 7 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: Tools/DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp b/Tools/DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp
index 4d678fb6a01e832f5518813f075e18191ddc044e..bbc62f801749cd7be582d86c5a77d439d9c99983 100644
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp
+++ b/Tools/DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp
@@ -33,6 +33,7 @@
#include "AccessibilityControllerChromium.h"
#include "EventSender.h"
+#include "MockColorChooser.h"
#include "MockWebSpeechInputController.h"
#include "MockWebSpeechRecognizer.h"
#include "SpellCheckClient.h"
@@ -439,6 +440,7 @@ WebTestProxyBase::WebTestProxyBase()
: m_testInterfaces(0)
, m_delegate(0)
, m_spellcheck(new SpellCheckClient)
+ , m_chooserCount(0)
{
reset();
}
@@ -486,6 +488,12 @@ WebSpellCheckClient* WebTestProxyBase::spellCheckClient() const
return m_spellcheck.get();
}
+WebColorChooser* WebTestProxyBase::createColorChooser(WebColorChooserClient* client)
+{
+ // This instance is deleted by WebCore::ColorInputType
+ return new MockColorChooser(client, m_delegate, this);
+}
+
string WebTestProxyBase::captureTree(bool debugRenderTree)
{
WebScriptController::flushConsoleMessages();
@@ -1073,6 +1081,21 @@ void WebTestProxyBase::setToolTipText(const WebString& text, WebTextDirection)
m_testInterfaces->testRunner()->setToolTipText(text);
}
+void WebTestProxyBase::didOpenChooser()
+{
+ m_chooserCount++;
+}
+
+void WebTestProxyBase::didCloseChooser()
+{
+ m_chooserCount--;
+}
+
+bool WebTestProxyBase::isChooserShown()
+{
+ return 0 < m_chooserCount;
+}
+
void WebTestProxyBase::willPerformClientRedirect(WebFrame* frame, const WebURL&, const WebURL& to, double, double)
{
if (m_testInterfaces->testRunner()->shouldDumpFrameLoadCallbacks()) {

Powered by Google App Engine
This is Rietveld 408576698