Title: [116581] trunk/Tools
Revision
116581
Author
[email protected]
Date
2012-05-09 17:15:11 -0700 (Wed, 09 May 2012)

Log Message

[Chromium] LayoutTestController should use ENABLE guards for some features
https://bugs.webkit.org/show_bug.cgi?id=86030

Reviewed by Eric Seidel.

These features are disabled on OS(ANDROID) and so shouldn't be compiled
when the feature is off.

* DumpRenderTree/chromium/LayoutTestController.cpp:
(LayoutTestController::LayoutTestController):
* DumpRenderTree/chromium/LayoutTestController.h:
(LayoutTestController):
* DumpRenderTree/chromium/TestShell.h:
(TestShell):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (116580 => 116581)


--- trunk/Tools/ChangeLog	2012-05-10 00:14:49 UTC (rev 116580)
+++ trunk/Tools/ChangeLog	2012-05-10 00:15:11 UTC (rev 116581)
@@ -1,3 +1,20 @@
+2012-05-09  Adam Barth  <[email protected]>
+
+        [Chromium] LayoutTestController should use ENABLE guards for some features
+        https://bugs.webkit.org/show_bug.cgi?id=86030
+
+        Reviewed by Eric Seidel.
+
+        These features are disabled on OS(ANDROID) and so shouldn't be compiled
+        when the feature is off.
+
+        * DumpRenderTree/chromium/LayoutTestController.cpp:
+        (LayoutTestController::LayoutTestController):
+        * DumpRenderTree/chromium/LayoutTestController.h:
+        (LayoutTestController):
+        * DumpRenderTree/chromium/TestShell.h:
+        (TestShell):
+
 2012-05-09  Tom Zakrajsek  <[email protected]>
 
         Fix overzealous re-opened since blocked by... message

Modified: trunk/Tools/DumpRenderTree/chromium/LayoutTestController.cpp (116580 => 116581)


--- trunk/Tools/DumpRenderTree/chromium/LayoutTestController.cpp	2012-05-10 00:14:49 UTC (rev 116580)
+++ trunk/Tools/DumpRenderTree/chromium/LayoutTestController.cpp	2012-05-10 00:15:11 UTC (rev 116581)
@@ -93,8 +93,10 @@
     // names to their methods will be done by calling bindToJavaScript() (defined
     // by CppBoundClass, the parent to LayoutTestController).
     bindMethod("addFileToPasteboardOnDrag", &LayoutTestController::addFileToPasteboardOnDrag);
+#if ENABLE(INPUT_SPEECH)
     bindMethod("addMockSpeechInputResult", &LayoutTestController::addMockSpeechInputResult);
     bindMethod("setMockSpeechInputDumpRect", &LayoutTestController::setMockSpeechInputDumpRect);
+#endif
     bindMethod("addOriginAccessWhitelistEntry", &LayoutTestController::addOriginAccessWhitelistEntry);
     bindMethod("addUserScript", &LayoutTestController::addUserScript);
     bindMethod("addUserStyleSheet", &LayoutTestController::addUserStyleSheet);
@@ -132,7 +134,9 @@
     bindMethod("setIsolatedWorldSecurityOrigin", &LayoutTestController::setIsolatedWorldSecurityOrigin);
     bindMethod("execCommand", &LayoutTestController::execCommand);
     bindMethod("forceRedSelectionColors", &LayoutTestController::forceRedSelectionColors);
+#if ENABLE(NOTIFICATIONS)
     bindMethod("grantDesktopNotificationPermission", &LayoutTestController::grantDesktopNotificationPermission);
+#endif
     bindMethod("findString", &LayoutTestController::findString);
     bindMethod("isCommandEnabled", &LayoutTestController::isCommandEnabled);
     bindMethod("hasCustomPageSizeStyle", &LayoutTestController::hasCustomPageSizeStyle);
@@ -210,7 +214,9 @@
     bindMethod("setXSSAuditorEnabled", &LayoutTestController::setXSSAuditorEnabled);
     bindMethod("setAsynchronousSpellCheckingEnabled", &LayoutTestController::setAsynchronousSpellCheckingEnabled);
     bindMethod("showWebInspector", &LayoutTestController::showWebInspector);
+#if ENABLE(NOTIFICATIONS)
     bindMethod("simulateDesktopNotificationClick", &LayoutTestController::simulateDesktopNotificationClick);
