QA/Firefox3.5/ViewSource Testplan
- Feature <abc> Test Plan
Overview
Provide an abstract of the feature and the test strategy. Are there particular challenges with testing this feature?
The View Source feature displays the source HTML of a page as the original text, not as rendered markup. The related View Selection Source command displays just the source for the selected range on the page.
View Page Source may be invoked several ways. 1. Select View >> Page Source from the main menu. 2. Select View Page Source from the page context menu. 3. Press Ctrl-U/Cmd-U on the keyboard.
View Selection Source may only be invoked from the context menu when some content on the page is currently selected.
Test Strategy
List major areas of test coverage List areas that will NOT be covered (by developer, third party, etc.) Describe how testcases will be created (litmus, mochitests, reftests, gristmill, etc..)
test strategy: overview
View Source functionality will be broken down into two major components:
- Existing (pre 3.1) view source functionality
- URL linkification (new in 3.1)
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
Estimate amount of time it will take to complete feature (Consider nightly builds, security reviews, bugs turnaround time)
The basic view source feature has existed for over 10 years. The most recent addition is the linkification of URL attributes. It is the latter feature that is most in need of testing at this time.
The linkification feature is "complete" at this time, but exhibits a number of bugs, some of them fairly severe. Some of these "bugs" are arguably missing sub-features rather than bugs, but at this point the distinction is probably meaningless.
The linkification feature is new for Firefox 3.1. The amount of time to "complete" the feature has been arbitrarily declared as the amount of time left on 3.1. Bugs/missing sub-features will be triaged and the most important ones will be fixed first. It should be possible to fix all the serious bugs and, hopefully, implement the most serious missing subfeatures in the time remaining. Bugs or missing sub-features which are "annoying" rather than serious can wait until Firefox 3.2 to be addressed if necessary.
References
Include notes, links, specs, relevant bugs
- Bug 17612: Bug 17612 – view-source link-browsing
- Bug 15372: view-source: URLs need overhaul
- Bug 463176: NS_ERROR_FACTORY_NOT_REGISTERED from nsIDocShellHistory.useGlobalHistory opening view source
- Bug 464314: view-source link-browsing doesn't decode entities
- Bug 464339: Links to images and non-textish media should not have view-source: links
- Bug 464388: View Source linkification triggers "ASSERTION: Error: no token allocator"
- Bug 464727: Incorrect linkification of view-source if newline follows the linkinfied attribute.
- Bug 79518: tracking view source UI
- Bug 455888: Make View Source not suck (view source meta bug)
- Bug 464361: Add support for back and forward mouse buttons to View Source
- Bug 229995: view source doesn't need history or security
- Bug 60426: Allow users to choose between generated and source html in view-source
- Bug 464222: Relative links not linkified in "View Selection Source"
Bug 79518: Bug 79518 – tracking view source UI
Bugs that describe how View Source works (or is supposed to work) now
- Bug 15364: Add line numbers to View Source
- Bug 17612: view-source link-browsing
- Bug 22022: no wrapping in view source
- Bug 39389: No context menus in "view source" window
- Bug 49721: [RFE] View Partial Source capability
- Bug 50877: Menu items don't work in View Source window
- Bug 55583: view-source should show original page source (use cached source)
- Bug 59489: Cannot print page source
- Bug 63026: Give me the menu in View Source back
- Bug 63137: [FIX]View Source converts tags to lower case
- Bug 71173: find only works once in view page source window
- Bug 77337: [FIX]view-source: does not allow viewing of many text files
- Bug 80598: View source window does not focus the content area when it's brought up
- Bug 85752: move viewsource search menuitems to edit and kill the search menu
- Bug 85908: Add reload to View Page Source Window
- Bug 99676: ctrl-e in viewsource causes composer to load highlighted source
Bugs that are feature requests or known bugs
- Bug 8589: make view source optionally open in text/plain helper app
- Bug 11520: Ability to view stylesheet source.
- Bug 28809: [RFE] View Source at Selection
- Bug 47139: Make page source tabbed, each tab representing a frame
- Bug 57722: view-source leaves out whitespace at end of document
- Bug 60426: Allow users to choose between generated and source html in view-source
- Bug 74862: Ability to save highlighted source in view-source
- Bug 76250: enable Page Info menu item in View Source
- Bug 78619: View-source: pages have a view source option if opened by hyperlink
- Bug 79339: stop spawning view-source: urls in a new window when we support view-source: recursion
- Bug 87787: need a stop button for view source
- Bug 169198: Add "Raw View" tab to View Source window
- Bug 202659: remove items from edit menu in view source
Bug 455888: Bug 455888 – Make View Source not suck (view source meta bug)
- Bug 11520: Ability to view stylesheet source.
- Bug 17612: view-source link-browsing
- Bug 246620: Add line numbers to View Source for Firefox
- Bug 455945: View Source should "linkify" links in the source -- i.e. show them as clickable hyperlinks
- Bug 455948: The view source window should have a toolbar with toggle-line-wrap and goto-line buttons.