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

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

Issue 1159553007: Move Tuple to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 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 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 protected: 67 protected:
68 void SetUp() override { 68 void SetUp() override {
69 dispatcher_.reset(new ScreenOrientationDispatcherWithSink(&sink_)); 69 dispatcher_.reset(new ScreenOrientationDispatcherWithSink(&sink_));
70 } 70 }
71 71
72 int GetFirstLockRequestIdFromSink() { 72 int GetFirstLockRequestIdFromSink() {
73 const IPC::Message* msg = sink().GetFirstMessageMatching( 73 const IPC::Message* msg = sink().GetFirstMessageMatching(
74 ScreenOrientationHostMsg_LockRequest::ID); 74 ScreenOrientationHostMsg_LockRequest::ID);
75 EXPECT_TRUE(msg != NULL); 75 EXPECT_TRUE(msg != NULL);
76 76
77 Tuple<blink::WebScreenOrientationLockType,int> params; 77 base::Tuple<blink::WebScreenOrientationLockType, int> params;
78 ScreenOrientationHostMsg_LockRequest::Read(msg, &params); 78 ScreenOrientationHostMsg_LockRequest::Read(msg, &params);
79 return get<1>(params); 79 return base::get<1>(params);
80 } 80 }
81 81
82 IPC::TestSink& sink() { 82 IPC::TestSink& sink() {
83 return sink_; 83 return sink_;
84 } 84 }
85 85
86 void LockOrientation(blink::WebScreenOrientationLockType orientation, 86 void LockOrientation(blink::WebScreenOrientationLockType orientation,
87 blink::WebLockOrientationCallback* callback) { 87 blink::WebLockOrientationCallback* callback) {
88 dispatcher_->lockOrientation(orientation, callback); 88 dispatcher_->lockOrientation(orientation, callback);
89 } 89 }
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 EXPECT_FALSE(callback_results1.succeeded_); 234 EXPECT_FALSE(callback_results1.succeeded_);
235 EXPECT_TRUE(callback_results1.failed_); 235 EXPECT_TRUE(callback_results1.failed_);
236 EXPECT_EQ(blink::WebLockOrientationErrorCanceled, callback_results1.error_); 236 EXPECT_EQ(blink::WebLockOrientationErrorCanceled, callback_results1.error_);
237 237
238 // Second request is still pending. 238 // Second request is still pending.
239 EXPECT_FALSE(callback_results2.succeeded_); 239 EXPECT_FALSE(callback_results2.succeeded_);
240 EXPECT_FALSE(callback_results2.failed_); 240 EXPECT_FALSE(callback_results2.failed_);
241 } 241 }
242 242
243 } // namespace content 243 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_widget_unittest.cc ('k') | extensions/browser/api/alarms/alarms_api_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698