Chromium Code Reviews| Index: LayoutTests/fast/svg/script-tests/animation-events.js |
| diff --git a/LayoutTests/fast/dom/script-tests/event-handlers.js b/LayoutTests/fast/svg/script-tests/animation-events.js |
| similarity index 52% |
| copy from LayoutTests/fast/dom/script-tests/event-handlers.js |
| copy to LayoutTests/fast/svg/script-tests/animation-events.js |
| index d3d724999ab70da9b3e2d0b7a446a5d61c7084b7..32a1f7a6b7e6c2c1ae0e1086d362e188a595b923 100644 |
| --- a/LayoutTests/fast/dom/script-tests/event-handlers.js |
| +++ b/LayoutTests/fast/svg/script-tests/animation-events.js |
| @@ -1,37 +1,21 @@ |
| function getObject(interface) { |
| switch(interface) { |
| - case "Element": |
| - var e = document.createElementNS("http://example.com/", "example"); |
| - assert_true(e instanceof Element); |
| - assert_false(e instanceof HTMLElement); |
| - assert_false(e instanceof SVGElement); |
| + case "SVGAnimateElement": |
|
fs
2014/03/17 14:35:27
Alternatively extend the "original" getObject with
Erik Dahlström (inactive)
2014/03/17 15:52:37
You mean add to LayoutTests/fast/dom/script-tests/
|
| + var e = document.createElementNS("http://www.w3.org/2000/svg", "animate"); |
| + assert_true(e instanceof SVGAnimateElement); |
| return e; |
| - case "HTMLElement": |
| - var e = document.createElement("html"); |
| - assert_true(e instanceof HTMLElement); |
| + case "SVGAnimateMotionElement": |
| + var e = document.createElementNS("http://www.w3.org/2000/svg", "animateMotion"); |
| + assert_true(e instanceof SVGAnimateMotionElement); |
| return e; |
| - case "HTMLBodyElement": |
| - var e = document.createElement("body"); |
| - assert_true(e instanceof HTMLBodyElement); |
| + case "SVGAnimateTransformElement": |
| + var e = document.createElementNS("http://www.w3.org/2000/svg", "animateTransform"); |
| + assert_true(e instanceof SVGAnimateTransformElement); |
| return e; |
| - case "HTMLFormElement": |
| - var e = document.createElement("form"); |
| - assert_true(e instanceof HTMLFormElement); |
| + case "SVGSetElement": |
| + var e = document.createElementNS("http://www.w3.org/2000/svg", "set"); |
| + assert_true(e instanceof SVGSetElement); |
| return e; |
| - case "HTMLFrameSetElement": |
| - var e = document.createElement("frameset"); |
| - assert_true(e instanceof HTMLFrameSetElement); |
| - return e; |
| - case "SVGElement": |
| - var e = document.createElementNS("http://www.w3.org/2000/svg", "rect"); |
| - assert_true(e instanceof SVGElement); |
| - return e; |
| - case "Document": |
| - assert_true(document instanceof Document); |
| - return document; |
| - case "Window": |
| - assert_true(window instanceof Window); |
| - return window; |
| } |
| assert_unreached(); |
| } |
| @@ -58,19 +42,6 @@ function testReflect(interface, attribute) { |
| element.removeAttribute(attribute); |
| }, "Reflect " + interface + "." + attribute); |
| } |
| -function testForwardToWindow(interface, attribute) { |
| - test(function() { |
| - var element = getObject(interface); |
| - window[attribute] = null; |
| - element.setAttribute(attribute, "return"); |
| - assert_equals(typeof window[attribute], "function", "Convert to function"); |
| - assert_equals(window[attribute], element[attribute], "Forward content attribute"); |
| - function nop() {} |
| - element[attribute] = nop; |
| - assert_equals(window[attribute], nop, "Forward IDL attribute"); |
| - window[attribute] = null; |
| - }, "Forward " + interface + "." + attribute + " to Window"); |
| -} |
| // Object.propertyIsEnumerable cannot be used because it doesn't |
| // work with properties inherited through the prototype chain. |
| function getEnumerable(interface) { |