Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(463)

Side by Side Diff: shell/dynamic_application_loader_unittest.cc

Issue 930243006: Simplify the ApplicationLoader interface in preparation for changes. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: trybot debugging ftw Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/context.h" 6 #include "shell/context.h"
7 #include "shell/dynamic_application_loader.h" 7 #include "shell/dynamic_application_loader.h"
8 #include "shell/dynamic_service_runner.h" 8 #include "shell/dynamic_service_runner.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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 scoped_ptr<DynamicApplicationLoader> loader_; 77 scoped_ptr<DynamicApplicationLoader> loader_;
78 TestState state_; 78 TestState state_;
79 }; 79 };
80 80
81 TEST_F(DynamicApplicationLoaderTest, DoesNotExist) { 81 TEST_F(DynamicApplicationLoaderTest, DoesNotExist) {
82 base::ScopedTempDir temp_dir; 82 base::ScopedTempDir temp_dir;
83 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); 83 ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
84 base::FilePath nonexistent_file(FILE_PATH_LITERAL("nonexistent.txt")); 84 base::FilePath nonexistent_file(FILE_PATH_LITERAL("nonexistent.txt"));
85 GURL url(FilePathToFileURL(temp_dir.path().Append(nonexistent_file))); 85 GURL url(FilePathToFileURL(temp_dir.path().Append(nonexistent_file)));
86 ApplicationPtr application; 86 ApplicationPtr application;
87 loader_->Load(context_.application_manager(), url, GetProxy(&application), 87 loader_->Load(url, GetProxy(&application),
88 ApplicationLoader::SimpleLoadCallback()); 88 DynamicApplicationLoader::SimpleLoadCallback());
89 EXPECT_FALSE(state_.runner_was_created); 89 EXPECT_FALSE(state_.runner_was_created);
90 EXPECT_FALSE(state_.runner_was_started); 90 EXPECT_FALSE(state_.runner_was_started);
91 EXPECT_FALSE(state_.runner_was_destroyed); 91 EXPECT_FALSE(state_.runner_was_destroyed);
92 } 92 }
93 93
94 } // namespace shell 94 } // namespace shell
95 } // namespace mojo 95 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698