You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.



You are here: Browser IQA Test Case index > Test cases description for Charset Handling part I

Test Cases for Browser Basic Charset Handling Part I:
Charset menu and Auto-Detect

Updated by software engineer Yuying Long

Setup and Deployment

  1. This is a basic i18n Browser feature. Fonts for i18n testing (e.g. Japanese fonts, Chinese fonts...etc.) are needed in order to run under the environment to display and input i18n data correctly.
  2. This document is only for testing Charset handling in Browser. It is not for testing in Composer, Mail/News...etc.
  3. Please go to Charset Handling Part II to check the test cases for Charset priority and override.
  4. This document is for pages that without frame(s), please also go to Charset Handling Part II to check the test cases for those pages that has frame(s).
  5. This document is working for both mozilla and netscape products, create user's own test data might be needed for their own test purpose.
  6. If there is any problem has been found during the testing, please go to http://bugzilla.mozilla.org log a bug for Browser product and Internationalization for component.
  7. Any live web page in this document could be changed any time, so they may not contain the information mentioned here.
  8. Please report bugs in bugzilla.mozilla.org under Browser product with Internationalization component.

Platform Combinations

Platforms

PC and Macintosh

Operating Systems

  • Windows (XP, 2000, NT, ME, 98... etc.)
  • Linux Red Hat 6.2, 7.1, 7.2, 7.3...etc.
  • Mac OS X, 9.x

Charsets:

Here are some charset examples for some languages:

  • Japanese (Shift-JIS, EUC-JP, ISO-2022-JP)
  • Traditional Chinese (Big5, EUC-TW, Big5HKSCS)
  • Simplified Chinese (GB2312, GBK, HZ, GB18030)
  • Korean (EUC-KR, UHC, JOHAB, ISO-2022-KR)
  • Western (ISO-8859-1, ISO-8859-15...)
  • ... etc.

Some charset could be represented differently, e.g. SHIIFT-JIS could be x-jis, Shift-jis, Big5 could be Big-5...etc.

Test Cases

1. Charset Menu

This part focus on the menu appearance, for how the charset menu should be marked will going to discuss in other parts.

Test Case # Objective Steps To Perform Expected Results
1-1 First Tier charset menu 1). Launch browser, View | Character Coding:
  • There should be a solid line separator in the sub-menu of Character Coding.
  • Above the separator line, there should be 3 items:
    Auto-Detect, More, Customize...
  • Below the separator line, there should be some specified charset(s) list there.
  • There must be one marked charset.
  • This is an example screen shot of Character Coding sub menu:
2). Visit different charset pages by:
  1. Find some test pages of double byte, high ascii pages here, or visit some other language web pages suitable for the test.
  2. Create some html files with different charsets.
  • Up to 5 items with recent encodings w/ most recent at top, we call this menu as dynamic charset menu.
  • There should be no limit to how many static encoding items can appear here via Customize ... Pref Dialog. - see case 1-2. Windows resolution may need to be adjusted if you want to view a long charset list completely.
  • The total encoding items should be: static encoding items + up to 5 recent encoding items which are not duplicates of static encoding items.
  • The charset is marked for the current document.
1-2 About Customized... 1). Select menu item "Customize..." from View | Character Coding.
2). Bring up "Customize Character Coding" dialog.
3). Highlight a charset from "Available Character Codings" field, and click on "Add" button.
4). The charset will be added in "Active Character Codings" field.
5). Add more than one charset by repeating steps 3) and 4) or:
Press Shift or Ctrl key and highlight multiple charsets from "Available Character Codings" field, and click on "Add" button to add them into "Active Character Codings" field.
  • The target charset(s) should be added into the static encoding items of Character Coding menu.
  • The encoding list order in Character Coding menu should follow the order of the charsets in "Active Character Codings".
6). Highlight a charset, click on "Up" or "Down" button to move it up or down. User should be able to modify/customize the order of static encoding items.
7). Press Shift or Ctrl key and highlight charset(s) and click on "Remove" button to remove charset(s) from "Active Character Coding". The charset(s) should be removed from the static encoding menu item.
8). With this Customize Character Coding dialog, Click on "Cancel" button after any action. The change(s) should not effect of charset static menu.
1-3 Second tier charset menu: Auto-Detect See case 2 for "Auto-detect". See the details in case 2.
1-4 Second tier charset menu: "More" and entire charset/encoding list 1). Launch browser, select menu item "More" from View | Character Coding.
  • There should be a solid line separator.
  • Above the separator line, there should be 5 language group items:
    West European, East European, East Asian, SE & SW Asian and Middle Eastern.
    Each one of the language groups should expand a sub menu for each encoding/charset.
  • Below the separator line, there should be 3 items:
    Unicode (UTF-8), Unicode (UTF-7) and User Define.
    User Define is the charset that can be edited in Preferences for user own usage.
  • This is the screen shot for sub-menu under "More": Sub-menu for "More"
2). Click on each language encoding/charset group menu.
  • Under each language group, the language names should be sorted according to the OS you are using, except under the West European language group in which the "Western" language should always be on the top of the list.
  • Within items that have the same language names (i.e. language names that have more than one encoding method), they are sorted by the encoding name according to the OS you are using.
