Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: timelapse
Fetching contributors…

Cannot retrieve contributors at this time

78 lines (59 sloc) 2.642 kB
This tests the WebKitCSSKeyframeRule and WebKitCSSKeyframesRule interfaces.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS WebKitCSSKeyframeRule exists on Window object
PASS WebKitCSSKeyframesRule exists on Window object
PASS WEBKIT_KEYFRAME_RULE exists on Window.CSSRule object
PASS WEBKIT_KEYFRAMES_RULE exists on Window.CSSRule object
PASS keyframes1.type is window.CSSRule.WEBKIT_KEYFRAMES_RULE
PASS keyframes1.name is 'test1'
PASS rules1.length is 2
PASS rules1.item(0).type is window.CSSRule.WEBKIT_KEYFRAME_RULE
PASS rules1.item(0).cssText is '0% { left: 10px; }'
PASS rules1.item(1).cssText is '100% { left: 20px; }'
Insert three new rules
PASS rules1.length is 5
PASS rules1.item(0).cssText is '0% { left: 10px; }'
PASS rules1.item(1).cssText is '100% { left: 20px; }'
PASS rules1.item(2).cssText is '30% { left: 30px; }'
PASS rules1.item(3).cssText is '60% { left: 60px; }'
PASS rules1.item(4).cssText is '20% { left: 50px; }'
PASS keyframes2.type is window.CSSRule.WEBKIT_KEYFRAMES_RULE
PASS keyframes2.name is 'test2'
PASS rules2.length is 3
PASS rules2.item(0).type is window.CSSRule.WEBKIT_KEYFRAME_RULE
PASS rules2.item(0).keyText is '0%'
PASS rules2.item(1).keyText is '50%'
PASS rules2.item(2).keyText is '100%'
PASS rules2.item(0).cssText is '0% { left: 10px; }'
PASS rules2.item(1).cssText is '50% { left: 30px; }'
PASS rules2.item(2).cssText is '100% { left: 20px; }'
PASS rules2.item(0).style is an instance of CSSStyleDeclaration
PASS rules2.item(0).style.length is 1
Find a rule
PASS rule.type is window.CSSRule.WEBKIT_KEYFRAME_RULE
PASS rule.cssText is '50% { left: 30px; }'
Find a rule using from and to
PASS keyframesFromTo.type is window.CSSRule.WEBKIT_KEYFRAMES_RULE
PASS rule.type is window.CSSRule.WEBKIT_KEYFRAME_RULE
PASS rule.cssText is '0% { left: 10px; }'
PASS rule.type is window.CSSRule.WEBKIT_KEYFRAME_RULE
PASS rule.cssText is '100% { left: 20px; }'
Try to find a rule that doesn't exist
PASS Non-existent rule was not found
Delete a rule
PASS rules2.length is 2
PASS rules2.item(0).type is window.CSSRule.WEBKIT_KEYFRAME_RULE
PASS rules2.item(0).keyText is '0%'
PASS rules2.item(1).keyText is '100%'
Delete a from rule
PASS rulesFromTo.length is 2
PASS rulesFromTo.item(0).type is window.CSSRule.WEBKIT_KEYFRAME_RULE
PASS rulesFromTo.item(0).keyText is '50%'
PASS rulesFromTo.item(1).keyText is '100%'
Delete a rule that doesn't exist
PASS rules2.length is 2
PASS rules2.item(0).type is window.CSSRule.WEBKIT_KEYFRAME_RULE
PASS rules2.item(0).keyText is '0%'
PASS rules2.item(1).keyText is '100%'
PASS successfullyParsed is true
TEST COMPLETE
Jump to Line
Something went wrong with that request. Please try again.