| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "shell/context.h" | 5 #include "shell/context.h" |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "mojo/common/message_pump_mojo.h" | 10 #include "mojo/common/message_pump_mojo.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 12 | 12 |
| 13 namespace mojo { | |
| 14 namespace shell { | 13 namespace shell { |
| 15 namespace { | 14 namespace { |
| 16 | 15 |
| 17 #if defined(OS_ANDROID) | 16 #if defined(OS_ANDROID) |
| 18 // TODO(vtl): The command line doesn't get initialized in a reasonable way on | 17 // TODO(vtl): The command line doesn't get initialized in a reasonable way on |
| 19 // Android, currently. (Relatedly, multiprocess tests are currently not | 18 // Android, currently. (Relatedly, multiprocess tests are currently not |
| 20 // supported.) | 19 // supported.) |
| 21 #define MAYBE_Paths DISABLED_Paths | 20 #define MAYBE_Paths DISABLED_Paths |
| 22 #else | 21 #else |
| 23 #define MAYBE_Paths Paths | 22 #define MAYBE_Paths Paths |
| 24 #endif | 23 #endif |
| 25 TEST(ContextTest, MAYBE_Paths) { | 24 TEST(ContextTest, MAYBE_Paths) { |
| 26 Context context; | 25 Context context; |
| 27 base::MessageLoop message_loop( | 26 base::MessageLoop message_loop( |
| 28 scoped_ptr<base::MessagePump>(new common::MessagePumpMojo())); | 27 scoped_ptr<base::MessagePump>(new mojo::common::MessagePumpMojo())); |
| 29 context.Init(); | 28 context.Init(); |
| 30 | 29 |
| 31 EXPECT_FALSE(context.mojo_shell_path().empty()); | 30 EXPECT_FALSE(context.mojo_shell_path().empty()); |
| 32 EXPECT_FALSE(context.mojo_shell_child_path().empty()); | 31 EXPECT_FALSE(context.mojo_shell_child_path().empty()); |
| 33 EXPECT_TRUE(context.mojo_shell_path().IsAbsolute()); | 32 EXPECT_TRUE(context.mojo_shell_path().IsAbsolute()); |
| 34 EXPECT_TRUE(context.mojo_shell_child_path().IsAbsolute()); | 33 EXPECT_TRUE(context.mojo_shell_child_path().IsAbsolute()); |
| 35 | 34 |
| 36 context.Shutdown(); | 35 context.Shutdown(); |
| 37 } | 36 } |
| 38 | 37 |
| 39 } // namespace | 38 } // namespace |
| 40 } // namespace shell | 39 } // namespace shell |
| 41 } // namespace mojo | |
| OLD | NEW |