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

Side by Side Diff: extensions/browser/api_test_utils.cc

Issue 2017113002: [Extensions] DCHECK that ExtensionFunctions respond (and only once) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « extensions/browser/api/test/test_api.cc ('k') | extensions/browser/extension_function.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 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/browser/api_test_utils.h" 5 #include "extensions/browser/api_test_utils.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 RunFunctionFlags flags) { 227 RunFunctionFlags flags) {
228 SendResponseDelegate response_delegate; 228 SendResponseDelegate response_delegate;
229 function->set_test_delegate(&response_delegate); 229 function->set_test_delegate(&response_delegate);
230 function->SetArgs(args.get()); 230 function->SetArgs(args.get());
231 231
232 CHECK(dispatcher); 232 CHECK(dispatcher);
233 function->set_dispatcher(dispatcher->AsWeakPtr()); 233 function->set_dispatcher(dispatcher->AsWeakPtr());
234 234
235 function->set_browser_context(context); 235 function->set_browser_context(context);
236 function->set_include_incognito(flags & INCLUDE_INCOGNITO); 236 function->set_include_incognito(flags & INCLUDE_INCOGNITO);
237 function->Run()->Execute(); 237 function->RunWithValidation()->Execute();
238 response_delegate.WaitForResponse(); 238 response_delegate.WaitForResponse();
239 239
240 EXPECT_TRUE(response_delegate.HasResponse()); 240 EXPECT_TRUE(response_delegate.HasResponse());
241 return response_delegate.GetResponse(); 241 return response_delegate.GetResponse();
242 } 242 }
243 243
244 } // namespace api_test_utils 244 } // namespace api_test_utils
245 } // namespace extensions 245 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/test/test_api.cc ('k') | extensions/browser/extension_function.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698