We need automated tests for view source

NEW
Assigned to

Status

()

10 years ago
10 years ago

People

(Reporter: cbartley, Assigned: cbartley)

Tracking

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

10 years ago
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.
(Assignee)

Comment 1

10 years ago
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.
(Assignee)

Updated

10 years ago
Attachment #356210 - Flags: review?(mrbkap)
Attachment #356210 - Flags: review?(mrbkap) → review+

Comment 2

10 years ago
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.