[chromium] move EventSender into TestRunner.a
authorjochen@chromium.org <jochen@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Jul 2012 13:02:39 +0000 (13:02 +0000)
committerjochen@chromium.org <jochen@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Jul 2012 13:02:39 +0000 (13:02 +0000)
https://bugs.webkit.org/show_bug.cgi?id=92277

Reviewed by Adam Barth.

* DumpRenderTree/DumpRenderTree.gypi:
* DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
* DumpRenderTree/chromium/TestRunner/EventSender.cpp: Renamed from Tools/DumpRenderTree/chromium/EventSender.cpp.
* DumpRenderTree/chromium/TestRunner/EventSender.h: Renamed from Tools/DumpRenderTree/chromium/EventSender.h.
* DumpRenderTree/chromium/TestRunner/TestInterfaces.cpp:
(TestInterfaces::Internal::eventSender):
(TestInterfaces::Internal):
(TestInterfaces::Internal::Internal):
(TestInterfaces::Internal::~Internal):
(TestInterfaces::Internal::setWebView):
(TestInterfaces::Internal::setDelegate):
(TestInterfaces::Internal::bindTo):
(TestInterfaces::Internal::resetAll):
(TestInterfaces::eventSender):
* DumpRenderTree/chromium/TestRunner/TestInterfaces.h:
(TestInterfaces):
* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::initialize):
(TestShell::createMainWindow):
(TestShell::~TestShell):
(TestShell::resetTestController):
(TestShell::bindJSObjectsToWindow):
* DumpRenderTree/chromium/TestShell.h:
(TestShell::eventSender):
(TestShell):
* DumpRenderTree/chromium/WebViewHost.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@124195 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp
Tools/DumpRenderTree/DumpRenderTree.gypi
Tools/DumpRenderTree/chromium/TestRunner/EventSender.cpp [moved from Tools/DumpRenderTree/chromium/EventSender.cpp with 100% similarity]
Tools/DumpRenderTree/chromium/TestRunner/EventSender.h [moved from Tools/DumpRenderTree/chromium/EventSender.h with 100% similarity]
Tools/DumpRenderTree/chromium/TestRunner/TestInterfaces.cpp
Tools/DumpRenderTree/chromium/TestRunner/TestInterfaces.h
Tools/DumpRenderTree/chromium/TestShell.cpp
Tools/DumpRenderTree/chromium/TestShell.h
Tools/DumpRenderTree/chromium/WebViewHost.cpp

index c74042e..0eaed75 100644 (file)
@@ -1,5 +1,39 @@
 2012-07-31  Jochen Eisinger  <jochen@chromium.org>
 
+        [chromium] move EventSender into TestRunner.a
+        https://bugs.webkit.org/show_bug.cgi?id=92277
+
+        Reviewed by Adam Barth.
+
+        * DumpRenderTree/DumpRenderTree.gypi:
+        * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+        * DumpRenderTree/chromium/TestRunner/EventSender.cpp: Renamed from Tools/DumpRenderTree/chromium/EventSender.cpp.
+        * DumpRenderTree/chromium/TestRunner/EventSender.h: Renamed from Tools/DumpRenderTree/chromium/EventSender.h.
+        * DumpRenderTree/chromium/TestRunner/TestInterfaces.cpp:
+        (TestInterfaces::Internal::eventSender):
+        (TestInterfaces::Internal):
+        (TestInterfaces::Internal::Internal):
+        (TestInterfaces::Internal::~Internal):
+        (TestInterfaces::Internal::setWebView):
+        (TestInterfaces::Internal::setDelegate):
+        (TestInterfaces::Internal::bindTo):
+        (TestInterfaces::Internal::resetAll):
+        (TestInterfaces::eventSender):
+        * DumpRenderTree/chromium/TestRunner/TestInterfaces.h:
+        (TestInterfaces):
+        * DumpRenderTree/chromium/TestShell.cpp:
+        (TestShell::initialize):
+        (TestShell::createMainWindow):
+        (TestShell::~TestShell):
+        (TestShell::resetTestController):
+        (TestShell::bindJSObjectsToWindow):
+        * DumpRenderTree/chromium/TestShell.h:
+        (TestShell::eventSender):
+        (TestShell):
+        * DumpRenderTree/chromium/WebViewHost.cpp:
+
+2012-07-31  Jochen Eisinger  <jochen@chromium.org>
+
         Unreviewed. Update watchlist
 
         * Scripts/webkitpy/common/config/watchlist: Turned out to be less useful than I had hoped
index 29773fb..e38c8d8 100644 (file)
             'sources': [
                 '<@(test_runner_files)',
             ],
