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

Unified Diff: chrome/browser/tab_contents/view_source_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/tab_contents/view_source_browsertest.cc
===================================================================
--- chrome/browser/tab_contents/view_source_browsertest.cc (revision 144216)
+++ chrome/browser/tab_contents/view_source_browsertest.cc (working copy)
@@ -5,6 +5,7 @@
#include "base/utf_string_conversions.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/browser_commands.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
@@ -65,7 +66,7 @@
GURL url(test_server()->GetURL(kTestHtml));
ui_test_utils::NavigateToURL(browser(), url);
- EXPECT_TRUE(browser()->command_updater()->IsCommandEnabled(IDC_VIEW_SOURCE));
+ EXPECT_TRUE(chrome::CanViewSource(browser()));
}
// Make sure that when looking at the page source, we can't select "View Source"
@@ -80,5 +81,5 @@
test_server()->GetURL(kTestHtml).spec());
ui_test_utils::NavigateToURL(browser(), url_viewsource);
- EXPECT_FALSE(browser()->command_updater()->IsCommandEnabled(IDC_VIEW_SOURCE));
+ EXPECT_FALSE(chrome::CanViewSource(browser()));
}

Powered by Google App Engine
This is Rietveld 408576698