Skip to content
Permalink
Browse files
2010-04-14 Adam Barth <abarth@webkit.org>
        Reviewed by Darin Fisher.

        Add LayoutTests for parsing "path" URLs
        https://bugs.webkit.org/show_bug.cgi?id=37581

        * fast/url/path-url-expected.txt: Added.
        * fast/url/path-url.html: Added.
        * fast/url/script-tests/path-url.js: Added.

Canonical link: https://commits.webkit.org/48874@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@57586 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
eseidel committed Apr 14, 2010
1 parent 746f6fc commit d25c61c65f152ca0a25d844ffe2b9a608d08f3a4
Showing 4 changed files with 53 additions and 0 deletions.
@@ -1,3 +1,14 @@
2010-04-14 Adam Barth <abarth@webkit.org>

Reviewed by Darin Fisher.

Add LayoutTests for parsing "path" URLs
https://bugs.webkit.org/show_bug.cgi?id=37581

* fast/url/path-url-expected.txt: Added.
* fast/url/path-url.html: Added.
* fast/url/script-tests/path-url.js: Added.

2010-04-14 Adam Barth <abarth@webkit.org>

Reviewed by Darin Fisher.
@@ -0,0 +1,11 @@
Canonicalization of path URLs

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


PASS canonicalize('javascript:') is 'javascript:'
FAIL canonicalize('JavaScript:Foo') should be javascript:Foo. Was JavaScript:Foo.
PASS successfullyParsed is true

TEST COMPLETE

@@ -0,0 +1,14 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<link rel="stylesheet" href="../js/resources/js-test-style.css">
<script src="../js/resources/js-test-pre.js"></script>
<script src="resources/utilities.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script src="script-tests/path-url.js"></script>
<script src="../js/resources/js-test-post.js"></script>
</body>
</html>
@@ -0,0 +1,17 @@
description("Canonicalization of path URLs");

cases = [
["javascript:", "javascript:"],
["JavaScript:Foo", "javascript:Foo"],
// Disabled because this gets treated as a relative URL.
// [":\":This /is interesting;?#", ":\":This /is interesting;?#"],
];

for (var i = 0; i < cases.length; ++i) {
test_vector = cases[i][0];
expected_result = cases[i][1];
shouldBe("canonicalize('" + test_vector + "')",
"'" + expected_result + "'");
}

var successfullyParsed = true;

0 comments on commit d25c61c

Please sign in to comment.