+            'conditions': [
+                ['toolkit_uses_gtk == 1', {
+                    'defines': [
+                        'WTF_USE_GTK=1',
+                    ],
+                    'dependencies': [
+                        '<(chromium_src_dir)/build/linux/system.gyp:gtk',
+                    ],
+                    'include_dirs': [
+                        '<(source_dir)/WebKit/chromium/public/gtk',
+                    ],
+                }],
+            ],
         },
         {
             'target_name': 'DumpRenderTree',
index dce1e36..f2bc73d 100644 (file)
@@ -6,8 +6,6 @@
             'chromium/DRTDevToolsClient.cpp',
             'chromium/DRTDevToolsClient.h',
             'chromium/DumpRenderTree.cpp',
-            'chromium/EventSender.cpp',
-            'chromium/EventSender.h',
             'chromium/LayoutTestController.cpp',
             'chromium/LayoutTestController.h',
             'chromium/MockGrammarCheck.cpp',
@@ -64,6 +62,8 @@
             'chromium/TestRunner/CppBoundClass.h',
             'chromium/TestRunner/CppVariant.cpp',
             'chromium/TestRunner/CppVariant.h',
+            'chromium/TestRunner/EventSender.cpp',
+            'chromium/TestRunner/EventSender.h',
             'chromium/TestRunner/GamepadController.cpp',
             'chromium/TestRunner/GamepadController.h',
             'chromium/TestRunner/Task.cpp',
index edd50df..6c23a28 100644 (file)
@@ -32,6 +32,7 @@
 #include "TestInterfaces.h"
 
 #include "AccessibilityController.h"
+#include "EventSender.h"
 #include "GamepadController.h"
 #include "TextInputController.h"
 #include "platform/WebString.h"
@@ -53,9 +54,11 @@ public:
     void resetAll();
 
     AccessibilityController* accessibilityController() { return m_accessibilityController.get(); }
+    EventSender* eventSender() { return m_eventSender.get(); }
 
 private:
     OwnPtr<AccessibilityController> m_accessibilityController;
+    OwnPtr<EventSender> m_eventSender;
     OwnPtr<GamepadController> m_gamepadController;
     OwnPtr<TextInputController> m_textInputController;
 };
@@ -63,6 +66,7 @@ private:
 TestInterfaces::Internal::Internal()
 {
     m_accessibilityController = adoptPtr(new AccessibilityController());
+    m_eventSender = adoptPtr(new EventSender());
     m_gamepadController = adoptPtr(new GamepadController());
     m_textInputController = adoptPtr(new TextInputController());
 }
@@ -70,10 +74,12 @@ TestInterfaces::Internal::Internal()
 TestInterfaces::Internal::~Internal()
 {
     m_accessibilityController->setWebView(0);
+    m_eventSender->setWebView(0);
     // m_gamepadController doesn't depend on WebView.
     m_textInputController->setWebView(0);
 
     // m_accessibilityController doesn't depend on TestDelegate.
+    m_eventSender->setDelegate(0);
     m_gamepadController->setDelegate(0);
     // m_textInputController doesn't depend on TestDelegate.
 }
@@ -81,6 +87,7 @@ TestInterfaces::Internal::~Internal()
 void TestInterfaces::Internal::setWebView(WebView* webView)
 {
     m_accessibilityController->setWebView(webView);
+    m_eventSender->setWebView(webView);
     // m_gamepadController doesn't depend on WebView.
     m_textInputController->setWebView(webView);
 }
@@ -88,6 +95,7 @@ void TestInterfaces::Internal::setWebView(WebView* webView)
 void TestInterfaces::Internal::setDelegate(TestDelegate* delegate)
 {
     // m_accessibilityController doesn't depend on TestDelegate.
+    m_eventSender->setDelegate(delegate);
     m_gamepadController->setDelegate(delegate);
     // m_textInputController doesn't depend on TestDelegate.
 }
@@ -95,6 +103,7 @@ void TestInterfaces::Internal::setDelegate(TestDelegate* delegate)
 void TestInterfaces::Internal::bindTo(WebFrame* frame)
 {
     m_accessibilityController->bindToJavascript(frame, WebString::fromUTF8("accessibilityController"));
+    m_eventSender->bindToJavascript(frame, WebString::fromUTF8("eventSender"));
     m_gamepadController->bindToJavascript(frame, WebString::fromUTF8("gamepadController"));
     m_textInputController->bindToJavascript(frame, WebString::fromUTF8("textInputController"));
 }
@@ -102,6 +111,7 @@ void TestInterfaces::Internal::bindTo(WebFrame* frame)
 void TestInterfaces::Internal::resetAll()
 {
     m_accessibilityController->reset();
+    m_eventSender->reset();
     m_gamepadController->reset();
     // m_textInputController doesn't have any state to reset.
 }
