blob: b8fe33b979f5052f262bcf6151e417e71d23816a [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../../resources/js-test.js"></script>
</head>
<body>
<script>
description('Test that when using the JavaScript bindings to get the value of a URL attribute such \
as \'src\', leading whitespace is ignored');
function testURL(attribute, url)
{
img[attribute] = url;
return img[attribute];
}
var img = new Image();
var url = "about:blank";
shouldBe('testURL("src", url)', 'url');
shouldBe('testURL("src", "\\n" + url)', 'url');
shouldBe('testURL("src", " " + url)', 'url');
shouldBe('testURL("lowsrc", url)', 'url');
shouldBe('testURL("lowsrc", "\\n" + url)', 'url');
shouldBe('testURL("lowsrc", " " + url)', 'url');
shouldBe('testURL("longDesc", url)', 'url');
shouldBe('testURL("longDesc", "\\n" + url)', 'url');
shouldBe('testURL("longDesc", " " + url)', 'url');
</script>
</body>
</html>