Title: [98559] trunk/Tools
- Revision
- 98559
- Author
- [email protected]
- Date
- 2011-10-27 06:07:23 -0700 (Thu, 27 Oct 2011)
Log Message
[Chromium] Allow DRT to be built without notifications enabled.
https://bugs.webkit.org/show_bug.cgi?id=70919
Reviewed by Tony Gentilcore.
* DumpRenderTree/chromium/LayoutTestController.cpp:
(LayoutTestController::grantDesktopNotificationPermission):
(LayoutTestController::simulateDesktopNotificationClick):
* DumpRenderTree/chromium/NotificationPresenter.cpp:
* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::TestShell):
(TestShell::resetTestController):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (98558 => 98559)
--- trunk/Tools/ChangeLog 2011-10-27 13:05:47 UTC (rev 98558)
+++ trunk/Tools/ChangeLog 2011-10-27 13:07:23 UTC (rev 98559)
@@ -1,3 +1,18 @@
+2011-10-27 John Knottenbelt <[email protected]>
+
+ [Chromium] Allow DRT to be built without notifications enabled.
+ https://bugs.webkit.org/show_bug.cgi?id=70919
+
+ Reviewed by Tony Gentilcore.
+
+ * DumpRenderTree/chromium/LayoutTestController.cpp:
+ (LayoutTestController::grantDesktopNotificationPermission):
+ (LayoutTestController::simulateDesktopNotificationClick):
+ * DumpRenderTree/chromium/NotificationPresenter.cpp:
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::TestShell):
+ (TestShell::resetTestController):
+
2011-10-21 Jocelyn Turcotte <[email protected]>
[Qt] Improve command line arguments handling for MiniBrowser.
Modified: trunk/Tools/DumpRenderTree/chromium/LayoutTestController.cpp (98558 => 98559)
--- trunk/Tools/DumpRenderTree/chromium/LayoutTestController.cpp 2011-10-27 13:05:47 UTC (rev 98558)
+++ trunk/Tools/DumpRenderTree/chromium/LayoutTestController.cpp 2011-10-27 13:07:23 UTC (rev 98559)
@@ -1133,7 +1133,9 @@
result->set(false);
return;
}
+#if ENABLE(NOTIFICATIONS)
m_shell->notificationPresenter()->grantPermission(cppVariantToWebString(arguments[0]));
+#endif
result->set(true);
}
@@ -1143,9 +1145,11 @@
result->set(false);
return;
}
+#if ENABLE(NOTIFICATIONS)
if (m_shell->notificationPresenter()->simulateClick(cppVariantToWebString(arguments[0])))
result->set(true);
else
+#endif
result->set(false);
}
Modified: trunk/Tools/DumpRenderTree/chromium/NotificationPresenter.cpp (98558 => 98559)
--- trunk/Tools/DumpRenderTree/chromium/NotificationPresenter.cpp 2011-10-27 13:05:47 UTC (rev 98558)
+++ trunk/Tools/DumpRenderTree/chromium/NotificationPresenter.cpp 2011-10-27 13:07:23 UTC (rev 98559)
@@ -31,6 +31,8 @@
#include "config.h"
#include "NotificationPresenter.h"
+#if ENABLE(NOTIFICATIONS)
+
#include "WebKit.h"
#include "WebKitPlatformSupport.h"
#include "WebNotification.h"
@@ -150,3 +152,5 @@
origin.toString().utf8().data());
callback->permissionRequestComplete();
}
+
+#endif // ENABLE(NOTIFICATIONS)
Modified: trunk/Tools/DumpRenderTree/chromium/TestShell.cpp (98558 => 98559)
--- trunk/Tools/DumpRenderTree/chromium/TestShell.cpp 2011-10-27 13:05:47 UTC (rev 98558)
+++ trunk/Tools/DumpRenderTree/chromium/TestShell.cpp 2011-10-27 13:07:23 UTC (rev 98559)
@@ -129,7 +129,9 @@
m_eventSender = adoptPtr(new EventSender(this));
m_plainTextController = adoptPtr(new PlainTextController());
m_textInputController = adoptPtr(new TextInputController(this));
+#if ENABLE(NOTIFICATIONS)
m_notificationPresenter = adoptPtr(new NotificationPresenter(this));
+#endif
m_printer = m_testShellMode ? TestEventPrinter::createTestShellPrinter() : TestEventPrinter::createDRTPrinter();
// 30 second is the same as the value in Mac DRT.
@@ -262,7 +264,9 @@
m_layoutTestController->reset();
m_eventSender->reset();
m_webViewHost->reset();
+#if ENABLE(NOTIFICATIONS)
m_notificationPresenter->reset();
+#endif
m_drtDevToolsAgent->reset();
if (m_drtDevToolsClient)
m_drtDevToolsClient->reset();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes