[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

satish at chromium.org satish at chromium.org
Wed Dec 22 15:58:56 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit df8dbb361cd639efbad4b3adf556e88afd38d4b5
Author: satish at chromium.org <satish at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Nov 17 15:17:06 2010 +0000

    2010-11-17  Satish Sampath  <satish at chromium.org>
    
            Reviewed by Jeremy Orlow.
    
            Clear the speech input mock explicitly before each test.
            https://bugs.webkit.org/show_bug.cgi?id=49660
    
            * platform/mock/SpeechInputClientMock.cpp:
            (WebCore::SpeechInputClientMock::clearResults): Added clearResults method.
            * platform/mock/SpeechInputClientMock.h:
    2010-11-17  Satish Sampath  <satish at chromium.org>
    
            Reviewed by Jeremy Orlow.
    
            Clear the speech input mock explicitly before each test.
            https://bugs.webkit.org/show_bug.cgi?id=49660
    
            * public/WebSpeechInputControllerMock.h:
            * src/WebSpeechInputControllerMockImpl.cpp:
            (WebKit::WebSpeechInputControllerMockImpl::clearResults): Added method to clear results.
            * src/WebSpeechInputControllerMockImpl.h:
    2010-11-17  Satish Sampath  <satish at chromium.org>
    
            Reviewed by Jeremy Orlow.
    
            Clear the speech input mock explicitly before each test.
            https://bugs.webkit.org/show_bug.cgi?id=49660
    
            * DumpRenderTree/chromium/LayoutTestController.cpp:
            (LayoutTestController::setMockSpeechInputResult):
            * DumpRenderTree/chromium/LayoutTestController.h:
            * DumpRenderTree/chromium/WebViewHost.cpp:
            (WebViewHost::speechInputController):
            (WebViewHost::reset): Invoke speech input mock's clearResults method.
            * DumpRenderTree/chromium/WebViewHost.h:
            (WebViewHost::speechInputControllerMock): Moved mock from LayoutTestController.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72206 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index e1a4f94..8fedd57 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,14 @@
+2010-11-17  Satish Sampath  <satish at chromium.org>
+
+        Reviewed by Jeremy Orlow.
+
+        Clear the speech input mock explicitly before each test.
+        https://bugs.webkit.org/show_bug.cgi?id=49660
+
+        * platform/mock/SpeechInputClientMock.cpp:
+        (WebCore::SpeechInputClientMock::clearResults): Added clearResults method.
+        * platform/mock/SpeechInputClientMock.h:
+
 2010-11-17  Alexander Pavlov  <apavlov at chromium.org>
 
         [Chromium] Unreviewed, fix Chromium-Mac build from r72189.
diff --git a/WebCore/platform/mock/SpeechInputClientMock.cpp b/WebCore/platform/mock/SpeechInputClientMock.cpp
index 331209c..820152c 100644
--- a/WebCore/platform/mock/SpeechInputClientMock.cpp
+++ b/WebCore/platform/mock/SpeechInputClientMock.cpp
@@ -89,6 +89,12 @@ void SpeechInputClientMock::setRecognitionResult(const String& result, const Ato
         m_recognitionResult.set(language, result);
 }
 
+void SpeechInputClientMock::clearResults()
+{
+    m_resultForEmptyLanguage = String();
+    m_recognitionResult.clear();
+}
+
 void SpeechInputClientMock::timerFired(WebCore::Timer<SpeechInputClientMock>*)
 {
     if (m_recording) {
diff --git a/WebCore/platform/mock/SpeechInputClientMock.h b/WebCore/platform/mock/SpeechInputClientMock.h
index 0e3c456..c2219b4 100644
--- a/WebCore/platform/mock/SpeechInputClientMock.h
+++ b/WebCore/platform/mock/SpeechInputClientMock.h
@@ -49,6 +49,7 @@ public:
     SpeechInputClientMock();
 
     void setRecognitionResult(const String& result, const AtomicString& language);
+    void clearResults();
 
     // SpeechInputClient methods.
     void setListener(SpeechInputListener*);
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 3b48c03..bebee69 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,15 @@
+2010-11-17  Satish Sampath  <satish at chromium.org>
+
+        Reviewed by Jeremy Orlow.
+
+        Clear the speech input mock explicitly before each test.
+        https://bugs.webkit.org/show_bug.cgi?id=49660
+
+        * public/WebSpeechInputControllerMock.h:
+        * src/WebSpeechInputControllerMockImpl.cpp:
+        (WebKit::WebSpeechInputControllerMockImpl::clearResults): Added method to clear results.
+        * src/WebSpeechInputControllerMockImpl.h:
+
 2010-11-17  Eric Uhrhane  <ericu at chromium.org>
 
         Reviewed by David Levin.
diff --git a/WebKit/chromium/public/WebSpeechInputControllerMock.h b/WebKit/chromium/public/WebSpeechInputControllerMock.h
index 0a7f6f9..31672ba 100644
--- a/WebKit/chromium/public/WebSpeechInputControllerMock.h
+++ b/WebKit/chromium/public/WebSpeechInputControllerMock.h
@@ -45,6 +45,8 @@ public:
     virtual ~WebSpeechInputControllerMock() { }
 
     virtual void setMockRecognitionResult(const WebString& result, const WebString& language) = 0;
+
+    virtual void clearResults() = 0;
 };
 
 } // namespace WebKit
diff --git a/WebKit/chromium/src/WebSpeechInputControllerMockImpl.cpp b/WebKit/chromium/src/WebSpeechInputControllerMockImpl.cpp
index ce8eba6..8cf7848 100644
--- a/WebKit/chromium/src/WebSpeechInputControllerMockImpl.cpp
+++ b/WebKit/chromium/src/WebSpeechInputControllerMockImpl.cpp
@@ -60,6 +60,11 @@ void WebSpeechInputControllerMockImpl::setMockRecognitionResult(const WebString&
     m_webcoreMock->setRecognitionResult(result, language);
 }
 
+void WebSpeechInputControllerMockImpl::clearResults()
+{
+    m_webcoreMock->clearResults();
+}
+
 void WebSpeechInputControllerMockImpl::didCompleteRecording(int requestId)
 {
     m_listener->didCompleteRecording(requestId);
diff --git a/WebKit/chromium/src/WebSpeechInputControllerMockImpl.h b/WebKit/chromium/src/WebSpeechInputControllerMockImpl.h
index 7b50a8b..7680873 100644
--- a/WebKit/chromium/src/WebSpeechInputControllerMockImpl.h
+++ b/WebKit/chromium/src/WebSpeechInputControllerMockImpl.h
@@ -63,6 +63,7 @@ public:
 
     // WebSpeechInputControllerMock methods.
     void setMockRecognitionResult(const WebString& result, const WebString& language);
+    void clearResults();
 
 private:
     OwnPtr<WebCore::SpeechInputClientMock> m_webcoreMock;
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index fda5741..6639388 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,19 @@
+2010-11-17  Satish Sampath  <satish at chromium.org>
+
+        Reviewed by Jeremy Orlow.
+
+        Clear the speech input mock explicitly before each test.
+        https://bugs.webkit.org/show_bug.cgi?id=49660
+
+        * DumpRenderTree/chromium/LayoutTestController.cpp:
+        (LayoutTestController::setMockSpeechInputResult):
+        * DumpRenderTree/chromium/LayoutTestController.h:
+        * DumpRenderTree/chromium/WebViewHost.cpp:
+        (WebViewHost::speechInputController):
+        (WebViewHost::reset): Invoke speech input mock's clearResults method.
+        * DumpRenderTree/chromium/WebViewHost.h:
+        (WebViewHost::speechInputControllerMock): Moved mock from LayoutTestController.
+
 2010-11-17  Alexander Pavlov  <apavlov at chromium.org>
 
         Unreviewed, specify IRC nickname in committers.py.
diff --git a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
index 386bba3..85b2dce 100644
--- a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
@@ -1543,14 +1543,7 @@ void LayoutTestController::setMockSpeechInputResult(const CppArgumentList& argum
     if (arguments.size() < 2 || !arguments[0].isString() || !arguments[1].isString())
         return;
 
-    m_speechInputControllerMock->setMockRecognitionResult(cppVariantToWebString(arguments[0]), cppVariantToWebString(arguments[1]));
-}
-
-WebKit::WebSpeechInputController* LayoutTestController::speechInputController(WebKit::WebSpeechInputListener* listener)
-{
-    if (!m_speechInputControllerMock.get())
-        m_speechInputControllerMock.set(WebSpeechInputControllerMock::create(listener));
-    return m_speechInputControllerMock.get();
+    m_shell->webViewHost()->speechInputControllerMock()->setMockRecognitionResult(cppVariantToWebString(arguments[0]), cppVariantToWebString(arguments[1]));
 }
 
 void LayoutTestController::layerTreeAsText(const CppArgumentList& args, CppVariant* result)
diff --git a/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp b/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
index 942a5bd..87fbaca 100644
--- a/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
@@ -50,6 +50,7 @@
 #include "WebRect.h"
 #include "WebScreenInfo.h"
 #include "WebSize.h"
+#include "WebSpeechInputControllerMock.h"
 #include "WebStorageNamespace.h"
 #include "WebURLRequest.h"
 #include "WebURLResponse.h"
@@ -581,7 +582,9 @@ WebKit::WebGeolocationService* WebViewHost::geolocationService()
 
 WebSpeechInputController* WebViewHost::speechInputController(WebKit::WebSpeechInputListener* listener)
 {
-    return m_shell->layoutTestController()->speechInputController(listener);
+    if (!m_speechInputControllerMock)
+        m_speechInputControllerMock.set(WebSpeechInputControllerMock::create(listener));
+    return m_speechInputControllerMock.get();
 }
 
 WebDeviceOrientationClientMock* WebViewHost::deviceOrientationClientMock()
@@ -1168,6 +1171,9 @@ void WebViewHost::reset()
     m_geolocationServiceMock.clear();
 #endif
 
+    if (m_speechInputControllerMock.get())
+        m_speechInputControllerMock->clearResults();
+
     m_currentCursor = WebCursorInfo();
     m_windowRect = WebRect();
     m_paintRect = WebRect();
diff --git a/WebKitTools/DumpRenderTree/chromium/WebViewHost.h b/WebKitTools/DumpRenderTree/chromium/WebViewHost.h
index c9a90ff..c8595b3 100644
--- a/WebKitTools/DumpRenderTree/chromium/WebViewHost.h
+++ b/WebKitTools/DumpRenderTree/chromium/WebViewHost.h
@@ -50,6 +50,7 @@ class WebDeviceOrientationClient;
 class WebDeviceOrientationClientMock;
 class WebGeolocationServiceMock;
 class WebSpeechInputController;
+class WebSpeechInputControllerMock;
 class WebSpeechInputListener;
 class WebURL;
 struct WebRect;
@@ -95,6 +96,8 @@ class WebViewHost : public WebKit::WebViewClient, public WebKit::WebFrameClient,
     WebKit::WebContextMenuData* lastContextMenuData() const;
     void clearContextMenuData();
 
+    WebKit::WebSpeechInputControllerMock* speechInputControllerMock() { return m_speechInputControllerMock.get(); }
+
     // NavigationHost
     virtual bool navigate(const TestNavigationEntry&, bool reload);
 
@@ -310,6 +313,7 @@ private:
 #endif
 
     OwnPtr<WebKit::WebDeviceOrientationClientMock> m_deviceOrientationClientMock;
+    OwnPtr<WebKit::WebSpeechInputControllerMock> m_speechInputControllerMock;
 
     OwnPtr<TestNavigationController*> m_navigationController;
 };

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list