| 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 "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
| 10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 EXPECT_EQ(GURL(chrome::kChromeSearchLocalNtpUrl), observer->current_url()) | 197 EXPECT_EQ(GURL(chrome::kChromeSearchLocalNtpUrl), observer->current_url()) |
| 198 << test.description; | 198 << test.description; |
| 199 // The navigation to Local NTP should be definitive i.e. can't go back. | 199 // The navigation to Local NTP should be definitive i.e. can't go back. |
| 200 EXPECT_FALSE(observer->can_go_back()); | 200 EXPECT_FALSE(observer->can_go_back()); |
| 201 } | 201 } |
| 202 } | 202 } |
| 203 } | 203 } |
| 204 | 204 |
| 205 TEST_F(BrowserInstantControllerTest, BrowserWindowLifecycle) { | 205 TEST_F(BrowserInstantControllerTest, BrowserWindowLifecycle) { |
| 206 scoped_ptr<BrowserWindow> window(CreateBrowserWindow()); | 206 scoped_ptr<BrowserWindow> window(CreateBrowserWindow()); |
| 207 Browser::CreateParams params(profile(), chrome::HOST_DESKTOP_TYPE_NATIVE); | 207 Browser::CreateParams params(profile(), ui::HOST_DESKTOP_TYPE_NATIVE); |
| 208 params.window = window.get(); | 208 params.window = window.get(); |
| 209 scoped_ptr<Browser> browser(new Browser(params)); | 209 scoped_ptr<Browser> browser(new Browser(params)); |
| 210 InstantServiceObserver* bic; | 210 InstantServiceObserver* bic; |
| 211 bic = browser->instant_controller(); | 211 bic = browser->instant_controller(); |
| 212 EXPECT_TRUE(IsInstantServiceObserver(bic)) | 212 EXPECT_TRUE(IsInstantServiceObserver(bic)) |
| 213 << "New BrowserInstantController should register as InstantServiceObserver"; | 213 << "New BrowserInstantController should register as InstantServiceObserver"; |
| 214 | 214 |
| 215 browser.reset(NULL); | 215 browser.reset(NULL); |
| 216 window.reset(NULL); | 216 window.reset(NULL); |
| 217 EXPECT_FALSE(IsInstantServiceObserver(bic)) | 217 EXPECT_FALSE(IsInstantServiceObserver(bic)) |
| 218 << "New BrowserInstantController should register as InstantServiceObserver"; | 218 << "New BrowserInstantController should register as InstantServiceObserver"; |
| 219 } | 219 } |
| 220 | 220 |
| 221 } // namespace | 221 } // namespace |
| 222 | 222 |
| 223 } // namespace chrome | 223 } // namespace chrome |
| OLD | NEW |