| 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/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
| 7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "components/guest_view/browser/guest_view_manager.h" | 8 #include "components/guest_view/browser/guest_view_manager.h" |
| 9 #include "components/guest_view/browser/guest_view_manager_factory.h" | 9 #include "components/guest_view/browser/guest_view_manager_factory.h" |
| 10 #include "components/guest_view/browser/test_guest_view_manager.h" | 10 #include "components/guest_view/browser/test_guest_view_manager.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 const Extension* LoadApp(const std::string& app_location) { | 113 const Extension* LoadApp(const std::string& app_location) { |
| 114 base::FilePath test_data_dir; | 114 base::FilePath test_data_dir; |
| 115 PathService::Get(DIR_TEST_DATA, &test_data_dir); | 115 PathService::Get(DIR_TEST_DATA, &test_data_dir); |
| 116 test_data_dir = test_data_dir.AppendASCII(app_location.c_str()); | 116 test_data_dir = test_data_dir.AppendASCII(app_location.c_str()); |
| 117 return extension_system_->LoadApp(test_data_dir); | 117 return extension_system_->LoadApp(test_data_dir); |
| 118 } | 118 } |
| 119 | 119 |
| 120 void RunTest(const std::string& test_name, | 120 void RunTest(const std::string& test_name, |
| 121 const std::string& app_location, | 121 const std::string& app_location, |
| 122 const std::string& app_to_embed) { | 122 const std::string& app_to_embed) { |
| 123 extension_system_->Init(); | |
| 124 | |
| 125 const Extension* app_embedder = LoadApp(app_location); | 123 const Extension* app_embedder = LoadApp(app_location); |
| 126 ASSERT_TRUE(app_embedder); | 124 ASSERT_TRUE(app_embedder); |
| 127 const Extension* app_embedded = LoadApp(app_to_embed); | 125 const Extension* app_embedded = LoadApp(app_to_embed); |
| 128 ASSERT_TRUE(app_embedded); | 126 ASSERT_TRUE(app_embedded); |
| 129 | 127 |
| 130 extension_system_->LaunchApp(app_embedder->id()); | 128 extension_system_->LaunchApp(app_embedder->id()); |
| 131 | 129 |
| 132 ExtensionTestMessageListener launch_listener("LAUNCHED", false); | 130 ExtensionTestMessageListener launch_listener("LAUNCHED", false); |
| 133 ASSERT_TRUE(launch_listener.WaitUntilSatisfied()); | 131 ASSERT_TRUE(launch_listener.WaitUntilSatisfied()); |
| 134 | 132 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 #endif | 201 #endif |
| 204 // Tests that <appview> is able to navigate to another installed app. | 202 // Tests that <appview> is able to navigate to another installed app. |
| 205 IN_PROC_BROWSER_TEST_P(AppViewTest, | 203 IN_PROC_BROWSER_TEST_P(AppViewTest, |
| 206 MAYBE_TestAppViewWithUndefinedDataShouldSucceed) { | 204 MAYBE_TestAppViewWithUndefinedDataShouldSucceed) { |
| 207 RunTest("testAppViewWithUndefinedDataShouldSucceed", | 205 RunTest("testAppViewWithUndefinedDataShouldSucceed", |
| 208 "app_view/apitest", | 206 "app_view/apitest", |
| 209 "app_view/apitest/skeleton"); | 207 "app_view/apitest/skeleton"); |
| 210 } | 208 } |
| 211 | 209 |
| 212 } // namespace extensions | 210 } // namespace extensions |
| OLD | NEW |