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

Side by Side Diff: content/renderer/screen_orientation/screen_orientation_dispatcher_browsertest.cc

Issue 2564653003: [DeviceService] Move screen_orientation.mojom from //content to //device. (Closed)
Patch Set: Address nits from blundell@ Created 4 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/renderer/screen_orientation/screen_orientation_dispatcher.h" 5 #include "content/renderer/screen_orientation/screen_orientation_dispatcher.h"
6 6
7 #include <list> 7 #include <list>
8 #include <memory> 8 #include <memory>
9 #include <tuple> 9 #include <tuple>
10 10
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "content/public/test/render_view_test.h" 12 #include "content/public/test/render_view_test.h"
13 #include "content/public/test/test_utils.h" 13 #include "content/public/test/test_utils.h"
14 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebLockO rientationCallback.h" 14 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebLockO rientationCallback.h"
15 15
16 namespace content { 16 namespace content {
17 17
18 using LockOrientationCallback = 18 using LockOrientationCallback =
19 mojom::ScreenOrientation::LockOrientationCallback; 19 device::mojom::ScreenOrientation::LockOrientationCallback;
20 using LockResult = ::blink::mojom::ScreenOrientationLockResult; 20 using LockResult = device::mojom::ScreenOrientationLockResult;
21 21
22 // MockLockOrientationCallback is an implementation of 22 // MockLockOrientationCallback is an implementation of
23 // WebLockOrientationCallback and takes a LockOrientationResultHolder* as a 23 // WebLockOrientationCallback and takes a LockOrientationResultHolder* as a
24 // parameter when being constructed. The |results_| pointer is owned by the 24 // parameter when being constructed. The |results_| pointer is owned by the
25 // caller and not by the callback object. The intent being that as soon as the 25 // caller and not by the callback object. The intent being that as soon as the
26 // callback is resolved, it will be killed so we use the 26 // callback is resolved, it will be killed so we use the
27 // LockOrientationResultHolder to know in which state the callback object is at 27 // LockOrientationResultHolder to know in which state the callback object is at
28 // any time. 28 // any time.
29 class MockLockOrientationCallback : public blink::WebLockOrientationCallback { 29 class MockLockOrientationCallback : public blink::WebLockOrientationCallback {
30 public: 30 public:
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 EXPECT_FALSE(callback_results1.succeeded_); 181 EXPECT_FALSE(callback_results1.succeeded_);
182 EXPECT_TRUE(callback_results1.failed_); 182 EXPECT_TRUE(callback_results1.failed_);
183 EXPECT_EQ(blink::WebLockOrientationErrorCanceled, callback_results1.error_); 183 EXPECT_EQ(blink::WebLockOrientationErrorCanceled, callback_results1.error_);
184 184
185 // Second request is still pending. 185 // Second request is still pending.
186 EXPECT_FALSE(callback_results2.succeeded_); 186 EXPECT_FALSE(callback_results2.succeeded_);
187 EXPECT_FALSE(callback_results2.failed_); 187 EXPECT_FALSE(callback_results2.failed_);
188 } 188 }
189 189
190 } // namespace content 190 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/screen_orientation/screen_orientation_dispatcher.cc ('k') | content/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698