Index: LayoutTests/svg/animations/animation-begin-change-js.html |
diff --git a/LayoutTests/svg/animations/animation-begin-change-js.html b/LayoutTests/svg/animations/animation-begin-change-js.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..51c1d7a2e406c31fceff62f1f597efe30252baf9 |
--- /dev/null |
+++ b/LayoutTests/svg/animations/animation-begin-change-js.html |
@@ -0,0 +1,44 @@ |
+<!DOCTYPE html> |
+<title>Tests that animation works, if begin is set by js.</title> |
fs
2015/05/12 10:35:48
Try to make this describe the test better (it's ve
Shanmuga Pandi
2015/05/12 11:03:10
Done.
|
+<script src=../../resources/testharness.js></script> |
+<script src=../../resources/testharnessreport.js></script> |
+<svg> |
+ <rect id="rect" width="100" height="100"> |
+ <set id="anim" |
+ begin="indefinite" |
+ dur="0.05s" |
+ attributeName="width" |
+ to="50" |
+ fill="freeze"/> |
+ </rect> |
+</svg> |
+<script> |
+ document.getElementById("anim").setAttribute("begin","rect.click"); |
+ if (window.eventSender) { |
+ eventSender.mouseMoveTo(50, 50); |
+ eventSender.mouseDown(); |
+ eventSender.mouseUp(); |
+ } |
+ |
+ if (window.testRunner) { |
+ testRunner.displayAsyncThen(function() { |
+ dumpResult(); |
+ }); |
+ } |
+ |
+ function dumpResult() |
+ { |
+ var width = document.getElementById("rect").getAttribute("width"); |
+ test(function() { |
+ assert_not_equals(width, "100"); |
fs
2015/05/12 10:35:48
This is very atypical use of testharness I'd say.
Shanmuga Pandi
2015/05/12 11:03:10
Changed according to your suggestion. Thank you.
|
+ }, document.title); |
+ |
+ if (window.testRunner) |
+ testRunner.notifyDone(); |
+ } |
+ |
+ if (window.testRunner) { |
+ testRunner.dumpAsText(); |
+ testRunner.waitUntilDone(); |
+ } |
+</script> |