QA/Firefox3.5/ViewSource Testplan: Difference between revisions
Line 70: | Line 70: | ||
# Entity expansion is not carried out when view-source URLs are built (it should be). | # Entity expansion is not carried out when view-source URLs are built (it should be). | ||
# URLs that point to non-text resources (most especially images) are still turned into view-source URLs which will try to interpret them as text. Since we don't need the mimetype to know for sure what sort of resource is being referenced, a smarter view-source handler is needed. A view-source URL pointing to an image should be rendered as a regular URL pointing to an image would be. This might be difficult to test programmatically, but it's pretty easy to test manually. | # URLs that point to non-text resources (most especially images) are still turned into view-source URLs which will try to interpret them as text. Since we don't need the mimetype to know for sure what sort of resource is being referenced, a smarter view-source handler is needed. A view-source URL pointing to an image should be rendered as a regular URL pointing to an image would be. This might be difficult to test programmatically, but it's pretty easy to test manually. | ||
==== <Back> and <Forward> ==== | |||
{| class="wikitable" | |||
|- | |||
! header 1 | |||
! header 2 | |||
! header 3 | |||
|- | |||
| row 1, cell 1 | |||
| row 1, cell 2 | |||
| row 1, cell 3 | |||
|- | |||
| row 2, cell 1 | |||
| row 2, cell 2 | |||
| row 2, cell 3 | |||
|} | |||
= Schedule Scoping = | = Schedule Scoping = |
Revision as of 22:26, 18 November 2008
- 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 markup for an HTML page as text rather than rendered markup. The text is displayed with syntax-based coloring, but is otherwise identical to the text retrieved by the browser from the server or filesystem. A new feature, "linkification" has been added for Firefox 3.1. Linkification treats the values of HREF and SRC attributes as URLs. So for example, imagine the following HTML:
<a href="http://www.example.com/about.html>About</a>.
The text fragment http://www.example.com/about.html would be displayed as a hyperlink, linking to the URL view-source:http://www.example.com/about.html. Clicking on the link would replace the current source page with the source for the "about.html" page.
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..)
Overview of Test Strategy
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.
Existing pre-3.1 features
There are three ways to open the view source window
- View >> Page Source from the main menu.
- View Page Source from the content area context menu.
- 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). Note that functionality specific to the View Source window won't be available in this case, e.g. line wrapping. This is simply because the source is displayed in a regular browser window in this case rather than the View Source window.
Basic Functionality
- It should be possible to select text in the view source text.
- It should be possible to copy the selected text.
- 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.
Linkification of HREF and SRC URLs in Firefox 3.1
A two pronged approach will be used for testing the linkification feature: Automated testing (using Mochitests) wherever possible, and manual testing elsewhere. Since view source is heavily used by web developers and linkification has been a much requested extension, we can reasonably expect good test coverage from beta users.
- Does linkification work at all? Mochitest can load a view-source page into an IFRAME and then scan the DOM for anchor elements. Anchor elements will only be present if linkification is in effect.
- Are links being built correctly? A Mochitest can examine the HREF attributes on anchor elements inside the view source page and can verify they are being built correctly.
- Do back and forward work? It might be possible to test this using the IFRAME approach and triggering back and forward programmatically. This won't test key bindings, but key bindings are simple to test manually.
- Do back and forward key bindings work? This really needs to be tested manually.
- Entity expansion is not carried out when view-source URLs are built (it should be).
- URLs that point to non-text resources (most especially images) are still turned into view-source URLs which will try to interpret them as text. Since we don't need the mimetype to know for sure what sort of resource is being referenced, a smarter view-source handler is needed. A view-source URL pointing to an image should be rendered as a regular URL pointing to an image would be. This might be difficult to test programmatically, but it's pretty easy to test manually.
<Back> and <Forward>
header 1 | header 2 | header 3 |
---|---|---|
row 1, cell 1 | row 1, cell 2 | row 1, cell 3 |
row 2, cell 1 | row 2, cell 2 | row 2, cell 3 |
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.
It's difficult to estimate how long it will take to fix bugs introduced by linkification. The plan is to focus on the most severe bugs first. Given the relative simplicity of the linkification feature as currently implemented, it should be possible to get it working well enough to ship in the 3.1 release.
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.