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

Issue 18417: Add a UI test for "Encoding" menu

Created:
11 years, 11 months ago by xlyuan
Modified:
7 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Bug = 5515

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Total comments: 24

Patch Set 5 : '' #

Patch Set 6 : '' #

Total comments: 12
Unified diffs Side-by-side diffs Delta from patch set Stats (+1432 lines, -44 lines) Patch
A chrome/browser/browser_encoding_uitest.cc View 1 2 3 4 5 1 chunk +306 lines, -0 lines 10 comments Download
M chrome/browser/download/save_page_uitest.cc View 1 2 3 4 1 chunk +8 lines, -27 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_alias_mapping/encoding-Big5.htm View 1 2 3 4 5 1 chunk +17 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_alias_mapping/encoding-EUC-JP.htm View 1 2 3 4 5 1 chunk +24 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_alias_mapping/encoding-ISO-8859-13.htm View 1 2 3 4 5 1 chunk +15 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_alias_mapping/encoding-ISO-8859-15.htm View 1 2 3 4 5 1 chunk +10 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_alias_mapping/encoding-ISO-8859-2.htm View 1 2 3 4 5 1 chunk +105 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_alias_mapping/encoding-ISO-8859-4.htm View 1 2 3 4 5 1 chunk +15 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_alias_mapping/encoding-ISO-8859-5.htm View 1 2 3 4 5 1 chunk +10 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_alias_mapping/encoding-ISO-8859-6.htm View 1 2 3 4 5 1 chunk +10 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_alias_mapping/encoding-ISO-8859-7.htm View 1 2 3 4 5 1 chunk +10 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_alias_mapping/encoding-ISO-8859-8.htm View 1 2 3 4 5 1 chunk +10 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_alias_mapping/encoding-KOI8-R.htm View 1 2 3 4 5 1 chunk +10 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_alias_mapping/encoding-KOI8-U.htm View 1 2 3 4 5 1 chunk +10 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_alias_mapping/encoding-Shift-JIS.htm View 1 2 3 4 5 1 chunk +12 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_alias_mapping/encoding-UTF-16LE.htm View Binary file 0 comments Download
A chrome/test/data/encoding_tests/encoding_alias_mapping/encoding-UTF-8.htm View 1 2 3 4 5 1 chunk +12 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_alias_mapping/encoding-gb18030.htm View 1 2 3 4 5 1 chunk +15 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_alias_mapping/encoding-iso-8859-1.htm View 1 chunk +11 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_alias_mapping/encoding-macintosh.htm View 1 chunk +10 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_alias_mapping/encoding-windows-1250.htm View 1 2 3 4 5 1 chunk +105 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_alias_mapping/encoding-windows-1251.htm View 1 2 3 4 5 1 chunk +10 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_alias_mapping/encoding-windows-1252.htm View 1 chunk +14 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_alias_mapping/encoding-windows-1253.htm View 1 2 3 4 5 1 chunk +10 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_alias_mapping/encoding-windows-1254.htm View 1 2 3 4 5 1 chunk +10 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_alias_mapping/encoding-windows-1255.htm View 1 2 3 4 5 1 chunk +10 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_alias_mapping/encoding-windows-1256.htm View 1 2 3 4 5 1 chunk +10 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_alias_mapping/encoding-windows-1257.htm View 1 2 3 4 5 1 chunk +23 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_alias_mapping/encoding-windows-1258.htm View 1 2 3 4 5 1 chunk +10 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_alias_mapping/encoding-windows-874.htm View 1 2 3 4 5 1 chunk +11 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_alias_mapping/encoding-windows-949.htm View 1 2 3 4 5 1 chunk +14 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/Big5_content_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +16 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/ISO-8859-13_content_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +14 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/ISO-8859-4_content_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +14 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/ISO-8859-5_content_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/ISO-8859-6_content_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/ISO-8859-7_content_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/ISO-8859-8_content_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/KOI8-R_content_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/KOI8-U_content_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +14 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/Shift-JIS_content_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +11 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/UTF-8_content_without_encoding_declaration.htm View Binary file 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/expect_results/expect_Big5_content_save_from_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +16 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/expect_results/expect_ISO-8859-5_content_save_from_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/expect_results/expect_ISO-8859-6_content_save_from_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/expect_results/expect_ISO-8859-7_content_save_from_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/expect_results/expect_ISO-8859-8_content_save_from_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/expect_results/expect_KOI8-R_content_save_from_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/expect_results/expect_Shift-JIS_content_save_from_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +11 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/expect_results/expect_UTF-8_content_save_from_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +11 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/expect_results/expect_gb18030_content_save_from_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +19 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/expect_results/expect_iso-8859-1_content_save_from_without_encoding_declaration.htm View 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/expect_results/expect_windows-1251_content_save_from_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/expect_results/expect_windows-1252_content_save_from_without_encoding_declaration.htm View 1 chunk +13 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/expect_results/expect_windows-1253_content_save_from_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/expect_results/expect_windows-1254_content_save_from_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/expect_results/expect_windows-1255_content_save_from_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/expect_results/expect_windows-1256_content_save_from_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/expect_results/expect_windows-1257_content_save_from_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +23 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/expect_results/expect_windows-1258_content_save_from_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/expect_results/expect_windows-874_content_save_from_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +10 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/expect_results/expect_windows-949_content_save_from_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +13 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/gb18030_content_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +20 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/iso-8859-1_content_without_encoding_declaration.htm View 1 chunk +10 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/macintosh_content_without_encoding_declaration.htm View 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/windows-1251_content_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/windows-1252_content_without_encoding_declaration.htm View 1 chunk +13 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/windows-1253_content_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/windows-1254_content_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/windows-1255_content_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/windows-1256_content_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/windows-1257_content_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +22 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/windows-1258_content_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/windows-874_content_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +10 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_auto_detect/windows-949_content_without_encoding_declaration.htm View 1 2 3 4 5 1 chunk +13 lines, -0 lines 0 comments Download
A chrome/test/data/encoding_tests/encoding_user_override/gb18030_content_with_encoding_iso88591.htm View 1 2 3 4 5 1 chunk +20 lines, -0 lines 0 comments Download
M chrome/test/ui/ui_test.h View 1 2 3 4 2 chunks +15 lines, -0 lines 0 comments Download
M chrome/test/ui/ui_test.cc View 1 2 3 4 2 chunks +39 lines, -2 lines 1 comment Download
M chrome/test/ui/ui_tests.vcproj View 1 2 3 4 7 chunks +22 lines, -15 lines 1 comment Download

