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

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

Issue 1697183003: Remove HostDesktopType from sessions and tab restore (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-19
Patch Set: mac Created 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/chrome_notification_types.h" 5 #include "chrome/browser/chrome_notification_types.h"
6 #include "chrome/browser/sessions/tab_restore_service_factory.h" 6 #include "chrome/browser/sessions/tab_restore_service_factory.h"
7 #include "chrome/browser/ui/browser.h" 7 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/browser_commands.h" 8 #include "chrome/browser/ui/browser_commands.h"
9 #include "chrome/browser/ui/browser_list.h" 9 #include "chrome/browser/ui/browser_list.h"
10 #include "chrome/browser/ui/browser_live_tab_context.h" 10 #include "chrome/browser/ui/browser_live_tab_context.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 bool has_tab_restore_service = !!service; 122 bool has_tab_restore_service = !!service;
123 ASSERT_TRUE(has_tab_restore_service); 123 ASSERT_TRUE(has_tab_restore_service);
124 sessions::LiveTabContext* context = 124 sessions::LiveTabContext* context =
125 BrowserLiveTabContext::FindContextForWebContents( 125 BrowserLiveTabContext::FindContextForWebContents(
126 browser->tab_strip_model()->GetActiveWebContents()); 126 browser->tab_strip_model()->GetActiveWebContents());
127 bool has_live_tab_context = !!context; 127 bool has_live_tab_context = !!context;
128 ASSERT_TRUE(has_live_tab_context); 128 ASSERT_TRUE(has_live_tab_context);
129 129
130 // Restore tabs using that delegated restore service. 130 // Restore tabs using that delegated restore service.
131 content::DOMMessageQueue queue; 131 content::DOMMessageQueue queue;
132 service->RestoreMostRecentEntry( 132 service->RestoreMostRecentEntry(context);
133 context, browser->host_desktop_type());
134 AwaitTabsReady(&queue, 2); 133 AwaitTabsReady(&queue, 2);
135 134
136 // There should be 3 restored tabs in the new browser. 135 // There should be 3 restored tabs in the new browser.
137 EXPECT_EQ(2u, active_browser_list->size()); 136 EXPECT_EQ(2u, active_browser_list->size());
138 browser = active_browser_list->get(1); 137 browser = active_browser_list->get(1);
139 EXPECT_EQ(3, browser->tab_strip_model()->count()); 138 EXPECT_EQ(3, browser->tab_strip_model()->count());
140 139
141 // The middle tab only should have visible disposition. 140 // The middle tab only should have visible disposition.
142 CheckVisbility(browser->tab_strip_model(), 1); 141 CheckVisbility(browser->tab_strip_model(), 1);
143 } 142 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_tab_restorer.cc ('k') | chrome/browser/ui/cocoa/history_menu_cocoa_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698