BUILD: 2002-03-15-08. STEPS TO REPRODUCE: 1) Load attached testcase 2) Click the button 3) Open "view source" EXPECTED RESULTS: See source of the document.written page. Failing that see source of original page ACTUAL RESULTS: The document.written page itself is shown NOTES: The presense of the meta charset causes the charset observer to trigger a reload of the document via nsWebShell::ReloadDocument(). This leads to a call to nsDocShell::LoadHistoryEntry on mOSHE. Unfortunately, the URL in mOSHE is wrong -- is is wyciwyg://0/file:///home/bzbarsky/foo.html instead of view-source:wyciwyg://0/file:///home/bzbarsky/foo.html That is the root cause of the bug, but I'm not sure why mOSHE has the wrong url.
When I click on the "View source Please" link, only the original testcase, http://bugzilla.mozilla.org/showattachment.cgi?attach_id=74467 comes around for loading. There is no meta charset detected or no reload done, Nor a view source url loaded.
You are supposed to just view-source at that point, not click on the link... My apologies for the slightly confusing testcase. That said, this now worksforme...
Per new instructions, this indeed works now.