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

Unified Diff: LayoutTests/transitions/svg-layout-transition.html

Issue 896773002: [svg2] Make 'x' and 'y' presentation attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: cleanup Created 5 years, 10 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: LayoutTests/transitions/svg-layout-transition.html
diff --git a/LayoutTests/transitions/svg-layout-transition.html b/LayoutTests/transitions/svg-layout-transition.html
new file mode 100644
index 0000000000000000000000000000000000000000..4f9d72fee92a5c7b01c886172b4475be7f568d9a
--- /dev/null
+++ b/LayoutTests/transitions/svg-layout-transition.html
@@ -0,0 +1,53 @@
+<!DOCTYPE>
+
+<html>
+<head>
+ <style>
+ .init {
+ transition-duration: 1s;
+ transition-timing-function: linear;
+ }
+
+ #x {
+ transition-property: x;
+ }
+ #x.final {
+ x: 200px;
+ }
+
+ #y {
+ transition-property: y;
+ }
+ #y.final {
+ y: 200px;
+ }
+ </style>
+ <script src="../animations/resources/animation-test-helpers.js"></script>
+ <script type="text/javascript">
+
+ const expectedValues = [
+ // [time, element-id, property, expected-value, tolerance]
+ [0.5, 'x', 'x', 150, 20],
+ [0.5, 'y', 'y', 150, 20],
+ ];
+
+ function setupTest()
+ {
+ document.getElementById('x').setAttribute('class', 'init final');
+ document.getElementById('y').setAttribute('class', 'init final');
+ }
+
+ runTransitionTest(expectedValues, setupTest);
+ </script>
+</head>
+<body>
+ <svg>
+ <rect x="100" y="100" width="100" height="100" class="init" id="x"/>
+ <rect x="100" y="100" width="100" height="100" class="init" id="y"/>
+ </svg>
+
+ <div id="result">
+ </div>
+
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698