1-5 Add charset from "More" into first tier charset 1). Select a charset from View | Character Coding | More.
  • If selected charset does not exist in the first tier charset menu before, then it will now appear in the first tier menu, and this charset will be marked.
  • If selected charset already existed in the first tier character menu, then that charset will be marked. The same charset should not have 2 entries in the first tier menu.
  • The page should be reloaded and should be displayed according to the selected charset.
2). Select some other charset(s) from View | Character Coding | More.
  • Up to 5 items of recent encodings will be displayed in the first tier menu, with the most recent one at the top.
  • The charset that was selected last will be marked as the most recent selected one.

2. Auto-detect without charset meta-tag pages

Test Case # Objective Steps To Perform Expected Results
2-1 Pages without charset meta-tag but with HTTP server or header charset info. Load pages that do not contain meta-charset, but have charset information in HTTP server or HTTP header, e.g.:
http://www.yahoo.co.jp. (this example web page is usable as of the test case's writing; it could be changed any time that caused different HTTP server information to be loaded)
Page(s) should always display properly, and the same charset/encoding should be marked consistently no matter how auto-detect options are set.
2-2 Load pages without charset meta-tag 1). Launch browser, keep the Auto-detect OFF by default.
2). Visit some pages that DO NOT HAVE charset meta-tag (there is no charset information in page source Content-Type) by:
  1. Find some test pages here or on the internet.
  2. Create an i18n html file without meta-charset.
  • The Charset/Encoding in Browser should be marked as the default charset that setting in Preferences | Navigator | Languages. e.g. Western (ISO-8859-1).
  • If the page loaded has a different language/charset than the default language/charset, then the page should not be displayed properly.
2-3 Auto-Detect Universal 1). Edit | Preferences | Advanced | Cache, clear both memory and disk Cache.
2). View | Character Coding | Auto-Detect.
3). Select "Universal".
  • The "Universal" item of Auto-Detect option should be marked (a bullet next to "Universal").
  • One charset should be marked if the charset already exists in the encoding menu; otherwise, the correct charset should be added into the encoding menu and marked, and all i18n characters and data should be displayed correctly.
  • The marked language/charset should match the loaded web page's language/charset properly. e.g. Japanese (SHIFT-JIS) for Japanese page....etc. A Japanese page must not be marked as a Chinese charset even if the page is displayed fine.
2-4 Auto-Detect a specified language name or language group 1). Edit | Preferences | Advanced | Cache, clear both memory and disk Cache.
2). View | Character Coding | Auto-Detect.
3). Select a language group, e.g. Japanese, East Asian, Traditional Chinese, Russian...etc.
  • A language type (e.g. Japanese or Traditional Chinese...etc.) under the Auto-Detect option should be marked.
  • Same result as in 2-2b and 2-2c.
  • With same page, the charset will marked as the same one that in auto-detect Universal if the specified a properly auto-detect language.
2-5 Reload without clearing Cache Click on Reload or View | Reload to reload the current page Regardless of whether auto-detect is "Off" or not, you should get the same results as in step 2-2 to 2-4.
2-6 Clearing Cache before reload 1). Repeat steps 2-2 to 2-4.
2). Edit | Preferences | Advanced | Cache, clear both memory and disk Cache.
3). Click on Reload or View | Reload to reload the current page.
Should get the same result as in step 2-2 to 2-4.
2-7 Reload by changing Auto-Detect to Off before clearing Cache first 1). Repeat steps 2-2 to 2-4.
2). View | Character Coding | Auto-Detect.
3). Select "Off"
4). Edit | Preferences | Advanced | Cache, clear both memory and disk Cache.
5). Click on Reload or View | Reload to reload the current page.
  • After auto-detect is changed to "Off" but before the Cache is cleared, the page should still be displayed properly, and the proper charset and auto-detect "Off" should be marked.
  • After reloading, you should get the same results as in step 2-2 to 2-4.
2-8 Reload by clearing the Cache first then changing Auto-Detect to Off 1). Edit | Preferences | Advanced | Cache, clear both memory and disk Cache.
2). Reload the page in step 2-3 or 2-4
Should get the same results as in step 2-2.

3. Auto-Detect with charset meta-tag pages

Browser should store the previous page charset information into Cache.

Test Case # Objective Steps To Perform Expected Results
3-1 Load pages with charsets 1). Launch browser, keep the Auto-detect OFF by default.
2). Visit some pages that HAVE charset meta-tag (there is meta-charset information in page source Content-Type) by:
  1. Find some test pages here or on the internet.
  2. Create an i18n html file with meta-charset.
  • The Charset/Encoding in Browser should mark the same encoding as the one that are specified in Page Source meta-charset.
  • The page should be displayed following the charset.
3-2 Auto-Detect Universal or as a specified language 1). View | Character Coding | Auto-Detect.
2). Select "Universal" or some language group name.
The Charset/Encoding in Browser should mark the same encoding as the one that are specified in Page Source meta-charset. It should act the same as when auto-detect was OFF.
3-3 Reload with or without clearing Cache 1). Reload page(s) by clearing Cache:
Edit | Preferences | Advanced | Cache, clear both memory and disk Cache.
2). Or Reload page(s) without clearing Cache.
Should get the same results as in step 3-1.