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

Unified Diff: third_party/WebKit/Source/web/tests/ScreenWakeLockTest.cpp

Issue 2921823002: Rationalize WakeLock naming conventions (Closed)
Patch Set: rebase Created 3 years, 6 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
« no previous file with comments | « third_party/WebKit/Source/modules/wake_lock/ScreenWakeLock.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/tests/ScreenWakeLockTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/ScreenWakeLockTest.cpp b/third_party/WebKit/Source/web/tests/ScreenWakeLockTest.cpp
index 73ee0296282dde322d798702e6fae273759d3e4e..12b1a754af07beceac8110b027fa19112dcdcdd5 100644
--- a/third_party/WebKit/Source/web/tests/ScreenWakeLockTest.cpp
+++ b/third_party/WebKit/Source/web/tests/ScreenWakeLockTest.cpp
@@ -24,10 +24,10 @@
namespace blink {
namespace {
-using device::mojom::blink::WakeLockService;
-using device::mojom::blink::WakeLockServiceRequest;
+using device::mojom::blink::WakeLock;
+using device::mojom::blink::WakeLockRequest;
-// This class allows binding interface requests to a MockWakeLockService.
+// This class allows binding interface requests to a MockWakeLock.
class MockInterfaceProvider : public InterfaceProvider {
public:
MockInterfaceProvider() : wake_lock_status_(false) {}
@@ -39,34 +39,32 @@ class MockInterfaceProvider : public InterfaceProvider {
void SetWakeLockStatus(bool status) { wake_lock_status_ = status; }
private:
- // A mock WakeLockService used to intercept calls to the mojo methods.
- class MockWakeLockService : public WakeLockService {
+ // A mock WakeLock used to intercept calls to the mojo methods.
+ class MockWakeLock : public WakeLock {
public:
- MockWakeLockService(MockInterfaceProvider* registry,
- WakeLockServiceRequest request)
+ MockWakeLock(MockInterfaceProvider* registry, WakeLockRequest request)
: binding_(this, std::move(request)), registry_(registry) {}
- ~MockWakeLockService() {}
+ ~MockWakeLock() {}
private:
- // mojom::WakeLockService
+ // mojom::WakeLock
void RequestWakeLock() override { registry_->SetWakeLockStatus(true); }
void CancelWakeLock() override { registry_->SetWakeLockStatus(false); }
- void AddClient(
- device::mojom::blink::WakeLockServiceRequest wake_lock) override {}
+ void AddClient(device::mojom::blink::WakeLockRequest wake_lock) override {}
void HasWakeLockForTests(HasWakeLockForTestsCallback callback) override {}
- mojo::Binding<WakeLockService> binding_;
+ mojo::Binding<WakeLock> binding_;
MockInterfaceProvider* const registry_;
};
- std::unique_ptr<MockWakeLockService> mock_wake_lock_service_;
+ std::unique_ptr<MockWakeLock> mock_wake_lock_;
bool wake_lock_status_;
};
void MockInterfaceProvider::GetInterface(const char* name,
mojo::ScopedMessagePipeHandle handle) {
- mock_wake_lock_service_.reset(
- new MockWakeLockService(this, WakeLockServiceRequest(std::move(handle))));
+ mock_wake_lock_.reset(
+ new MockWakeLock(this, WakeLockRequest(std::move(handle))));
}
// A TestWebFrameClient to allow overriding the interfaceProvider() with a mock.
« no previous file with comments | « third_party/WebKit/Source/modules/wake_lock/ScreenWakeLock.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698