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

Side by Side Diff: chrome/browser/browser_encoding_uitest.cc

Issue 242024: TestOverrideEncoding hanging is because TabProxy::WaitForNavigation can not g... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/automation/automation_provider.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 #include <string> 4 #include <string>
5 5
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/scoped_temp_dir.h" 7 #include "base/scoped_temp_dir.h"
8 #include "chrome/browser/net/url_request_mock_http_job.h" 8 #include "chrome/browser/net/url_request_mock_http_job.h"
9 #include "chrome/browser/download/save_package.h" 9 #include "chrome/browser/download/save_package.h"
10 #include "chrome/common/pref_names.h" 10 #include "chrome/common/pref_names.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 std::string encoding; 108 std::string encoding;
109 EXPECT_TRUE(tab_proxy->GetPageCurrentEncoding(&encoding)); 109 EXPECT_TRUE(tab_proxy->GetPageCurrentEncoding(&encoding));
110 EXPECT_EQ(encoding, kEncodingTestDatas[i].encoding_name); 110 EXPECT_EQ(encoding, kEncodingTestDatas[i].encoding_name);
111 } 111 }
112 } 112 }
113 113
114 #if defined(OS_WIN) 114 #if defined(OS_WIN)
115 // We are disabling this test on MacOS and Linux because on those platforms 115 // We are disabling this test on MacOS and Linux because on those platforms
116 // AutomationProvider::OverrideEncoding is not implemented yet. 116 // AutomationProvider::OverrideEncoding is not implemented yet.
117 // TODO(port): Enable when encoding-related parts of Browser are ported. 117 // TODO(port): Enable when encoding-related parts of Browser are ported.
118 TEST_F(BrowserEncodingTest, DISABLED_TestOverrideEncoding) { 118 TEST_F(BrowserEncodingTest, TestOverrideEncoding) {
119 const char* const kTestFileName = "gb18030_with_iso88591_meta.html"; 119 const char* const kTestFileName = "gb18030_with_iso88591_meta.html";
120 const char* const kExpectedFileName = 120 const char* const kExpectedFileName =
121 "expected_gb18030_saved_from_iso88591_meta.html"; 121 "expected_gb18030_saved_from_iso88591_meta.html";
122 const char* const kOverrideTestDir = "user_override"; 122 const char* const kOverrideTestDir = "user_override";
123 123
124 FilePath test_dir_path = FilePath(kTestDir).AppendASCII(kOverrideTestDir); 124 FilePath test_dir_path = FilePath(kTestDir).AppendASCII(kOverrideTestDir);
125 test_dir_path = test_dir_path.AppendASCII(kTestFileName); 125 test_dir_path = test_dir_path.AppendASCII(kTestFileName);
126 GURL url = URLRequestMockHTTPJob::GetMockUrl(test_dir_path.ToWStringHack()); 126 GURL url = URLRequestMockHTTPJob::GetMockUrl(test_dir_path.ToWStringHack());
127 scoped_refptr<TabProxy> tab_proxy(GetActiveTab()); 127 scoped_refptr<TabProxy> tab_proxy(GetActiveTab());
128 ASSERT_TRUE(tab_proxy.get()); 128 ASSERT_TRUE(tab_proxy.get());
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 expected_result_file_name = expected_result_file_name.AppendASCII( 288 expected_result_file_name = expected_result_file_name.AppendASCII(
289 kExpectedResultDir); 289 kExpectedResultDir);
290 expected_result_file_name = expected_result_file_name.AppendASCII( 290 expected_result_file_name = expected_result_file_name.AppendASCII(
291 kTestDatas[i].expected_result); 291 kTestDatas[i].expected_result);
292 EXPECT_TRUE(tab->SavePage(full_saved_file_name, temp_sub_resource_dir_, 292 EXPECT_TRUE(tab->SavePage(full_saved_file_name, temp_sub_resource_dir_,
293 SavePackage::SAVE_AS_COMPLETE_HTML)); 293 SavePackage::SAVE_AS_COMPLETE_HTML));
294 EXPECT_TRUE(WaitForDownloadShelfVisible(browser.get())); 294 EXPECT_TRUE(WaitForDownloadShelfVisible(browser.get()));
295 CheckFile(full_saved_file_name, expected_result_file_name, true); 295 CheckFile(full_saved_file_name, expected_result_file_name, true);
296 } 296 }
297 } 297 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698