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

Unified Diff: chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc

Issue 10677009: Move command handling and updating off Browser and onto a helper object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc
===================================================================
--- chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc (revision 144460)
+++ chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc (working copy)
@@ -32,7 +32,7 @@
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_WEB_CONTENTS_TITLE_UPDATED,
content::NotificationService::AllSources());
- browser()->ExecuteCommand(IDC_PRINT);
+ chrome::ExecuteCommand(browser(), IDC_PRINT);
observer.Wait();
}
};
@@ -41,32 +41,30 @@
// We start off at about:blank page.
// Make sure there is 1 tab and print is enabled.
ASSERT_EQ(1, browser()->tab_count());
- ASSERT_TRUE(browser()->command_updater()->IsCommandEnabled(IDC_PRINT));
+ ASSERT_TRUE(chrome::IsCommandEnabled(browser(), IDC_PRINT));
+
// Make sure advanced print command (Ctrl+Shift+p) is enabled.
- ASSERT_TRUE(
- browser()->command_updater()->IsCommandEnabled(IDC_ADVANCED_PRINT));
+ ASSERT_TRUE(chrome::IsCommandEnabled(browser(), IDC_ADVANCED_PRINT));
// Create print preview tab.
Print();
// Make sure print is disabled.
- ASSERT_FALSE(browser()->command_updater()->IsCommandEnabled(IDC_PRINT));
+ ASSERT_FALSE(chrome::IsCommandEnabled(browser(), IDC_PRINT));
// Make sure advanced print command (Ctrl+Shift+p) is enabled.
- ASSERT_TRUE(
- browser()->command_updater()->IsCommandEnabled(IDC_ADVANCED_PRINT));
+ ASSERT_TRUE(chrome::IsCommandEnabled(browser(), IDC_ADVANCED_PRINT));
content::TestNavigationObserver reload_observer(
content::NotificationService::AllSources());
chrome::Reload(browser(), CURRENT_TAB);
reload_observer.Wait();
- ASSERT_TRUE(browser()->command_updater()->IsCommandEnabled(IDC_PRINT));
+ ASSERT_TRUE(chrome::IsCommandEnabled(browser(), IDC_PRINT));
// Make sure advanced print command (Ctrl+Shift+p) is enabled.
- ASSERT_TRUE(
- browser()->command_updater()->IsCommandEnabled(IDC_ADVANCED_PRINT));
+ ASSERT_TRUE(chrome::IsCommandEnabled(browser(), IDC_ADVANCED_PRINT));
}
} // namespace
« no previous file with comments | « chrome/browser/ui/webui/options2/chromeos/cros_language_options_handler2.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698