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

Side by Side Diff: chrome/browser/apps/app_shim/app_shim_host_mac_unittest.cc

Issue 1767343004: Replace base::Tuple in //chrome with std::tuple (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/typedef/using/ Created 4 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/declarative_content/declarative_content_css_condition_tracker_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/apps/app_shim/app_shim_host_mac.h" 5 #include "chrome/browser/apps/app_shim/app_shim_host_mac.h"
6 6
7 #include <tuple>
7 #include <vector> 8 #include <vector>
8 9
9 #include "base/macros.h" 10 #include "base/macros.h"
10 #include "base/memory/scoped_vector.h" 11 #include "base/memory/scoped_vector.h"
11 #include "chrome/common/mac/app_shim_messages.h" 12 #include "chrome/common/mac/app_shim_messages.h"
12 #include "ipc/ipc_message.h" 13 #include "ipc/ipc_message.h"
13 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
14 15
15 namespace { 16 namespace {
16 17
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 launch_type, 68 launch_type,
68 std::vector<base::FilePath>()))); 69 std::vector<base::FilePath>())));
69 } 70 }
70 71
71 apps::AppShimLaunchResult GetLaunchResult() { 72 apps::AppShimLaunchResult GetLaunchResult() {
72 EXPECT_EQ(1u, host()->sent_messages().size()); 73 EXPECT_EQ(1u, host()->sent_messages().size());
73 IPC::Message* message = host()->sent_messages()[0]; 74 IPC::Message* message = host()->sent_messages()[0];
74 EXPECT_EQ(AppShimMsg_LaunchApp_Done::ID, message->type()); 75 EXPECT_EQ(AppShimMsg_LaunchApp_Done::ID, message->type());
75 AppShimMsg_LaunchApp_Done::Param param; 76 AppShimMsg_LaunchApp_Done::Param param;
76 AppShimMsg_LaunchApp_Done::Read(message, &param); 77 AppShimMsg_LaunchApp_Done::Read(message, &param);
77 return base::get<0>(param); 78 return std::get<0>(param);
78 } 79 }
79 80
80 void SimulateDisconnect() { 81 void SimulateDisconnect() {
81 static_cast<IPC::Listener*>(host_.release())->OnChannelError(); 82 static_cast<IPC::Listener*>(host_.release())->OnChannelError();
82 } 83 }
83 84
84 protected: 85 protected:
85 void OnShimLaunch(Host* host, 86 void OnShimLaunch(Host* host,
86 apps::AppShimLaunchType launch_type, 87 apps::AppShimLaunchType launch_type,
87 const std::vector<base::FilePath>& file) override { 88 const std::vector<base::FilePath>& file) override {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 apps::AppShimHandler::RemoveHandler(kTestAppId); 167 apps::AppShimHandler::RemoveHandler(kTestAppId);
167 } 168 }
168 169
169 TEST_F(AppShimHostTest, TestFailLaunch) { 170 TEST_F(AppShimHostTest, TestFailLaunch) {
170 apps::AppShimHandler::RegisterHandler(kTestAppId, this); 171 apps::AppShimHandler::RegisterHandler(kTestAppId, this);
171 launch_result_ = apps::APP_SHIM_LAUNCH_APP_NOT_FOUND; 172 launch_result_ = apps::APP_SHIM_LAUNCH_APP_NOT_FOUND;
172 LaunchApp(apps::APP_SHIM_LAUNCH_NORMAL); 173 LaunchApp(apps::APP_SHIM_LAUNCH_NORMAL);
173 EXPECT_EQ(apps::APP_SHIM_LAUNCH_APP_NOT_FOUND, GetLaunchResult()); 174 EXPECT_EQ(apps::APP_SHIM_LAUNCH_APP_NOT_FOUND, GetLaunchResult());
174 apps::AppShimHandler::RemoveHandler(kTestAppId); 175 apps::AppShimHandler::RemoveHandler(kTestAppId);
175 } 176 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/declarative_content/declarative_content_css_condition_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698