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 "mojo/runner/context.h" | 6 #include "mojo/runner/context.h" |
7 #include "mojo/shell/application_manager.h" | 7 #include "mojo/shell/application_manager.h" |
8 #include "mojo/util/filename_util.h" | 8 #include "mojo/util/filename_util.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 | 10 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 } | 87 } |
88 }; | 88 }; |
89 | 89 |
90 TEST_F(NativeApplicationLoaderTest, DoesNotExist) { | 90 TEST_F(NativeApplicationLoaderTest, DoesNotExist) { |
91 base::ScopedTempDir temp_dir; | 91 base::ScopedTempDir temp_dir; |
92 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); | 92 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); |
93 base::FilePath nonexistent_file(FILE_PATH_LITERAL("nonexistent.txt")); | 93 base::FilePath nonexistent_file(FILE_PATH_LITERAL("nonexistent.txt")); |
94 GURL url(util::FilePathToFileURL(temp_dir.path().Append(nonexistent_file))); | 94 GURL url(util::FilePathToFileURL(temp_dir.path().Append(nonexistent_file))); |
95 InterfaceRequest<ServiceProvider> services; | 95 InterfaceRequest<ServiceProvider> services; |
96 ServiceProviderPtr service_provider; | 96 ServiceProviderPtr service_provider; |
| 97 mojo::URLRequestPtr request(mojo::URLRequest::New()); |
| 98 request->url = mojo::String::From(url.spec()); |
97 application_manager_.ConnectToApplication( | 99 application_manager_.ConnectToApplication( |
98 url, GURL(), services.Pass(), service_provider.Pass(), base::Closure()); | 100 request.Pass(), GURL(), services.Pass(), service_provider.Pass(), |
| 101 base::Closure()); |
99 EXPECT_FALSE(state_.runner_was_created); | 102 EXPECT_FALSE(state_.runner_was_created); |
100 EXPECT_FALSE(state_.runner_was_started); | 103 EXPECT_FALSE(state_.runner_was_started); |
101 EXPECT_FALSE(state_.runner_was_destroyed); | 104 EXPECT_FALSE(state_.runner_was_destroyed); |
102 } | 105 } |
103 | 106 |
104 } // namespace | 107 } // namespace |
105 } // namespace runner | 108 } // namespace runner |
106 } // namespace mojo | 109 } // namespace mojo |
OLD | NEW |