mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Make about:blank work correctly as a reference for reftests served over HTTP. (Bug 457821) r=jwalden
This commit is contained in:
parent
a1bf2f89c4
commit
14126e8fd6
5
layout/reftests/reftest-sanity/blank.html
Normal file
5
layout/reftests/reftest-sanity/blank.html
Normal file
@ -0,0 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
@ -19,3 +19,16 @@ HTTP != html-vs-xhtml-by-extension.html html-vs-xhtml-by-extension.xhtml
|
||||
!= green.html default.html
|
||||
!= green.html red.html
|
||||
!= red.html default.html
|
||||
|
||||
# Make sure about:blank works, even via HTTP.
|
||||
== blank.html about:blank
|
||||
== about:blank blank.html
|
||||
HTTP == blank.html about:blank
|
||||
HTTP == about:blank blank.html
|
||||
# same for data:
|
||||
== default.html data:text/html,<div>Text</div>
|
||||
== data:text/html,<div>Text</div> default.html
|
||||
HTTP == default.html data:text/html,<div>Text</div>
|
||||
HTTP == data:text/html,<div>Text</div> default.html
|
||||
!= blank.html default.html
|
||||
HTTP != blank.html default.html
|
||||
|
@ -281,11 +281,15 @@ function ServeFiles(manifestURL, directory, files)
|
||||
var secMan = CC[NS_SCRIPTSECURITYMANAGER_CONTRACTID]
|
||||
.getService(CI.nsIScriptSecurityManager);
|
||||
|
||||
var testbase =
|
||||
gIOService.newURI("http://localhost:" + HTTP_SERVER_PORT + path,
|
||||
null, null);
|
||||
|
||||
function FileToURI(file)
|
||||
{
|
||||
var testURI = gIOService.newURI("http://localhost:" + HTTP_SERVER_PORT +
|
||||
path + file,
|
||||
null, null);
|
||||
// Only serve relative URIs via the HTTP server, not absolute
|
||||
// ones like about:blank.
|
||||
var testURI = gIOService.newURI(file, null, testbase);
|
||||
|
||||
// XXX necessary? manifestURL guaranteed to be file, others always HTTP
|
||||
secMan.checkLoadURI(manifestURL, testURI,
|
||||
|
Loading…
Reference in New Issue
Block a user