Messages

Total messages: 4 (0 generated)
xlyuan
Hi, Johnny and Jungshik: I fixed several style issues, can you please take a look? ...
11 years, 10 months ago (2009-02-23 04:54:09 UTC) #1
Johnny(Jianning) Ding
I have a few comments for the first two .cc files. Will check the rest ...
11 years, 10 months ago (2009-02-24 13:01:58 UTC) #2
xlyuan
Hi, Johnny: For add more encoding for user override, I thought one encoding is enough ...
11 years, 9 months ago (2009-03-05 03:22:13 UTC) #3
Johnny(Jianning) Ding
11 years, 9 months ago (2009-03-09 12:31:46 UTC) #4
The following are some comments. Thanks!

http://codereview.chromium.org/18417/diff/3483/2477
File chrome/browser/browser_encoding_uitest.cc (right):

http://codereview.chromium.org/18417/diff/3483/2477#newcode27
Line 27: void CheckFile(const std::wstring& generated_file,
would please move this function to UITest with adding one additional parameter
"test_dir_path". Then we can remove the  duplicated duplicate CheckFile both
encoding_uitest and savepage_uitest

http://codereview.chromium.org/18417/diff/3483/2477#newcode59
Line 59: // ISO-8859-16
would you please file a bug for those encoding, the once you  have practicable
editor, you can add those tests.

http://codereview.chromium.org/18417/diff/3483/2477#newcode61
Line 61: struct EncodingTestData {
you can move the definition to class BrowserEncodingTest, then we use can it in
those test functions.

http://codereview.chromium.org/18417/diff/3483/2477#newcode100
Line 100: kTestDir + L"/encoding_alias_mapping/" +
encoding_test_data[i].file_name);
needs 4 spaces indent, you can write it like
url = URLRequestMockHTTPJob::GetMockUrl(kTestDir + 
    L"/encoding_alias_mapping/" + encoding_test_data[i].file_name);
or
url = URLRequestMockHTTPJob::GetMockUrl(kTestDir + 
                                        L"/encoding_alias_mapping/" +
                                        encoding_test_data[i].file_name);

http://codereview.chromium.org/18417/diff/3483/2477#newcode117
Line 117: kTestDir + L"/encoding_user_override/" + file_name);
4 spaces indent

http://codereview.chromium.org/18417/diff/3483/2477#newcode156
Line 156: 
please remove this empty line.

http://codereview.chromium.org/18417/diff/3483/2477#newcode161
Line 161: 
please remove this empty line.

http://codereview.chromium.org/18417/diff/3483/2477#newcode167
Line 167: const wchar_t* file_name[] = {
please use the previous defined "EncodingTestData" structure instead of using
two separated string arrays.

http://codereview.chromium.org/18417/diff/3483/2477#newcode228
Line 228: L"Big5_content_without_encoding_declaration_files",
you can define the prefix name like EncodingTestData EncodingTestData
encoding_test_data[] = {
{ L"Big5_content_without_encoding_declaration", L"Big5" },
...
};
so 
test_file_name = encoding_test_data[i] + L".htm";
expact_file_name = L"expect_" + encoding_test_data[i] + L".htm";
sub_dir_name =  encoding_test_data[i] + L"_files";

it will make code more readable.

http://codereview.chromium.org/18417/diff/3483/2477#newcode264
Line 264: kTestDir + L"/encoding_auto_detect/" + file_name[i]);
4 spaces indent

http://codereview.chromium.org/18417/diff/3483/2479
File chrome/test/ui/ui_test.cc (right):

http://codereview.chromium.org/18417/diff/3483/2479#newcode759
Line 759: const std::wstring &test_case) {
make the parameter of this line aligned with previous parameter

http://codereview.chromium.org/18417/diff/3483/2480
File chrome/test/ui/ui_tests.vcproj (right):

http://codereview.chromium.org/18417/diff/3483/2480#newcode541
Line 541: >
only needs to add browser_encoding_uitest.cc in this project file. Make sure no
other changes in this file

Powered by Google App Engine
This is Rietveld 408576698