213
edits
Line 23: | Line 23: | ||
Describe how testcases will be created (litmus, mochitests, reftests, gristmill, etc..) | Describe how testcases will be created (litmus, mochitests, reftests, gristmill, etc..) | ||
== test strategy: overview == | |||
1. | View Source functionality will be broken down into two major components: | ||
1. Existing (pre 3.1) view source functionality | |||
1. URL linkification (new in 3.1) | |||
3. | Due to time constraints and resource limitation, this document will only attempt a cursory level of testing for existing view source functionality, with the understanding that this error will be fleshed out later. | ||
Since the linkification feature is new and is likely to contain bugs, most of the test effort will be focused on it for 3.1. | |||
== test strategy: existing pre-3.1 features == | |||
=== There are three ways to open the view source window === | |||
1. View >> Page Source from the main menu. | |||
1. View Page Source from the content area context menu. | |||
1. Ctrl-U/Cmd-U | |||
=== There is also a way to view source in a regular browser window/tab === | |||
Enter a view-source:url in the address bar (directly, by bookmark, or by clicking a link which has a view-source:url as its HREF). | |||
=== Basic Functionality === | |||
1. It should be possible to select text in the view source text. | |||
1. It should be possible to copy the selected text. | |||
1. Find and Find Again should work. | |||
=== Fidelity: ensure that view-source does not corrupt the source === | |||
The text displayed by view-source should exactly match the source returned by the server or retrieved from the filesystem. It's possible for errors in the formatting code to cause characters to be omitted, for example. This is particularly important because subtle errors in the displayed source text may be quite hard to detect, but could still cause users considerable difficulty. | |||
The plan is to assemble a small, but reasonably representative, set of HTML source files as a test suite. A mochitest or a series of mochitests will be written to automatically open view-source windows (possibly as IFRAMES) and extract (using document.body.textContent) the raw unformatted text. The mochitests will then compare the extracted text content with the actual source text retrieved directly from the file system. | |||
Ultimately the suite of test HTML files will be greatly expanded to ensure good coverage. It may make sense to include XML files as well (including SVG files). | |||
There should be an emphasis on view-source fidelity because it is very amenable to automated testing, and because it's extremely important. | |||
= Schedule Scoping = | = Schedule Scoping = |
edits