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

Side by Side Diff: chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc

Issue 296453015: Remove kEnablePrintPreview now that the pdf plugin is part of Chromium. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: reupload after revert Created 6 years, 7 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
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
6 #include "base/prefs/pref_service.h" 5 #include "base/prefs/pref_service.h"
7 #include "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/app/chrome_command_ids.h" 7 #include "chrome/app/chrome_command_ids.h"
9 #include "chrome/browser/content_settings/host_content_settings_map.h" 8 #include "chrome/browser/content_settings/host_content_settings_map.h"
10 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/task_manager/task_manager_browsertest_util.h" 10 #include "chrome/browser/task_manager/task_manager_browsertest_util.h"
12 #include "chrome/browser/ui/browser.h" 11 #include "chrome/browser/ui/browser.h"
13 #include "chrome/browser/ui/browser_commands.h" 12 #include "chrome/browser/ui/browser_commands.h"
14 #include "chrome/browser/ui/browser_dialogs.h" 13 #include "chrome/browser/ui/browser_dialogs.h"
15 #include "chrome/browser/ui/tabs/tab_strip_model.h" 14 #include "chrome/browser/ui/tabs/tab_strip_model.h"
16 #include "chrome/common/chrome_switches.h"
17 #include "chrome/common/pref_names.h" 15 #include "chrome/common/pref_names.h"
18 #include "chrome/common/url_constants.h" 16 #include "chrome/common/url_constants.h"
19 #include "chrome/test/base/in_process_browser_test.h" 17 #include "chrome/test/base/in_process_browser_test.h"
20 #include "chrome/test/base/ui_test_utils.h" 18 #include "chrome/test/base/ui_test_utils.h"
21 #include "content/public/browser/web_contents.h" 19 #include "content/public/browser/web_contents.h"
22 #include "content/public/browser/web_contents_observer.h" 20 #include "content/public/browser/web_contents_observer.h"
23 #include "content/public/test/browser_test_utils.h" 21 #include "content/public/test/browser_test_utils.h"
24 #include "content/public/test/test_navigation_observer.h" 22 #include "content/public/test/test_navigation_observer.h"
25 #include "content/public/test/test_utils.h" 23 #include "content/public/test/test_utils.h"
26 24
(...skipping 12 matching lines...) Expand all
39 // They must not have been running before since these bots didn't have the PDf 37 // They must not have been running before since these bots didn't have the PDf
40 // plugin. 38 // plugin.
41 #if !defined(ADDRESS_SANITIZER) 39 #if !defined(ADDRESS_SANITIZER)
42 40
43 namespace { 41 namespace {
44 42
45 class PrintPreviewTest : public InProcessBrowserTest { 43 class PrintPreviewTest : public InProcessBrowserTest {
46 public: 44 public:
47 PrintPreviewTest() {} 45 PrintPreviewTest() {}
48 46
49 #if !defined(GOOGLE_CHROME_BUILD)
50 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
51 command_line->AppendSwitch(switches::kEnablePrintPreview);
52 }
53 #endif
54
55 void Print() { 47 void Print() {
56 content::TestNavigationObserver nav_observer(NULL); 48 content::TestNavigationObserver nav_observer(NULL);
57 nav_observer.StartWatchingNewWebContents(); 49 nav_observer.StartWatchingNewWebContents();
58 chrome::ExecuteCommand(browser(), IDC_PRINT); 50 chrome::ExecuteCommand(browser(), IDC_PRINT);
59 nav_observer.Wait(); 51 nav_observer.Wait();
60 nav_observer.StopWatchingNewWebContents(); 52 nav_observer.StopWatchingNewWebContents();
61 } 53 }
62 }; 54 };
63 55
64 IN_PROC_BROWSER_TEST_F(PrintPreviewTest, PrintCommands) { 56 IN_PROC_BROWSER_TEST_F(PrintPreviewTest, PrintCommands) {
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 // Navigate main tab to hide print preview. 199 // Navigate main tab to hide print preview.
208 ui_test_utils::NavigateToURL(browser(), GURL("about:blank")); 200 ui_test_utils::NavigateToURL(browser(), GURL("about:blank"));
209 201
210 browser()->tab_strip_model()->ActivateTabAt(1, true); 202 browser()->tab_strip_model()->ActivateTabAt(1, true);
211 } 203 }
212 #endif 204 #endif
213 205
214 } // namespace 206 } // namespace
215 207
216 #endif 208 #endif
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698