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