OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_MODEL_TEST_UTIL_H_ | 5 #ifndef CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_MODEL_TEST_UTIL_H_ |
6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_MODEL_TEST_UTIL_H_ | 6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_MODEL_TEST_UTIL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 22 matching lines...) Expand all Loading... |
33 // methods). | 33 // methods). |
34 void SetUp(); | 34 void SetUp(); |
35 | 35 |
36 // Cleans up data structures for this class (mirroring gtest standard | 36 // Cleans up data structures for this class (mirroring gtest standard |
37 // methods). | 37 // methods). |
38 void TearDown(); | 38 void TearDown(); |
39 | 39 |
40 // TemplateURLModelObserver implemementation. | 40 // TemplateURLModelObserver implemementation. |
41 virtual void OnTemplateURLModelChanged(); | 41 virtual void OnTemplateURLModelChanged(); |
42 | 42 |
43 // Checks that the observer count is what is expected. | 43 // Gets the observer count. |
44 void VerifyObserverCount(int expected_changed_count); | 44 int GetObserverCount(); |
45 | 45 |
46 // Sets the observer count to 0. | 46 // Sets the observer count to 0. |
47 void ResetObserverCount(); | 47 void ResetObserverCount(); |
48 | 48 |
49 // Blocks the caller until the service has finished servicing all pending | 49 // Blocks the caller until the service has finished servicing all pending |
50 // requests. | 50 // requests. |
51 static void BlockTillServiceProcessesRequests(); | 51 static void BlockTillServiceProcessesRequests(); |
52 | 52 |
53 // Blocks the caller until the I/O thread has finished servicing all pending | 53 // Blocks the caller until the I/O thread has finished servicing all pending |
54 // requests. | 54 // requests. |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 // properly. | 93 // properly. |
94 BrowserThread ui_thread_; | 94 BrowserThread ui_thread_; |
95 scoped_ptr<TemplateURLModelTestingProfile> profile_; | 95 scoped_ptr<TemplateURLModelTestingProfile> profile_; |
96 scoped_ptr<TestingTemplateURLModel> model_; | 96 scoped_ptr<TestingTemplateURLModel> model_; |
97 int changed_count_; | 97 int changed_count_; |
98 | 98 |
99 DISALLOW_COPY_AND_ASSIGN(TemplateURLModelTestUtil); | 99 DISALLOW_COPY_AND_ASSIGN(TemplateURLModelTestUtil); |
100 }; | 100 }; |
101 | 101 |
102 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_MODEL_TEST_UTIL_H_ | 102 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_MODEL_TEST_UTIL_H_ |
OLD | NEW |