OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/extensions/extension_function_test_utils.h" | 5 #include "chrome/browser/extensions/extension_function_test_utils.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 namespace { | 22 namespace { |
23 | 23 |
24 class TestFunctionDispatcherDelegate | 24 class TestFunctionDispatcherDelegate |
25 : public ExtensionFunctionDispatcher::Delegate { | 25 : public ExtensionFunctionDispatcher::Delegate { |
26 public: | 26 public: |
27 explicit TestFunctionDispatcherDelegate(Browser* browser) : | 27 explicit TestFunctionDispatcherDelegate(Browser* browser) : |
28 browser_(browser) {} | 28 browser_(browser) {} |
29 virtual ~TestFunctionDispatcherDelegate() {} | 29 virtual ~TestFunctionDispatcherDelegate() {} |
30 | 30 |
31 private: | 31 private: |
32 virtual ExtensionWindowController* GetExtensionWindowController() | 32 virtual extensions::WindowController* GetExtensionWindowController() |
33 const OVERRIDE { | 33 const OVERRIDE { |
34 return browser_->extension_window_controller(); | 34 return browser_->extension_window_controller(); |
35 } | 35 } |
36 | 36 |
37 virtual WebContents* GetAssociatedWebContents() const OVERRIDE { | 37 virtual WebContents* GetAssociatedWebContents() const OVERRIDE { |
38 return NULL; | 38 return NULL; |
39 } | 39 } |
40 | 40 |
41 Browser* browser_; | 41 Browser* browser_; |
42 }; | 42 }; |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 if (!response_delegate.HasResponse()) { | 221 if (!response_delegate.HasResponse()) { |
222 response_delegate.set_should_post_quit(true); | 222 response_delegate.set_should_post_quit(true); |
223 ui_test_utils::RunMessageLoop(); | 223 ui_test_utils::RunMessageLoop(); |
224 } | 224 } |
225 | 225 |
226 EXPECT_TRUE(response_delegate.HasResponse()); | 226 EXPECT_TRUE(response_delegate.HasResponse()); |
227 return response_delegate.GetResponse(); | 227 return response_delegate.GetResponse(); |
228 } | 228 } |
229 | 229 |
230 } // namespace extension_function_test_utils | 230 } // namespace extension_function_test_utils |
OLD | NEW |