OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_TEST_UTIL_H_ | 5 #ifndef CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_TEST_UTIL_H_ |
6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_TEST_UTIL_H_ | 6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_TEST_UTIL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 | 82 |
83 // Returns the TemplateURLService. | 83 // Returns the TemplateURLService. |
84 TemplateURLService* model() const; | 84 TemplateURLService* model() const; |
85 | 85 |
86 // Returns the TestingProfile. | 86 // Returns the TestingProfile. |
87 TestingProfile* profile() const; | 87 TestingProfile* profile() const; |
88 | 88 |
89 // Starts an I/O thread. | 89 // Starts an I/O thread. |
90 void StartIOThread(); | 90 void StartIOThread(); |
91 | 91 |
| 92 // Runs all pending tasks on the UI loop. |
| 93 void PumpLoop(); |
| 94 |
92 private: | 95 private: |
93 MessageLoopForUI message_loop_; | 96 MessageLoopForUI message_loop_; |
94 // Needed to make the DeleteOnUIThread trait of WebDataService work | 97 // Needed to make the DeleteOnUIThread trait of WebDataService work |
95 // properly. | 98 // properly. |
96 content::TestBrowserThread ui_thread_; | 99 content::TestBrowserThread ui_thread_; |
97 scoped_ptr<TemplateURLServiceTestingProfile> profile_; | 100 scoped_ptr<TemplateURLServiceTestingProfile> profile_; |
98 scoped_ptr<TestingTemplateURLService> model_; | 101 scoped_ptr<TestingTemplateURLService> model_; |
99 int changed_count_; | 102 int changed_count_; |
100 | 103 |
101 DISALLOW_COPY_AND_ASSIGN(TemplateURLServiceTestUtil); | 104 DISALLOW_COPY_AND_ASSIGN(TemplateURLServiceTestUtil); |
102 }; | 105 }; |
103 | 106 |
104 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_TEST_UTIL_H_ | 107 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_TEST_UTIL_H_ |
OLD | NEW |