Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/HTMLImageElement/parse-src.html

Issue 2667393002: Stop using script-tests in fast/dom/. (Closed)
Patch Set: . Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/dom/HTMLImageElement/parse-src.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/HTMLImageElement/parse-src.html b/third_party/WebKit/LayoutTests/fast/dom/HTMLImageElement/parse-src.html
index e3e232a0a99b850ad0d3e962b825e077f18896cd..b8fe33b979f5052f262bcf6151e417e71d23816a 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/HTMLImageElement/parse-src.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/HTMLImageElement/parse-src.html
@@ -4,6 +4,30 @@
<script src="../../../resources/js-test.js"></script>
</head>
<body>
-<script src="script-tests/parse-src.js"></script>
+<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>

Powered by Google App Engine
This is Rietveld 408576698