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/files/scoped_temp_dir.h" | 5 #include "base/files/scoped_temp_dir.h" |
6 #include "shell/application_manager/application_manager.h" | 6 #include "shell/application_manager/application_manager.h" |
7 #include "shell/application_manager/native_application_options.h" | 7 #include "shell/application_manager/native_application_options.h" |
8 #include "shell/context.h" | 8 #include "shell/context.h" |
9 #include "shell/filename_util.h" | 9 #include "shell/filename_util.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 // ApplicationManager::Delegate | 81 // ApplicationManager::Delegate |
82 GURL ResolveMappings(const GURL& url) override { return url; } | 82 GURL ResolveMappings(const GURL& url) override { return url; } |
83 GURL ResolveMojoURL(const GURL& url) override { return url; } | 83 GURL ResolveMojoURL(const GURL& url) override { return url; } |
84 }; | 84 }; |
85 | 85 |
86 TEST_F(NativeApplicationLoaderTest, DoesNotExist) { | 86 TEST_F(NativeApplicationLoaderTest, DoesNotExist) { |
87 base::ScopedTempDir temp_dir; | 87 base::ScopedTempDir temp_dir; |
88 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); | 88 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); |
89 base::FilePath nonexistent_file(FILE_PATH_LITERAL("nonexistent.txt")); | 89 base::FilePath nonexistent_file(FILE_PATH_LITERAL("nonexistent.txt")); |
90 GURL url(FilePathToFileURL(temp_dir.path().Append(nonexistent_file))); | 90 GURL url(FilePathToFileURL(temp_dir.path().Append(nonexistent_file))); |
91 mojo::InterfaceRequest<mojo::ServiceProvider> services; | 91 application_manager_.ConnectToApplication(url, GURL(), nullptr, |
92 mojo::ServiceProviderPtr service_provider; | 92 base::Closure()); |
93 application_manager_.ConnectToApplication( | |
94 url, GURL(), services.Pass(), service_provider.Pass(), base::Closure()); | |
95 EXPECT_FALSE(state_.runner_was_created); | 93 EXPECT_FALSE(state_.runner_was_created); |
96 EXPECT_FALSE(state_.runner_was_started); | 94 EXPECT_FALSE(state_.runner_was_started); |
97 EXPECT_FALSE(state_.runner_was_destroyed); | 95 EXPECT_FALSE(state_.runner_was_destroyed); |
98 } | 96 } |
99 | 97 |
100 } // namespace | 98 } // namespace |
101 } // namespace shell | 99 } // namespace shell |
OLD | NEW |