| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |