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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/memory/scoped_vector.h" | 7 #include "base/memory/scoped_vector.h" |
8 #include "mojo/application_manager/application_manager.h" | 8 #include "mojo/application_manager/application_manager.h" |
9 #include "mojo/public/cpp/application/application_delegate.h" | 9 #include "mojo/public/cpp/application/application_delegate.h" |
10 #include "mojo/public/cpp/application/application_impl.h" | 10 #include "mojo/public/cpp/application/application_impl.h" |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 } | 175 } |
176 | 176 |
177 WindowManagerPtr window_manager_; | 177 WindowManagerPtr window_manager_; |
178 | 178 |
179 private: | 179 private: |
180 // Overridden from testing::Test: | 180 // Overridden from testing::Test: |
181 void SetUp() override { | 181 void SetUp() override { |
182 test_helper_.reset(new shell::ShellTestHelper); | 182 test_helper_.reset(new shell::ShellTestHelper); |
183 test_helper_->Init(); | 183 test_helper_->Init(); |
184 test_helper_->AddCustomMapping(GURL("mojo:window_manager"), | 184 test_helper_->AddCustomMapping(GURL("mojo:window_manager"), |
185 GURL("mojo://core_window_manager")); | 185 GURL("mojo:core_window_manager")); |
186 test_helper_->SetLoaderForURL( | 186 test_helper_->SetLoaderForURL( |
187 scoped_ptr<ApplicationLoader>(new TestApplicationLoader(base::Bind( | 187 scoped_ptr<ApplicationLoader>(new TestApplicationLoader(base::Bind( |
188 &WindowManagerApiTest::OnRootAdded, base::Unretained(this)))), | 188 &WindowManagerApiTest::OnRootAdded, base::Unretained(this)))), |
189 GURL(kTestServiceURL)); | 189 GURL(kTestServiceURL)); |
190 ConnectToWindowManager2(); | 190 ConnectToWindowManager2(); |
191 } | 191 } |
192 void TearDown() override {} | 192 void TearDown() override {} |
193 | 193 |
194 void ConnectToWindowManager2() { | 194 void ConnectToWindowManager2() { |
195 test_helper_->application_manager()->ConnectToService( | 195 test_helper_->application_manager()->ConnectToService( |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 | 256 |
257 Id second_window = OpenWindow(); | 257 Id second_window = OpenWindow(); |
258 window_manager_->ActivateWindow(second_window, | 258 window_manager_->ActivateWindow(second_window, |
259 base::Bind(&EmptyResultCallback)); | 259 base::Bind(&EmptyResultCallback)); |
260 ids = WaitForActiveWindowChange(); | 260 ids = WaitForActiveWindowChange(); |
261 EXPECT_EQ(ids.first, first_window); | 261 EXPECT_EQ(ids.first, first_window); |
262 EXPECT_EQ(ids.second, second_window); | 262 EXPECT_EQ(ids.second, second_window); |
263 } | 263 } |
264 | 264 |
265 } // namespace mojo | 265 } // namespace mojo |
OLD | NEW |