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

Unified Diff: chrome/browser/browser_encoding_browsertest.cc

Issue 10702029: Move tab functions off Browser into browser_tabstrip and browser_tabrestore. (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
« no previous file with comments | « chrome/browser/browser_commands_unittest.cc ('k') | chrome/browser/browser_focus_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_encoding_browsertest.cc
===================================================================
--- chrome/browser/browser_encoding_browsertest.cc (revision 145001)
+++ chrome/browser/browser_encoding_browsertest.cc (working copy)
@@ -11,6 +11,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
+#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
@@ -43,7 +44,7 @@
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_SAVE_PACKAGE_SUCCESSFULLY_FINISHED,
content::NotificationService::AllSources());
- browser()->GetActiveWebContents()->SavePage(
+ chrome::GetActiveWebContents(browser())->SavePage(
full_file_name, temp_sub_resource_dir_,
content::SAVE_PAGE_TYPE_AS_COMPLETE_HTML);
observer.Wait();
@@ -139,7 +140,7 @@
ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
EXPECT_EQ(kEncodingTestDatas[i].encoding_name,
- browser()->GetActiveWebContents()->GetEncoding());
+ chrome::GetActiveWebContents(browser())->GetEncoding());
chrome::CloseTab(browser());
}
}
@@ -155,7 +156,7 @@
test_dir_path = test_dir_path.AppendASCII(kTestFileName);
GURL url = URLRequestMockHTTPJob::GetMockUrl(test_dir_path);
ui_test_utils::NavigateToURL(browser(), url);
- content::WebContents* web_contents = browser()->GetActiveWebContents();
+ content::WebContents* web_contents = chrome::GetActiveWebContents(browser());
EXPECT_EQ("ISO-8859-1", web_contents->GetEncoding());
// Override the encoding to "gb18030".
@@ -259,7 +260,7 @@
browser()->profile()->GetPrefs()->SetString(prefs::kDefaultCharset,
"ISO-8859-4");
- content::WebContents* web_contents = browser()->GetActiveWebContents();
+ content::WebContents* web_contents = chrome::GetActiveWebContents(browser());
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestDatas); ++i) {
// Disable auto detect if it is on.
browser()->profile()->GetPrefs()->SetBoolean(
« no previous file with comments | « chrome/browser/browser_commands_unittest.cc ('k') | chrome/browser/browser_focus_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698