Index: third_party/WebKit/LayoutTests/svg/animations/animation-events.html |
diff --git a/third_party/WebKit/LayoutTests/fast/svg/script-tests/animation-events.js b/third_party/WebKit/LayoutTests/svg/animations/animation-events.html |
similarity index 80% |
rename from third_party/WebKit/LayoutTests/fast/svg/script-tests/animation-events.js |
rename to third_party/WebKit/LayoutTests/svg/animations/animation-events.html |
index 35a859f2f6074e72df6d941c3c29c55b0c4f4950..c3ec7ad28137096e9910ff86c57f918391574363 100644 |
--- a/third_party/WebKit/LayoutTests/fast/svg/script-tests/animation-events.js |
+++ b/third_party/WebKit/LayoutTests/svg/animations/animation-events.html |
@@ -1,3 +1,8 @@ |
+<!DOCTYPE html> |
+<title>EventHandlers on SVGAnimationElement test</title> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
+<script> |
function getObject(interface) { |
switch(interface) { |
case "SVGAnimateElement": |
@@ -71,3 +76,25 @@ function testEnumerate(interface, attribute) { |
assert_true(enumerableCache[interface][attribute]); |
}, "Enumerate " + interface + "." + attribute); |
} |
+ |
+var attributeToEventMap = { |
+ "onbegin" : "beginEvent", |
+ "onend" : "endEvent", |
+ "onrepeat" : "repeatEvent" |
+}; |
+ |
+for (var attribute in attributeToEventMap) { |
+ [ |
+ "SVGAnimateElement", |
+ "SVGAnimateMotionElement", |
+ "SVGAnimateTransformElement", |
+ "SVGSetElement" |
+ ].forEach(function(interface) { |
+ testSet(interface, attribute); |
+ testEnumerate(interface, attribute); |
+ testReflect(interface, attribute); |
+ }); |
+ |
+ testEventHandlerMapping(attribute, attributeToEventMap[attribute]); |
+} |
+</script> |