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

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

Issue 1301503003: Revert of Enable and fix tests after page serializer merge (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/download/save_page_browsertest.cc » ('j') | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 4
5 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/files/file_util.h" 6 #include "base/files/file_util.h"
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/browser/character_encoding.h" 9 #include "chrome/browser/character_encoding.h"
10 #include "chrome/browser/net/url_request_mock_util.h" 10 #include "chrome/browser/net/url_request_mock_util.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 EXPECT_EQ(GetParam().encoding_name, 171 EXPECT_EQ(GetParam().encoding_name,
172 browser()->tab_strip_model()->GetActiveWebContents()-> 172 browser()->tab_strip_model()->GetActiveWebContents()->
173 GetEncoding()); 173 GetEncoding());
174 } 174 }
175 175
176 INSTANTIATE_TEST_CASE_P(EncodingAliases, 176 INSTANTIATE_TEST_CASE_P(EncodingAliases,
177 BrowserEncodingTest, 177 BrowserEncodingTest,
178 testing::ValuesIn(kEncodingTestDatas)); 178 testing::ValuesIn(kEncodingTestDatas));
179 179
180 // Marked as flaky: see http://crbug.com/44668 180 // Marked as flaky: see http://crbug.com/44668
181 IN_PROC_BROWSER_TEST_F(BrowserEncodingTest, TestOverrideEncoding) { 181 IN_PROC_BROWSER_TEST_F(BrowserEncodingTest, DISABLED_TestOverrideEncoding) {
182 const char* const kTestFileName = "gb18030_with_iso88591_meta.html"; 182 const char* const kTestFileName = "gb18030_with_iso88591_meta.html";
183 const char* const kExpectedFileName = 183 const char* const kExpectedFileName =
184 "expected_gb18030_saved_from_iso88591_meta.html"; 184 "expected_gb18030_saved_from_iso88591_meta.html";
185 const char* const kOverrideTestDir = "user_override"; 185 const char* const kOverrideTestDir = "user_override";
186 186
187 base::FilePath test_dir_path = 187 base::FilePath test_dir_path =
188 base::FilePath(kTestDir).AppendASCII(kOverrideTestDir); 188 base::FilePath(kTestDir).AppendASCII(kOverrideTestDir);
189 test_dir_path = test_dir_path.AppendASCII(kTestFileName); 189 test_dir_path = test_dir_path.AppendASCII(kTestFileName);
190 GURL url = net::URLRequestMockHTTPJob::GetMockUrl(test_dir_path); 190 GURL url = net::URLRequestMockHTTPJob::GetMockUrl(test_dir_path);
191 ui_test_utils::NavigateToURL(browser(), url); 191 ui_test_utils::NavigateToURL(browser(), url);
(...skipping 30 matching lines...) Expand all
222 // For Hebrew, the expected encoding value is ISO-8859-8-I. See 222 // For Hebrew, the expected encoding value is ISO-8859-8-I. See
223 // http://crbug.com/2927 for more details. 223 // http://crbug.com/2927 for more details.
224 // 224 //
225 // This test is failing consistently on ChromeOS, see http://crbug.com/512996. 225 // This test is failing consistently on ChromeOS, see http://crbug.com/512996.
226 #if defined(OS_CHROMEOS) 226 #if defined(OS_CHROMEOS)
227 #define MAYBE_TestEncodingAutoDetect DISABLED_TestEncodingAutoDetect 227 #define MAYBE_TestEncodingAutoDetect DISABLED_TestEncodingAutoDetect
228 #else 228 #else
229 #define MAYBE_TestEncodingAutoDetect TestEncodingAutoDetect 229 #define MAYBE_TestEncodingAutoDetect TestEncodingAutoDetect
230 #endif 230 #endif
231 // TODO(phajdan.jr): See if fix for http://crbug.com/122053 would help here. 231 // TODO(phajdan.jr): See if fix for http://crbug.com/122053 would help here.
232 IN_PROC_BROWSER_TEST_F(BrowserEncodingTest, MAYBE_TestEncodingAutoDetect) { 232 // Disabled to revert a depending Blink CL. crbug.com/328354, and
233 // crbug.com/510422.
234 IN_PROC_BROWSER_TEST_F(BrowserEncodingTest, DISABLED_TestEncodingAutoDetect) {
233 struct EncodingAutoDetectTestData { 235 struct EncodingAutoDetectTestData {
234 const char* test_file_name; // File name of test data. 236 const char* test_file_name; // File name of test data.
235 const char* expected_result; // File name of expected results. 237 const char* expected_result; // File name of expected results.
236 const char* expected_encoding; // expected encoding. 238 const char* expected_encoding; // expected encoding.
237 }; 239 };
238 const EncodingAutoDetectTestData kTestDatas[] = { 240 const EncodingAutoDetectTestData kTestDatas[] = {
239 { "Big5_with_no_encoding_specified.html", 241 { "Big5_with_no_encoding_specified.html",
240 "expected_Big5_saved_from_no_encoding_specified.html", 242 "expected_Big5_saved_from_no_encoding_specified.html",
241 "Big5" }, 243 "Big5" },
242 { "gb18030_with_no_encoding_specified.html", 244 { "gb18030_with_no_encoding_specified.html",
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 326
325 // Dump the page, the content of dump page should be equal with our expect 327 // Dump the page, the content of dump page should be equal with our expect
326 // result file. 328 // result file.
327 base::FilePath expected_result_file_name = 329 base::FilePath expected_result_file_name =
328 base::FilePath().AppendASCII(kAutoDetectDir). 330 base::FilePath().AppendASCII(kAutoDetectDir).
329 AppendASCII(kExpectedResultDir). 331 AppendASCII(kExpectedResultDir).
330 AppendASCII(kTestDatas[i].expected_result); 332 AppendASCII(kTestDatas[i].expected_result);
331 SaveAndCompare(kTestDatas[i].test_file_name, expected_result_file_name); 333 SaveAndCompare(kTestDatas[i].test_file_name, expected_result_file_name);
332 } 334 }
333 } 335 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/download/save_page_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698