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

Side by Side Diff: third_party/WebKit/LayoutTests/svg/animations/animation-events.html

Issue 2112373002: Fold fast/svg/script-tests/animation-events.js into the test using it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Actually move the test... Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/svg/script-tests/animation-events.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html>
2 <title>EventHandlers on SVGAnimationElement test</title>
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <script>
1 function getObject(interface) { 6 function getObject(interface) {
2 switch(interface) { 7 switch(interface) {
3 case "SVGAnimateElement": 8 case "SVGAnimateElement":
4 var e = document.createElementNS("http://www.w3.org/2000/svg", "anim ate"); 9 var e = document.createElementNS("http://www.w3.org/2000/svg", "anim ate");
5 assert_true(e instanceof SVGAnimateElement); 10 assert_true(e instanceof SVGAnimateElement);
6 return e; 11 return e;
7 case "SVGAnimateMotionElement": 12 case "SVGAnimateMotionElement":
8 var e = document.createElementNS("http://www.w3.org/2000/svg", "anim ateMotion"); 13 var e = document.createElementNS("http://www.w3.org/2000/svg", "anim ateMotion");
9 assert_true(e instanceof SVGAnimateMotionElement); 14 assert_true(e instanceof SVGAnimateMotionElement);
10 return e; 15 return e;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 } 69 }
65 var enumerableCache = {}; 70 var enumerableCache = {};
66 function testEnumerate(interface, attribute) { 71 function testEnumerate(interface, attribute) {
67 if (!(interface in enumerableCache)) { 72 if (!(interface in enumerableCache)) {
68 enumerableCache[interface] = getEnumerable(interface); 73 enumerableCache[interface] = getEnumerable(interface);
69 } 74 }
70 test(function() { 75 test(function() {
71 assert_true(enumerableCache[interface][attribute]); 76 assert_true(enumerableCache[interface][attribute]);
72 }, "Enumerate " + interface + "." + attribute); 77 }, "Enumerate " + interface + "." + attribute);
73 } 78 }
79
80 var attributeToEventMap = {
81 "onbegin" : "beginEvent",
82 "onend" : "endEvent",
83 "onrepeat" : "repeatEvent"
84 };
85
86 for (var attribute in attributeToEventMap) {
87 [
88 "SVGAnimateElement",
89 "SVGAnimateMotionElement",
90 "SVGAnimateTransformElement",
91 "SVGSetElement"
92 ].forEach(function(interface) {
93 testSet(interface, attribute);
94 testEnumerate(interface, attribute);
95 testReflect(interface, attribute);
96 });
97
98 testEventHandlerMapping(attribute, attributeToEventMap[attribute]);
99 }
100 </script>
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/svg/script-tests/animation-events.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698