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

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

Issue 694813003: Changing SessionService to have a BaseSessionService, not being one. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed non ChromeOS builds Created 6 years, 1 month 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 2222 matching lines...) Expand 10 before | Expand all | Expand 10 after
2233 #if defined(OS_WIN) && defined(USE_ASH) 2233 #if defined(OS_WIN) && defined(USE_ASH)
2234 // kNoStartupWindow doesn't make sense in Metro+Ash. 2234 // kNoStartupWindow doesn't make sense in Metro+Ash.
2235 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) 2235 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests))
2236 return; 2236 return;
2237 #endif 2237 #endif
2238 2238
2239 Profile* profile = ProfileManager::GetActiveUserProfile(); 2239 Profile* profile = ProfileManager::GetActiveUserProfile();
2240 2240
2241 SessionService* session_service = 2241 SessionService* session_service =
2242 SessionServiceFactory::GetForProfile(profile); 2242 SessionServiceFactory::GetForProfile(profile);
2243 ASSERT_FALSE(session_service->processed_any_commands()); 2243 ASSERT_FALSE(session_service->GetBaseSessionServiceForTest()->
2244 ProcessedAnyCommandsForTest());
2244 2245
2245 ui_test_utils::BrowserAddedObserver browser_added_observer; 2246 ui_test_utils::BrowserAddedObserver browser_added_observer;
2246 CreateBrowserForApp("blah", profile); 2247 CreateBrowserForApp("blah", profile);
2247 browser_added_observer.WaitForSingleNewBrowser(); 2248 browser_added_observer.WaitForSingleNewBrowser();
2248 2249
2249 ASSERT_FALSE(session_service->processed_any_commands()); 2250 ASSERT_FALSE(session_service->GetBaseSessionServiceForTest()->
2251 ProcessedAnyCommandsForTest());
2250 } 2252 }
2251 #endif // !defined(OS_CHROMEOS) 2253 #endif // !defined(OS_CHROMEOS)
2252 2254
2253 // This test needs to be placed outside the anonymous namespace because we 2255 // This test needs to be placed outside the anonymous namespace because we
2254 // need to access private type of Browser. 2256 // need to access private type of Browser.
2255 class AppModeTest : public BrowserTest { 2257 class AppModeTest : public BrowserTest {
2256 public: 2258 public:
2257 AppModeTest() {} 2259 AppModeTest() {}
2258 2260
2259 void SetUpCommandLine(CommandLine* command_line) override { 2261 void SetUpCommandLine(CommandLine* command_line) override {
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
2641 #endif 2643 #endif
2642 EXPECT_EQ(exp_commit_size, rwhv_commit_size2); 2644 EXPECT_EQ(exp_commit_size, rwhv_commit_size2);
2643 EXPECT_EQ(exp_commit_size, wcv_commit_size2); 2645 EXPECT_EQ(exp_commit_size, wcv_commit_size2);
2644 gfx::Size exp_final_size(initial_wcv_size); 2646 gfx::Size exp_final_size(initial_wcv_size);
2645 exp_final_size.Enlarge(wcv_resize_insets.width(), 2647 exp_final_size.Enlarge(wcv_resize_insets.width(),
2646 wcv_resize_insets.height() + height_inset); 2648 wcv_resize_insets.height() + height_inset);
2647 EXPECT_EQ(exp_final_size, 2649 EXPECT_EQ(exp_final_size,
2648 web_contents->GetRenderWidgetHostView()->GetViewBounds().size()); 2650 web_contents->GetRenderWidgetHostView()->GetViewBounds().size());
2649 EXPECT_EQ(exp_final_size, web_contents->GetContainerBounds().size()); 2651 EXPECT_EQ(exp_final_size, web_contents->GetContainerBounds().size());
2650 } 2652 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698