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

Unified Diff: LayoutTests/fast/svg/linear-gradient-default-length.html

Issue 1083893002: The default for x1, y1 and y2 is 0% for LinearGradient (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: small nits Created 5 years, 8 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
« no previous file with comments | « no previous file | Source/core/svg/SVGLinearGradientElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/svg/linear-gradient-default-length.html
diff --git a/LayoutTests/fast/svg/linear-gradient-default-length.html b/LayoutTests/fast/svg/linear-gradient-default-length.html
new file mode 100644
index 0000000000000000000000000000000000000000..9a2a698301d2b53b2bd446c78162062a5473ab27
--- /dev/null
+++ b/LayoutTests/fast/svg/linear-gradient-default-length.html
@@ -0,0 +1,22 @@
+<!doctype html>
+<title>SVGlength tests</title>
fs 2015/04/14 10:24:15 Could be more specific. Maybe something like: "SVG
Shanmuga Pandi 2015/04/14 10:41:37 Done.
+<script src=../../resources/testharness.js></script>
+<script src=../../resources/testharnessreport.js></script>
+<div id="testcontainer">
fs 2015/04/14 10:24:15 Useful for?
Shanmuga Pandi 2015/04/14 10:41:37 Removed
+<svg width="1" height="1" visibility="hidden">
fs 2015/04/14 10:24:15 These attributes doesn't seem useful for anything.
Shanmuga Pandi 2015/04/14 10:41:37 Removed unneeded attributes
+ <linearGradient id="lg"/>
+</svg>
+</div>
+<div id=log></div>
fs 2015/04/14 10:24:15 Not needed.
Shanmuga Pandi 2015/04/14 10:41:37 Acknowledged.
+<script>
+function testLengthValue(result,expected, testcase) {
Erik Dahlström (inactive) 2015/04/14 09:27:46 nit: add a space after the comma
Shanmuga Pandi 2015/04/14 09:30:17 Done.
+ test(function() {
+ assert_equals(result, expected);
+ }, testcase);
fs 2015/04/14 10:24:15 With a better <title> you might do: document.title
Shanmuga Pandi 2015/04/14 10:41:37 Done.
+}
+
+testLengthValue(document.querySelector("#lg").x1.baseVal.valueAsString, "0%", "linearGradient.x1");
fs 2015/04/14 10:24:15 Maybe first do: var linearGradient = document.que
Shanmuga Pandi 2015/04/14 10:41:37 Done.
+testLengthValue(document.querySelector("#lg").x2.baseVal.valueAsString, "100%", "linearGradient.x2");
+testLengthValue(document.querySelector("#lg").y1.baseVal.valueAsString, "0%", "linearGradient.y1");
+testLengthValue(document.querySelector("#lg").y2.baseVal.valueAsString, "0%", "linearGradient.y2");
+</script>
« no previous file with comments | « no previous file | Source/core/svg/SVGLinearGradientElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698