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

Side by Side Diff: third_party/WebKit/Source/web/tests/ScreenWakeLockTest.cpp

Issue 1902263004: Mojo: Change the blink variant from "wtf" to "blink". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/wake_lock/ScreenWakeLock.h" 5 #include "modules/wake_lock/ScreenWakeLock.h"
6 6
7 #include "core/dom/DOMImplementation.h" 7 #include "core/dom/DOMImplementation.h"
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/dom/DocumentInit.h" 9 #include "core/dom/DocumentInit.h"
10 #include "mojo/public/cpp/bindings/interface_request.h" 10 #include "mojo/public/cpp/bindings/interface_request.h"
11 #include "mojo/public/cpp/bindings/strong_binding.h" 11 #include "mojo/public/cpp/bindings/strong_binding.h"
12 #include "platform/testing/URLTestHelpers.h" 12 #include "platform/testing/URLTestHelpers.h"
13 #include "platform/testing/UnitTestHelpers.h" 13 #include "platform/testing/UnitTestHelpers.h"
14 #include "public/platform/Platform.h" 14 #include "public/platform/Platform.h"
15 #include "public/platform/ServiceRegistry.h" 15 #include "public/platform/ServiceRegistry.h"
16 #include "public/platform/WebPageVisibilityState.h" 16 #include "public/platform/WebPageVisibilityState.h"
17 #include "public/platform/WebURLLoaderMockFactory.h" 17 #include "public/platform/WebURLLoaderMockFactory.h"
18 #include "public/web/WebCache.h" 18 #include "public/web/WebCache.h"
19 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/include/gtest/gtest.h"
20 #include "web/WebLocalFrameImpl.h" 20 #include "web/WebLocalFrameImpl.h"
21 #include "web/tests/FrameTestHelpers.h" 21 #include "web/tests/FrameTestHelpers.h"
22 22
23 namespace { 23 namespace {
24 24
25 using blink::ScreenWakeLock; 25 using blink::ScreenWakeLock;
26 using blink::mojom::wtf::WakeLockService; 26 using blink::mojom::blink::WakeLockService;
27 using blink::mojom::wtf::WakeLockServiceRequest; 27 using blink::mojom::blink::WakeLockServiceRequest;
28 28
29 // This class allows connecting service requests to a MockWakeLockService. 29 // This class allows connecting service requests to a MockWakeLockService.
30 class MockServiceRegistry : public blink::ServiceRegistry { 30 class MockServiceRegistry : public blink::ServiceRegistry {
31 public: 31 public:
32 MockServiceRegistry() : m_wakeLockStatus(false) {} 32 MockServiceRegistry() : m_wakeLockStatus(false) {}
33 ~MockServiceRegistry() {} 33 ~MockServiceRegistry() {}
34 34
35 void connectToRemoteService(const char* name, mojo::ScopedMessagePipeHandle) override; 35 void connectToRemoteService(const char* name, mojo::ScopedMessagePipeHandle) override;
36 36
37 bool wakeLockStatus() const { return m_wakeLockStatus; } 37 bool wakeLockStatus() const { return m_wakeLockStatus; }
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 ASSERT_FALSE(clientKeepScreenAwake()); 215 ASSERT_FALSE(clientKeepScreenAwake());
216 216
217 setKeepAwake(true); 217 setKeepAwake(true);
218 loadFrame(); 218 loadFrame();
219 219
220 EXPECT_FALSE(screenKeepAwake()); 220 EXPECT_FALSE(screenKeepAwake());
221 EXPECT_FALSE(clientKeepScreenAwake()); 221 EXPECT_FALSE(clientKeepScreenAwake());
222 } 222 }
223 223
224 } // namespace 224 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698