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

Side by Side Diff: chrome/browser/printing/print_preview_dialog_controller_browsertest.cc

Issue 12212048: Linux/ChromeOS Chromium style checker cleanup, chrome/browser edition. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 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 | 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 #include "base/command_line.h" 5 #include "base/command_line.h"
6 #include "chrome/browser/printing/print_preview_dialog_controller.h" 6 #include "chrome/browser/printing/print_preview_dialog_controller.h"
7 #include "chrome/browser/printing/print_view_manager.h" 7 #include "chrome/browser/printing/print_view_manager.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/browser_commands.h" 9 #include "chrome/browser/ui/browser_commands.h"
10 #include "chrome/browser/ui/tabs/tab_strip_model.h" 10 #include "chrome/browser/ui/tabs/tab_strip_model.h"
11 #include "chrome/common/chrome_switches.h" 11 #include "chrome/common/chrome_switches.h"
12 #include "chrome/common/url_constants.h" 12 #include "chrome/common/url_constants.h"
13 #include "chrome/test/base/in_process_browser_test.h" 13 #include "chrome/test/base/in_process_browser_test.h"
14 #include "chrome/test/base/ui_test_utils.h" 14 #include "chrome/test/base/ui_test_utils.h"
15 #include "content/public/browser/notification_service.h" 15 #include "content/public/browser/notification_service.h"
16 #include "content/public/browser/notification_types.h" 16 #include "content/public/browser/notification_types.h"
17 #include "content/public/browser/web_contents_observer.h" 17 #include "content/public/browser/web_contents_observer.h"
18 #include "googleurl/src/gurl.h" 18 #include "googleurl/src/gurl.h"
19 19
20 using content::WebContents; 20 using content::WebContents;
21 21
22 class PrintPreviewDialogControllerBrowserTest : public InProcessBrowserTest { 22 class PrintPreviewDialogControllerBrowserTest : public InProcessBrowserTest {
23 public: 23 public:
24 PrintPreviewDialogControllerBrowserTest() {} 24 PrintPreviewDialogControllerBrowserTest() {}
25 virtual ~PrintPreviewDialogControllerBrowserTest() {} 25 virtual ~PrintPreviewDialogControllerBrowserTest() {}
26 26
27 virtual void SetUpCommandLine(CommandLine* command_line) { 27 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
28 #if !defined(GOOGLE_CHROME_BUILD) 28 #if !defined(GOOGLE_CHROME_BUILD)
29 command_line->AppendSwitch(switches::kEnablePrintPreview); 29 command_line->AppendSwitch(switches::kEnablePrintPreview);
30 #endif 30 #endif
31 } 31 }
32 }; 32 };
33 33
34 class TabDestroyedObserver : public content::WebContentsObserver { 34 class TabDestroyedObserver : public content::WebContentsObserver {
35 public: 35 public:
36 explicit TabDestroyedObserver(WebContents* contents) 36 explicit TabDestroyedObserver(WebContents* contents)
37 : content::WebContentsObserver(contents), 37 : content::WebContentsObserver(contents),
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 ASSERT_TRUE(tab_destroyed_observer.tab_destroyed()); 133 ASSERT_TRUE(tab_destroyed_observer.tab_destroyed());
134 134
135 // Get the print preview tab for initiator tab. 135 // Get the print preview tab for initiator tab.
136 print_view_manager->PrintPreviewNow(false); 136 print_view_manager->PrintPreviewNow(false);
137 WebContents* new_preview_tab = 137 WebContents* new_preview_tab =
138 tab_controller->GetOrCreatePreviewTab(initiator_tab); 138 tab_controller->GetOrCreatePreviewTab(initiator_tab);
139 139
140 EXPECT_EQ(1, browser()->tab_strip_model()->count()); 140 EXPECT_EQ(1, browser()->tab_strip_model()->count());
141 EXPECT_TRUE(new_preview_tab); 141 EXPECT_TRUE(new_preview_tab);
142 } 142 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698