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 "base/at_exit.h" | 5 #include "base/at_exit.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "mojo/shell/application_loader.h" | 9 #include "mojo/shell/application_loader.h" |
10 #include "mojo/shell/application_manager.h" | 10 #include "mojo/shell/application_manager.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 protected: | 67 protected: |
68 template <class T> | 68 template <class T> |
69 void CreateLoader(const std::string& url) { | 69 void CreateLoader(const std::string& url) { |
70 application_manager_->SetLoaderForURL( | 70 application_manager_->SetLoaderForURL( |
71 make_scoped_ptr(new TestLoader(new T)), GURL(url)); | 71 make_scoped_ptr(new TestLoader(new T)), GURL(url)); |
72 } | 72 } |
73 | 73 |
74 void RunBlockingTest(); | 74 void RunBlockingTest(); |
75 void RunWildcardTest(); | 75 void RunWildcardTest(); |
76 | 76 |
77 // Implement to provide an implementation of PackageManager for the test's | |
78 // ApplicationManager. | |
79 virtual PackageManager* CreatePackageManager() = 0; | |
80 | |
81 // Overridden from testing::Test: | 77 // Overridden from testing::Test: |
82 void SetUp() override; | 78 void SetUp() override; |
83 void TearDown() override; | 79 void TearDown() override; |
84 | 80 |
85 base::MessageLoop* loop() { return &loop_; } | 81 base::MessageLoop* loop() { return &loop_; } |
86 ApplicationManager* application_manager() { | 82 ApplicationManager* application_manager() { |
87 return application_manager_.get(); | 83 return application_manager_.get(); |
88 } | 84 } |
89 ConnectionValidator* validator() { return validator_; } | 85 ConnectionValidator* validator() { return validator_; } |
90 | 86 |
(...skipping 11 matching lines...) Expand all Loading... |
102 base::MessageLoop loop_; | 98 base::MessageLoop loop_; |
103 scoped_ptr<ApplicationManager> application_manager_; | 99 scoped_ptr<ApplicationManager> application_manager_; |
104 ConnectionValidator* validator_; | 100 ConnectionValidator* validator_; |
105 | 101 |
106 DISALLOW_COPY_AND_ASSIGN(CapabilityFilterTest); | 102 DISALLOW_COPY_AND_ASSIGN(CapabilityFilterTest); |
107 }; | 103 }; |
108 | 104 |
109 } // namespace test | 105 } // namespace test |
110 } // namespace shell | 106 } // namespace shell |
111 } // namespace mojo | 107 } // namespace mojo |
OLD | NEW |