+#endif
     bindMethod("startSpeechInput", &LayoutTestController::startSpeechInput);
     bindMethod("suspendAnimations", &LayoutTestController::suspendAnimations);
     bindMethod("testRepaint", &LayoutTestController::testRepaint);
@@ -1186,6 +1192,7 @@
     result->set(m_shell->webView()->dispatchBeforeUnloadEvent());
 }
 
+#if ENABLE(NOTIFICATIONS)
 void LayoutTestController::grantDesktopNotificationPermission(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() != 1 || !arguments[0].isString()) {
@@ -1211,6 +1218,7 @@
 #endif
         result->set(false);
 }
+#endif
 
 void LayoutTestController::setDomainRelaxationForbiddenForURLScheme(const CppArgumentList& arguments, CppVariant* result)
 {
@@ -1960,6 +1968,7 @@
     result->setNull();
 }
 
+#if ENABLE(INPUT_SPEECH)
 void LayoutTestController::addMockSpeechInputResult(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
@@ -1979,6 +1988,7 @@
     if (MockWebSpeechInputController* controller = m_shell->webViewHost()->speechInputControllerMock())
         controller->setDumpRect(arguments[0].value.boolValue);
 }
+#endif
 
 void LayoutTestController::startSpeechInput(const CppArgumentList& arguments, CppVariant* result)
 {

Modified: trunk/Tools/DumpRenderTree/chromium/LayoutTestController.h (116580 => 116581)


--- trunk/Tools/DumpRenderTree/chromium/LayoutTestController.h	2012-05-10 00:14:49 UTC (rev 116580)
+++ trunk/Tools/DumpRenderTree/chromium/LayoutTestController.h	2012-05-10 00:15:11 UTC (rev 116581)
@@ -249,10 +249,12 @@
     void setIconDatabaseEnabled(const CppArgumentList&, CppVariant*);
     void dumpSelectionRect(const CppArgumentList&, CppVariant*);
 
+#if ENABLE(NOTIFICATIONS)
     // Grants permission for desktop notifications to an origin
     void grantDesktopNotificationPermission(const CppArgumentList&, CppVariant*);
     // Simulates a click on a desktop notification.
     void simulateDesktopNotificationClick(const CppArgumentList&, CppVariant*);
+#endif
 
     void setDomainRelaxationForbiddenForURLScheme(const CppArgumentList&, CppVariant*);
     void setDeferMainResourceDataLoad(const CppArgumentList&, CppVariant*);
@@ -374,8 +376,10 @@
     void abortModal(const CppArgumentList&, CppVariant*);
 
     // Speech input related functions.
+#if ENABLE(INPUT_SPEECH)
     void addMockSpeechInputResult(const CppArgumentList&, CppVariant*);
     void setMockSpeechInputDumpRect(const CppArgumentList&, CppVariant*);
+#endif
     void startSpeechInput(const CppArgumentList&, CppVariant*);
 
     void layerTreeAsText(const CppArgumentList& args, CppVariant* result);

Modified: trunk/Tools/DumpRenderTree/chromium/TestShell.h (116580 => 116581)


--- trunk/Tools/DumpRenderTree/chromium/TestShell.h	2012-05-10 00:14:49 UTC (rev 116580)
+++ trunk/Tools/DumpRenderTree/chromium/TestShell.h	2012-05-10 00:15:11 UTC (rev 116581)
@@ -95,7 +95,9 @@
     EventSender* eventSender() const { return m_eventSender.get(); }
     AccessibilityController* accessibilityController() const { return m_accessibilityController.get(); }
     GamepadController* gamepadController() const { return m_gamepadController.get(); }
+#if ENABLE(NOTIFICATIONS)
     NotificationPresenter* notificationPresenter() const { return m_notificationPresenter.get(); }
+#endif
     TestEventPrinter* printer() const { return m_printer.get(); }
 
     WebPreferences* preferences() { return &m_prefs; }
@@ -217,7 +219,9 @@
     OwnPtr<EventSender> m_eventSender;
     OwnPtr<LayoutTestController> m_layoutTestController;
     OwnPtr<TextInputController> m_textInputController;
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
     OwnPtr<NotificationPresenter> m_notificationPresenter;
+#endif
     OwnPtr<WebViewHost> m_webViewHost;
     OwnPtr<WebKit::WebThread> m_webCompositorThread;
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to