Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
auto merge of #1583 : brunoabinader/servo/document-url, r=Ms2ger
Specs: http://dom.spec.whatwg.org/#dom-document-url http://dom.spec.whatwg.org/#dom-document-documenturi This is a sub-task for #1428.
- Loading branch information
Showing
7 changed files
with
64 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<title></title> | ||
<script src="harness.js"></script> | ||
<script> | ||
// test1: URL & documentURI | ||
{ | ||
isnot(document.URL, null, "test1-0, URL & documentURI"); | ||
isnot(document.documentURI, null, "test1-1, URL & documentURI"); | ||
is(document.URL, document.documentURI, "test1-2, URL & documentURI"); | ||
} | ||
|
||
// test2: new document | ||
{ | ||
var doc = new Document(); | ||
is(doc.URL, "about:blank", "test2-0, new document"); | ||
} | ||
|
||
// test3: current document | ||
{ | ||
var url = document.URL.split("/"); | ||
is(url[0], "file:", "test3-0, current document"); | ||
is(url[url.length-1], "test_document_url.html", "test3-1, current document"); | ||
} | ||
|
||
finish(); | ||
</script> | ||
</head> | ||
<body> | ||
</body> | ||
</html> |