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

Unified Diff: content/shell/renderer/layout_test/webkit_test_runner.cc

Issue 907893002: Retry to add MockPresentationClient to use in layout tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Split Presentation API mock into per-frame and per-view objects Created 5 years, 10 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: content/shell/renderer/layout_test/webkit_test_runner.cc
diff --git a/content/shell/renderer/layout_test/webkit_test_runner.cc b/content/shell/renderer/layout_test/webkit_test_runner.cc
index 28c12fc0187a606c79209134d9b25d68d9442a47..71d957e4364e7377e4d6b43eaa0d00e7f66a7f92 100644
--- a/content/shell/renderer/layout_test/webkit_test_runner.cc
+++ b/content/shell/renderer/layout_test/webkit_test_runner.cc
@@ -35,6 +35,7 @@
#include "content/shell/renderer/layout_test/gc_controller.h"
#include "content/shell/renderer/layout_test/layout_test_render_process_observer.h"
#include "content/shell/renderer/layout_test/leak_detector.h"
+#include "content/shell/renderer/test_runner/mock_presentation_service.h"
#include "content/shell/renderer/test_runner/mock_screen_orientation_client.h"
#include "content/shell/renderer/test_runner/web_task.h"
#include "content/shell/renderer/test_runner/web_test_interfaces.h"
@@ -248,6 +249,16 @@ void WebKitTestRunner::DidChangeBatteryStatus(
MockBatteryStatusChanged(status);
}
+void WebKitTestRunner::SetScreenAvailability(bool available) {
+ MockPresentationService* mock_service = proxy()->GetPresentationServiceMock();
+ mock_service->SetScreenAvailability(available);
+}
+
+void WebKitTestRunner::ResetPresentationService() {
+ MockPresentationService* mock_service = proxy()->GetPresentationServiceMock();
+ mock_service->Reset();
+}
+
void WebKitTestRunner::PrintMessage(const std::string& message) {
Send(new ShellViewHostMsg_PrintMessage(routing_id(), message));
}

Powered by Google App Engine
This is Rietveld 408576698