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

Side by Side Diff: chrome/browser/app_controller_mac_browsertest.mm

Issue 10702029: Move tab functions off Browser into browser_tabstrip and browser_tabrestore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
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 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/scoped_nsobject.h" 8 #include "base/memory/scoped_nsobject.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #import "chrome/browser/app_controller_mac.h" 10 #import "chrome/browser/app_controller_mac.h"
11 #import "chrome/browser/ui/browser.h" 11 #include "chrome/browser/ui/browser.h"
12 #import "chrome/browser/ui/browser_list.h" 12 #include "chrome/browser/ui/browser_list.h"
13 #include "chrome/browser/ui/browser_tabstrip.h"
13 #import "chrome/common/chrome_switches.h" 14 #import "chrome/common/chrome_switches.h"
14 #include "chrome/test/base/in_process_browser_test.h" 15 #include "chrome/test/base/in_process_browser_test.h"
15 #include "chrome/test/base/ui_test_utils.h" 16 #include "chrome/test/base/ui_test_utils.h"
16 #include "content/public/browser/web_contents.h" 17 #include "content/public/browser/web_contents.h"
17 18
18 namespace { 19 namespace {
19 20
20 class AppControllerPlatformAppBrowserTest : public InProcessBrowserTest { 21 class AppControllerPlatformAppBrowserTest : public InProcessBrowserTest {
21 protected: 22 protected:
22 AppControllerPlatformAppBrowserTest() {} 23 AppControllerPlatformAppBrowserTest() {}
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 IN_PROC_BROWSER_TEST_F(AppControllerWebAppBrowserTest, 62 IN_PROC_BROWSER_TEST_F(AppControllerWebAppBrowserTest,
62 WebAppReopenWithNoWindows) { 63 WebAppReopenWithNoWindows) {
63 scoped_nsobject<AppController> ac([[AppController alloc] init]); 64 scoped_nsobject<AppController> ac([[AppController alloc] init]);
64 EXPECT_EQ(1u, BrowserList::size()); 65 EXPECT_EQ(1u, BrowserList::size());
65 BOOL result = [ac applicationShouldHandleReopen:NSApp hasVisibleWindows:NO]; 66 BOOL result = [ac applicationShouldHandleReopen:NSApp hasVisibleWindows:NO];
66 67
67 EXPECT_FALSE(result); 68 EXPECT_FALSE(result);
68 EXPECT_EQ(2u, BrowserList::size()); 69 EXPECT_EQ(2u, BrowserList::size());
69 70
70 Browser* browser = *(BrowserList::begin()); 71 Browser* browser = *(BrowserList::begin());
71 GURL current_url = browser->GetActiveWebContents()->GetURL(); 72 GURL current_url = chrome::GetActiveWebContents(browser)->GetURL();
72 EXPECT_EQ(GetAppURL(), current_url.spec()); 73 EXPECT_EQ(GetAppURL(), current_url.spec());
73 } 74 }
74 75
75 } // namespace 76 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/accessibility/accessibility_win_browsertest.cc ('k') | chrome/browser/autocomplete/autocomplete_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698