| OLD | NEW |
| 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/file_util.h" | 6 #include "base/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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 { "ISO-8859-13.html", "ISO-8859-13" }, | 46 { "ISO-8859-13.html", "ISO-8859-13" }, |
| 47 { "ISO-8859-15.html", "ISO-8859-15" }, | 47 { "ISO-8859-15.html", "ISO-8859-15" }, |
| 48 { "KOI8-R.html", "KOI8-R" }, | 48 { "KOI8-R.html", "KOI8-R" }, |
| 49 { "KOI8-U.html", "KOI8-U" }, | 49 { "KOI8-U.html", "KOI8-U" }, |
| 50 { "macintosh.html", "macintosh" }, | 50 { "macintosh.html", "macintosh" }, |
| 51 { "Shift-JIS.html", "Shift_JIS" }, | 51 { "Shift-JIS.html", "Shift_JIS" }, |
| 52 { "US-ASCII.html", "ISO-8859-1" }, // http://crbug.com/15801 | 52 { "US-ASCII.html", "ISO-8859-1" }, // http://crbug.com/15801 |
| 53 { "UTF-8.html", "UTF-8" }, | 53 { "UTF-8.html", "UTF-8" }, |
| 54 { "UTF-16LE.html", "UTF-16LE" }, | 54 { "UTF-16LE.html", "UTF-16LE" }, |
| 55 { "windows-874.html", "windows-874" }, | 55 { "windows-874.html", "windows-874" }, |
| 56 // http://crbug.com/95963 | 56 #if 0 |
| 57 // { "windows-949.html", "windows-949" }, | 57 // TODO(jungshik): Temporarily disable this. Reenable it once |
| 58 // Blink rolls to include https://codereview.chromium.org/25870005/ |
| 59 // (it's reverted so that it has to be landed again). |
| 60 { "EUC-KR.html", "EUC-KR" }, |
| 61 #endif |
| 58 { "windows-1250.html", "windows-1250" }, | 62 { "windows-1250.html", "windows-1250" }, |
| 59 { "windows-1251.html", "windows-1251" }, | 63 { "windows-1251.html", "windows-1251" }, |
| 60 { "windows-1252.html", "windows-1252" }, | 64 { "windows-1252.html", "windows-1252" }, |
| 61 { "windows-1253.html", "windows-1253" }, | 65 { "windows-1253.html", "windows-1253" }, |
| 62 { "windows-1254.html", "windows-1254" }, | 66 { "windows-1254.html", "windows-1254" }, |
| 63 { "windows-1255.html", "windows-1255" }, | 67 { "windows-1255.html", "windows-1255" }, |
| 64 { "windows-1256.html", "windows-1256" }, | 68 { "windows-1256.html", "windows-1256" }, |
| 65 { "windows-1257.html", "windows-1257" }, | 69 { "windows-1257.html", "windows-1257" }, |
| 66 { "windows-1258.html", "windows-1258" } | 70 { "windows-1258.html", "windows-1258" } |
| 67 }; | 71 }; |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 "ISO-8859-8-I" }, | 262 "ISO-8859-8-I" }, |
| 259 { "KOI8-R_with_no_encoding_specified.html", | 263 { "KOI8-R_with_no_encoding_specified.html", |
| 260 "expected_KOI8-R_saved_from_no_encoding_specified.html", | 264 "expected_KOI8-R_saved_from_no_encoding_specified.html", |
| 261 "KOI8-R" }, | 265 "KOI8-R" }, |
| 262 { "Shift-JIS_with_no_encoding_specified.html", | 266 { "Shift-JIS_with_no_encoding_specified.html", |
| 263 "expected_Shift-JIS_saved_from_no_encoding_specified.html", | 267 "expected_Shift-JIS_saved_from_no_encoding_specified.html", |
| 264 "Shift_JIS" }, | 268 "Shift_JIS" }, |
| 265 { "UTF-8_with_no_encoding_specified.html", | 269 { "UTF-8_with_no_encoding_specified.html", |
| 266 "expected_UTF-8_saved_from_no_encoding_specified.html", | 270 "expected_UTF-8_saved_from_no_encoding_specified.html", |
| 267 "UTF-8" }, | 271 "UTF-8" }, |
| 268 { "windows-949_with_no_encoding_specified.html", | 272 #if 0 |
| 269 "expected_windows-949_saved_from_no_encoding_specified.html", | 273 // TODO(jungshik): Temporarily disable this. Reenable it once |
| 270 "windows-949-2000" }, | 274 // Blink rolls to include https://codereview.chromium.org/25870005/ |
| 275 // (it's reverted so that it has to be landed again). |
| 276 { "EUC-KR_with_no_encoding_specified.html", |
| 277 "expected_EUC-KR_saved_from_no_encoding_specified.html", |
| 278 "EUC-KR" }, |
| 279 #endif |
| 271 { "windows-1251_with_no_encoding_specified.html", | 280 { "windows-1251_with_no_encoding_specified.html", |
| 272 "expected_windows-1251_saved_from_no_encoding_specified.html", | 281 "expected_windows-1251_saved_from_no_encoding_specified.html", |
| 273 "windows-1251" }, | 282 "windows-1251" }, |
| 274 { "windows-1254_with_no_encoding_specified.html", | 283 { "windows-1254_with_no_encoding_specified.html", |
| 275 "expected_windows-1254_saved_from_no_encoding_specified.html", | 284 "expected_windows-1254_saved_from_no_encoding_specified.html", |
| 276 "windows-1254" }, | 285 "windows-1254" }, |
| 277 { "windows-1255_with_no_encoding_specified.html", | 286 { "windows-1255_with_no_encoding_specified.html", |
| 278 "expected_windows-1255_saved_from_no_encoding_specified.html", | 287 "expected_windows-1255_saved_from_no_encoding_specified.html", |
| 279 "windows-1255" }, | 288 "windows-1255" }, |
| 280 { "windows-1256_with_no_encoding_specified.html", | 289 { "windows-1256_with_no_encoding_specified.html", |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 | 332 |
| 324 // Dump the page, the content of dump page should be equal with our expect | 333 // Dump the page, the content of dump page should be equal with our expect |
| 325 // result file. | 334 // result file. |
| 326 base::FilePath expected_result_file_name = | 335 base::FilePath expected_result_file_name = |
| 327 base::FilePath().AppendASCII(kAutoDetectDir). | 336 base::FilePath().AppendASCII(kAutoDetectDir). |
| 328 AppendASCII(kExpectedResultDir). | 337 AppendASCII(kExpectedResultDir). |
| 329 AppendASCII(kTestDatas[i].expected_result); | 338 AppendASCII(kTestDatas[i].expected_result); |
| 330 SaveAndCompare(kTestDatas[i].test_file_name, expected_result_file_name); | 339 SaveAndCompare(kTestDatas[i].test_file_name, expected_result_file_name); |
| 331 } | 340 } |
| 332 } | 341 } |
| OLD | NEW |