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

Side by Side Diff: mojo/shell/capability_filter_test.cc

Issue 1679573002: Move shell interfaces into the shell.mojom namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@delegate
Patch Set: . Created 4 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
« no previous file with comments | « mojo/shell/capability_filter_test.h ('k') | mojo/shell/connect_to_application_params.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "mojo/shell/capability_filter_test.h" 5 #include "mojo/shell/capability_filter_test.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 void PrintUnmetExpectations() { 45 void PrintUnmetExpectations() {
46 for (auto expectation : expectations_) 46 for (auto expectation : expectations_)
47 ADD_FAILURE() << "Unmet: " << expectation; 47 ADD_FAILURE() << "Unmet: " << expectation;
48 for (auto unexpected : unexpected_) 48 for (auto unexpected : unexpected_)
49 ADD_FAILURE() << "Unexpected: " << unexpected; 49 ADD_FAILURE() << "Unexpected: " << unexpected;
50 } 50 }
51 51
52 private: 52 private:
53 // Overridden from ApplicationLoader: 53 // Overridden from ApplicationLoader:
54 void Load(const GURL& url, InterfaceRequest<Application> request) override { 54 void Load(const GURL& url,
55 InterfaceRequest<mojom::Application> request) override {
55 app_.reset(new ApplicationImpl(this, std::move(request))); 56 app_.reset(new ApplicationImpl(this, std::move(request)));
56 } 57 }
57 58
58 // Overridden from ApplicationDelegate: 59 // Overridden from ApplicationDelegate:
59 bool AcceptConnection(ApplicationConnection* connection) override { 60 bool AcceptConnection(ApplicationConnection* connection) override {
60 connection->AddService<Validator>(this); 61 connection->AddService<Validator>(this);
61 return true; 62 return true;
62 } 63 }
63 64
64 // Overridden from InterfaceFactory<Validator>: 65 // Overridden from InterfaceFactory<Validator>:
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 validator_->ConnectionClosed(app_->url(), service_url); 188 validator_->ConnectionClosed(app_->url(), service_url);
188 } 189 }
189 190
190 //////////////////////////////////////////////////////////////////////////////// 191 ////////////////////////////////////////////////////////////////////////////////
191 // TestLoader: 192 // TestLoader:
192 193
193 TestLoader::TestLoader(ApplicationDelegate* delegate) : delegate_(delegate) {} 194 TestLoader::TestLoader(ApplicationDelegate* delegate) : delegate_(delegate) {}
194 TestLoader::~TestLoader() {} 195 TestLoader::~TestLoader() {}
195 196
196 void TestLoader::Load(const GURL& url, 197 void TestLoader::Load(const GURL& url,
197 InterfaceRequest<Application> request) { 198 InterfaceRequest<mojom::Application> request) {
198 app_.reset(new ApplicationImpl(delegate_.get(), std::move(request))); 199 app_.reset(new ApplicationImpl(delegate_.get(), std::move(request)));
199 } 200 }
200 201
201 //////////////////////////////////////////////////////////////////////////////// 202 ////////////////////////////////////////////////////////////////////////////////
202 // CapabilityFilterTest: 203 // CapabilityFilterTest:
203 204
204 CapabilityFilterTest::CapabilityFilterTest() : validator_(nullptr) {} 205 CapabilityFilterTest::CapabilityFilterTest() : validator_(nullptr) {}
205 CapabilityFilterTest::~CapabilityFilterTest() {} 206 CapabilityFilterTest::~CapabilityFilterTest() {}
206 207
207 void CapabilityFilterTest::RunBlockingTest() { 208 void CapabilityFilterTest::RunBlockingTest() {
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 void CapabilityFilterTest::RunTest() { 321 void CapabilityFilterTest::RunTest() {
321 loop()->Run(); 322 loop()->Run();
322 EXPECT_TRUE(validator_->expectations_met()); 323 EXPECT_TRUE(validator_->expectations_met());
323 if (!validator_->expectations_met()) 324 if (!validator_->expectations_met())
324 validator_->PrintUnmetExpectations(); 325 validator_->PrintUnmetExpectations();
325 } 326 }
326 327
327 } // namespace test 328 } // namespace test
328 } // namespace shell 329 } // namespace shell
329 } // namespace mojo 330 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/capability_filter_test.h ('k') | mojo/shell/connect_to_application_params.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698