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

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

Issue 702603004: Renamed DISABLE_BASIC_PRINTING and ENABLE_FULL_PRINTING. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Wed Nov 5 02:31:54 PST 2014 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 "base/prefs/pref_service.h" 5 #include "base/prefs/pref_service.h"
6 #include "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "chrome/app/chrome_command_ids.h" 7 #include "chrome/app/chrome_command_ids.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/task_manager/task_manager_browsertest_util.h" 9 #include "chrome/browser/task_manager/task_manager_browsertest_util.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 } 48 }
49 }; 49 };
50 50
51 IN_PROC_BROWSER_TEST_F(PrintPreviewTest, PrintCommands) { 51 IN_PROC_BROWSER_TEST_F(PrintPreviewTest, PrintCommands) {
52 // We start off at about:blank page. 52 // We start off at about:blank page.
53 // Make sure there is 1 tab and print is enabled. 53 // Make sure there is 1 tab and print is enabled.
54 ASSERT_EQ(1, browser()->tab_strip_model()->count()); 54 ASSERT_EQ(1, browser()->tab_strip_model()->count());
55 55
56 ASSERT_TRUE(chrome::IsCommandEnabled(browser(), IDC_PRINT)); 56 ASSERT_TRUE(chrome::IsCommandEnabled(browser(), IDC_PRINT));
57 57
58 #if defined(DISABLE_BASIC_PRINTING) 58 #if defined(ENABLE_BASIC_PRINTING)
59 bool is_basic_print_expected = true;
60 #else
59 bool is_basic_print_expected = false; 61 bool is_basic_print_expected = false;
60 #else 62 #endif // ENABLE_BASIC_PRINTING
61 bool is_basic_print_expected = true;
62 #endif // DISABLE_BASIC_PRINTING
63 63
64 ASSERT_EQ(is_basic_print_expected, 64 ASSERT_EQ(is_basic_print_expected,
65 chrome::IsCommandEnabled(browser(), IDC_BASIC_PRINT)); 65 chrome::IsCommandEnabled(browser(), IDC_BASIC_PRINT));
66 66
67 // Create the print preview dialog. 67 // Create the print preview dialog.
68 Print(); 68 Print();
69 69
70 ASSERT_FALSE(chrome::IsCommandEnabled(browser(), IDC_PRINT)); 70 ASSERT_FALSE(chrome::IsCommandEnabled(browser(), IDC_PRINT));
71 71
72 ASSERT_EQ(is_basic_print_expected, 72 ASSERT_EQ(is_basic_print_expected,
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 browser()->tab_strip_model()->ActivateTabAt(0, true); 134 browser()->tab_strip_model()->ActivateTabAt(0, true);
135 135
136 // Navigate main tab to hide print preview. 136 // Navigate main tab to hide print preview.
137 ui_test_utils::NavigateToURL(browser(), GURL("about:blank")); 137 ui_test_utils::NavigateToURL(browser(), GURL("about:blank"));
138 138
139 browser()->tab_strip_model()->ActivateTabAt(1, true); 139 browser()->tab_strip_model()->ActivateTabAt(1, true);
140 } 140 }
141 #endif // defined(OS_WIN) 141 #endif // defined(OS_WIN)
142 142
143 } // namespace 143 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698