OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/memory/scoped_vector.h" | 8 #include "base/memory/scoped_vector.h" |
9 #include "chrome/browser/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
10 #include "chrome/browser/search/instant_service.h" | 10 #include "chrome/browser/search/instant_service.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 // Validate initial instant state. | 94 // Validate initial instant state. |
95 EXPECT_EQ(test.start_in_instant_process, | 95 EXPECT_EQ(test.start_in_instant_process, |
96 instant_service_->IsInstantProcess( | 96 instant_service_->IsInstantProcess( |
97 contents->GetRenderProcessHost()->GetID())) | 97 contents->GetRenderProcessHost()->GetID())) |
98 << test.description; | 98 << test.description; |
99 | 99 |
100 // Setup an observer to verify reload or absence thereof. | 100 // Setup an observer to verify reload or absence thereof. |
101 observers.push_back(new FakeWebContentsObserver(contents)); | 101 observers.push_back(new FakeWebContentsObserver(contents)); |
102 } | 102 } |
103 | 103 |
104 SetDefaultSearchProvider("https://bar.com/"); | 104 SetUserSelectedDefaultSearchProvider("https://bar.com/"); |
105 | 105 |
106 for (size_t i = 0; i < num_tests; ++i) { | 106 for (size_t i = 0; i < num_tests; ++i) { |
107 FakeWebContentsObserver* observer = observers[i]; | 107 FakeWebContentsObserver* observer = observers[i]; |
108 const TabReloadTestCase& test = kTabReloadTestCases[i]; | 108 const TabReloadTestCase& test = kTabReloadTestCases[i]; |
109 | 109 |
110 if (test.should_reload) { | 110 if (test.should_reload) { |
111 // Validate final instant state. | 111 // Validate final instant state. |
112 EXPECT_EQ( | 112 EXPECT_EQ( |
113 test.end_in_instant_process, | 113 test.end_in_instant_process, |
114 chrome::ShouldAssignURLToInstantRenderer(observer->url(), profile())) | 114 chrome::ShouldAssignURLToInstantRenderer(observer->url(), profile())) |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 | 172 |
173 browser.reset(NULL); | 173 browser.reset(NULL); |
174 window.reset(NULL); | 174 window.reset(NULL); |
175 EXPECT_FALSE(IsInstantServiceObserver(bic)) | 175 EXPECT_FALSE(IsInstantServiceObserver(bic)) |
176 << "New BrowserInstantController should register as InstantServiceObserver"; | 176 << "New BrowserInstantController should register as InstantServiceObserver"; |
177 } | 177 } |
178 | 178 |
179 } // namespace | 179 } // namespace |
180 | 180 |
181 } // namespace chrome | 181 } // namespace chrome |
OLD | NEW |