polymer-paper-rails 0.2.0 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/components/core-a11y-keys/core-a11y-keys.html +335 -0
- data/app/assets/components/core-animation/core-animation.html +7 -6
- data/app/assets/components/core-animation/web-animations.html +1 -1
- data/app/assets/components/core-collapse/core-collapse.html +41 -5
- data/app/assets/components/core-component-page/core-component-page.html +1 -1
- data/app/assets/components/core-drawer-panel/core-drawer-panel.css +14 -9
- data/app/assets/components/core-drawer-panel/core-drawer-panel.html +76 -21
- data/app/assets/components/core-drawer-panel/metadata.html +1 -1
- data/app/assets/components/core-dropdown/core-dropdown-base.html +117 -0
- data/app/assets/components/core-dropdown/core-dropdown.html +305 -0
- data/app/assets/components/core-dropdown/metadata.html +62 -0
- data/app/assets/components/core-elements/paper-elements.html +2 -0
- data/app/assets/components/core-focusable/core-focusable.html +4 -0
- data/app/assets/components/core-focusable/core-focusable.js +134 -0
- data/app/assets/components/core-focusable/polymer-mixin.js +35 -0
- data/app/assets/components/core-header-panel/core-header-panel.css +6 -3
- data/app/assets/components/core-header-panel/core-header-panel.html +96 -44
- data/app/assets/components/core-header-panel/metadata.html +1 -1
- data/app/assets/components/core-icon/core-icon.html +19 -5
- data/app/assets/components/core-icons/av-icons.html +57 -31
- data/app/assets/components/core-icons/communication-icons.html +42 -44
- data/app/assets/components/core-icons/core-icons.html +267 -263
- data/app/assets/components/core-icons/device-icons.html +90 -44
- data/app/assets/components/core-icons/editor-icons.html +52 -52
- data/app/assets/components/core-icons/hardware-icons.html +42 -43
- data/app/assets/components/core-icons/image-icons.html +140 -130
- data/app/assets/components/core-icons/maps-icons.html +57 -54
- data/app/assets/components/core-icons/notification-icons.html +34 -35
- data/app/assets/components/core-icons/social-icons.html +38 -37
- data/app/assets/components/core-iconset-svg/core-iconset-svg.html +1 -1
- data/app/assets/components/core-input/core-input.css +3 -7
- data/app/assets/components/core-input/core-input.html +105 -411
- data/app/assets/components/core-input/metadata.html +6 -3
- data/app/assets/components/core-item/core-item.css +7 -6
- data/app/assets/components/core-item/core-item.html +4 -5
- data/app/assets/components/core-item/metadata.html +1 -1
- data/app/assets/components/core-label/core-label.html +124 -0
- data/app/assets/components/core-menu/core-menu.css +3 -3
- data/app/assets/components/core-menu/core-menu.html +8 -2
- data/app/assets/components/core-menu/core-submenu.css +14 -0
- data/app/assets/components/core-menu/core-submenu.html +21 -1
- data/app/assets/components/core-overlay/core-overlay-layer.html +1 -0
- data/app/assets/components/core-overlay/core-overlay.html +163 -90
- data/app/assets/components/core-overlay/gulpfile.js +2 -0
- data/app/assets/components/core-overlay/tests/html/core-overlay-basic.html +127 -0
- data/app/assets/components/core-overlay/tests/html/core-overlay-positioning-margin.html +153 -0
- data/app/assets/components/core-overlay/tests/html/core-overlay-positioning.html +167 -0
- data/app/assets/components/core-overlay/tests/html/core-overlay-scroll.html +130 -0
- data/app/assets/components/core-overlay/tests/js/htmltests.js +6 -0
- data/app/assets/components/core-overlay/tests/runner.html +14 -0
- data/app/assets/components/core-overlay/tests/tests.json +6 -0
- data/app/assets/components/core-scroll-header-panel/core-scroll-header-panel.html +45 -9
- data/app/assets/components/core-scroll-header-panel/metadata.html +1 -1
- data/app/assets/components/core-selector/core-selector.html +116 -28
- data/app/assets/components/core-selector/metadata.html +1 -1
- data/app/assets/components/core-style/core-style.html +4 -4
- data/app/assets/components/core-style/elements.html +1 -1
- data/app/assets/components/core-style/my-theme.html +1 -1
- data/app/assets/components/core-toolbar/core-toolbar.css +14 -7
- data/app/assets/components/core-toolbar/core-toolbar.html +88 -7
- data/app/assets/components/core-toolbar/metadata.html +1 -1
- data/app/assets/components/core-transition/core-transition-css.html +1 -2
- data/app/assets/components/core-transition/core-transition-overlay.css +9 -9
- data/app/assets/components/core-transition/core-transition.html +1 -1
- data/app/assets/components/font-roboto/roboto.html +1 -1
- data/app/assets/components/paper-button/metadata.html +2 -2
- data/app/assets/components/paper-button/paper-button-base.html +120 -0
- data/app/assets/components/paper-button/paper-button.html +114 -145
- data/app/assets/components/paper-checkbox/paper-checkbox.css +1 -1
- data/app/assets/components/paper-dialog/paper-action-dialog.html +104 -0
- data/app/assets/components/paper-dialog/paper-dialog-base.html +81 -0
- data/app/assets/components/paper-dialog/paper-dialog-transition.html +1 -1
- data/app/assets/components/paper-dialog/paper-dialog.html +68 -143
- data/app/assets/components/{paper-dropdown/paper-dropdown.css → paper-dropdown-menu/paper-dropdown-menu.css} +1 -5
- data/app/assets/components/paper-dropdown-menu/paper-dropdown-menu.html +181 -0
- data/app/assets/components/{polymer/polymer.html → paper-dropdown/paper-dropdown-transition.css} +9 -7
- data/app/assets/components/paper-dropdown/paper-dropdown-transition.html +166 -0
- data/app/assets/components/paper-dropdown/paper-dropdown.html +69 -143
- data/app/assets/components/paper-fab/metadata.html +1 -1
- data/app/assets/components/paper-fab/paper-fab.html +140 -16
- data/app/assets/components/paper-icon-button/paper-icon-button.html +99 -32
- data/app/assets/components/paper-input/metadata.html +1 -4
- data/app/assets/components/paper-input/paper-autogrow-textarea.html +157 -0
- data/app/assets/components/paper-input/{paper-input.css → paper-input-decorator.css} +25 -25
- data/app/assets/components/paper-input/paper-input-decorator.html +468 -0
- data/app/assets/components/paper-input/paper-input.html +74 -269
- data/app/assets/components/paper-item/metadata.html +1 -1
- data/app/assets/components/paper-item/paper-item.html +95 -52
- data/app/assets/components/paper-menu-button/metadata.html +1 -1
- data/app/assets/components/paper-menu-button/paper-menu-button.css +38 -19
- data/app/assets/components/paper-menu-button/paper-menu-button.html +57 -138
- data/app/assets/components/paper-progress/paper-progress.css +39 -6
- data/app/assets/components/paper-progress/paper-progress.html +30 -4
- data/app/assets/components/paper-radio-button/paper-radio-button.html +3 -0
- data/app/assets/components/paper-radio-group/paper-radio-group.html +34 -1
- data/app/assets/components/paper-ripple/paper-ripple.html +110 -61
- data/app/assets/components/paper-shadow/metadata.html +2 -2
- data/app/assets/components/paper-shadow/paper-shadow.css +20 -45
- data/app/assets/components/paper-shadow/paper-shadow.html +55 -195
- data/app/assets/components/paper-slider/paper-slider.css +15 -1
- data/app/assets/components/paper-slider/paper-slider.html +98 -57
- data/app/assets/components/paper-spinner/paper-spinner.css +311 -0
- data/app/assets/components/paper-spinner/paper-spinner.html +116 -0
- data/app/assets/components/paper-tabs/paper-tab.css +26 -16
- data/app/assets/components/paper-tabs/paper-tab.html +24 -8
- data/app/assets/components/paper-tabs/paper-tabs.css +31 -13
- data/app/assets/components/paper-tabs/paper-tabs.html +217 -20
- data/app/assets/components/paper-toast/paper-toast.html +44 -6
- data/app/assets/components/paper-toggle-button/paper-toggle-button.css +7 -1
- data/app/assets/components/paper-toggle-button/paper-toggle-button.html +12 -2
- data/app/assets/components/sampler-scaffold/sampler-scaffold.css +2 -1
- data/app/assets/components/web-animations-next/Gruntfile.js +279 -0
- data/app/assets/components/web-animations-next/History.md +76 -0
- data/app/assets/components/web-animations-next/package.json +33 -0
- data/app/assets/components/web-animations-next/src/animation-constructor.js +139 -0
- data/app/assets/components/web-animations-next/src/animation-node.js +31 -0
- data/app/assets/components/web-animations-next/src/animation.js +65 -0
- data/app/assets/components/web-animations-next/src/apply-preserving-inline-style.js +192 -0
- data/app/assets/components/web-animations-next/src/apply.js +25 -0
- data/app/assets/components/web-animations-next/src/box-handler.js +57 -0
- data/app/assets/components/web-animations-next/src/color-handler.js +62 -0
- data/app/assets/components/web-animations-next/src/deprecation.js +42 -0
- data/app/assets/components/web-animations-next/src/dev.js +16 -0
- data/app/assets/components/web-animations-next/src/dimension-handler.js +167 -0
- data/app/assets/components/web-animations-next/src/effect-callback.js +86 -0
- data/app/assets/components/web-animations-next/src/effect.js +110 -0
- data/app/assets/components/web-animations-next/src/element-animatable.js +19 -0
- data/app/assets/components/web-animations-next/src/font-weight-handler.js +42 -0
- data/app/assets/components/web-animations-next/src/group-constructors.js +81 -0
- data/app/assets/components/web-animations-next/src/handler-utils.js +177 -0
- data/app/assets/components/web-animations-next/src/interpolation.js +49 -0
- data/app/assets/components/web-animations-next/src/matrix-decomposition.js +452 -0
- data/app/assets/components/web-animations-next/src/matrix-interpolation.js +130 -0
- data/app/assets/components/web-animations-next/src/maxifill-player.js +162 -0
- data/app/assets/components/web-animations-next/src/normalize-keyframes.js +259 -0
- data/app/assets/components/web-animations-next/src/number-handler.js +72 -0
- data/app/assets/components/web-animations-next/src/player.js +193 -0
- data/app/assets/components/web-animations-next/src/position-handler.js +117 -0
- data/app/assets/components/web-animations-next/src/property-interpolation.js +62 -0
- data/app/assets/components/web-animations-next/src/property-names.js +35 -0
- data/app/assets/components/web-animations-next/src/scope.js +20 -0
- data/app/assets/components/web-animations-next/src/shadow-handler.js +108 -0
- data/app/assets/components/web-animations-next/src/shape-handler.js +85 -0
- data/app/assets/components/web-animations-next/src/tick.js +148 -0
- data/app/assets/components/web-animations-next/src/timeline.js +77 -0
- data/app/assets/components/web-animations-next/src/timing-utilities.js +242 -0
- data/app/assets/components/web-animations-next/src/transform-handler.js +262 -0
- data/app/assets/components/web-animations-next/src/visibility-handler.js +29 -0
- data/app/assets/components/web-animations-next/target-config.js +124 -0
- data/app/assets/components/web-animations-next/target-loader.js +13 -0
- data/app/assets/components/web-animations-next/templates/boilerplate +13 -0
- data/app/assets/components/web-animations-next/templates/runner.html +26 -0
- data/app/assets/components/web-animations-next/templates/web-animations.html +18 -0
- data/app/assets/components/web-animations-next/templates/web-animations.js +21 -0
- data/app/assets/components/web-animations-next/web-animations-next-lite.dev.html +44 -0
- data/app/assets/components/web-animations-next/web-animations-next-lite.dev.js +21 -0
- data/app/assets/components/web-animations-next/web-animations-next.dev.html +49 -0
- data/app/assets/components/web-animations-next/web-animations-next.dev.js +21 -0
- data/app/assets/components/web-animations-next/web-animations.dev.html +44 -0
- data/app/assets/components/web-animations-next/web-animations.dev.js +21 -0
- data/app/assets/components/web-animations-next/web-animations.html +50 -0
- data/lib/polymer-paper-rails/version.rb +1 -1
- metadata +82 -421
- data/app/assets/components/core-animation/README.md +0 -4
- data/app/assets/components/core-animation/bower.json +0 -8
- data/app/assets/components/core-animation/demo.html +0 -149
- data/app/assets/components/core-animation/index.html +0 -22
- data/app/assets/components/core-collapse/README.md +0 -4
- data/app/assets/components/core-collapse/bower.json +0 -7
- data/app/assets/components/core-collapse/demo.html +0 -93
- data/app/assets/components/core-collapse/index.html +0 -22
- data/app/assets/components/core-component-page/README.md +0 -6
- data/app/assets/components/core-component-page/bower.json +0 -8
- data/app/assets/components/core-component-page/demo.html +0 -23
- data/app/assets/components/core-component-page/index.html +0 -22
- data/app/assets/components/core-drawer-panel/README.md +0 -4
- data/app/assets/components/core-drawer-panel/bower.json +0 -8
- data/app/assets/components/core-drawer-panel/demo.html +0 -73
- data/app/assets/components/core-drawer-panel/index.html +0 -22
- data/app/assets/components/core-elements/README.md +0 -4
- data/app/assets/components/core-elements/bower.json +0 -29
- data/app/assets/components/core-elements/demo.html +0 -105
- data/app/assets/components/core-elements/demos/core-toolbar.html +0 -98
- data/app/assets/components/core-field/README.md +0 -4
- data/app/assets/components/core-field/bower.json +0 -7
- data/app/assets/components/core-field/demo.html +0 -67
- data/app/assets/components/core-field/index.html +0 -22
- data/app/assets/components/core-header-panel/README.md +0 -4
- data/app/assets/components/core-header-panel/bower.json +0 -7
- data/app/assets/components/core-header-panel/demo.html +0 -100
- data/app/assets/components/core-header-panel/index.html +0 -23
- data/app/assets/components/core-icon-button/README.md +0 -4
- data/app/assets/components/core-icon-button/bower.json +0 -7
- data/app/assets/components/core-icon-button/demo.html +0 -35
- data/app/assets/components/core-icon-button/index.html +0 -22
- data/app/assets/components/core-icon/README.md +0 -4
- data/app/assets/components/core-icon/bower.json +0 -8
- data/app/assets/components/core-icon/demo.html +0 -44
- data/app/assets/components/core-icon/index.html +0 -22
- data/app/assets/components/core-icons/README.md +0 -4
- data/app/assets/components/core-icons/bower.json +0 -9
- data/app/assets/components/core-icons/demo.html +0 -96
- data/app/assets/components/core-icons/index.html +0 -22
- data/app/assets/components/core-iconset-svg/README.md +0 -4
- data/app/assets/components/core-iconset-svg/bower.json +0 -8
- data/app/assets/components/core-iconset-svg/demo.html +0 -66
- data/app/assets/components/core-iconset-svg/index.html +0 -22
- data/app/assets/components/core-iconset/README.md +0 -4
- data/app/assets/components/core-iconset/bower.json +0 -9
- data/app/assets/components/core-iconset/demo.html +0 -62
- data/app/assets/components/core-iconset/index.html +0 -22
- data/app/assets/components/core-input/README.md +0 -2
- data/app/assets/components/core-input/bower.json +0 -6
- data/app/assets/components/core-input/demo.html +0 -142
- data/app/assets/components/core-input/index.html +0 -22
- data/app/assets/components/core-item/README.md +0 -4
- data/app/assets/components/core-item/bower.json +0 -8
- data/app/assets/components/core-item/demo.html +0 -92
- data/app/assets/components/core-item/index.html +0 -22
- data/app/assets/components/core-media-query/README.md +0 -4
- data/app/assets/components/core-media-query/bower.json +0 -7
- data/app/assets/components/core-media-query/demo.html +0 -44
- data/app/assets/components/core-media-query/index.html +0 -22
- data/app/assets/components/core-menu/README.md +0 -4
- data/app/assets/components/core-menu/bower.json +0 -9
- data/app/assets/components/core-menu/demo.html +0 -101
- data/app/assets/components/core-menu/index.html +0 -22
- data/app/assets/components/core-meta/README.md +0 -4
- data/app/assets/components/core-meta/bower.json +0 -7
- data/app/assets/components/core-meta/demo.html +0 -58
- data/app/assets/components/core-meta/index.html +0 -22
- data/app/assets/components/core-overlay/README.md +0 -4
- data/app/assets/components/core-overlay/bower.json +0 -8
- data/app/assets/components/core-overlay/demo.html +0 -155
- data/app/assets/components/core-overlay/index.html +0 -22
- data/app/assets/components/core-popup-menu/README.md +0 -6
- data/app/assets/components/core-popup-menu/bower.json +0 -13
- data/app/assets/components/core-popup-menu/demo.html +0 -542
- data/app/assets/components/core-popup-menu/index.html +0 -22
- data/app/assets/components/core-range/README.md +0 -2
- data/app/assets/components/core-range/bower.json +0 -7
- data/app/assets/components/core-range/demo.html +0 -64
- data/app/assets/components/core-range/index.html +0 -22
- data/app/assets/components/core-scroll-header-panel/README.md +0 -4
- data/app/assets/components/core-scroll-header-panel/bower.json +0 -11
- data/app/assets/components/core-scroll-header-panel/demo.html +0 -111
- data/app/assets/components/core-scroll-header-panel/demos/demo1.html +0 -80
- data/app/assets/components/core-scroll-header-panel/demos/demo2.html +0 -82
- data/app/assets/components/core-scroll-header-panel/demos/demo3.html +0 -81
- data/app/assets/components/core-scroll-header-panel/demos/demo4.html +0 -109
- data/app/assets/components/core-scroll-header-panel/demos/demo5.html +0 -109
- data/app/assets/components/core-scroll-header-panel/demos/demo6.html +0 -113
- data/app/assets/components/core-scroll-header-panel/demos/demo7.html +0 -120
- data/app/assets/components/core-scroll-header-panel/demos/demo8.html +0 -122
- data/app/assets/components/core-scroll-header-panel/demos/demo9.html +0 -100
- data/app/assets/components/core-scroll-header-panel/demos/images/bg2.jpg +0 -0
- data/app/assets/components/core-scroll-header-panel/demos/images/bg3.jpg +0 -0
- data/app/assets/components/core-scroll-header-panel/demos/images/bg5.jpg +0 -0
- data/app/assets/components/core-scroll-header-panel/demos/images/bg6.jpg +0 -0
- data/app/assets/components/core-scroll-header-panel/demos/images/bg9.jpg +0 -0
- data/app/assets/components/core-scroll-header-panel/demos/lorem-ipsum.html +0 -42
- data/app/assets/components/core-scroll-header-panel/index.html +0 -22
- data/app/assets/components/core-selection/README.md +0 -4
- data/app/assets/components/core-selection/bower.json +0 -7
- data/app/assets/components/core-selection/demo.html +0 -59
- data/app/assets/components/core-selection/index.html +0 -22
- data/app/assets/components/core-selector/README.md +0 -4
- data/app/assets/components/core-selector/bower.json +0 -8
- data/app/assets/components/core-selector/demo.html +0 -106
- data/app/assets/components/core-selector/index.html +0 -22
- data/app/assets/components/core-style/README.md +0 -4
- data/app/assets/components/core-style/bower.json +0 -7
- data/app/assets/components/core-style/demo.html +0 -58
- data/app/assets/components/core-style/index.html +0 -22
- data/app/assets/components/core-toolbar/README.md +0 -4
- data/app/assets/components/core-toolbar/bower.json +0 -7
- data/app/assets/components/core-toolbar/demo.html +0 -107
- data/app/assets/components/core-toolbar/index.html +0 -22
- data/app/assets/components/core-transition/README.md +0 -2
- data/app/assets/components/core-transition/bower.json +0 -8
- data/app/assets/components/core-transition/demo.html +0 -87
- data/app/assets/components/core-transition/index.html +0 -22
- data/app/assets/components/paper-button/README.md +0 -4
- data/app/assets/components/paper-button/bower.json +0 -11
- data/app/assets/components/paper-button/demo.html +0 -99
- data/app/assets/components/paper-button/demo2.html +0 -136
- data/app/assets/components/paper-button/index.html +0 -22
- data/app/assets/components/paper-button/paper-button.css +0 -125
- data/app/assets/components/paper-checkbox/README.md +0 -4
- data/app/assets/components/paper-checkbox/bower.json +0 -8
- data/app/assets/components/paper-checkbox/demo.html +0 -113
- data/app/assets/components/paper-checkbox/index.html +0 -22
- data/app/assets/components/paper-dialog/README.md +0 -4
- data/app/assets/components/paper-dialog/bower.json +0 -10
- data/app/assets/components/paper-dialog/demo.html +0 -85
- data/app/assets/components/paper-dialog/index.html +0 -22
- data/app/assets/components/paper-dialog/paper-dialog.css +0 -52
- data/app/assets/components/paper-dropdown/README.md +0 -9
- data/app/assets/components/paper-dropdown/bower.json +0 -12
- data/app/assets/components/paper-dropdown/demo.html +0 -345
- data/app/assets/components/paper-dropdown/index.html +0 -22
- data/app/assets/components/paper-fab/README.md +0 -4
- data/app/assets/components/paper-fab/bower.json +0 -8
- data/app/assets/components/paper-fab/demo.html +0 -72
- data/app/assets/components/paper-fab/demo2.html +0 -103
- data/app/assets/components/paper-fab/index.html +0 -22
- data/app/assets/components/paper-fab/paper-fab.css +0 -36
- data/app/assets/components/paper-focusable/README.md +0 -4
- data/app/assets/components/paper-focusable/bower.json +0 -7
- data/app/assets/components/paper-focusable/demo.html +0 -155
- data/app/assets/components/paper-icon-button/README.md +0 -4
- data/app/assets/components/paper-icon-button/bower.json +0 -9
- data/app/assets/components/paper-icon-button/demo.html +0 -102
- data/app/assets/components/paper-icon-button/index.html +0 -22
- data/app/assets/components/paper-icon-button/paper-icon-button.css +0 -17
- data/app/assets/components/paper-icon-button/pulse-ink.css +0 -20
- data/app/assets/components/paper-input/README.md +0 -4
- data/app/assets/components/paper-input/bower.json +0 -11
- data/app/assets/components/paper-input/demo.html +0 -124
- data/app/assets/components/paper-input/index.html +0 -22
- data/app/assets/components/paper-item/README.md +0 -4
- data/app/assets/components/paper-item/bower.json +0 -9
- data/app/assets/components/paper-item/demo.html +0 -39
- data/app/assets/components/paper-item/index.html +0 -22
- data/app/assets/components/paper-item/paper-item.css +0 -43
- data/app/assets/components/paper-menu-button/README.md +0 -4
- data/app/assets/components/paper-menu-button/bower.json +0 -16
- data/app/assets/components/paper-menu-button/demo.html +0 -95
- data/app/assets/components/paper-menu-button/index.html +0 -22
- data/app/assets/components/paper-menu-button/paper-menu-button-transition.css +0 -19
- data/app/assets/components/paper-menu-button/paper-menu-button-transition.html +0 -123
- data/app/assets/components/paper-progress/README.md +0 -4
- data/app/assets/components/paper-progress/bower.json +0 -8
- data/app/assets/components/paper-progress/demo.html +0 -107
- data/app/assets/components/paper-progress/index.html +0 -22
- data/app/assets/components/paper-radio-button/README.md +0 -4
- data/app/assets/components/paper-radio-button/bower.json +0 -7
- data/app/assets/components/paper-radio-button/demo.html +0 -75
- data/app/assets/components/paper-radio-button/index.html +0 -22
- data/app/assets/components/paper-radio-group/README.md +0 -4
- data/app/assets/components/paper-radio-group/bower.json +0 -9
- data/app/assets/components/paper-radio-group/demo.html +0 -82
- data/app/assets/components/paper-radio-group/index.html +0 -22
- data/app/assets/components/paper-ripple/README.md +0 -4
- data/app/assets/components/paper-ripple/bower.json +0 -9
- data/app/assets/components/paper-ripple/demo.html +0 -418
- data/app/assets/components/paper-ripple/index.html +0 -22
- data/app/assets/components/paper-ripple/raw.html +0 -799
- data/app/assets/components/paper-shadow/README.md +0 -4
- data/app/assets/components/paper-shadow/bower.json +0 -7
- data/app/assets/components/paper-shadow/demo.html +0 -252
- data/app/assets/components/paper-shadow/index.html +0 -22
- data/app/assets/components/paper-slider/README.md +0 -4
- data/app/assets/components/paper-slider/bower.json +0 -9
- data/app/assets/components/paper-slider/demo.html +0 -151
- data/app/assets/components/paper-slider/index.html +0 -22
- data/app/assets/components/paper-tabs/README.md +0 -4
- data/app/assets/components/paper-tabs/bower.json +0 -12
- data/app/assets/components/paper-tabs/demo.html +0 -166
- data/app/assets/components/paper-tabs/index.html +0 -22
- data/app/assets/components/paper-toast/README.md +0 -4
- data/app/assets/components/paper-toast/bower.json +0 -10
- data/app/assets/components/paper-toast/demo.html +0 -67
- data/app/assets/components/paper-toast/index.html +0 -22
- data/app/assets/components/paper-toggle-button/README.md +0 -4
- data/app/assets/components/paper-toggle-button/bower.json +0 -8
- data/app/assets/components/paper-toggle-button/demo.html +0 -77
- data/app/assets/components/paper-toggle-button/index.html +0 -22
- data/app/assets/components/platform/README.md +0 -6
- data/app/assets/components/platform/bower.json +0 -16
- data/app/assets/components/platform/build.log +0 -35
- data/app/assets/components/platform/platform.js.map +0 -1
- data/app/assets/components/polymer/README.md +0 -17
- data/app/assets/components/polymer/bower.json +0 -8
- data/app/assets/components/polymer/build.log +0 -35
- data/app/assets/components/polymer/layout.html +0 -286
- data/app/assets/components/polymer/polymer.js +0 -14
- data/app/assets/components/polymer/polymer.js.map +0 -1
- data/app/assets/components/sampler-scaffold/README.md +0 -4
- data/app/assets/components/sampler-scaffold/bower.json +0 -12
- data/app/assets/components/sampler-scaffold/demo.html +0 -54
- data/app/assets/components/sampler-scaffold/demos/checkbox.html +0 -20
- data/app/assets/components/sampler-scaffold/demos/color.html +0 -20
- data/app/assets/components/sampler-scaffold/demos/radio.html +0 -20
- data/app/assets/components/sampler-scaffold/demos/range.html +0 -20
- data/app/assets/components/sampler-scaffold/demos/string.html +0 -20
- data/app/assets/components/sampler-scaffold/index.html +0 -22
- data/app/assets/components/web-animations-js/COPYING +0 -202
- data/app/assets/components/web-animations-js/README.md +0 -237
- data/app/assets/components/web-animations-js/run-lint.sh +0 -19
- data/app/assets/components/web-animations-js/run-tests-android.sh +0 -25
- data/app/assets/components/web-animations-js/run-tests.sh +0 -15
- data/app/assets/components/web-animations-js/test/bootstrap.js +0 -1266
- data/app/assets/components/web-animations-js/test/img/error.png +0 -0
- data/app/assets/components/web-animations-js/test/img/success.png +0 -0
- data/app/assets/components/web-animations-js/test/img/unknown.png +0 -0
- data/app/assets/components/web-animations-js/test/perf/balls-add-compositing.html +0 -147
- data/app/assets/components/web-animations-js/test/perf/balls-replace-compositing.html +0 -144
- data/app/assets/components/web-animations-js/test/perf/perf.js +0 -158
- data/app/assets/components/web-animations-js/test/perf/updating-inline-style-during-animation.html +0 -165
- data/app/assets/components/web-animations-js/test/test-generator.html +0 -240
- data/app/assets/components/web-animations-js/test/test-results-post.html +0 -3
- data/app/assets/components/web-animations-js/test/test-runner.html +0 -810
- data/app/assets/components/web-animations-js/test/testcases.js +0 -93
- data/app/assets/components/web-animations-js/test/testcases/auto-test-box-shadow-checks.js +0 -42
- data/app/assets/components/web-animations-js/test/testcases/auto-test-box-shadow.html +0 -40
- data/app/assets/components/web-animations-js/test/testcases/auto-test-calc-checks.js +0 -41
- data/app/assets/components/web-animations-js/test/testcases/auto-test-calc.html +0 -156
- data/app/assets/components/web-animations-js/test/testcases/auto-test-change-playback-rate-checks.js +0 -23
- data/app/assets/components/web-animations-js/test/testcases/auto-test-circular-path-checks.js +0 -65
- data/app/assets/components/web-animations-js/test/testcases/auto-test-circular-path.html +0 -83
- data/app/assets/components/web-animations-js/test/testcases/auto-test-color-checks.js +0 -101
- data/app/assets/components/web-animations-js/test/testcases/auto-test-color-names-checks.js +0 -431
- data/app/assets/components/web-animations-js/test/testcases/auto-test-color-names.html +0 -204
- data/app/assets/components/web-animations-js/test/testcases/auto-test-color.html +0 -117
- data/app/assets/components/web-animations-js/test/testcases/auto-test-composite-transforms-checks.js +0 -45
- data/app/assets/components/web-animations-js/test/testcases/auto-test-composite-transforms.html +0 -97
- data/app/assets/components/web-animations-js/test/testcases/auto-test-compositor-checks.js +0 -26
- data/app/assets/components/web-animations-js/test/testcases/auto-test-compositor.html +0 -68
- data/app/assets/components/web-animations-js/test/testcases/auto-test-delay-checks.js +0 -92
- data/app/assets/components/web-animations-js/test/testcases/auto-test-delay.html +0 -39
- data/app/assets/components/web-animations-js/test/testcases/auto-test-element-animate-checks.js +0 -8
- data/app/assets/components/web-animations-js/test/testcases/auto-test-element-animate.html +0 -30
- data/app/assets/components/web-animations-js/test/testcases/auto-test-fill-values-checks.js +0 -266
- data/app/assets/components/web-animations-js/test/testcases/auto-test-fill-values.html +0 -114
- data/app/assets/components/web-animations-js/test/testcases/auto-test-font-weight-checks.js +0 -26
- data/app/assets/components/web-animations-js/test/testcases/auto-test-font-weight.html +0 -43
- data/app/assets/components/web-animations-js/test/testcases/auto-test-initial-checks.js +0 -74
- data/app/assets/components/web-animations-js/test/testcases/auto-test-initial.html +0 -242
- data/app/assets/components/web-animations-js/test/testcases/auto-test-inline-style-checks.js +0 -17
- data/app/assets/components/web-animations-js/test/testcases/auto-test-inline-style-fallback-checks.js +0 -17
- data/app/assets/components/web-animations-js/test/testcases/auto-test-inline-style-fallback.html +0 -78
- data/app/assets/components/web-animations-js/test/testcases/auto-test-inline-style-methods-checks.js +0 -17
- data/app/assets/components/web-animations-js/test/testcases/auto-test-inline-style-methods.html +0 -70
- data/app/assets/components/web-animations-js/test/testcases/auto-test-inline-style.html +0 -69
- data/app/assets/components/web-animations-js/test/testcases/auto-test-integer-checks.js +0 -38
- data/app/assets/components/web-animations-js/test/testcases/auto-test-integer.html +0 -52
- data/app/assets/components/web-animations-js/test/testcases/auto-test-iteration-start-checks.js +0 -506
- data/app/assets/components/web-animations-js/test/testcases/auto-test-iteration-start.html +0 -160
- data/app/assets/components/web-animations-js/test/testcases/auto-test-iterations-alternate-checks.js +0 -44
- data/app/assets/components/web-animations-js/test/testcases/auto-test-iterations-alternate-holes-checks.js +0 -41
- data/app/assets/components/web-animations-js/test/testcases/auto-test-iterations-alternate-holes.html +0 -48
- data/app/assets/components/web-animations-js/test/testcases/auto-test-iterations-alternate.html +0 -50
- data/app/assets/components/web-animations-js/test/testcases/auto-test-iterations-basic-checks.js +0 -162
- data/app/assets/components/web-animations-js/test/testcases/auto-test-iterations-basic.html +0 -116
- data/app/assets/components/web-animations-js/test/testcases/auto-test-iterations-fill-checks.js +0 -602
- data/app/assets/components/web-animations-js/test/testcases/auto-test-iterations-fill.html +0 -167
- data/app/assets/components/web-animations-js/test/testcases/auto-test-keyframe-creation-checks.js +0 -67
- data/app/assets/components/web-animations-js/test/testcases/auto-test-keyframe-creation.html +0 -109
- data/app/assets/components/web-animations-js/test/testcases/auto-test-keyframe-easing-checks.js +0 -65
- data/app/assets/components/web-animations-js/test/testcases/auto-test-keyframe-easing.html +0 -64
- data/app/assets/components/web-animations-js/test/testcases/auto-test-length-units-checks.js +0 -342
- data/app/assets/components/web-animations-js/test/testcases/auto-test-length-units.html +0 -103
- data/app/assets/components/web-animations-js/test/testcases/auto-test-matrix-transforms-checks.js +0 -56
- data/app/assets/components/web-animations-js/test/testcases/auto-test-matrix-transforms.html +0 -90
- data/app/assets/components/web-animations-js/test/testcases/auto-test-motion-path-checks.js +0 -110
- data/app/assets/components/web-animations-js/test/testcases/auto-test-motion-path.html +0 -133
- data/app/assets/components/web-animations-js/test/testcases/auto-test-non-numeric-checks.js +0 -26
- data/app/assets/components/web-animations-js/test/testcases/auto-test-non-numeric.html +0 -42
- data/app/assets/components/web-animations-js/test/testcases/auto-test-parent-checks.js +0 -38
- data/app/assets/components/web-animations-js/test/testcases/auto-test-parent.html +0 -52
- data/app/assets/components/web-animations-js/test/testcases/auto-test-partial-keyframes-checks.js +0 -27
- data/app/assets/components/web-animations-js/test/testcases/auto-test-partial-keyframes.html +0 -43
- data/app/assets/components/web-animations-js/test/testcases/auto-test-path-checks.js +0 -20
- data/app/assets/components/web-animations-js/test/testcases/auto-test-path.html +0 -41
- data/app/assets/components/web-animations-js/test/testcases/auto-test-pause-checks.js +0 -79
- data/app/assets/components/web-animations-js/test/testcases/auto-test-pause.html +0 -82
- data/app/assets/components/web-animations-js/test/testcases/auto-test-perspective-checks.js +0 -37
- data/app/assets/components/web-animations-js/test/testcases/auto-test-perspective-origin-checks.js +0 -61
- data/app/assets/components/web-animations-js/test/testcases/auto-test-perspective-origin.html +0 -94
- data/app/assets/components/web-animations-js/test/testcases/auto-test-perspective.html +0 -79
- data/app/assets/components/web-animations-js/test/testcases/auto-test-playback-rate-checks.js +0 -146
- data/app/assets/components/web-animations-js/test/testcases/auto-test-playback-rate.html +0 -128
- data/app/assets/components/web-animations-js/test/testcases/auto-test-position-list-type-checks.js +0 -73
- data/app/assets/components/web-animations-js/test/testcases/auto-test-rectangle-checks.js +0 -23
- data/app/assets/components/web-animations-js/test/testcases/auto-test-rectangle.html +0 -57
- data/app/assets/components/web-animations-js/test/testcases/auto-test-reparent-checks.js +0 -95
- data/app/assets/components/web-animations-js/test/testcases/auto-test-reparent.html +0 -60
- data/app/assets/components/web-animations-js/test/testcases/auto-test-seq-speed-checks.js +0 -69
- data/app/assets/components/web-animations-js/test/testcases/auto-test-seq-speed.html +0 -86
- data/app/assets/components/web-animations-js/test/testcases/auto-test-shorthand-checks.js +0 -197
- data/app/assets/components/web-animations-js/test/testcases/auto-test-shorthand.html +0 -115
- data/app/assets/components/web-animations-js/test/testcases/auto-test-start-time-checks.js +0 -58
- data/app/assets/components/web-animations-js/test/testcases/auto-test-start-time-iterations-checks.js +0 -92
- data/app/assets/components/web-animations-js/test/testcases/auto-test-start-time-iterations.html +0 -107
- data/app/assets/components/web-animations-js/test/testcases/auto-test-start-time.html +0 -90
- data/app/assets/components/web-animations-js/test/testcases/auto-test-svg-anim-checks.js +0 -23
- data/app/assets/components/web-animations-js/test/testcases/auto-test-svg-anim.html +0 -39
- data/app/assets/components/web-animations-js/test/testcases/auto-test-svg-circle-checks.js +0 -23
- data/app/assets/components/web-animations-js/test/testcases/auto-test-svg-circle.html +0 -38
- data/app/assets/components/web-animations-js/test/testcases/auto-test-svg-color-checks.js +0 -20
- data/app/assets/components/web-animations-js/test/testcases/auto-test-svg-color.html +0 -36
- data/app/assets/components/web-animations-js/test/testcases/auto-test-text-shadow-checks.js +0 -20
- data/app/assets/components/web-animations-js/test/testcases/auto-test-text-shadow.html +0 -37
- data/app/assets/components/web-animations-js/test/testcases/auto-test-timing-functions-checks.js +0 -89
- data/app/assets/components/web-animations-js/test/testcases/auto-test-timing-functions.html +0 -77
- data/app/assets/components/web-animations-js/test/testcases/auto-test-to-animation-checks.js +0 -58
- data/app/assets/components/web-animations-js/test/testcases/auto-test-to-animation.html +0 -83
- data/app/assets/components/web-animations-js/test/testcases/auto-test-transform-3d-checks.js +0 -134
- data/app/assets/components/web-animations-js/test/testcases/auto-test-transform-3d.html +0 -123
- data/app/assets/components/web-animations-js/test/testcases/auto-test-transform-functions-checks.js +0 -160
- data/app/assets/components/web-animations-js/test/testcases/auto-test-transform-functions.html +0 -158
- data/app/assets/components/web-animations-js/test/testcases/auto-test-transform-origin-checks.js +0 -37
- data/app/assets/components/web-animations-js/test/testcases/auto-test-transform-origin.html +0 -80
- data/app/assets/components/web-animations-js/test/testcases/auto-test-transform-primitives-checks.js +0 -292
- data/app/assets/components/web-animations-js/test/testcases/auto-test-transform-primitives.html +0 -97
- data/app/assets/components/web-animations-js/test/testcases/auto-test-transform-units-checks.js +0 -202
- data/app/assets/components/web-animations-js/test/testcases/auto-test-transform-units.html +0 -98
- data/app/assets/components/web-animations-js/test/testcases/auto-test-visibility-checks.js +0 -54
- data/app/assets/components/web-animations-js/test/testcases/auto-test-visibility.html +0 -80
- data/app/assets/components/web-animations-js/test/testcases/auto-test-wrapping-bug-checks.js +0 -58
- data/app/assets/components/web-animations-js/test/testcases/auto-test-wrapping-bug.html +0 -60
- data/app/assets/components/web-animations-js/test/testcases/background.png +0 -0
- data/app/assets/components/web-animations-js/test/testcases/disabled-auto-test-change-playback-rate.html +0 -65
- data/app/assets/components/web-animations-js/test/testcases/disabled-auto-test-position-list-type.html +0 -103
- data/app/assets/components/web-animations-js/test/testcases/disabled-media.html +0 -439
- data/app/assets/components/web-animations-js/test/testcases/disabled-test-compositing-order.html +0 -112
- data/app/assets/components/web-animations-js/test/testcases/impl-test-deprecation.html +0 -85
- data/app/assets/components/web-animations-js/test/testcases/impl-test-from-css-value.html +0 -219
- data/app/assets/components/web-animations-js/test/testcases/impl-test-paced-timing-function.html +0 -83
- data/app/assets/components/web-animations-js/test/testcases/impl-test-totimelinetime.html +0 -37
- data/app/assets/components/web-animations-js/test/testcases/impl-unit-test-position-type.html +0 -256
- data/app/assets/components/web-animations-js/test/testcases/manual-test-add-player-onend.html +0 -57
- data/app/assets/components/web-animations-js/test/testcases/manual-test-preset-timings.html +0 -71
- data/app/assets/components/web-animations-js/test/testcases/manual-test-step.html +0 -88
- data/app/assets/components/web-animations-js/test/testcases/small.mp4 +0 -0
- data/app/assets/components/web-animations-js/test/testcases/small.webm +0 -0
- data/app/assets/components/web-animations-js/test/testcases/test-bounds.html +0 -69
- data/app/assets/components/web-animations-js/test/testcases/test-document-timeline.html +0 -53
- data/app/assets/components/web-animations-js/test/testcases/test-dynamic-load.html +0 -65
- data/app/assets/components/web-animations-js/test/testcases/test-fill-auto.html +0 -78
- data/app/assets/components/web-animations-js/test/testcases/test-getcurrent.html +0 -324
- data/app/assets/components/web-animations-js/test/testcases/test-keyframe-animation-effect.html +0 -248
- data/app/assets/components/web-animations-js/test/testcases/test-keyframe-composite-operation.html +0 -182
- data/app/assets/components/web-animations-js/test/testcases/test-null-target.html +0 -66
- data/app/assets/components/web-animations-js/test/testcases/test-pause-for-testing.html +0 -52
- data/app/assets/components/web-animations-js/test/testcases/test-player-addeventlistener.html +0 -161
- data/app/assets/components/web-animations-js/test/testcases/test-player-cleanup.html +0 -79
- data/app/assets/components/web-animations-js/test/testcases/test-player-finish-event.html +0 -101
- data/app/assets/components/web-animations-js/test/testcases/test-player-sort.html +0 -48
- data/app/assets/components/web-animations-js/test/testcases/test-player.html +0 -786
- data/app/assets/components/web-animations-js/test/testcases/test-pseudo-element-reference.html +0 -38
- data/app/assets/components/web-animations-js/test/testcases/test-repeated-pause.html +0 -54
- data/app/assets/components/web-animations-js/test/testcases/test-restart.html +0 -115
- data/app/assets/components/web-animations-js/test/testcases/test-reversed-player-active-phase.html +0 -28
- data/app/assets/components/web-animations-js/test/testcases/test-rotation-not-reversed.html +0 -55
- data/app/assets/components/web-animations-js/test/testcases/test-update-state.html +0 -113
- data/app/assets/components/web-animations-js/test/testcases/unit-test-clone.html +0 -80
- data/app/assets/components/web-animations-js/test/testcases/unit-test-delay.html +0 -66
- data/app/assets/components/web-animations-js/test/testcases/unit-test-dom-operations.html +0 -164
- data/app/assets/components/web-animations-js/test/testcases/unit-test-duration.html +0 -66
- data/app/assets/components/web-animations-js/test/testcases/unit-test-get-siblings.html +0 -112
- data/app/assets/components/web-animations-js/test/testcases/unit-test-modify-timing-params.html +0 -105
- data/app/assets/components/web-animations-js/test/testcases/unit-test-null-effect.html +0 -43
- data/app/assets/components/web-animations-js/test/testcases/unit-test-set-parent.html +0 -111
- data/app/assets/components/web-animations-js/test/testcases/unit-test-testharness-failure.html +0 -54
- data/app/assets/components/web-animations-js/test/testcases/unit-test-testharness.html +0 -248
- data/app/assets/components/web-animations-js/test/testcases/unit-test-unpause.html +0 -68
- data/app/assets/components/web-animations-js/test/testharness_timing.css +0 -75
- data/app/assets/components/web-animations-js/test/update-testcases.py +0 -63
- data/app/assets/components/web-animations-js/tools/android/config.sh +0 -8
- data/app/assets/components/web-animations-js/tools/android/setup.sh +0 -152
- data/app/assets/components/web-animations-js/tools/android/stop.sh +0 -20
- data/app/assets/components/web-animations-js/tools/python/requirements.txt +0 -12
- data/app/assets/components/web-animations-js/tools/python/run-tests.py +0 -813
- data/app/assets/components/web-animations-js/tools/python/setup.sh +0 -60
- data/app/assets/components/web-animations-js/tutorial/basic-animations/basic-animation-exercise-1.html +0 -62
- data/app/assets/components/web-animations-js/tutorial/basic-animations/basic-animation.html +0 -120
- data/app/assets/components/web-animations-js/tutorial/iframe-contents.html +0 -29
- data/app/assets/components/web-animations-js/tutorial/jquery.js +0 -9555
- data/app/assets/components/web-animations-js/tutorial/page-load.js +0 -114
- data/app/assets/components/web-animations-js/tutorial/parallel/parallel-exercise-1.html +0 -58
- data/app/assets/components/web-animations-js/tutorial/parallel/parallel.html +0 -101
- data/app/assets/components/web-animations-js/tutorial/sample-tutorial.html +0 -44
- data/app/assets/components/web-animations-js/tutorial/try-it-yourself.js +0 -216
- data/app/assets/components/web-animations-js/tutorial/tutorial-style.css +0 -344
- data/app/assets/components/web-animations-js/tutorial/tutorial-testing.js +0 -84
@@ -1,52 +0,0 @@
|
|
1
|
-
<!--
|
2
|
-
Copyright 2013 Google Inc. All Rights Reserved.
|
3
|
-
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
you may not use this file except in compliance with the License.
|
6
|
-
You may obtain a copy of the License at
|
7
|
-
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
See the License for the specific language governing permissions and
|
14
|
-
limitations under the License.
|
15
|
-
-->
|
16
|
-
|
17
|
-
<!DOCTYPE html><meta charset="UTF-8">
|
18
|
-
|
19
|
-
<style>
|
20
|
-
.anim {
|
21
|
-
position: absolute;
|
22
|
-
width: 50px;
|
23
|
-
height: 50px;
|
24
|
-
top: 0px;
|
25
|
-
border-radius: 50%;
|
26
|
-
}
|
27
|
-
</style>
|
28
|
-
<div class='anim' id='a' style='left: 0px; background-color: lightsteelblue'></div>
|
29
|
-
<div class='anim' id='b' style='left: 450px; background-color: red'></div>
|
30
|
-
<script src='../bootstrap.js'></script>
|
31
|
-
<script>
|
32
|
-
'use strict';
|
33
|
-
var downRed = new AnimationGroup(
|
34
|
-
[new Animation(document.querySelector('#a'), {top: '600px'}, 4)]);
|
35
|
-
var downBlue = new AnimationGroup(
|
36
|
-
[new Animation(document.querySelector('#b'), {top: '600px'}, 4)],
|
37
|
-
{delay: 1});
|
38
|
-
document.timeline.play(downRed);
|
39
|
-
document.timeline.play(downBlue);
|
40
|
-
document.timeline._pauseAnimationsForTesting(2);
|
41
|
-
|
42
|
-
timing_test(function() {
|
43
|
-
at(0, function() {
|
44
|
-
assert_styles('#a', {'top':'300px'})
|
45
|
-
assert_styles('#b', {'top':'150px'})
|
46
|
-
});
|
47
|
-
at(12, function() {
|
48
|
-
assert_styles('#a', {'top':'300px'})
|
49
|
-
assert_styles('#b', {'top':'150px'})
|
50
|
-
});
|
51
|
-
}, 'Pausing all animations should work when players have different start delays.')
|
52
|
-
</script>
|
data/app/assets/components/web-animations-js/test/testcases/test-player-addeventlistener.html
DELETED
@@ -1,161 +0,0 @@
|
|
1
|
-
<!--
|
2
|
-
Copyright 2014 Google Inc. All Rights Reserved.
|
3
|
-
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
you may not use this file except in compliance with the License.
|
6
|
-
You may obtain a copy of the License at
|
7
|
-
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
See the License for the specific language governing permissions and
|
14
|
-
limitations under the License.
|
15
|
-
-->
|
16
|
-
|
17
|
-
<!DOCTYPE html><meta charset="UTF-8">
|
18
|
-
<style>
|
19
|
-
#target {
|
20
|
-
position: absolute;
|
21
|
-
left: 0px;
|
22
|
-
top: 0px;
|
23
|
-
width: 100px;
|
24
|
-
height: 100px;
|
25
|
-
background-color: green;
|
26
|
-
}
|
27
|
-
</style>
|
28
|
-
<div id="target"></div>
|
29
|
-
<script src="../bootstrap.js"></script>
|
30
|
-
<script>
|
31
|
-
'use strict';
|
32
|
-
|
33
|
-
function createPlayer() {
|
34
|
-
return target.animate({ left: '100px' }, {
|
35
|
-
iterations: 2,
|
36
|
-
duration: 0.25,
|
37
|
-
});
|
38
|
-
}
|
39
|
-
|
40
|
-
var player;
|
41
|
-
|
42
|
-
player = createPlayer();
|
43
|
-
var singleEventHandler = false;
|
44
|
-
player.addEventListener('finish', function() { singleEventHandler = true; })
|
45
|
-
var testA = async_test('Check finish event with single handler');
|
46
|
-
player.addEventListener('finish', function() {
|
47
|
-
testA.step(function() { assert_true(singleEventHandler); });
|
48
|
-
testA.done();
|
49
|
-
});
|
50
|
-
|
51
|
-
player = createPlayer();
|
52
|
-
var eventHandlingCount = 0;
|
53
|
-
var addMultipleTimes = function() { eventHandlingCount++; };
|
54
|
-
player.addEventListener('finish', addMultipleTimes);
|
55
|
-
player.addEventListener('finish', addMultipleTimes);
|
56
|
-
var testB = async_test('Check finish event with single handler added multiple times');
|
57
|
-
player.addEventListener('finish', function() {
|
58
|
-
testB.step(function() { assert_equals(eventHandlingCount, 1); });
|
59
|
-
testB.done();
|
60
|
-
});
|
61
|
-
|
62
|
-
player = createPlayer();
|
63
|
-
var multiEventHandlerA = false;
|
64
|
-
var multiEventHandlerB = false;
|
65
|
-
var multiEventHandlerC = false;
|
66
|
-
player.addEventListener('finish', function() { multiEventHandlerA = true; })
|
67
|
-
player.addEventListener('finish', function() { multiEventHandlerB = true; })
|
68
|
-
player.addEventListener('finish', function() { multiEventHandlerC = true; })
|
69
|
-
var testC = async_test('Check finish event with multiple handlers');
|
70
|
-
player.addEventListener('finish', function() {
|
71
|
-
testC.step(function() { assert_true(multiEventHandlerA && multiEventHandlerB && multiEventHandlerC); });
|
72
|
-
testC.done();
|
73
|
-
});
|
74
|
-
|
75
|
-
player = createPlayer();
|
76
|
-
var retainEventHandler = false;
|
77
|
-
player.addEventListener('finish', function() { retainEventHandler = true; });
|
78
|
-
var removeEventHandler = true;
|
79
|
-
var eventHandlerToRemove = function() { removeEventHandler = false; }
|
80
|
-
player.addEventListener('finish', eventHandlerToRemove);
|
81
|
-
player.removeEventListener('finish', eventHandlerToRemove);
|
82
|
-
var testD = async_test('Check finish event with event handler removed');
|
83
|
-
player.addEventListener('finish', function() {
|
84
|
-
testD.step(function() { assert_true(retainEventHandler && removeEventHandler); });
|
85
|
-
testD.done();
|
86
|
-
});
|
87
|
-
|
88
|
-
player = createPlayer();
|
89
|
-
var onEventHandler = false;
|
90
|
-
player.onfinish = function() { onEventHandler = true; };
|
91
|
-
var testE = async_test('Check onfinish handler');
|
92
|
-
player.addEventListener('finish', function() {
|
93
|
-
testE.step(function() { assert_true(onEventHandler); });
|
94
|
-
testE.done();
|
95
|
-
});
|
96
|
-
|
97
|
-
player = createPlayer();
|
98
|
-
var clearOnEventHandler = true;
|
99
|
-
player.onfinish = function() { clearOnEventHandler = false; };
|
100
|
-
player.onfinish = null;
|
101
|
-
var testF = async_test('Check clearing onfinish handler');
|
102
|
-
player.addEventListener('finish', function() {
|
103
|
-
testF.step(function() { assert_true(clearOnEventHandler); });
|
104
|
-
testF.done();
|
105
|
-
});
|
106
|
-
|
107
|
-
player = createPlayer();
|
108
|
-
var onEventOrdering = '';
|
109
|
-
player.addEventListener('finish', function() { onEventOrdering += 'a'; });
|
110
|
-
player.onfinish = function() { onEventOrdering += '!'; };
|
111
|
-
player.addEventListener('finish', function() { onEventOrdering += 'b'; });
|
112
|
-
player.onfinish = function() { onEventOrdering += 'c'; };
|
113
|
-
player.addEventListener('finish', function() { onEventOrdering += 'd'; });
|
114
|
-
var testG = async_test('Check onfinish handler ordering and overriding');
|
115
|
-
player.addEventListener('finish', function() {
|
116
|
-
testG.step(function() { assert_equals(onEventOrdering, 'abcd'); });
|
117
|
-
testG.done();
|
118
|
-
});
|
119
|
-
|
120
|
-
player = createPlayer();
|
121
|
-
var onEventOrderingAfterRemoval = '';
|
122
|
-
var eventHandlerToRemoveA = function() { onEventOrderingAfterRemoval += '!'; };
|
123
|
-
var eventHandlerToRemoveB = function() { onEventOrderingAfterRemoval += '!!'; };
|
124
|
-
player.addEventListener('finish', function() { onEventOrderingAfterRemoval += 'a'; });
|
125
|
-
player.addEventListener('finish', eventHandlerToRemoveA);
|
126
|
-
player.onfinish = function() { onEventOrderingAfterRemoval += 'b'; };
|
127
|
-
player.addEventListener('finish', function() { onEventOrderingAfterRemoval += 'c'; });
|
128
|
-
player.addEventListener('finish', eventHandlerToRemoveB);
|
129
|
-
player.removeEventListener('finish', eventHandlerToRemoveA);
|
130
|
-
player.removeEventListener('finish', eventHandlerToRemoveB);
|
131
|
-
var testH = async_test('Check onfinish handler ordering after removal');
|
132
|
-
player.addEventListener('finish', function() {
|
133
|
-
testH.step(function() { assert_equals(onEventOrderingAfterRemoval, 'abc'); });
|
134
|
-
testH.done();
|
135
|
-
});
|
136
|
-
|
137
|
-
player = createPlayer();
|
138
|
-
var onEventDuplication = 0;
|
139
|
-
var duplicateFunctionA = function() { onEventDuplication += 1; };
|
140
|
-
player.addEventListener('finish', duplicateFunctionA);
|
141
|
-
player.onfinish = duplicateFunctionA;
|
142
|
-
var testI = async_test('Check onfinish handler duplication');
|
143
|
-
player.addEventListener('finish', function() {
|
144
|
-
testI.step(function() { assert_equals(onEventDuplication, 2); });
|
145
|
-
testI.done();
|
146
|
-
});
|
147
|
-
|
148
|
-
player = createPlayer();
|
149
|
-
var eventDuplication = 0;
|
150
|
-
var duplicateFunctionB = function() { eventDuplication += 1; };
|
151
|
-
player.addEventListener('finish', duplicateFunctionB);
|
152
|
-
player.addEventListener('finish', duplicateFunctionB);
|
153
|
-
var testJ = async_test('Check finish event handler duplication');
|
154
|
-
player.addEventListener('finish', function() {
|
155
|
-
testJ.step(function() { assert_equals(eventDuplication, 1); });
|
156
|
-
testJ.done();
|
157
|
-
});
|
158
|
-
|
159
|
-
timing_test(function() { at(1, function(){}); }, 'Force testharness to execute to 1 second.');
|
160
|
-
|
161
|
-
</script>
|
@@ -1,79 +0,0 @@
|
|
1
|
-
<!--
|
2
|
-
Copyright 2013 Google Inc. All Rights Reserved.
|
3
|
-
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
you may not use this file except in compliance with the License.
|
6
|
-
You may obtain a copy of the License at
|
7
|
-
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
See the License for the specific language governing permissions and
|
14
|
-
limitations under the License.
|
15
|
-
-->
|
16
|
-
<!DOCTYPE html><meta charset="UTF-8">
|
17
|
-
<div id='anim'></div>
|
18
|
-
<script>
|
19
|
-
var expected_failures = [
|
20
|
-
{
|
21
|
-
browser_configurations: [{ msie: true }],
|
22
|
-
tests: ['t=(3|5)s'],
|
23
|
-
message: 'IE returns rgba.',
|
24
|
-
}
|
25
|
-
];
|
26
|
-
</script>
|
27
|
-
<script src="../bootstrap.js"></script>
|
28
|
-
<script>
|
29
|
-
"use strict";
|
30
|
-
|
31
|
-
|
32
|
-
document.timeline.play(new Animation(null, {},
|
33
|
-
{duration: 1, fill: 'forwards'}));
|
34
|
-
document.timeline.play(new Animation(null, {},
|
35
|
-
{duration: 1, fill: 'none'}));
|
36
|
-
var player = document.timeline.play(new Animation(anim,
|
37
|
-
[{backgroundColor: 'red'}, {backgroundColor: 'white'}],
|
38
|
-
{duration: 1, fill: 'none'}));
|
39
|
-
|
40
|
-
timing_test(function() {
|
41
|
-
at(0.5, function() {
|
42
|
-
assert_equals(document.timeline.getCurrentPlayers().length, 3,
|
43
|
-
"All animations current");
|
44
|
-
assert_equals(_WebAnimationsTestingUtilities._knownPlayers.length, 3,
|
45
|
-
"All animations known");
|
46
|
-
});
|
47
|
-
at(2, function() {
|
48
|
-
assert_equals(document.timeline.getCurrentPlayers().length, 0,
|
49
|
-
"No animations current");
|
50
|
-
assert_equals(_WebAnimationsTestingUtilities._knownPlayers.length, 1,
|
51
|
-
"Only animations with forward fill known");
|
52
|
-
});
|
53
|
-
at(3, function() {
|
54
|
-
player.currentTime = 0;
|
55
|
-
assert_equals(document.timeline.getCurrentPlayers().length, 1,
|
56
|
-
"Only restarted animation current");
|
57
|
-
assert_equals(_WebAnimationsTestingUtilities._knownPlayers.length, 2,
|
58
|
-
"Restarted and forward filling animations known");
|
59
|
-
assert_styles('#anim', [{"backgroundColor": 'rgb(255, 0, 0)'}],
|
60
|
-
"takes effect immediately");
|
61
|
-
});
|
62
|
-
at(3.5, function() {
|
63
|
-
assert_equals(document.timeline.getCurrentPlayers().length, 1,
|
64
|
-
"Only restarted animation current");
|
65
|
-
assert_equals(_WebAnimationsTestingUtilities._knownPlayers.length, 2,
|
66
|
-
"Restarted and forward filling animations known");
|
67
|
-
})
|
68
|
-
|
69
|
-
at(5, function() {
|
70
|
-
player.source.timing.duration = 4;
|
71
|
-
assert_equals(document.timeline.getCurrentPlayers().length, 1,
|
72
|
-
"Only restarted animation current");
|
73
|
-
assert_equals(_WebAnimationsTestingUtilities._knownPlayers.length, 2,
|
74
|
-
"Restarted and forward filling animations known");
|
75
|
-
assert_styles('#anim', [{"backgroundColor": 'rgb(255, 64, 64)'}],
|
76
|
-
"takes effect immediately");
|
77
|
-
});
|
78
|
-
});
|
79
|
-
</script>
|
@@ -1,101 +0,0 @@
|
|
1
|
-
<!--
|
2
|
-
Copyright 2014 Google Inc. All Rights Reserved.
|
3
|
-
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
you may not use this file except in compliance with the License.
|
6
|
-
You may obtain a copy of the License at
|
7
|
-
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
See the License for the specific language governing permissions and
|
14
|
-
limitations under the License.
|
15
|
-
-->
|
16
|
-
|
17
|
-
<!DOCTYPE html><meta charset="UTF-8">
|
18
|
-
<script src="../bootstrap.js"></script>
|
19
|
-
<script>
|
20
|
-
'use strict';
|
21
|
-
|
22
|
-
function createPlayer() {
|
23
|
-
return document.timeline.play(new Animation(null, null, 200));
|
24
|
-
}
|
25
|
-
|
26
|
-
function assertFinishEvents(description, player, expectedEvents) {
|
27
|
-
var i = 0;
|
28
|
-
|
29
|
-
expectedEvents.forEach(function (expectedEvent, expectedIndex) {
|
30
|
-
var asyncTestHandle = async_test(description + ', t=' + expectedEvent.timelineTime);
|
31
|
-
// Testharness quirk: async_test won't time out if step is never called.
|
32
|
-
at(expectedEvent.timelineTime, function() {asyncTestHandle.step(function() {});});
|
33
|
-
player.addEventListener('finish', function(event) {
|
34
|
-
if (i === expectedIndex) {
|
35
|
-
asyncTestHandle.step(function() {
|
36
|
-
assert_equals(event.currentTime, expectedEvent.currentTime, 'event.currentTime');
|
37
|
-
assert_equals(event.timelineTime, expectedEvent.timelineTime, 'event.timelineTime');
|
38
|
-
assert_equals(event.target, player, 'event.target');
|
39
|
-
assert_approx_equals(document.timeline.currentTime, expectedEvent.timelineTime, 50, 'timeline.currentTime');
|
40
|
-
});
|
41
|
-
asyncTestHandle.done();
|
42
|
-
}
|
43
|
-
});
|
44
|
-
});
|
45
|
-
|
46
|
-
player.addEventListener('finish', function(event) {
|
47
|
-
if (i >= expectedEvents.length) {
|
48
|
-
test(function() {assert_true(false);}, 'More than ' + expectedEvents.length + ' events fired for test "' + description + '"');
|
49
|
-
}
|
50
|
-
i++;
|
51
|
-
});
|
52
|
-
}
|
53
|
-
|
54
|
-
var player;
|
55
|
-
|
56
|
-
player = createPlayer();
|
57
|
-
assertFinishEvents('Players should fire finished events when they complete', player, [
|
58
|
-
{timelineTime: 200, currentTime: 200},
|
59
|
-
]);
|
60
|
-
|
61
|
-
player = createPlayer();
|
62
|
-
player.source = null;
|
63
|
-
assertFinishEvents('A player with no source should report finished on the next sample', player, [
|
64
|
-
{timelineTime: 0, currentTime: 0},
|
65
|
-
]);
|
66
|
-
|
67
|
-
player = createPlayer();
|
68
|
-
player.currentTime = 200;
|
69
|
-
assertFinishEvents('Jumping to the end of a player\'s animation should fire the finish event', player, [
|
70
|
-
{timelineTime: 0, currentTime: 200},
|
71
|
-
]);
|
72
|
-
|
73
|
-
player = createPlayer();
|
74
|
-
player.currentTime = 200;
|
75
|
-
player.currentTime = 1;
|
76
|
-
player.currentTime = 200;
|
77
|
-
assertFinishEvents('Jumping to the end of a player\'s animation twice should fire the finish event once', player, [
|
78
|
-
{timelineTime: 0, currentTime: 200},
|
79
|
-
]);
|
80
|
-
|
81
|
-
var jumpingPlayer = createPlayer();
|
82
|
-
jumpingPlayer.currentTime = 200;
|
83
|
-
at(100, function() {jumpingPlayer.currentTime = 100;});
|
84
|
-
at(200, function() {jumpingPlayer.currentTime = 200;});
|
85
|
-
assertFinishEvents('Jumping to the end of a player\'s animation twice on different frames should fire the finish event twice', jumpingPlayer, [
|
86
|
-
{timelineTime: 0, currentTime: 200},
|
87
|
-
{timelineTime: 200, currentTime: 200},
|
88
|
-
]);
|
89
|
-
|
90
|
-
var reversedPlayer = createPlayer();
|
91
|
-
reversedPlayer.currentTime = 100;
|
92
|
-
reversedPlayer.reverse();
|
93
|
-
assertFinishEvents('Reversed players should fire finish events when they reach the start of their animation', reversedPlayer, [
|
94
|
-
{timelineTime: 100, currentTime: 0},
|
95
|
-
]);
|
96
|
-
|
97
|
-
// Force the test harness to sample periodically.
|
98
|
-
for (var t = 0; t < 500; t += 100) {
|
99
|
-
at(t, function() {});
|
100
|
-
}
|
101
|
-
</script>
|
@@ -1,48 +0,0 @@
|
|
1
|
-
<!--
|
2
|
-
Copyright 2013 Google Inc. All Rights Reserved.
|
3
|
-
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
you may not use this file except in compliance with the License.
|
6
|
-
You may obtain a copy of the License at
|
7
|
-
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
See the License for the specific language governing permissions and
|
14
|
-
limitations under the License.
|
15
|
-
-->
|
16
|
-
|
17
|
-
<!DOCTYPE html><meta charset="UTF-8">
|
18
|
-
|
19
|
-
<script src="../bootstrap.js"></script>
|
20
|
-
<script>
|
21
|
-
"use strict";
|
22
|
-
|
23
|
-
var globalVar = 0;
|
24
|
-
var incGlobalVar = function() {
|
25
|
-
globalVar += 1;
|
26
|
-
}
|
27
|
-
var failed = false;
|
28
|
-
|
29
|
-
for (var i = 0; i < 100; i++) {
|
30
|
-
document.timeline.play(new Animation(null, incGlobalVar, 1));
|
31
|
-
}
|
32
|
-
|
33
|
-
document.timeline.play(new Animation(null, function() {
|
34
|
-
if (globalVar !== 100) {
|
35
|
-
failed = true;
|
36
|
-
}
|
37
|
-
globalVar = 0;
|
38
|
-
}, 1));
|
39
|
-
|
40
|
-
// ensure at least one point is sampled
|
41
|
-
at(0, function() { });
|
42
|
-
|
43
|
-
timing_test(function() {
|
44
|
-
at(1, function() { assert_true(!failed); });
|
45
|
-
},
|
46
|
-
"the 101st animation should always come 101st");
|
47
|
-
|
48
|
-
</script>
|
@@ -1,786 +0,0 @@
|
|
1
|
-
<!--
|
2
|
-
Copyright 2013 Google Inc. All Rights Reserved.
|
3
|
-
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
you may not use this file except in compliance with the License.
|
6
|
-
You may obtain a copy of the License at
|
7
|
-
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
See the License for the specific language governing permissions and
|
14
|
-
limitations under the License.
|
15
|
-
|
16
|
-
Written by Steph McArthur
|
17
|
-
-->
|
18
|
-
|
19
|
-
<!DOCTYPE html><meta charset="UTF-8">
|
20
|
-
<div id="anim"></div>
|
21
|
-
|
22
|
-
<script src="../bootstrap.js"></script>
|
23
|
-
<script>
|
24
|
-
var animation = new Animation(anim, {left: "100px"}, 100);
|
25
|
-
var dt = document.timeline;
|
26
|
-
|
27
|
-
// Test AnimationPlayer.timeline.
|
28
|
-
var player1 = dt.play(animation);
|
29
|
-
test(function() {assert_equals(player1.timeline, document.timeline)},
|
30
|
-
"AnimationPlayer.timeline is document timeline");
|
31
|
-
|
32
|
-
// Test that TimedItem.player and AnimationPlayer.source are consistent.
|
33
|
-
test(function() {assert_equals(player1.source, animation)},
|
34
|
-
"AnimationPlayer.source should be the Animation");
|
35
|
-
test(function() {assert_equals(animation.player, player1)},
|
36
|
-
"TimedItem.player should be the AnimationPlayer");
|
37
|
-
|
38
|
-
// Test that play() always returns a new AnimationPlayer.
|
39
|
-
var player2 = dt.play(animation);
|
40
|
-
test(function() {assert_not_equals(player2, player1)},
|
41
|
-
"Repeated calls to play() should create a new AnimationPlayer");
|
42
|
-
test(function() {assert_equals(animation.player, player2)},
|
43
|
-
"Repeated play(): TimedItem.player should be the AnimationPlayer");
|
44
|
-
test(function() {assert_equals(player2.source, animation)},
|
45
|
-
"Repeated play(): AnimationPlayer.source should be the Animation");
|
46
|
-
test(function() {assert_equals(player2.startTime, player1.startTime)},
|
47
|
-
"Repeated play(): Players should have same start time");
|
48
|
-
|
49
|
-
// Test explicit setting of AnimationPlayer.source.
|
50
|
-
player1.source = animation;
|
51
|
-
test(function() {assert_equals(player2.source, null)},
|
52
|
-
"Set AnimationPlayer.source: Old source should be null");
|
53
|
-
test(function() {assert_equals(player1.source, animation)},
|
54
|
-
"Set AnimationPlayer.source: New source should be the Animation");
|
55
|
-
test(function() {assert_equals(animation.player, player1)},
|
56
|
-
"Set AnimationPlayer.source: TimedItem.player should be the AnimationPlayer");
|
57
|
-
|
58
|
-
// Test that TimedItem.player gives null on a detached tree.
|
59
|
-
var animation2 =
|
60
|
-
new Animation(document.getElementById("anim"), {left: "100px"});
|
61
|
-
var animationGroup = new AnimationGroup([animation2]);
|
62
|
-
test(function() {assert_equals(animationGroup.player, null)},
|
63
|
-
"TimedItem.player should be null for root");
|
64
|
-
test(function() {assert_equals(animation2.player, null)},
|
65
|
-
"TimedItem.player should be null for leaf");
|
66
|
-
|
67
|
-
// Test that TimedItem.player remotes to the root of the tree.
|
68
|
-
var player3 = dt.play(animationGroup);
|
69
|
-
test(function() {assert_equals(animation2.player, player3)},
|
70
|
-
"TimedItem.player should remote");
|
71
|
-
|
72
|
-
// Test that calling play() on a TimedItem with a parent results in
|
73
|
-
// reparenting.
|
74
|
-
var player4 = dt.play(animation2);
|
75
|
-
test(function() {assert_equals(animation2.parent, null)},
|
76
|
-
"Animation should be reparented");
|
77
|
-
test(function() {assert_equals(animationGroup.children.length, 0)},
|
78
|
-
"Animation parent should be updated, leaving animationGroup.children.length = 0");
|
79
|
-
test(function() {assert_equals(player4.source, animation2)},
|
80
|
-
"AnimationPlayer should use reparented animation");
|
81
|
-
|
82
|
-
// Test that setting a parent on a TimedItem with an AnimationPlayer causes the
|
83
|
-
// player to be disconnected.
|
84
|
-
animationGroup.append(animation2);
|
85
|
-
test(function() {assert_equals(animationGroup.player, player3)},
|
86
|
-
"TimedItem.player should be updated for root");
|
87
|
-
test(function() {assert_equals(animation2.player, player3)},
|
88
|
-
"TimedItem.player should be updated for leaf");
|
89
|
-
test(function() {assert_equals(player4.source, null)},
|
90
|
-
"AnimationPlayer.source should be updated");
|
91
|
-
test(function() {assert_equals(animation2.parent, animationGroup)},
|
92
|
-
"Animation.parent should be updated");
|
93
|
-
test(function() {assert_equals(animationGroup.children.length, 1)},
|
94
|
-
"Animation parent should be updated, leaving animationGroup.children.length = 1");
|
95
|
-
test(function() {assert_equals(animationGroup.children[0], animation2)},
|
96
|
-
"Animation parent should be updated");
|
97
|
-
|
98
|
-
// Test that currentTime is zero before timeline starts.
|
99
|
-
test(function() {assert_equals(document.timeline.play(animation).currentTime, 0)},
|
100
|
-
"currentTime should be zero before Timeline starts");
|
101
|
-
|
102
|
-
// Test that startTime is zero before timeline starts.
|
103
|
-
test(function() {assert_equals(document.timeline.play(animation).startTime, 0)},
|
104
|
-
"startTime should be zero before Timeline starts");
|
105
|
-
|
106
|
-
// Test that setting currentTime has an effect before the timeline starts.
|
107
|
-
var player5 = dt.play(animation);
|
108
|
-
player5.currentTime = 42;
|
109
|
-
test(function() {assert_equals(player5.currentTime, 42)},
|
110
|
-
"player5 can be seeked before timeline starts");
|
111
|
-
timing_test(function() {
|
112
|
-
at(0.1, function() {
|
113
|
-
assert_equals(player5.currentTime, 42.1);
|
114
|
-
});
|
115
|
-
}, "player5's updates to currentTime should persist after Timeline starts");
|
116
|
-
|
117
|
-
// Test that setting startTime has an effect before the timeline starts.
|
118
|
-
var player6 = dt.play(animation.clone());
|
119
|
-
player6.startTime = 42;
|
120
|
-
test(function() {assert_equals(player6.currentTime, -42)},
|
121
|
-
"player6's currentTime should always be zero before Timeline starts");
|
122
|
-
|
123
|
-
// Test that an AnimationPlayer's TimedItem gets a null inherited time until the
|
124
|
-
// timeline starts.
|
125
|
-
var animation1 = new Animation(document.getElementById("anim"), {left: "100px"});
|
126
|
-
dt.play(animation1);
|
127
|
-
test(function() {assert_equals(animation1.localTime, null)},
|
128
|
-
"TimedItem's inherited time, and thus " +
|
129
|
-
"localTime should be null before Timeline starts");
|
130
|
-
timing_test(function() {
|
131
|
-
at(0.0, function() {assert_not_equals(animation1.localTime, null)});
|
132
|
-
}, "TimedItem's inherited time " +
|
133
|
-
"and thus localTime should not be null after Timeline starts");
|
134
|
-
|
135
|
-
// Test that TimedItem is updated immediately on calling Timeline.play() after
|
136
|
-
// the timeline starts.
|
137
|
-
var animation4 = new Animation(
|
138
|
-
document.getElementById("anim"), {left: "100px"});
|
139
|
-
test(function() {assert_equals(animation4.localTime, null)},
|
140
|
-
"localTime should be null before playing");
|
141
|
-
timing_test(function() {
|
142
|
-
at(0.0, function() {
|
143
|
-
document.timeline.play(animation4);
|
144
|
-
assert_equals(animation4.localTime, 0)
|
145
|
-
});
|
146
|
-
}, "localTime should be set by playing");
|
147
|
-
|
148
|
-
// Test that updates to currentTime take immediate effect.
|
149
|
-
timing_test(function() {
|
150
|
-
at(0.0, function() {
|
151
|
-
var animation5 = new Animation(
|
152
|
-
document.getElementById("anim"), {left: "100px"}, 100);
|
153
|
-
document.timeline.play(animation5).currentTime = 42;
|
154
|
-
assert_equals(animation5.localTime, 42);
|
155
|
-
});
|
156
|
-
}, "Updates to AnimationPlayer.currentTime should take immediate effect");
|
157
|
-
|
158
|
-
// Test that updates to source take immediate effect.
|
159
|
-
timing_test(function() {
|
160
|
-
at(0.0, function() {
|
161
|
-
var player = document.timeline.play(new Animation(
|
162
|
-
document.getElementById("anim"), {left: "100px"}));
|
163
|
-
var animation7 = new Animation(
|
164
|
-
document.getElementById("anim"), {left: "100px"});
|
165
|
-
player.source = animation7;
|
166
|
-
assert_equals(animation7.localTime, 0);
|
167
|
-
});
|
168
|
-
}, "Updates to AnimationPlayer.source should take immediate effect");
|
169
|
-
|
170
|
-
function createPlayer(duration) {
|
171
|
-
return document.timeline.play(new Animation(null, null, duration));
|
172
|
-
}
|
173
|
-
|
174
|
-
// Tests the initial values of the AnimationPlayer API.
|
175
|
-
timing_test(function() {
|
176
|
-
at(0, function() {
|
177
|
-
var anim = new Animation(null, null, 3);
|
178
|
-
assert_equals(anim.player, null, "player should be null initially");
|
179
|
-
|
180
|
-
// Check state after playing
|
181
|
-
document.timeline.play(anim);
|
182
|
-
assert_not_equals(anim.player, null, "player should be not be null when playing");
|
183
|
-
assert_equals(anim.player.source, anim, "Initial source content");
|
184
|
-
assert_equals(anim.player.timeline, document.timeline, "Initial document timeline");
|
185
|
-
assert_equals(anim.player.startTime, document.timeline.currentTime, "Initial start time");
|
186
|
-
assert_equals(anim.player.currentTime, 0, "Initial current time");
|
187
|
-
assert_equals(anim.player.timeLag, 0, "Initial time lag");
|
188
|
-
assert_equals(anim.player.playbackRate, 1, "Initial playback rate");
|
189
|
-
assert_false(anim.player.paused, "Initial paused state");
|
190
|
-
assert_false(anim.player.finished, "Initial finished state");
|
191
|
-
});
|
192
|
-
}, "Initial state");
|
193
|
-
|
194
|
-
// Test paused states after pausing.
|
195
|
-
test(function() {
|
196
|
-
var player = createPlayer(3);
|
197
|
-
|
198
|
-
// Pause
|
199
|
-
player.pause();
|
200
|
-
assert_true(player.paused, "Paused state after pausing");
|
201
|
-
assert_false(player.finished, "Finished state after pausing");
|
202
|
-
|
203
|
-
// Unpause
|
204
|
-
player.play();
|
205
|
-
assert_false(player.paused, "Paused state after unpausing");
|
206
|
-
assert_false(player.finished, "Finished state after unpausing");
|
207
|
-
}, "Pause");
|
208
|
-
|
209
|
-
// Test seeking behind startTime for a forwards player.
|
210
|
-
timing_test(function() {
|
211
|
-
var player = createPlayer(3);
|
212
|
-
|
213
|
-
// Seek before start
|
214
|
-
player.currentTime = -0.1;
|
215
|
-
assert_equals(player.currentTime, -0.1, "Current time after seeking before start");
|
216
|
-
assert_false(player.paused, "Paused state after seeking before start");
|
217
|
-
assert_false(player.finished, "Finished state after seeking before start");
|
218
|
-
|
219
|
-
// Check player does progress
|
220
|
-
at(0.2, function() {
|
221
|
-
assert_equals(player.currentTime, 0.1, "Current time should progress");
|
222
|
-
});
|
223
|
-
}, "Seek behind content (forwards)");
|
224
|
-
|
225
|
-
// Test players do not get bounded after updating startTime such that they are before the start time.
|
226
|
-
timing_test(function() {
|
227
|
-
var player = createPlayer(3);
|
228
|
-
|
229
|
-
// Set start time in the future
|
230
|
-
player.startTime = 0.1;
|
231
|
-
|
232
|
-
// Check state of player
|
233
|
-
assert_equals(player.currentTime, -0.1, "Current time while waiting to start");
|
234
|
-
assert_false(player.paused, "Paused state while waiting to start");
|
235
|
-
assert_false(player.finished, "Finished state while waiting to start");
|
236
|
-
|
237
|
-
// Check player starts automatically
|
238
|
-
at(0.2, function() {
|
239
|
-
assert_equals(player.currentTime, 0.1, "Current time should progress");
|
240
|
-
assert_false(player.paused, "Paused state after starting");
|
241
|
-
assert_false(player.finished, "Finished state after starting");
|
242
|
-
});
|
243
|
-
}, "No bounding at start");
|
244
|
-
|
245
|
-
// Test players get bounded when they finish their source content.
|
246
|
-
timing_test(function() {
|
247
|
-
var player = createPlayer(3);
|
248
|
-
|
249
|
-
// Seek to just before end
|
250
|
-
player.currentTime = 2.9;
|
251
|
-
|
252
|
-
// Check state of player
|
253
|
-
assert_equals(player.currentTime, 2.9, "Current time just before end");
|
254
|
-
assert_false(player.paused, "Paused state just before end");
|
255
|
-
assert_false(player.finished, "Finished state just before end");
|
256
|
-
|
257
|
-
// Check player after finishing
|
258
|
-
at(0.2, function() {
|
259
|
-
assert_equals(player.currentTime, 3.0, "Current time when bounded progress");
|
260
|
-
assert_false(player.paused, "Paused state after ending");
|
261
|
-
assert_true(player.finished, "Finished state after ending");
|
262
|
-
});
|
263
|
-
}, "Limiting at end (seek with current time)");
|
264
|
-
|
265
|
-
// Test players get bounded when they finish their source content after altering start time.
|
266
|
-
timing_test(function() {
|
267
|
-
var player = createPlayer(3);
|
268
|
-
|
269
|
-
// Seek to just before end using the start time
|
270
|
-
player.startTime -= 2.9;
|
271
|
-
|
272
|
-
// Check state of player
|
273
|
-
assert_equals(player.currentTime, 2.9, "Current time just before end");
|
274
|
-
assert_false(player.paused, "Paused state just before end");
|
275
|
-
assert_false(player.finished, "Finished state just before end");
|
276
|
-
|
277
|
-
// Check player after finishing
|
278
|
-
at(0.2, function() {
|
279
|
-
assert_equals(player.currentTime, 3.0, "Current time when bounded progress");
|
280
|
-
assert_false(player.paused, "Paused state after ending");
|
281
|
-
assert_true(player.finished, "Finished state after ending");
|
282
|
-
});
|
283
|
-
}, "Limiting at end (seek with start time)");
|
284
|
-
|
285
|
-
// Test reversing a player prior to starting doesn't snap the current time to the beginning.
|
286
|
-
timing_test(function() {
|
287
|
-
var player = createPlayer(3);
|
288
|
-
|
289
|
-
// Seek before start
|
290
|
-
player.currentTime = -0.1;
|
291
|
-
|
292
|
-
// Check state
|
293
|
-
assert_equals(player.currentTime, -0.1, "Current time before reversing");
|
294
|
-
assert_false(player.finished, "Finished state before reversing");
|
295
|
-
|
296
|
-
// Reverse
|
297
|
-
player.reverse();
|
298
|
-
assert_equals(player.currentTime, -0.1, "Current time after reversing");
|
299
|
-
assert_true(player.finished, "Finished state after reversing");
|
300
|
-
assert_equals(player.playbackRate, -1, "Playback rate after reversing");
|
301
|
-
|
302
|
-
// Check player after some time
|
303
|
-
at(0.2, function() {
|
304
|
-
assert_equals(player.currentTime, -0.1, "Current time later");
|
305
|
-
assert_true(player.finished, "Finished state later");
|
306
|
-
});
|
307
|
-
}, "reverse() before start");
|
308
|
-
|
309
|
-
// Test reversing a player at the start causes the player to become bounded.
|
310
|
-
timing_test(function() {
|
311
|
-
var player = createPlayer(3);
|
312
|
-
|
313
|
-
// Reverse
|
314
|
-
player.reverse();
|
315
|
-
assert_equals(player.currentTime, 0, "Current time after reversing");
|
316
|
-
assert_true(player.finished, "Finished state after reversing");
|
317
|
-
assert_equals(player.playbackRate, -1, "Playback rate after reversing");
|
318
|
-
|
319
|
-
// Check player after some time
|
320
|
-
at(0.2, function() {
|
321
|
-
assert_equals(player.currentTime, 0, "Current time later");
|
322
|
-
assert_true(player.finished, "Finished state later");
|
323
|
-
});
|
324
|
-
}, "reverse() at start");
|
325
|
-
|
326
|
-
// Test reversing a player halfway through an animation.
|
327
|
-
timing_test(function() {
|
328
|
-
var player = createPlayer(3);
|
329
|
-
|
330
|
-
// Seek midway
|
331
|
-
player.currentTime = 1.5;
|
332
|
-
|
333
|
-
// Reverse
|
334
|
-
player.reverse();
|
335
|
-
assert_equals(player.currentTime, 1.5, "Current time after reversing");
|
336
|
-
assert_false(player.finished, "Finished state after reversing");
|
337
|
-
assert_equals(player.playbackRate, -1, "Playback rate after reversing");
|
338
|
-
|
339
|
-
// Check player after some time
|
340
|
-
at(0.2, function() {
|
341
|
-
assert_equals(player.currentTime, 1.3, "Current time when reversing");
|
342
|
-
assert_false(player.finished, "Finished state later");
|
343
|
-
});
|
344
|
-
}, "reverse() while playing");
|
345
|
-
|
346
|
-
// Test reversing a player that has ended starts playing backwards.
|
347
|
-
timing_test(function() {
|
348
|
-
var player = createPlayer(3);
|
349
|
-
|
350
|
-
// Seek to just before the end
|
351
|
-
player.currentTime = 2.9;
|
352
|
-
|
353
|
-
// Wait to finish
|
354
|
-
at(0.2, function() {
|
355
|
-
assert_equals(player.currentTime, 3.0, "Current time when finished");
|
356
|
-
assert_true(player.finished, "Finished state after finished");
|
357
|
-
|
358
|
-
// Reverse
|
359
|
-
player.reverse();
|
360
|
-
assert_equals(player.currentTime, 3.0, "Current time after reversing");
|
361
|
-
assert_false(player.finished, "Finished state after reversing");
|
362
|
-
assert_equals(player.playbackRate, -1, "Playback rate after reversing");
|
363
|
-
|
364
|
-
// Check we actually reverse
|
365
|
-
at(0.2, function() {
|
366
|
-
assert_equals(player.currentTime, 2.8, "Current time after beginning reverse");
|
367
|
-
assert_false(player.finished, "Finished state after reversing");
|
368
|
-
});
|
369
|
-
});
|
370
|
-
}, "reverse() when finished");
|
371
|
-
|
372
|
-
// Test reversing a player seeked past the end will snap back to the end.
|
373
|
-
timing_test(function() {
|
374
|
-
var player = createPlayer(3);
|
375
|
-
|
376
|
-
// Seek to past the end
|
377
|
-
player.currentTime = 4.0
|
378
|
-
|
379
|
-
player.reverse();
|
380
|
-
assert_equals(player.currentTime, 3.0, "Current time after reversing");
|
381
|
-
assert_false(player.finished, "Finished state after reversing");
|
382
|
-
assert_equals(player.playbackRate, -1, "Playback rate after reversing");
|
383
|
-
|
384
|
-
// Check we actually reverse
|
385
|
-
at(0.2, function() {
|
386
|
-
assert_equals(player.currentTime, 2.8, "Current time after beginning reverse");
|
387
|
-
assert_false(player.finished, "Finished state after reversing");
|
388
|
-
});
|
389
|
-
}, "reverse() when seeked past end");
|
390
|
-
|
391
|
-
// Test player current time after adjusting start time.
|
392
|
-
test(function() {
|
393
|
-
var player = createPlayer(3);
|
394
|
-
|
395
|
-
player.startTime = 1;
|
396
|
-
|
397
|
-
assert_equals(player.currentTime, -1, "currentTime while waiting to start");
|
398
|
-
assert_false(player.finished, "Finished state while waiting to start");
|
399
|
-
|
400
|
-
// Then put it in range
|
401
|
-
player.startTime -= 2;
|
402
|
-
assert_equals(player.currentTime, 1, "currentTime after updating start time");
|
403
|
-
assert_false(player.finished, "Finished state while after updating start time");
|
404
|
-
}, "Adjust start time (1)");
|
405
|
-
|
406
|
-
// Test player current time after adjusting start time and playing.
|
407
|
-
timing_test(function() {
|
408
|
-
var player = createPlayer(3);
|
409
|
-
|
410
|
-
player.startTime = 1;
|
411
|
-
|
412
|
-
assert_equals(player.currentTime, -1, "currentTime while waiting to start");
|
413
|
-
assert_false(player.finished, "Finished state while waiting to start");
|
414
|
-
|
415
|
-
// Then adjust start time
|
416
|
-
player.startTime -= 0.75;
|
417
|
-
|
418
|
-
// Check player is still waiting
|
419
|
-
assert_equals(player.currentTime, -0.25, "currentTime while waiting to start");
|
420
|
-
assert_false(player.finished, "Finished state while still waiting to start");
|
421
|
-
|
422
|
-
// Verify the time *did* update though
|
423
|
-
at(0.5, function() {
|
424
|
-
assert_equals(player.currentTime, 0.25, "currentTime after starting to play");
|
425
|
-
assert_false(player.finished, "Finished state after starting to play");
|
426
|
-
});
|
427
|
-
}, "Adjust start time (2)");
|
428
|
-
|
429
|
-
// Test player bounding by changing start time.
|
430
|
-
test(function() {
|
431
|
-
var player = createPlayer(3);
|
432
|
-
|
433
|
-
// Put it past the end
|
434
|
-
player.startTime = -4;
|
435
|
-
assert_equals(player.currentTime, 3, "currentTime after end");
|
436
|
-
assert_true(player.finished, "Finished state after end");
|
437
|
-
}, "Adjust start time (3)");
|
438
|
-
|
439
|
-
// Test bounding and unbounding a player by modifying start time.
|
440
|
-
test(function() {
|
441
|
-
var player = createPlayer(3);
|
442
|
-
|
443
|
-
// Put player in limited stage
|
444
|
-
player.startTime = -4;
|
445
|
-
|
446
|
-
assert_equals(player.currentTime, 3, "currentTime state while limited");
|
447
|
-
assert_true(player.finished, "Finished state while limited");
|
448
|
-
|
449
|
-
// Then put it in range
|
450
|
-
player.startTime += 2;
|
451
|
-
assert_equals(player.currentTime, 2, "currentTime after updating start time");
|
452
|
-
assert_false(player.finished, "Finished state while after updating start time");
|
453
|
-
}, "Adjust start time (4)");
|
454
|
-
|
455
|
-
// Test seeking past end of player.
|
456
|
-
timing_test(function() {
|
457
|
-
var player = createPlayer(3);
|
458
|
-
player.currentTime = 4;
|
459
|
-
assert_equals(player.currentTime, 4, "currentTime before waiting");
|
460
|
-
at(0.2, function() {
|
461
|
-
assert_equals(player.currentTime, 4, "currentTime after waiting");
|
462
|
-
});
|
463
|
-
}, "Seeking past player content end and waiting");
|
464
|
-
|
465
|
-
// Test seeking before start of reversed player.
|
466
|
-
timing_test(function() {
|
467
|
-
var player = createPlayer(3);
|
468
|
-
player.playbackRate = -1;
|
469
|
-
player.currentTime = -1;
|
470
|
-
assert_equals(player.currentTime, -1, "currentTime before waiting");
|
471
|
-
at(0.2, function() {
|
472
|
-
assert_equals(player.currentTime, -1, "currentTime after waiting");
|
473
|
-
});
|
474
|
-
}, "Seeking before reversed player content start and waiting");
|
475
|
-
|
476
|
-
// Test reversing the playback rate of a bounded player.
|
477
|
-
timing_test(function() {
|
478
|
-
var player = createPlayer(3);
|
479
|
-
|
480
|
-
// Set up player to start in 0.1s
|
481
|
-
player.startTime = 0.1;
|
482
|
-
|
483
|
-
// Check state
|
484
|
-
assert_equals(player.currentTime, -0.1, "currentTime after while waiting to start");
|
485
|
-
assert_false(player.finished, "Finished state while waiting to start");
|
486
|
-
|
487
|
-
// Reverse playbackRate
|
488
|
-
player.playbackRate = -1;
|
489
|
-
|
490
|
-
// We should maintain the same current time
|
491
|
-
assert_equals(player.currentTime, -0.1, "currentTime after updating playbackRate");
|
492
|
-
assert_true(player.finished, "Finished state after updating playbackRate");
|
493
|
-
|
494
|
-
// If we wait a while we should be stuck at the end
|
495
|
-
at(0.2, function() {
|
496
|
-
assert_equals(player.currentTime, -0.1, "currentTime after waiting");
|
497
|
-
assert_true(player.finished, "Finished state after waiting");
|
498
|
-
|
499
|
-
// Call play and we should start from the end
|
500
|
-
player.play();
|
501
|
-
assert_equals(player.currentTime, 3, "currentTime after play()");
|
502
|
-
assert_false(player.finished, "Finished state after play()");
|
503
|
-
});
|
504
|
-
}, "Reversing playbackRate before start");
|
505
|
-
|
506
|
-
// Test normal current time progression of a player after being bounded and unbounded.
|
507
|
-
timing_test(function() {
|
508
|
-
// Set up player
|
509
|
-
var player = createPlayer(3);
|
510
|
-
|
511
|
-
// Seek to bounded time
|
512
|
-
player.currentTime = 4;
|
513
|
-
|
514
|
-
// Check state
|
515
|
-
assert_equals(player.currentTime, 4, "currentTime while bounded");
|
516
|
-
assert_true(player.finished, "Finished state while bounded");
|
517
|
-
|
518
|
-
// Seek to unbounded time
|
519
|
-
player.currentTime = 2;
|
520
|
-
assert_equals(player.currentTime, 2, "currentTime while unbounded");
|
521
|
-
assert_false(player.finished, "Finished state while unbounded");
|
522
|
-
|
523
|
-
// Check it actually is playing
|
524
|
-
at(0.2, function() {
|
525
|
-
assert_equals(player.currentTime, 2.2, "Current time after playing unbounded");
|
526
|
-
});
|
527
|
-
}, "Seeking from end to playing");
|
528
|
-
|
529
|
-
// Test finishing and replaying a player in reverse.
|
530
|
-
timing_test(function() {
|
531
|
-
// Set up player
|
532
|
-
var player = createPlayer(3);
|
533
|
-
|
534
|
-
// Seek to middle of interval and reverse
|
535
|
-
player.currentTime = 2;
|
536
|
-
player.reverse();
|
537
|
-
|
538
|
-
// Check state
|
539
|
-
assert_equals(player.currentTime, 2, "currentTime after reversing");
|
540
|
-
assert_false(player.finished, "Finished state after reversing");
|
541
|
-
assert_equals(player.playbackRate, -1, "Playback rate after reversing");
|
542
|
-
player.finish();
|
543
|
-
assert_equals(player.currentTime, 0, "currentTime after finishing");
|
544
|
-
assert_true(player.finished, "Finished state after finishing");
|
545
|
-
|
546
|
-
// Then play again
|
547
|
-
player.play();
|
548
|
-
assert_equals(player.currentTime, 3, "currentTime after playing again");
|
549
|
-
assert_false(player.finished, "Finished state after playing again");
|
550
|
-
|
551
|
-
// Check if actually progresses
|
552
|
-
at(0.2, function() {
|
553
|
-
assert_equals(player.currentTime, 2.8, "Current time after playing for a while");
|
554
|
-
});
|
555
|
-
}, "play() on a finished reversed player");
|
556
|
-
|
557
|
-
// Test player.play() seeking to start when behind the source content.
|
558
|
-
timing_test(function() {
|
559
|
-
// Set up player to start in 2s
|
560
|
-
var player = createPlayer(3);
|
561
|
-
player.startTime = 2;
|
562
|
-
|
563
|
-
// Check it is waiting to start
|
564
|
-
assert_equals(player.currentTime, -2, "currentTime while waiting");
|
565
|
-
assert_false(player.finished, "Finished state while waiting");
|
566
|
-
|
567
|
-
// Call play()
|
568
|
-
player.play();
|
569
|
-
assert_equals(player.currentTime, 0, "currentTime after calling play()");
|
570
|
-
assert_false(player.finished, "Finished state after calling play()");
|
571
|
-
|
572
|
-
// Check it really is playing
|
573
|
-
at(0.5, function() {
|
574
|
-
assert_equals(player.currentTime, 0.5, "Current time after playing for a while");
|
575
|
-
});
|
576
|
-
}, "play() on player waiting to start kick-starts it");
|
577
|
-
|
578
|
-
// Test seeking a player to the start of its animation.
|
579
|
-
timing_test(function() {
|
580
|
-
// Set up player to start in 2s
|
581
|
-
var player = createPlayer(3);
|
582
|
-
player.startTime = 2;
|
583
|
-
|
584
|
-
// Check it is waiting to start
|
585
|
-
assert_equals(player.currentTime, -2, "currentTime while waiting");
|
586
|
-
assert_false(player.finished, "Finished state while waiting");
|
587
|
-
|
588
|
-
// Set currentTime = 0
|
589
|
-
player.currentTime = 0;
|
590
|
-
assert_equals(player.currentTime, 0, "currentTime after setting currentTime = 0");
|
591
|
-
assert_false(player.finished, "Finished state after setting currentTime = 0");
|
592
|
-
|
593
|
-
// Check it is playing
|
594
|
-
at(0.5, function() {
|
595
|
-
assert_equals(player.currentTime, 0.5, "currentTime after waiting a while");
|
596
|
-
assert_false(player.finished, "Finished state after waiting a while");
|
597
|
-
});
|
598
|
-
}, "currentTime = 0 on player waiting to start is ok");
|
599
|
-
|
600
|
-
// Test player becoming unbounded after source content is extended.
|
601
|
-
timing_test(function() {
|
602
|
-
var player = createPlayer(3);
|
603
|
-
|
604
|
-
player.currentTime = 4;
|
605
|
-
assert_equals(player.currentTime, 4, "currentTime after setting currentTime = 4");
|
606
|
-
assert_true(player.finished, "Finished state after setting currentTime = 4");
|
607
|
-
|
608
|
-
// Check it is NOT playing
|
609
|
-
at(0.2, function() {
|
610
|
-
assert_equals(player.currentTime, 4, "currentTime after waiting a while");
|
611
|
-
|
612
|
-
// Extend source
|
613
|
-
player.source.timing.duration = 5;
|
614
|
-
assert_equals(player.currentTime, 4, "currentTime after extending source");
|
615
|
-
assert_false(player.finished, "Finished state after extending source");
|
616
|
-
|
617
|
-
// Check it IS playing
|
618
|
-
at(0.2, function() {
|
619
|
-
assert_equals(player.currentTime, 4.2, "currentTime after waiting a while again");
|
620
|
-
});
|
621
|
-
});
|
622
|
-
}, "Extending source unblocks player (seek past end)");
|
623
|
-
|
624
|
-
// Test player ending normally and becoming unbounded after source content is extended.
|
625
|
-
timing_test(function() {
|
626
|
-
var player = createPlayer(3);
|
627
|
-
|
628
|
-
// Set currentTime to just before the end
|
629
|
-
player.currentTime = 2.9;
|
630
|
-
assert_false(player.finished, "Finished state just before ending");
|
631
|
-
|
632
|
-
// Play to end
|
633
|
-
at(0.2, function() {
|
634
|
-
assert_equals(player.currentTime, 3, "currentTime after ending normally");
|
635
|
-
assert_true(player.finished, "Finished state after ending normally");
|
636
|
-
|
637
|
-
// Extend source
|
638
|
-
player.source.timing.duration = 5;
|
639
|
-
assert_equals(player.currentTime, 3.0, "currentTime after extending source");
|
640
|
-
assert_false(player.finished, "Finished state after extending source");
|
641
|
-
|
642
|
-
// Check it is playing
|
643
|
-
at(0.2, function() {
|
644
|
-
assert_equals(player.currentTime, 3.2, "currentTime after waiting a while again");
|
645
|
-
});
|
646
|
-
});
|
647
|
-
}, "Extending source unblocks player (end normally)");
|
648
|
-
|
649
|
-
// Test player becomes bounded after source content is shortened.
|
650
|
-
timing_test(function() {
|
651
|
-
var player = createPlayer(3);
|
652
|
-
|
653
|
-
// Set currentTime to just before the end
|
654
|
-
player.currentTime = 2;
|
655
|
-
assert_equals(player.currentTime, 2.0, "currentTime before shortening");
|
656
|
-
assert_false(player.finished, "Finished state before shortening");
|
657
|
-
|
658
|
-
// Shorten source
|
659
|
-
player.source.timing.duration = 1;
|
660
|
-
assert_equals(player.currentTime, 2.0, "currentTime after shortening");
|
661
|
-
assert_true(player.finished, "Finished state after shortening");
|
662
|
-
|
663
|
-
// Check it is not playing
|
664
|
-
at(0.2, function() {
|
665
|
-
assert_equals(player.currentTime, 2.0, "currentTime after shortening");
|
666
|
-
});
|
667
|
-
}, "Shortening source blocks player");
|
668
|
-
|
669
|
-
// Test playing player becomes bounded after source content is shortened.
|
670
|
-
timing_test(function() {
|
671
|
-
var player = createPlayer(3);
|
672
|
-
|
673
|
-
// Set currentTime to midway
|
674
|
-
player.currentTime = 1.5;
|
675
|
-
assert_equals(player.currentTime, 1.5, "currentTime before shortening");
|
676
|
-
assert_false(player.finished, "Finished state after seeking");
|
677
|
-
|
678
|
-
// Let it play for a while
|
679
|
-
at(0.2, function() {
|
680
|
-
assert_equals(player.currentTime, 1.7, "currentTime before shortening");
|
681
|
-
assert_false(player.finished, "Finished state before shortening");
|
682
|
-
|
683
|
-
// Shorten source
|
684
|
-
player.source.timing.duration = 1;
|
685
|
-
assert_equals(player.currentTime, 1.7, "currentTime after shortening");
|
686
|
-
assert_true(player.finished, "Finished state after shortening");
|
687
|
-
});
|
688
|
-
}, "Shortening source blocks player when playing");
|
689
|
-
|
690
|
-
// Test reversed player does not become bounded after its source content is shortened.
|
691
|
-
timing_test(function() {
|
692
|
-
var player = createPlayer(3);
|
693
|
-
|
694
|
-
// Set currentTime to just before the end
|
695
|
-
player.currentTime = 2;
|
696
|
-
player.reverse();
|
697
|
-
assert_equals(player.currentTime, 2.0, "currentTime before shortening");
|
698
|
-
assert_false(player.finished, "Finished state before shortening");
|
699
|
-
|
700
|
-
// Shorten source
|
701
|
-
player.source.timing.duration = 1;
|
702
|
-
assert_equals(player.currentTime, 2.0, "currentTime after shortening");
|
703
|
-
assert_false(player.finished, "Finished state after shortening");
|
704
|
-
|
705
|
-
// Check it is playing
|
706
|
-
at(0.2, function() {
|
707
|
-
assert_equals(player.currentTime, 1.8, "currentTime after shortening");
|
708
|
-
});
|
709
|
-
}, "Shortening source does not block in reverse");
|
710
|
-
|
711
|
-
// Test player becoming unbounded after duration 0 source content is extended.
|
712
|
-
timing_test(function() {
|
713
|
-
// Add empty animation
|
714
|
-
var player = createPlayer(0);
|
715
|
-
|
716
|
-
// Check we don't progress
|
717
|
-
assert_equals(player.currentTime, 0, "currentTime before adding content");
|
718
|
-
assert_true(player.finished, "Finished state before adding content");
|
719
|
-
|
720
|
-
// Wait and check we don't progress
|
721
|
-
at(0.2, function() {
|
722
|
-
assert_equals(player.currentTime, 0, "currentTime after waiting");
|
723
|
-
assert_true(player.finished, "Finished state after waiting");
|
724
|
-
|
725
|
-
// "Add" content
|
726
|
-
player.source.timing.duration = 3;
|
727
|
-
|
728
|
-
// We should pick up from 0, not jump 0.2s in
|
729
|
-
assert_equals(player.currentTime, 0, "currentTime after extending");
|
730
|
-
assert_false(player.finished, "Finished state after extending");
|
731
|
-
|
732
|
-
// Wait and check
|
733
|
-
at(0.2, function() {
|
734
|
-
assert_equals(player.currentTime, 0.2, "currentTime after extending and waiting");
|
735
|
-
});
|
736
|
-
});
|
737
|
-
}, "Async add content");
|
738
|
-
|
739
|
-
// Test negative player playback rate with negative current time.
|
740
|
-
timing_test(function() {
|
741
|
-
var player = createPlayer(3);
|
742
|
-
|
743
|
-
// Set a negative time and let it play for a while
|
744
|
-
player.currentTime = -1;
|
745
|
-
at(0.2, function() {
|
746
|
-
assert_equals(player.currentTime, -0.8, "currentTime after waiting");
|
747
|
-
assert_false(player.finished, "Finished state after waiting");
|
748
|
-
|
749
|
-
// Reverse
|
750
|
-
player.playbackRate = -1;
|
751
|
-
assert_equals(player.currentTime, -0.8, "currentTime after reversing");
|
752
|
-
assert_true(player.finished, "Finished state after reversing");
|
753
|
-
});
|
754
|
-
}, "Setting negative playback rate in negative space");
|
755
|
-
|
756
|
-
// Test reversed player becoming bounded when start of animation is reached.
|
757
|
-
timing_test(function() {
|
758
|
-
var player = createPlayer(3);
|
759
|
-
|
760
|
-
// Seek to just before end
|
761
|
-
player.reverse();
|
762
|
-
player.currentTime = 0.1;
|
763
|
-
|
764
|
-
// Check state of player
|
765
|
-
assert_equals(player.currentTime, 0.1, "Current time just before end");
|
766
|
-
assert_false(player.paused, "Paused state just before end");
|
767
|
-
assert_false(player.finished, "Finished state just before end");
|
768
|
-
|
769
|
-
// Check player after finishing
|
770
|
-
at(0.2, function() {
|
771
|
-
assert_equals(player.currentTime, 0, "Current time when limited");
|
772
|
-
assert_false(player.paused, "Paused state after ending");
|
773
|
-
assert_true(player.finished, "Finished state after ending");
|
774
|
-
});
|
775
|
-
}, "Limiting at start");
|
776
|
-
|
777
|
-
// Test the floating point accuracy of seeking a player.
|
778
|
-
test(function() {
|
779
|
-
var player = createPlayer(3);
|
780
|
-
// Setting a high playbackRate has caused the reported currentTime to differ
|
781
|
-
// from what was set in previous implementations of AnimationPlayer.
|
782
|
-
player.playbackRate = 123456;
|
783
|
-
player.currentTime = 1.618;
|
784
|
-
assert_equals(player.currentTime, 1.618, "currentTime after seeking to fractional time");
|
785
|
-
}, "currentTime preserves floating point accuracy after seeking");
|
786
|
-
</script>
|