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

Unified Diff: content/shell/renderer/test_runner/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: Replaced a failing DCHECK with a Reset(). 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/test_runner/test_runner.cc
diff --git a/content/shell/renderer/test_runner/test_runner.cc b/content/shell/renderer/test_runner/test_runner.cc
index 2b79535bcefc506a7094f634a0ebe439c13a6f1f..69644f4d05cc1f123723f976811452282184cc89 100644
--- a/content/shell/renderer/test_runner/test_runner.cc
+++ b/content/shell/renderer/test_runner/test_runner.cc
@@ -204,6 +204,7 @@ class TestRunnerBindings : public gin::Wrappable<TestRunnerBindings> {
double dischargingTime,
double level);
void ResetBatteryStatus();
+ void SetMockScreenAvailability(bool available);
void DidAcquirePointerLock();
void DidNotAcquirePointerLock();
void DidLosePointerLock();
@@ -411,6 +412,8 @@ gin::ObjectTemplateBuilder TestRunnerBindings::GetObjectTemplateBuilder(
.SetMethod("didChangeBatteryStatus",
&TestRunnerBindings::DidChangeBatteryStatus)
.SetMethod("resetBatteryStatus", &TestRunnerBindings::ResetBatteryStatus)
+ .SetMethod("setMockScreenAvailability",
+ &TestRunnerBindings::SetMockScreenAvailability)
.SetMethod("didAcquirePointerLock",
&TestRunnerBindings::DidAcquirePointerLock)
.SetMethod("didNotAcquirePointerLock",
@@ -966,6 +969,11 @@ void TestRunnerBindings::ResetBatteryStatus() {
runner_->ResetBatteryStatus();
}
+void TestRunnerBindings::SetMockScreenAvailability(bool available) {
+ if (runner_)
+ runner_->SetMockScreenAvailability(available);
+}
+
void TestRunnerBindings::DidAcquirePointerLock() {
if (runner_)
runner_->DidAcquirePointerLock();
@@ -1639,6 +1647,7 @@ void TestRunner::Reset() {
delegate_->ResetScreenOrientation();
delegate_->SetBluetoothMockDataSet("");
delegate_->ClearGeofencingMockProvider();
+ delegate_->ResetPresentationService();
ResetBatteryStatus();
ResetDeviceLight();
}
@@ -2459,6 +2468,10 @@ void TestRunner::ResetBatteryStatus() {
delegate_->DidChangeBatteryStatus(status);
}
+void TestRunner::SetMockScreenAvailability(bool available) {
+ delegate_->SetScreenAvailability(available);
+}
+
void TestRunner::DidAcquirePointerLock() {
DidAcquirePointerLockInternal();
}

Powered by Google App Engine
This is Rietveld 408576698