@@ -140,3 +150,8 @@ AccessibilityController* TestInterfaces::accessibilityController()
 {
     return m_internal->accessibilityController();
 }
+
+EventSender* TestInterfaces::eventSender()
+{
+    return m_internal->eventSender();
+}
index 5615223..9176954 100644 (file)
@@ -37,6 +37,7 @@ class WebView;
 }
 
 class AccessibilityController;
+class EventSender;
 class TestDelegate;
 
 class TestInterfaces {
@@ -50,6 +51,7 @@ public:
     void resetAll();
 
     AccessibilityController* accessibilityController();
+    EventSender* eventSender();
 
 private:
     class Internal;
index 6f991ff..f122e1d 100644 (file)
@@ -152,7 +152,6 @@ void TestShell::initialize()
     m_webPermissions = adoptPtr(new WebPermissions(this));
     m_testInterfaces = adoptPtr(new TestInterfaces());
     m_layoutTestController = adoptPtr(new LayoutTestController(this));
-    m_eventSender = adoptPtr(new EventSender());
 #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
     m_notificationPresenter = adoptPtr(new NotificationPresenter(this));
 #endif
@@ -178,8 +177,6 @@ void TestShell::createMainWindow()
     m_webView = m_webViewHost->webView();
     m_testInterfaces->setDelegate(m_webViewHost.get());
     m_testInterfaces->setWebView(m_webView);
-    m_eventSender->setDelegate(m_webViewHost.get());
-    m_eventSender->setWebView(m_webView);
     m_drtDevToolsAgent->setWebView(m_webView);
 }
 
@@ -187,8 +184,6 @@ TestShell::~TestShell()
 {
     m_testInterfaces->setDelegate(0);
     m_testInterfaces->setWebView(0);
-    m_eventSender->setDelegate(0);
-    m_eventSender->setWebView(0);
     m_drtDevToolsAgent->setWebView(0);
 }
 
@@ -301,7 +296,6 @@ void TestShell::resetTestController()
     m_webPermissions->reset();
     m_testInterfaces->resetAll();
     m_layoutTestController->reset();
-    m_eventSender->reset();
     m_webViewHost->reset();
 #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
     m_notificationPresenter->reset();
@@ -730,7 +724,6 @@ void TestShell::bindJSObjectsToWindow(WebFrame* frame)
     m_testInterfaces->bindTo(frame);
     m_layoutTestController->bindToJavascript(frame, WebString::fromUTF8("layoutTestController"));
     m_layoutTestController->bindToJavascript(frame, WebString::fromUTF8("testRunner"));
-    m_eventSender->bindToJavascript(frame, WebString::fromUTF8("eventSender"));
 }
 
 WebViewHost* TestShell::createNewWindow(const WebKit::WebURL& url)
index 0778163..dbfc1d1 100644 (file)
@@ -32,7 +32,6 @@
 #define TestShell_h
 
 #include "AccessibilityController.h"
-#include "EventSender.h"
 #include "GamepadController.h"
 #include "LayoutTestController.h"
 #include "NotificationPresenter.h"
@@ -91,7 +90,7 @@ public:
     // Returns the host for the main WebView.
     WebViewHost* webViewHost() const { return m_webViewHost.get(); }
     LayoutTestController* layoutTestController() const { return m_layoutTestController.get(); }
-    EventSender* eventSender() const { return m_eventSender.get(); }
+    EventSender* eventSender() const { return m_testInterfaces->eventSender(); }
     AccessibilityController* accessibilityController() const { return m_testInterfaces->accessibilityController(); }
 #if ENABLE(NOTIFICATIONS)
     NotificationPresenter* notificationPresenter() const { return m_notificationPresenter.get(); }
@@ -214,7 +213,6 @@ private:
     OwnPtr<DRTDevToolsAgent> m_drtDevToolsAgent;
     OwnPtr<DRTDevToolsClient> m_drtDevToolsClient;
     OwnPtr<TestInterfaces> m_testInterfaces;
-    OwnPtr<EventSender> m_eventSender;
     OwnPtr<LayoutTestController> m_layoutTestController;
 #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
     OwnPtr<NotificationPresenter> m_notificationPresenter;
index ba5ecf0..115c405 100644 (file)
@@ -31,6 +31,7 @@
 #include "config.h"
 #include "WebViewHost.h"
 
+#include "EventSender.h"
 #include "LayoutTestController.h"
 #include "MockGrammarCheck.h"
 #include "MockWebSpeechInputController.h"