We need automated tests for view source. The view source test plan is at https://wiki.mozilla.org/QA/Firefox3.1/ViewSource_Testplan. Bug 464314 has an incomplete compiled-code test for entity decoding in view source linkification (missing makefile changes). Bug 464339 has a reftest for view-source URLs that point to images. We need more.
Created attachment 356210 [details] [diff] [review] A simple mochitest to test basic view source fidelity. This test simply verifies that the source text displayed by a "view-source:" URL actually matches the raw source text of the file. It does not test syntax coloring or linkification, just basic fidelity. The test uses both an XMLHttpRequest and an IFRAME which seems rather yucky, but I can't think of any real alternatives.
Attachment #356210 - Flags: review?(mrbkap)
Attachment #356210 - Flags: review?(mrbkap) → review+
What URLs do you guys wanted automated tests for? I was able to make this work in a reftest.list: == view-source:http://www.ganymede.org/ ./ganymede.html The ganymede.html file has an <img> with the <body> set correctly. I can generate more of these. Just give me a list of URLs.
You need to log in before you can comment on or make changes to this bug.