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

Side by Side Diff: extensions/renderer/api_test_base.cc

Issue 669303002: Add an extensions keep-alive client. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@keep-alive-service
Patch Set: keep alive client tests Created 6 years, 1 month 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 | « extensions/renderer/api_test_base.h ('k') | extensions/renderer/dispatcher.cc » ('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 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 "extensions/renderer/api_test_base.h" 5 #include "extensions/renderer/api_test_base.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "extensions/common/extension_urls.h" 10 #include "extensions/common/extension_urls.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 base::Callback<void(mojo::ScopedMessagePipeHandle)> >::iterator it = 89 base::Callback<void(mojo::ScopedMessagePipeHandle)> >::iterator it =
90 service_factories_.find(service_name); 90 service_factories_.find(service_name);
91 if (it != service_factories_.end()) 91 if (it != service_factories_.end())
92 it->second.Run(pipe.handle0.Pass()); 92 it->second.Run(pipe.handle0.Pass());
93 return pipe.handle1.release(); 93 return pipe.handle1.release();
94 } 94 }
95 95
96 TestServiceProvider::TestServiceProvider() { 96 TestServiceProvider::TestServiceProvider() {
97 } 97 }
98 98
99 // static
100 void TestServiceProvider::IgnoreHandle(mojo::ScopedMessagePipeHandle handle) {
101 }
102
99 ApiTestBase::ApiTestBase() { 103 ApiTestBase::ApiTestBase() {
100 } 104 }
101 ApiTestBase::~ApiTestBase() { 105 ApiTestBase::~ApiTestBase() {
102 } 106 }
103 107
104 void ApiTestBase::SetUp() { 108 void ApiTestBase::SetUp() {
105 ModuleSystemTest::SetUp(); 109 ModuleSystemTest::SetUp();
106 InitializeEnvironment(); 110 InitializeEnvironment();
107 RegisterModules(); 111 RegisterModules();
108 } 112 }
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 } 216 }
213 217
214 void ApiTestBase::RunPromisesAgain() { 218 void ApiTestBase::RunPromisesAgain() {
215 RunResolvedPromises(); 219 RunResolvedPromises();
216 base::MessageLoop::current()->PostTask( 220 base::MessageLoop::current()->PostTask(
217 FROM_HERE, 221 FROM_HERE,
218 base::Bind(&ApiTestBase::RunPromisesAgain, base::Unretained(this))); 222 base::Bind(&ApiTestBase::RunPromisesAgain, base::Unretained(this)));
219 } 223 }
220 224
221 } // namespace extensions 225 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/renderer/api_test_base.h ('k') | extensions/renderer/dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698