Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Side by Side Diff: chrome/browser/ui/browser_instant_controller_unittest.cc

Issue 2685333005: ash: fix regression where ctrl+n put new window on wrong desktop (Closed)
Patch Set: Rebase to ToT Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 EXPECT_EQ(GURL(chrome::kChromeSearchLocalNtpUrl), observer->current_url()) 216 EXPECT_EQ(GURL(chrome::kChromeSearchLocalNtpUrl), observer->current_url())
217 << test.description; 217 << test.description;
218 // The navigation to Local NTP should be definitive i.e. can't go back. 218 // The navigation to Local NTP should be definitive i.e. can't go back.
219 EXPECT_FALSE(observer->can_go_back()); 219 EXPECT_FALSE(observer->can_go_back());
220 } 220 }
221 } 221 }
222 } 222 }
223 223
224 TEST_F(BrowserInstantControllerTest, BrowserWindowLifecycle) { 224 TEST_F(BrowserInstantControllerTest, BrowserWindowLifecycle) {
225 std::unique_ptr<BrowserWindow> window(CreateBrowserWindow()); 225 std::unique_ptr<BrowserWindow> window(CreateBrowserWindow());
226 Browser::CreateParams params(profile()); 226 Browser::CreateParams params(profile(), true);
227 params.window = window.get(); 227 params.window = window.get();
228 std::unique_ptr<Browser> browser(new Browser(params)); 228 std::unique_ptr<Browser> browser(new Browser(params));
229 InstantServiceObserver* bic; 229 InstantServiceObserver* bic;
230 bic = browser->instant_controller(); 230 bic = browser->instant_controller();
231 EXPECT_TRUE(IsInstantServiceObserver(bic)) 231 EXPECT_TRUE(IsInstantServiceObserver(bic))
232 << "New BrowserInstantController should register as InstantServiceObserver"; 232 << "New BrowserInstantController should register as InstantServiceObserver";
233 233
234 browser.reset(NULL); 234 browser.reset(NULL);
235 window.reset(NULL); 235 window.reset(NULL);
236 EXPECT_FALSE(IsInstantServiceObserver(bic)) 236 EXPECT_FALSE(IsInstantServiceObserver(bic))
237 << "New BrowserInstantController should register as InstantServiceObserver"; 237 << "New BrowserInstantController should register as InstantServiceObserver";
238 } 238 }
239 239
240 } // namespace 240 } // namespace
241 241
242 } // namespace chrome 242 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_focus_uitest.cc ('k') | chrome/browser/ui/browser_live_tab_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698