mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-07 23:43:37 +00:00
Bug 514412: about:blank should derefence to an empty stream. r=bzbarsky
This commit is contained in:
parent
91c8a167c1
commit
352f57cb25
@ -19,8 +19,9 @@ function runTest() {
|
||||
sendChar('a', e.contentDocument);
|
||||
sendChar('b', e.contentDocument);
|
||||
sendChar('c', e.contentDocument);
|
||||
var frame_html = "<head><title></title></head><body>abc</body>";
|
||||
ok(frame_html == e.contentDocument.documentElement.innerHTML);
|
||||
var expected = "<head></head><body>abc</body>";
|
||||
var result = e.contentDocument.documentElement.innerHTML;
|
||||
is(result, expected, "iframe with designmode on had incorrect content");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Steffen Wilberg <steffen.wilberg@web.de>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
@ -43,9 +44,6 @@
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsAboutBlank, nsIAboutModule)
|
||||
|
||||
static const char kBlankPage[] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">"
|
||||
"<html><head><title></title></head><body></body></html>";
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAboutBlank::NewChannel(nsIURI *aURI, nsIChannel **result)
|
||||
{
|
||||
@ -54,7 +52,7 @@ nsAboutBlank::NewChannel(nsIURI *aURI, nsIChannel **result)
|
||||
nsIChannel* channel;
|
||||
|
||||
nsCOMPtr<nsIInputStream> in;
|
||||
rv = NS_NewCStringInputStream(getter_AddRefs(in), NS_LITERAL_CSTRING(kBlankPage));
|
||||
rv = NS_NewCStringInputStream(getter_AddRefs(in), EmptyCString());
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = NS_NewInputStreamChannel(&channel, aURI, in,
|
||||
|
Loading…
x
Reference in New Issue
Block a user