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

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

Issue 2705503002: Mojo C++ bindings: rename GetIsolatedProxy to MakeIsolatedRequest to better match other functions. (Closed)
Patch Set: . Created 3 years, 9 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 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
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 }; 52 };
53 53
54 // TODO(lunalu): When available, test mojo service without needing a 54 // TODO(lunalu): When available, test mojo service without needing a
55 // RenderViewTest. 55 // RenderViewTest.
56 class ScreenOrientationDispatcherTest : public RenderViewTest { 56 class ScreenOrientationDispatcherTest : public RenderViewTest {
57 protected: 57 protected:
58 void SetUp() override { 58 void SetUp() override {
59 RenderViewTest::SetUp(); 59 RenderViewTest::SetUp();
60 dispatcher_.reset(new ScreenOrientationDispatcher(nullptr)); 60 dispatcher_.reset(new ScreenOrientationDispatcher(nullptr));
61 ScreenOrientationAssociatedPtr screen_orientation; 61 ScreenOrientationAssociatedPtr screen_orientation;
62 mojo::GetIsolatedProxy(&screen_orientation); 62 mojo::MakeIsolatedRequest(&screen_orientation);
63 dispatcher_->SetScreenOrientationForTests(screen_orientation); 63 dispatcher_->SetScreenOrientationForTests(screen_orientation);
64 } 64 }
65 65
66 void LockOrientation( 66 void LockOrientation(
67 blink::WebScreenOrientationLockType orientation, 67 blink::WebScreenOrientationLockType orientation,
68 std::unique_ptr<blink::WebLockOrientationCallback> callback) { 68 std::unique_ptr<blink::WebLockOrientationCallback> callback) {
69 dispatcher_->lockOrientation(orientation, std::move(callback)); 69 dispatcher_->lockOrientation(orientation, std::move(callback));
70 } 70 }
71 71
72 void UnlockOrientation() { dispatcher_->unlockOrientation(); } 72 void UnlockOrientation() { dispatcher_->unlockOrientation(); }
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 EXPECT_FALSE(callback_results1.succeeded_); 182 EXPECT_FALSE(callback_results1.succeeded_);
183 EXPECT_TRUE(callback_results1.failed_); 183 EXPECT_TRUE(callback_results1.failed_);
184 EXPECT_EQ(blink::WebLockOrientationErrorCanceled, callback_results1.error_); 184 EXPECT_EQ(blink::WebLockOrientationErrorCanceled, callback_results1.error_);
185 185
186 // Second request is still pending. 186 // Second request is still pending.
187 EXPECT_FALSE(callback_results2.succeeded_); 187 EXPECT_FALSE(callback_results2.succeeded_);
188 EXPECT_FALSE(callback_results2.failed_); 188 EXPECT_FALSE(callback_results2.failed_);
189 } 189 }
190 190
191 } // namespace content 191 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/mock_render_process_host.cc ('k') | mojo/public/cpp/bindings/associated_interface_ptr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698