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( |