OLD | NEW |
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 "base/memory/ptr_util.h" |
12 #include "content/public/test/render_view_test.h" | 13 #include "content/public/test/render_view_test.h" |
13 #include "content/public/test/test_utils.h" | 14 #include "content/public/test/test_utils.h" |
14 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebLockO
rientationCallback.h" | 15 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebLockO
rientationCallback.h" |
15 | 16 |
16 namespace content { | 17 namespace content { |
17 | 18 |
18 using LockOrientationCallback = | 19 using LockOrientationCallback = |
19 device::mojom::ScreenOrientation::LockOrientationCallback; | 20 device::mojom::ScreenOrientation::LockOrientationCallback; |
20 using LockResult = device::mojom::ScreenOrientationLockResult; | 21 using LockResult = device::mojom::ScreenOrientationLockResult; |
21 | 22 |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 EXPECT_FALSE(callback_results1.succeeded_); | 182 EXPECT_FALSE(callback_results1.succeeded_); |
182 EXPECT_TRUE(callback_results1.failed_); | 183 EXPECT_TRUE(callback_results1.failed_); |
183 EXPECT_EQ(blink::WebLockOrientationErrorCanceled, callback_results1.error_); | 184 EXPECT_EQ(blink::WebLockOrientationErrorCanceled, callback_results1.error_); |
184 | 185 |
185 // Second request is still pending. | 186 // Second request is still pending. |
186 EXPECT_FALSE(callback_results2.succeeded_); | 187 EXPECT_FALSE(callback_results2.succeeded_); |
187 EXPECT_FALSE(callback_results2.failed_); | 188 EXPECT_FALSE(callback_results2.failed_); |
188 } | 189 } |
189 | 190 |
190 } // namespace content | 191 } // namespace content |
OLD | NEW |