OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "mojo/shell/public/cpp/shell_test.h" | 5 #include "mojo/shell/public/cpp/shell_test.h" |
6 | 6 |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "mojo/shell/background/background_shell.h" | 8 #include "mojo/shell/background/background_shell.h" |
9 #include "mojo/shell/public/cpp/shell_client.h" | 9 #include "mojo/shell/public/cpp/shell_client.h" |
10 | 10 |
11 namespace mojo { | 11 namespace mojo { |
12 namespace test { | 12 namespace test { |
13 | 13 |
14 ShellTestClient::ShellTestClient(ShellTest* test) : test_(test) {} | 14 ShellTestClient::ShellTestClient(ShellTest* test) : test_(test) {} |
15 ShellTestClient::~ShellTestClient() {} | 15 ShellTestClient::~ShellTestClient() {} |
16 | 16 |
17 void ShellTestClient::Initialize(Connector* connector, const std::string& name, | 17 void ShellTestClient::Initialize(Connector* connector, const Identity& identity, |
18 const std::string& user_id, uint32_t id) { | 18 uint32_t id) { |
19 test_->InitializeCalled(connector, name, user_id, id); | 19 test_->InitializeCalled(connector, identity.name(), identity.user_id(), id); |
20 } | 20 } |
21 | 21 |
22 ShellTest::ShellTest() {} | 22 ShellTest::ShellTest() {} |
23 ShellTest::ShellTest(const std::string& test_name) : test_name_(test_name) {} | 23 ShellTest::ShellTest(const std::string& test_name) : test_name_(test_name) {} |
24 ShellTest::~ShellTest() {} | 24 ShellTest::~ShellTest() {} |
25 | 25 |
26 void ShellTest::InitTestName(const std::string& test_name) { | 26 void ShellTest::InitTestName(const std::string& test_name) { |
27 DCHECK(test_name_.empty()); | 27 DCHECK(test_name_.empty()); |
28 test_name_ = test_name; | 28 test_name_ = test_name; |
29 } | 29 } |
(...skipping 25 matching lines...) Expand all Loading... |
55 | 55 |
56 void ShellTest::TearDown() { | 56 void ShellTest::TearDown() { |
57 shell_connection_.reset(); | 57 shell_connection_.reset(); |
58 background_shell_.reset(); | 58 background_shell_.reset(); |
59 message_loop_.reset(); | 59 message_loop_.reset(); |
60 shell_client_.reset(); | 60 shell_client_.reset(); |
61 } | 61 } |
62 | 62 |
63 } // namespace test | 63 } // namespace test |
64 } // namespace mojo | 64 } // namespace mojo |
OLD | NEW |