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,68 +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
|
-
<style>
|
19
|
-
div.anim {
|
20
|
-
position: relative;
|
21
|
-
left: 0px;
|
22
|
-
}
|
23
|
-
</style>
|
24
|
-
|
25
|
-
<div id="anim" class="anim"></div>
|
26
|
-
|
27
|
-
<script src="../bootstrap.js"></script>
|
28
|
-
<script>
|
29
|
-
"use strict";
|
30
|
-
|
31
|
-
var effect = [{left: "100px"}, {left: "200px"}];
|
32
|
-
|
33
|
-
var testPauseUnpause = function(name, player) {
|
34
|
-
player.currentTime = 5.0;
|
35
|
-
player.paused = true;
|
36
|
-
test(function() {assert_equals(player.currentTime, 5.0)},
|
37
|
-
name + " AnimationPlayer.currentTime should be unaffected by pausing");
|
38
|
-
player.paused = false;
|
39
|
-
test(function() {assert_equals(player.currentTime, 5.0)},
|
40
|
-
name + " AnimationPlayer.currentTime should be unaffected by unpausing");
|
41
|
-
};
|
42
|
-
|
43
|
-
// Test that an AnimationPlayer's currentTime is correct after pausing and
|
44
|
-
// unpausing, with a zero startTime.
|
45
|
-
addEventListener("load", function() {
|
46
|
-
testPauseUnpause("zero starttime,", document.timeline.play(new Animation(
|
47
|
-
document.getElementById("anim"), effect, 1.0)));
|
48
|
-
|
49
|
-
});
|
50
|
-
|
51
|
-
// Test that an AnimationPlayer's currentTime is correct after pausing and
|
52
|
-
// unpausing, with a non-zero startTime.
|
53
|
-
addEventListener("load", function() {
|
54
|
-
var player = document.timeline.play(new Animation(
|
55
|
-
document.getElementById("anim"), effect, 1.0));
|
56
|
-
test(function() {assert_equals(player.startTime > 0, true)},
|
57
|
-
"AnimationPlayer has started");
|
58
|
-
testPauseUnpause("non-zero starttime,", player);
|
59
|
-
});
|
60
|
-
|
61
|
-
// TODO: Test pausing and unpausing with a forced currentTime while the
|
62
|
-
// Timeline is not started. See
|
63
|
-
// https://github.com/web-animations/web-animations-js/issues/167
|
64
|
-
|
65
|
-
// FIXME! - Make this actually test something...
|
66
|
-
test(function() { assert_true(true); }, "Dummy test");
|
67
|
-
|
68
|
-
</script>
|
@@ -1,75 +0,0 @@
|
|
1
|
-
html, body {
|
2
|
-
height: 100%;
|
3
|
-
padding: 0;
|
4
|
-
margin: 0;
|
5
|
-
}
|
6
|
-
|
7
|
-
#timeline {
|
8
|
-
position: fixed;
|
9
|
-
height: 35px;
|
10
|
-
bottom: 2px;
|
11
|
-
left: 0;
|
12
|
-
width: calc(100% - 50px);
|
13
|
-
|
14
|
-
padding-left: 25px;
|
15
|
-
padding-right: 25px;
|
16
|
-
}
|
17
|
-
|
18
|
-
#timeline div.bar {
|
19
|
-
position: absolute;
|
20
|
-
border: 1px solid black;
|
21
|
-
top: 25px;
|
22
|
-
height: 10px;
|
23
|
-
width: calc(100% - 135px);
|
24
|
-
}
|
25
|
-
|
26
|
-
#timeline button {
|
27
|
-
float: right;
|
28
|
-
margin: 1px;
|
29
|
-
margin-top: 17px;
|
30
|
-
height: 20px;
|
31
|
-
width: 20px;
|
32
|
-
}
|
33
|
-
|
34
|
-
#timeline #control {
|
35
|
-
width: 30px;
|
36
|
-
font-size: 6pt;
|
37
|
-
padding: 0;
|
38
|
-
}
|
39
|
-
|
40
|
-
#timeline div.progress {
|
41
|
-
background-color: black;
|
42
|
-
height: 100%;
|
43
|
-
}
|
44
|
-
|
45
|
-
img.marker {
|
46
|
-
position: absolute;
|
47
|
-
top: -25px;
|
48
|
-
width: 20px;
|
49
|
-
height: 30px;
|
50
|
-
}
|
51
|
-
|
52
|
-
div.info {
|
53
|
-
border: 1px solid black;
|
54
|
-
border-radius: 10px;
|
55
|
-
padding: 5px;
|
56
|
-
position: absolute;
|
57
|
-
bottom: 40px;
|
58
|
-
background: white;
|
59
|
-
}
|
60
|
-
|
61
|
-
div.info pre {
|
62
|
-
display: block;
|
63
|
-
}
|
64
|
-
|
65
|
-
#results tr td:last-child {
|
66
|
-
white-space: pre;
|
67
|
-
font-family: monospace;
|
68
|
-
}
|
69
|
-
|
70
|
-
#debug {
|
71
|
-
width: 100%;
|
72
|
-
height: 400px;
|
73
|
-
overflow-y: scroll;
|
74
|
-
border: 1px solid black;
|
75
|
-
}
|
@@ -1,63 +0,0 @@
|
|
1
|
-
#!/usr/bin/python
|
2
|
-
|
3
|
-
import cStringIO as StringIO
|
4
|
-
from fnmatch import fnmatch
|
5
|
-
import difflib
|
6
|
-
import os
|
7
|
-
import sys
|
8
|
-
|
9
|
-
|
10
|
-
def get_name(filename):
|
11
|
-
return os.path.splitext(filename)[0]
|
12
|
-
|
13
|
-
|
14
|
-
def list_dir(dir_path, filter_func):
|
15
|
-
return sorted(filter(filter_func, os.listdir(dir_path)), key=get_name)
|
16
|
-
|
17
|
-
|
18
|
-
def main():
|
19
|
-
test_dir = os.path.dirname(os.path.realpath(__file__))
|
20
|
-
testcase_dir = os.path.join(test_dir, 'testcases')
|
21
|
-
testcase_file = os.path.join(test_dir, 'testcases.js')
|
22
|
-
|
23
|
-
def is_testcase_file(filename):
|
24
|
-
return (
|
25
|
-
fnmatch(filename, "*.html") and
|
26
|
-
not fnmatch(filename, "manual-test*") and
|
27
|
-
not fnmatch(filename, "disabled-*"))
|
28
|
-
|
29
|
-
new_testcases = StringIO.StringIO()
|
30
|
-
new_testcases.write("""\
|
31
|
-
// This file is automatically generated by test/update-testcases.py.
|
32
|
-
// Disable tests by adding them to test/disabled-testcases
|
33
|
-
""")
|
34
|
-
new_testcases.write('var tests = [\n \'')
|
35
|
-
new_testcases.write(
|
36
|
-
'\',\n \''.join(list_dir(testcase_dir, is_testcase_file)))
|
37
|
-
new_testcases.write('\',\n];\n')
|
38
|
-
new_testcases.seek(0)
|
39
|
-
new_testcases_lines = new_testcases.readlines()
|
40
|
-
|
41
|
-
current_testcases_lines = file(testcase_file).readlines()
|
42
|
-
|
43
|
-
lines = list(difflib.unified_diff(
|
44
|
-
current_testcases_lines, new_testcases_lines,
|
45
|
-
fromfile=testcase_file, tofile=testcase_file))
|
46
|
-
|
47
|
-
if len(lines) == 0:
|
48
|
-
sys.stdout.write('Nothing to do\n')
|
49
|
-
sys.exit(0)
|
50
|
-
|
51
|
-
if not "--dry-run" in sys.argv:
|
52
|
-
file(testcase_file, "w").write("".join(new_testcases_lines))
|
53
|
-
sys.stdout.write(
|
54
|
-
'Updating %s with the following diff.\n' % testcase_file)
|
55
|
-
|
56
|
-
for line in lines:
|
57
|
-
sys.stdout.write(line)
|
58
|
-
|
59
|
-
sys.exit(1)
|
60
|
-
|
61
|
-
|
62
|
-
if __name__ == '__main__':
|
63
|
-
main()
|
@@ -1,152 +0,0 @@
|
|
1
|
-
#! /bin/bash
|
2
|
-
|
3
|
-
# Create the Android environment needed by run-tests.py
|
4
|
-
set -e
|
5
|
-
ANDROID_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
6
|
-
. $ANDROID_DIR/config.sh
|
7
|
-
cd $ANDROID_DIR
|
8
|
-
|
9
|
-
# Download the android emulator and adb
|
10
|
-
if [ ! -d adt ]; then
|
11
|
-
wget -c https://dl.google.com/android/adt/adt-bundle-linux-$(uname -p)-20131030.zip -O adt.zip
|
12
|
-
unzip adt.zip > /dev/null
|
13
|
-
ls -l adt*
|
14
|
-
mv adt-bundle-linux-* adt
|
15
|
-
fi
|
16
|
-
export ADB="$ANDROID_DIR/adt/sdk/platform-tools/adb -e"
|
17
|
-
export EMULATOR=$ANDROID_DIR/adt/sdk/tools/emulator
|
18
|
-
export AVD=$ANDROID_DIR/adt/sdk/tools/android
|
19
|
-
|
20
|
-
# Create an Android Virtual Device
|
21
|
-
if [ ! -e avd ]; then
|
22
|
-
echo "" | $AVD --verbose create avd -n Android-Chrome --target 1 --force --path avd
|
23
|
-
fi
|
24
|
-
|
25
|
-
# See if the emulator is running? The emulator occasionally segfaults when
|
26
|
-
# starting, so we try this in a loop.
|
27
|
-
while true; do
|
28
|
-
EMULATOR_RUNNING=false
|
29
|
-
if [ -e $EMULATOR_PIDFILE ]; then
|
30
|
-
EMULATOR_PID=$(cat $EMULATOR_PIDFILE)
|
31
|
-
if kill -0 $EMULATOR_PID ; then
|
32
|
-
EMULATOR_RUNNING=true
|
33
|
-
else
|
34
|
-
rm $EMULATOR_PIDFILE
|
35
|
-
fi
|
36
|
-
fi
|
37
|
-
if $EMULATOR_RUNNING ; then
|
38
|
-
echo "Android emulator running at $EMULATOR_PID"
|
39
|
-
else
|
40
|
-
# The emulator needs an xserver, start xvfb if none are running.
|
41
|
-
if [ "x$DISPLAY" == x ]; then
|
42
|
-
export DISPLAY=:99.0
|
43
|
-
# xvfb must use 24bits otherwise you get a "failed to create drawable" error
|
44
|
-
# from the emulator. See the following bug for more information
|
45
|
-
# https://bugs.freedesktop.org/show_bug.cgi?id=62742
|
46
|
-
/sbin/start-stop-daemon --start --quiet --pidfile $XVFB_PIDFILE --make-pidfile --background --exec \
|
47
|
-
/usr/bin/Xvfb -- :99 +extension GLX -ac -screen 0 1280x1024x24
|
48
|
-
sleep 15
|
49
|
-
fi
|
50
|
-
|
51
|
-
$ADB kill-server
|
52
|
-
$ADB start-server
|
53
|
-
if [ $($ADB devices | wc -l) -gt 2 ]; then
|
54
|
-
echo "Multiple Android devices found, bailing."
|
55
|
-
exit 1
|
56
|
-
fi
|
57
|
-
# "-no-snapshot-save -wipe-data" is needed so not state is saved.
|
58
|
-
# "-gpu on" is needed as Chrome segfaults without a GPU.
|
59
|
-
/sbin/start-stop-daemon --verbose --start --quiet --pidfile $EMULATOR_PIDFILE --make-pidfile --background --exec /bin/bash -- -c \
|
60
|
-
"exec $EMULATOR -verbose -gpu on -no-audio -no-boot-anim -partition-size 1024 -no-snapshot-save -wipe-data @Android-Chrome >> $OLD_PWD/emulator.log 2>&1"
|
61
|
-
|
62
|
-
# The emulator crashes if you access it too fast :/
|
63
|
-
sleep 5
|
64
|
-
continue
|
65
|
-
fi
|
66
|
-
|
67
|
-
$ADB wait-for-device shell true
|
68
|
-
|
69
|
-
BOOTED=$($ADB shell getprop sys.boot_completed | sed -e's/[^0-9]*//g')
|
70
|
-
BOOTANIM=$($ADB shell getprop init.svc.bootanim | sed -e's/[^a-zA-Z]*//g')
|
71
|
-
echo "Waiting for emulator to boot... Booted? $BOOTED Animation? $BOOTANIM"
|
72
|
-
|
73
|
-
if [ x$BOOTED == x1 -a x$BOOTANIM == xstopped ]; then
|
74
|
-
|
75
|
-
# Make localhost refer to the host machine, not the emulator.
|
76
|
-
# See http://developer.android.com/tools/devices/emulator.html#emulatornetworking
|
77
|
-
echo "Redirecting localhost"
|
78
|
-
$ADB shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock0 /system
|
79
|
-
$ADB shell echo "10.0.2.2 localhost" \> /etc/hosts
|
80
|
-
|
81
|
-
break
|
82
|
-
else
|
83
|
-
sleep 5
|
84
|
-
fi
|
85
|
-
done
|
86
|
-
|
87
|
-
# Download and install the chrome apk.
|
88
|
-
if [ -e Chrome.apk ]; then
|
89
|
-
CHROME_APK=$ANDROID_DIR/Chrome.apk
|
90
|
-
CHROME_APP=com.google.android.apps.chrome
|
91
|
-
CHROME_ACT=.Main
|
92
|
-
else
|
93
|
-
if [ ! -e chrome-android/apks/ChromeShell.apk ]; then
|
94
|
-
LATEST_APK=`curl -s http://commondatastorage.googleapis.com/chromium-browser-continuous/Android/LAST_CHANGE`
|
95
|
-
REMOTE_APK=http://commondatastorage.googleapis.com/chromium-browser-continuous/Android/$LATEST_APK/chrome-android.zip
|
96
|
-
wget -c $REMOTE_APK
|
97
|
-
unzip chrome-android.zip
|
98
|
-
fi
|
99
|
-
CHROME_APK=$ANDROID_DIR/chrome-android/apks/ChromeShell.apk
|
100
|
-
CHROME_APP=org.chromium.chrome.shell
|
101
|
-
CHROME_ACT=.ChromeShellActivity
|
102
|
-
fi
|
103
|
-
|
104
|
-
function start_chrome () {
|
105
|
-
$ADB shell am start -a android.intent.action.MAIN -n $CHROME_APP/$CHROME_ACT -W
|
106
|
-
}
|
107
|
-
|
108
|
-
if start_chrome | grep -q "does not exist"; then
|
109
|
-
$ADB install $CHROME_APK
|
110
|
-
fi
|
111
|
-
|
112
|
-
# Check the chrome binary actually starts without segfaulting
|
113
|
-
start_chrome
|
114
|
-
sleep 2
|
115
|
-
if start_chrome | grep -q "its current task has been brought to the front"; then
|
116
|
-
echo "Chrome seems to have started okay."
|
117
|
-
else
|
118
|
-
echo "Chrome seems to have crashed!"
|
119
|
-
$ADB shell dumpsys activity # FIXME: Need to grep for running Chrome.
|
120
|
-
exit 1
|
121
|
-
fi
|
122
|
-
|
123
|
-
|
124
|
-
# Download and start the chromedriver binary
|
125
|
-
if [ ! -e chromedriver ]; then
|
126
|
-
# TODO: Use the latest release of chromedriver instead of this custom build once version 3.0 comes out.
|
127
|
-
# LATEST_CHROMEDRIVER=`curl -s http://chromedriver.storage.googleapis.com/LATEST_RELEASE`
|
128
|
-
# wget -c http://chromedriver.storage.googleapis.com/$LATEST_CHROMEDRIVER/chromedriver_linux64.zip -O chromedriver.zip
|
129
|
-
# unzip chromedriver.zip
|
130
|
-
|
131
|
-
# This version of chromedriver was build from the Chromium repository at r262639 on 2014-04-09.
|
132
|
-
wget https://googledrive.com/host/0B6C-LL9qmW-IYVFrdURCMHZlM1U -O chromedriver
|
133
|
-
chmod 0755 chromedriver
|
134
|
-
fi
|
135
|
-
|
136
|
-
CHROMEDRIVER_NOTRUNNING=true
|
137
|
-
if [ -e $CHROMEDRIVER_PIDFILE ]; then
|
138
|
-
CHROMEDRIVER_PID=$(cat $CHROMEDRIVER_PIDFILE)
|
139
|
-
if kill -0 $CHROMEDRIVER_PID ; then
|
140
|
-
echo "Chrome Driver running at $CHROMEDRIVER_PID"
|
141
|
-
CHROMEDRIVER_NOTRUNNING=false
|
142
|
-
else
|
143
|
-
rm $CHROMEDRIVER_PIDFILE
|
144
|
-
fi
|
145
|
-
fi
|
146
|
-
if $CHROMEDRIVER_NOTRUNNING; then
|
147
|
-
/sbin/start-stop-daemon --verbose --start --quiet --pidfile $CHROMEDRIVER_PIDFILE --make-pidfile --background --exec \
|
148
|
-
$ANDROID_DIR/chromedriver
|
149
|
-
sleep 5
|
150
|
-
fi
|
151
|
-
|
152
|
-
cd $OLD_PWD
|
@@ -1,20 +0,0 @@
|
|
1
|
-
#! /bin/bash
|
2
|
-
|
3
|
-
# Stop all the stuff started by setup.sh
|
4
|
-
set -x
|
5
|
-
set -e
|
6
|
-
ANDROID_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
7
|
-
. $ANDROID_DIR/config.sh
|
8
|
-
cd $ANDROID_DIR
|
9
|
-
|
10
|
-
for SERVER in $SERVERS; do
|
11
|
-
PIDFILE_VAR=${SERVER}_PIDFILE
|
12
|
-
PIDFILE=${!PIDFILE_VAR}
|
13
|
-
echo "$SERVER $PIDFILE"
|
14
|
-
if [ -e $PIDFILE ]; then
|
15
|
-
echo "Stopping $SERVER at $(cat $PIDFILE)"
|
16
|
-
/sbin/start-stop-daemon --stop --pidfile $PIDFILE --retry TERM/30/KILL/5 || rm $PIDFILE
|
17
|
-
fi
|
18
|
-
done
|
19
|
-
|
20
|
-
cd $OLD_PWD
|
@@ -1,813 +0,0 @@
|
|
1
|
-
#!/usr/bin/python
|
2
|
-
#
|
3
|
-
# -*- coding: utf-8 -*-
|
4
|
-
# vim: set ts=4 sw=4 et sts=4 ai:
|
5
|
-
|
6
|
-
import atexit
|
7
|
-
import base64
|
8
|
-
import cStringIO as StringIO
|
9
|
-
import getpass
|
10
|
-
import httplib
|
11
|
-
import json as simplejson
|
12
|
-
import os
|
13
|
-
import platform
|
14
|
-
import pprint
|
15
|
-
import re
|
16
|
-
import socket
|
17
|
-
import sys
|
18
|
-
import time
|
19
|
-
import urllib2
|
20
|
-
import zipfile
|
21
|
-
|
22
|
-
import argparse
|
23
|
-
parser = argparse.ArgumentParser()
|
24
|
-
|
25
|
-
parser.add_argument(
|
26
|
-
"-b", "--browser", type=str, required=True,
|
27
|
-
choices=['Firefox', 'Chrome', 'Ie', 'PhantomJS', 'Remote'],
|
28
|
-
help="Which WebDriver to use.")
|
29
|
-
|
30
|
-
parser.add_argument(
|
31
|
-
"-f", "--flag", action='append', default=[],
|
32
|
-
help="Command line flags to pass to the browser, "
|
33
|
-
"currently only available for Chrome. "
|
34
|
-
"Each flag must be a separate --flag invoccation.")
|
35
|
-
|
36
|
-
parser.add_argument(
|
37
|
-
"-x", "--virtual", action='store_true', default=False,
|
38
|
-
help="Use a virtual screen system such as Xvfb, Xephyr or Xvnc.")
|
39
|
-
|
40
|
-
parser.add_argument(
|
41
|
-
"-d", "--dontexit", action='store_true', default=False,
|
42
|
-
help="At end of testing, don't exit.")
|
43
|
-
|
44
|
-
parser.add_argument(
|
45
|
-
"-v", "--verbose", action='store_true', default=False,
|
46
|
-
help="Output more information.")
|
47
|
-
|
48
|
-
parser.add_argument(
|
49
|
-
"-u", "--upload", action='store_true', default=False,
|
50
|
-
help="Upload images to picture sharing site (http://postimage.org/),"
|
51
|
-
" only really useful for testbots.")
|
52
|
-
|
53
|
-
# Only used by the Remote browser option.
|
54
|
-
parser.add_argument(
|
55
|
-
"--remote-executor", type=str,
|
56
|
-
help="Location of the Remote executor.")
|
57
|
-
|
58
|
-
parser.add_argument(
|
59
|
-
"--remote-caps", action='append',
|
60
|
-
help="Location of capabilities to request on Remote executor.",
|
61
|
-
default=[])
|
62
|
-
|
63
|
-
parser.add_argument(
|
64
|
-
"-s", "--sauce", action='store_true', default=False,
|
65
|
-
help="Use the SauceLab's Selenium farm rather then locally starting"
|
66
|
-
" selenium. SAUCE_USERNAME and SAUCE_ACCESS_KEY must be set in"
|
67
|
-
" environment.")
|
68
|
-
|
69
|
-
# Subunit / testrepository support
|
70
|
-
parser.add_argument(
|
71
|
-
"--subunit", action='store_true', default=False,
|
72
|
-
help="Output raw subunit binary data.")
|
73
|
-
|
74
|
-
parser.add_argument(
|
75
|
-
"--list", action='store_true', default=False,
|
76
|
-
help="List tests which are available.")
|
77
|
-
|
78
|
-
parser.add_argument(
|
79
|
-
"--load-list", type=argparse.FileType('r'),
|
80
|
-
help="List of tests to run.")
|
81
|
-
|
82
|
-
args = parser.parse_args()
|
83
|
-
|
84
|
-
if args.verbose and args.subunit:
|
85
|
-
raise SystemExit("--verbose and --subunit are not compatible.")
|
86
|
-
|
87
|
-
# Make sure the repository is setup and the dependencies exist
|
88
|
-
# -----------------------------------------------------------------------------
|
89
|
-
|
90
|
-
import subprocess
|
91
|
-
|
92
|
-
caps = {}
|
93
|
-
if not args.sauce:
|
94
|
-
# Get any selenium drivers we might need
|
95
|
-
if args.browser == "Chrome":
|
96
|
-
# Get ChromeDriver if it's not in the path...
|
97
|
-
# https://code.google.com/p/chromedriver/downloads/list
|
98
|
-
chromedriver_bin = "chromedriver"
|
99
|
-
chromedriver_url_tmpl = "http://chromedriver.storage.googleapis.com/2.6/chromedriver_%s%s.zip" # noqa
|
100
|
-
|
101
|
-
if platform.system() == "Linux":
|
102
|
-
if platform.processor() == "x86_64":
|
103
|
-
# 64 bit binary needed
|
104
|
-
chromedriver_url = chromedriver_url_tmpl % ("linux", "64")
|
105
|
-
else:
|
106
|
-
# 32 bit binary needed
|
107
|
-
chromedriver_url = chromedriver_url_tmpl % ("linux", "32")
|
108
|
-
|
109
|
-
elif platform.system() == "Darwin":
|
110
|
-
chromedriver_url = chromedriver_url_tmpl % ("mac", "32")
|
111
|
-
elif platform.system() == "win32":
|
112
|
-
chromedriver_url = chromedriver_url_tmpl % ("win", "32")
|
113
|
-
chromedriver_url = "chromedriver.exe"
|
114
|
-
|
115
|
-
try:
|
116
|
-
if subprocess.call(chromedriver_bin) != 0:
|
117
|
-
raise OSError("Return code?")
|
118
|
-
except OSError:
|
119
|
-
chromedriver_local = os.path.join("tools", chromedriver_bin)
|
120
|
-
|
121
|
-
if not os.path.exists(chromedriver_local):
|
122
|
-
datafile = StringIO.StringIO(
|
123
|
-
urllib2.urlopen(chromedriver_url).read())
|
124
|
-
contents = zipfile.ZipFile(datafile, 'r')
|
125
|
-
contents.extract(chromedriver_bin, "tools")
|
126
|
-
|
127
|
-
chromedriver = os.path.realpath(chromedriver_local)
|
128
|
-
os.chmod(chromedriver, 0755)
|
129
|
-
else:
|
130
|
-
chromedriver = "chromedriver"
|
131
|
-
|
132
|
-
elif args.browser == "Firefox":
|
133
|
-
pass
|
134
|
-
|
135
|
-
elif args.browser == "PhantomJS":
|
136
|
-
phantomjs_bin = None
|
137
|
-
if platform.system() == "Linux":
|
138
|
-
phantomjs_bin = "phantomjs"
|
139
|
-
if platform.processor() == "x86_64":
|
140
|
-
# 64 bit binary needed
|
141
|
-
phantomjs_url = "https://phantomjs.googlecode.com/files/phantomjs-1.9.0-linux-x86_64.tar.bz2" # noqa
|
142
|
-
else:
|
143
|
-
# 32 bit binary needed
|
144
|
-
phantomjs_url = "https://phantomjs.googlecode.com/files/phantomjs-1.9.0-linux-i686.tar.bz2" # noqa
|
145
|
-
|
146
|
-
phantomjs_local = os.path.join("tools", phantomjs_bin)
|
147
|
-
if not os.path.exists(phantomjs_local):
|
148
|
-
datafile = StringIO.StringIO(
|
149
|
-
urllib2.urlopen(phantomjs_url).read())
|
150
|
-
contents = tarfile.TarFile.open(fileobj=datafile, mode='r:bz2')
|
151
|
-
file("tools/"+phantomjs_bin, "w").write(
|
152
|
-
contents.extractfile(
|
153
|
-
"phantomjs-1.9.0-linux-x86_64/bin/"+phantomjs_bin
|
154
|
-
).read())
|
155
|
-
|
156
|
-
phantomjs = os.path.realpath(phantomjs_local)
|
157
|
-
os.chmod(phantomjs, 0755)
|
158
|
-
else:
|
159
|
-
if platform.system() == "Darwin":
|
160
|
-
phantomjs_url = "https://phantomjs.googlecode.com/files/phantomjs-1.9.0-macosx.zip" # noqa
|
161
|
-
phantomjs_bin = "phantomjs"
|
162
|
-
|
163
|
-
elif platform.system() == "win32":
|
164
|
-
chromedriver_bin = "https://phantomjs.googlecode.com/files/phantomjs-1.9.0-windows.zip" # noqa
|
165
|
-
phantomjs_url = "phantomjs.exe"
|
166
|
-
|
167
|
-
phantomjs_local = os.path.join("tools", phantomjs_bin)
|
168
|
-
if not os.path.exists(phantomjs_local):
|
169
|
-
datafile = StringIO.StringIO(
|
170
|
-
urllib2.urlopen(phantomjs_url).read())
|
171
|
-
contents = zipfile.ZipFile(datafile, 'r')
|
172
|
-
contents.extract(phantomjs_bin, "tools")
|
173
|
-
|
174
|
-
phantomjs = os.path.realpath(phantomjs_local)
|
175
|
-
os.chmod(phantomjs, 0755)
|
176
|
-
else:
|
177
|
-
assert os.environ['SAUCE_USERNAME']
|
178
|
-
assert os.environ['SAUCE_ACCESS_KEY']
|
179
|
-
sauce_username = os.environ['SAUCE_USERNAME']
|
180
|
-
sauce_access_key = os.environ['SAUCE_ACCESS_KEY']
|
181
|
-
|
182
|
-
# Download the Sauce Connect script
|
183
|
-
sauce_connect_url = "http://saucelabs.com/downloads/Sauce-Connect-latest.zip" # noqa
|
184
|
-
sauce_connect_bin = "Sauce-Connect.jar"
|
185
|
-
sauce_connect_local = os.path.join("tools", sauce_connect_bin)
|
186
|
-
if not os.path.exists(sauce_connect_local):
|
187
|
-
datafile = StringIO.StringIO(urllib2.urlopen(sauce_connect_url).read())
|
188
|
-
contents = zipfile.ZipFile(datafile, 'r')
|
189
|
-
contents.extract(sauce_connect_bin, "tools")
|
190
|
-
|
191
|
-
if 'TRAVIS_JOB_NUMBER' in os.environ:
|
192
|
-
tunnel_id = os.environ['TRAVIS_JOB_NUMBER']
|
193
|
-
else:
|
194
|
-
tunnel_id = "%s:%s" % (socket.gethostname(), os.getpid())
|
195
|
-
args.remote_caps.append('tunnel-identifier=%s' % tunnel_id)
|
196
|
-
|
197
|
-
# Kill the tunnel when we die
|
198
|
-
def kill_tunnel(sauce_tunnel):
|
199
|
-
if sauce_tunnel.returncode is None:
|
200
|
-
sauce_tunnel.terminate()
|
201
|
-
|
202
|
-
timeout = time.time()
|
203
|
-
while sauce_tunnel.poll() is None:
|
204
|
-
if time.time() - timeout < 30:
|
205
|
-
time.sleep(1)
|
206
|
-
else:
|
207
|
-
sauce_tunnel.kill()
|
208
|
-
|
209
|
-
readyfile = "."+tunnel_id
|
210
|
-
sauce_tunnel = None
|
211
|
-
try:
|
212
|
-
sauce_log = file("sauce_tunnel.log", "w")
|
213
|
-
sauce_tunnel = subprocess.Popen(
|
214
|
-
["java", "-jar", sauce_connect_local,
|
215
|
-
"--readyfile", readyfile,
|
216
|
-
"--tunnel-identifier", tunnel_id,
|
217
|
-
sauce_username, sauce_access_key],
|
218
|
-
stdout=sauce_log, stderr=sauce_log)
|
219
|
-
|
220
|
-
atexit.register(kill_tunnel, sauce_tunnel)
|
221
|
-
|
222
|
-
# Wait for the tunnel to come up
|
223
|
-
while not os.path.exists(readyfile):
|
224
|
-
time.sleep(0.5)
|
225
|
-
|
226
|
-
except:
|
227
|
-
if sauce_tunnel:
|
228
|
-
kill_tunnel(sauce_tunnel)
|
229
|
-
raise
|
230
|
-
|
231
|
-
args.remote_executor = "http://%s:%s@localhost:4445/wd/hub" % (
|
232
|
-
sauce_username, sauce_access_key)
|
233
|
-
|
234
|
-
custom_data = {}
|
235
|
-
git_info = subprocess.Popen(
|
236
|
-
["git", "describe", "--all", "--long"], stdout=subprocess.PIPE
|
237
|
-
).communicate()[0]
|
238
|
-
custom_data["git-info"] = git_info
|
239
|
-
|
240
|
-
git_commit = subprocess.Popen(
|
241
|
-
["git", "rev-parse", "HEAD"], stdout=subprocess.PIPE
|
242
|
-
).communicate()[0]
|
243
|
-
custom_data["git-commit"] = git_commit
|
244
|
-
|
245
|
-
caps['tags'] = []
|
246
|
-
if 'TRAVIS_BUILD_NUMBER' in os.environ:
|
247
|
-
# Send travis information upstream
|
248
|
-
caps['build'] = "%s %s" % (
|
249
|
-
os.environ['TRAVIS_REPO_SLUG'],
|
250
|
-
os.environ['TRAVIS_BUILD_NUMBER'],
|
251
|
-
)
|
252
|
-
caps['name'] = "Travis run for %s" % os.environ['TRAVIS_REPO_SLUG']
|
253
|
-
|
254
|
-
caps['tags'].append(
|
255
|
-
"repo=%s" % os.environ['TRAVIS_REPO_SLUG'])
|
256
|
-
caps['tags'].append(
|
257
|
-
"branch=%s" % os.environ['TRAVIS_BRANCH'])
|
258
|
-
|
259
|
-
travis_env = [
|
260
|
-
'TRAVIS_BRANCH',
|
261
|
-
'TRAVIS_BUILD_ID',
|
262
|
-
'TRAVIS_BUILD_NUMBER',
|
263
|
-
'TRAVIS_COMMIT',
|
264
|
-
'TRAVIS_COMMIT_RANGE',
|
265
|
-
'TRAVIS_JOB_ID',
|
266
|
-
'TRAVIS_JOB_NUMBER',
|
267
|
-
'TRAVIS_PULL_REQUEST',
|
268
|
-
'TRAVIS_REPO_SLUG',
|
269
|
-
]
|
270
|
-
|
271
|
-
for env in travis_env:
|
272
|
-
tag = env[len('TRAVIS_'):].lower()
|
273
|
-
value = os.environ.get(env, None)
|
274
|
-
if not value:
|
275
|
-
continue
|
276
|
-
custom_data[tag] = value
|
277
|
-
|
278
|
-
custom_data["github-url"] = (
|
279
|
-
"https://github.com/%s/tree/%s" % (
|
280
|
-
os.environ['TRAVIS_REPO_SLUG'], git_commit))
|
281
|
-
custom_data["travis-url"] = (
|
282
|
-
"https://travis-ci.org/%s/builds/%s" % (
|
283
|
-
os.environ['TRAVIS_REPO_SLUG'],
|
284
|
-
os.environ['TRAVIS_BUILD_ID']))
|
285
|
-
else:
|
286
|
-
# Collect information about who/what is running the test
|
287
|
-
caps['name'] = "Manual run for %s" % getpass.getuser()
|
288
|
-
caps['build'] = git_info
|
289
|
-
|
290
|
-
caps['tags'].append('user=%s' % getpass.getuser())
|
291
|
-
caps['tags'].append('host=%s' % socket.gethostname())
|
292
|
-
|
293
|
-
# -----------------------------------------------------------------------------
|
294
|
-
|
295
|
-
import subunit
|
296
|
-
import testtools
|
297
|
-
|
298
|
-
if args.list:
|
299
|
-
data = file("test/testcases.js").read()
|
300
|
-
for test in re.compile("(?<=').+(?=')").findall(data):
|
301
|
-
print test[:-5]
|
302
|
-
sys.exit(-1)
|
303
|
-
|
304
|
-
if args.load_list:
|
305
|
-
tests = list(set(x.split(':')[0].strip()+'.html'
|
306
|
-
for x in args.load_list.readlines()))
|
307
|
-
else:
|
308
|
-
tests = []
|
309
|
-
|
310
|
-
# Collect summary of all the individual test runs
|
311
|
-
summary = testtools.StreamSummary()
|
312
|
-
|
313
|
-
# Output information to stdout
|
314
|
-
if not args.subunit:
|
315
|
-
# Output test failures
|
316
|
-
result_streams = [testtools.TextTestResult(sys.stdout)]
|
317
|
-
if args.verbose:
|
318
|
-
import unittest
|
319
|
-
# Output individual test progress
|
320
|
-
result_streams.insert(0,
|
321
|
-
unittest.TextTestResult(
|
322
|
-
unittest.runner._WritelnDecorator(sys.stdout), False, 2))
|
323
|
-
# Human readable test output
|
324
|
-
pertest = testtools.StreamToExtendedDecorator(
|
325
|
-
testtools.MultiTestResult(*result_streams))
|
326
|
-
else:
|
327
|
-
from subunit.v2 import StreamResultToBytes
|
328
|
-
pertest = StreamResultToBytes(sys.stdout)
|
329
|
-
|
330
|
-
if args.list:
|
331
|
-
output = subunit.CopyStreamResult([summary, pertest])
|
332
|
-
output.startTestRun()
|
333
|
-
for test in re.compile("(?<=').+(?=')").findall(
|
334
|
-
file("test/testcases.js").read()):
|
335
|
-
output.status(test_status='exists', test_id=test[:-5])
|
336
|
-
|
337
|
-
output.stopTestRun()
|
338
|
-
sys.exit(-1)
|
339
|
-
|
340
|
-
output = subunit.CopyStreamResult([summary, pertest])
|
341
|
-
output.startTestRun()
|
342
|
-
|
343
|
-
# Start up a local HTTP server which serves the files to the browser and
|
344
|
-
# collects the test results.
|
345
|
-
# -----------------------------------------------------------------------------
|
346
|
-
import SimpleHTTPServer
|
347
|
-
import SocketServer
|
348
|
-
import threading
|
349
|
-
import cgi
|
350
|
-
import re
|
351
|
-
|
352
|
-
import itertools
|
353
|
-
import mimetools
|
354
|
-
import mimetypes
|
355
|
-
|
356
|
-
|
357
|
-
class MultiPartForm(object):
|
358
|
-
"""Accumulate the data to be used when posting a form."""
|
359
|
-
|
360
|
-
def __init__(self):
|
361
|
-
self.form_fields = []
|
362
|
-
self.files = []
|
363
|
-
self.boundary = mimetools.choose_boundary()
|
364
|
-
return
|
365
|
-
|
366
|
-
def get_content_type(self):
|
367
|
-
return 'multipart/form-data; boundary=%s' % self.boundary
|
368
|
-
|
369
|
-
def add_field(self, name, value):
|
370
|
-
"""Add a simple field to the form data."""
|
371
|
-
self.form_fields.append((name, value))
|
372
|
-
return
|
373
|
-
|
374
|
-
def add_file(self, fieldname, filename, fileHandle, mimetype=None):
|
375
|
-
"""Add a file to be uploaded."""
|
376
|
-
body = fileHandle.read()
|
377
|
-
if mimetype is None:
|
378
|
-
mimetype = (
|
379
|
-
mimetypes.guess_type(filename)[0] or
|
380
|
-
'application/octet-stream')
|
381
|
-
self.files.append((fieldname, filename, mimetype, body))
|
382
|
-
return
|
383
|
-
|
384
|
-
def __str__(self):
|
385
|
-
"""Return a string representing the form data, with attached files."""
|
386
|
-
# Build a list of lists, each containing "lines" of the
|
387
|
-
# request. Each part is separated by a boundary string.
|
388
|
-
# Once the list is built, return a string where each
|
389
|
-
# line is separated by '\r\n'.
|
390
|
-
parts = []
|
391
|
-
part_boundary = '--' + self.boundary
|
392
|
-
|
393
|
-
# Add the form fields
|
394
|
-
parts.extend([
|
395
|
-
part_boundary,
|
396
|
-
'Content-Disposition: form-data; name="%s"' % name,
|
397
|
-
'',
|
398
|
-
value,
|
399
|
-
] for name, value in self.form_fields)
|
400
|
-
|
401
|
-
# Add the files to upload
|
402
|
-
parts.extend([
|
403
|
-
part_boundary,
|
404
|
-
'Content-Disposition: file; name="%s"; filename="%s"' % (
|
405
|
-
field_name, filename),
|
406
|
-
'Content-Type: %s' % content_type,
|
407
|
-
'',
|
408
|
-
body,
|
409
|
-
] for field_name, filename, content_type, body in self.files)
|
410
|
-
|
411
|
-
# Flatten the list and add closing boundary marker,
|
412
|
-
# then return CR+LF separated data
|
413
|
-
flattened = list(str(b) for b in itertools.chain(*parts))
|
414
|
-
flattened.append('--' + self.boundary + '--')
|
415
|
-
flattened.append('')
|
416
|
-
return '\r\n'.join(flattened)
|
417
|
-
|
418
|
-
|
419
|
-
critical_failure = False
|
420
|
-
|
421
|
-
|
422
|
-
class ServerHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
423
|
-
STATUS = {0: 'success', 1: 'fail', 2: 'fail', 3: 'skip'}
|
424
|
-
|
425
|
-
# Make the HTTP requests be quiet
|
426
|
-
def log_message(self, format, *a):
|
427
|
-
if args.verbose:
|
428
|
-
SimpleHTTPServer.SimpleHTTPRequestHandler.log_message(
|
429
|
-
self, format, *a)
|
430
|
-
|
431
|
-
def do_POST(self):
|
432
|
-
global critical_failure
|
433
|
-
already_failed = critical_failure
|
434
|
-
|
435
|
-
form = cgi.FieldStorage(
|
436
|
-
fp=self.rfile,
|
437
|
-
headers=self.headers,
|
438
|
-
environ={
|
439
|
-
'REQUEST_METHOD': 'POST',
|
440
|
-
'CONTENT_TYPE': self.headers['Content-Type'],
|
441
|
-
})
|
442
|
-
|
443
|
-
overall_status = 0
|
444
|
-
test_id = None
|
445
|
-
try:
|
446
|
-
json_data = form.getvalue('data')
|
447
|
-
data = simplejson.loads(json_data)
|
448
|
-
except ValueError, e:
|
449
|
-
critical_failure = True
|
450
|
-
|
451
|
-
test_id = "CRITICAL-FAILURE"
|
452
|
-
|
453
|
-
msg = "Unable to decode JSON object (%s)\n%s" % (e, json_data)
|
454
|
-
overall_status = 1
|
455
|
-
output.status(
|
456
|
-
test_id="CRITICAL-FAILURE",
|
457
|
-
test_status='fail',
|
458
|
-
test_tags=[args.browser],
|
459
|
-
file_name='traceback',
|
460
|
-
file_bytes=msg,
|
461
|
-
mime_type='text/plain; charset=UTF-8',
|
462
|
-
eof=True)
|
463
|
-
else:
|
464
|
-
test_id = data['testName'][:-5]
|
465
|
-
for result in data['results']:
|
466
|
-
info = dict(result)
|
467
|
-
info.pop('_structured_clone', None)
|
468
|
-
|
469
|
-
if not isinstance(result['message'], (str, unicode)):
|
470
|
-
msg = str(result['message'])
|
471
|
-
else:
|
472
|
-
msg = result['message']
|
473
|
-
|
474
|
-
overall_status += result['status']
|
475
|
-
output.status(
|
476
|
-
test_id="%s:%s" % (test_id, result['name']),
|
477
|
-
test_status=self.STATUS[result['status']],
|
478
|
-
test_tags=[args.browser],
|
479
|
-
file_name='traceback',
|
480
|
-
file_bytes=msg,
|
481
|
-
mime_type='text/plain; charset=UTF-8',
|
482
|
-
eof=True)
|
483
|
-
|
484
|
-
if args.verbose and 'debug' in data and overall_status > 0:
|
485
|
-
output.status(
|
486
|
-
test_id="%s:debug-log" % (test_id),
|
487
|
-
test_status='fail',
|
488
|
-
test_tags=[args.browser],
|
489
|
-
file_name='traceback',
|
490
|
-
file_bytes=data['debug'],
|
491
|
-
mime_type='text/plain; charset=UTF-8',
|
492
|
-
eof=True)
|
493
|
-
|
494
|
-
# Take a screenshot of result if a failure occurred.
|
495
|
-
if overall_status > 0 and (args.virtual or args.browser == "Remote"):
|
496
|
-
time.sleep(1)
|
497
|
-
|
498
|
-
try:
|
499
|
-
screenshot = test_id + '.png'
|
500
|
-
if args.virtual:
|
501
|
-
disp.grab().save(screenshot)
|
502
|
-
elif args.browser == "Remote":
|
503
|
-
global browser
|
504
|
-
browser.save_screenshot(screenshot)
|
505
|
-
|
506
|
-
# On android we want to do a
|
507
|
-
# adb run /system/bin/screencap -p /sdcard/FILENAME.png
|
508
|
-
# adb cp FILENAME.png ....
|
509
|
-
|
510
|
-
if args.upload and not already_failed:
|
511
|
-
form = MultiPartForm()
|
512
|
-
form.add_field('adult', 'no')
|
513
|
-
form.add_field('optsize', '0')
|
514
|
-
form.add_file(
|
515
|
-
'upload[]', screenshot, fileHandle=open(screenshot, 'rb'))
|
516
|
-
|
517
|
-
request = urllib2.Request("http://postimage.org/")
|
518
|
-
body = str(form)
|
519
|
-
request.add_header('Content-type', form.get_content_type())
|
520
|
-
request.add_header('Content-length', len(body))
|
521
|
-
request.add_data(body)
|
522
|
-
|
523
|
-
result = urllib2.urlopen(request).read()
|
524
|
-
print "Screenshot at:", re.findall("""<td><textarea wrap='off' onmouseover='this.focus\(\)' onfocus='this.select\(\)' id="code_1" scrolling="no">([^<]*)</textarea></td>""", result) # noqa
|
525
|
-
except Exception, e:
|
526
|
-
print e
|
527
|
-
|
528
|
-
response = "OK"
|
529
|
-
self.send_response(200)
|
530
|
-
self.send_header("Content-type", "text/plain")
|
531
|
-
self.send_header("Content-length", len(response))
|
532
|
-
self.end_headers()
|
533
|
-
self.wfile.write(response)
|
534
|
-
self.wfile.close()
|
535
|
-
|
536
|
-
if args.sauce:
|
537
|
-
port = 55001
|
538
|
-
else:
|
539
|
-
port = 0 # Bind to any port on localhost
|
540
|
-
|
541
|
-
while True:
|
542
|
-
try:
|
543
|
-
httpd = SocketServer.TCPServer(
|
544
|
-
("127.0.0.1", port),
|
545
|
-
ServerHandler)
|
546
|
-
break
|
547
|
-
except socket.error as e:
|
548
|
-
print e
|
549
|
-
time.sleep(5)
|
550
|
-
|
551
|
-
port = httpd.socket.getsockname()[-1]
|
552
|
-
print "Serving at", port
|
553
|
-
|
554
|
-
httpd_thread = threading.Thread(target=httpd.serve_forever)
|
555
|
-
httpd_thread.daemon = True
|
556
|
-
httpd_thread.start()
|
557
|
-
|
558
|
-
|
559
|
-
# Start up a virtual display, useful for testing on headless servers.
|
560
|
-
# -----------------------------------------------------------------------------
|
561
|
-
|
562
|
-
VIRTUAL_SIZE = (1024, 2000)
|
563
|
-
|
564
|
-
# PhantomJS doesn't need a display
|
565
|
-
disp = None
|
566
|
-
if args.virtual and args.browser != "PhantomJS":
|
567
|
-
from pyvirtualdisplay.smartdisplay import SmartDisplay
|
568
|
-
|
569
|
-
try:
|
570
|
-
disp = SmartDisplay(
|
571
|
-
visible=0, bgcolor='black', size=VIRTUAL_SIZE).start()
|
572
|
-
atexit.register(disp.stop)
|
573
|
-
except:
|
574
|
-
if disp:
|
575
|
-
disp.stop()
|
576
|
-
raise
|
577
|
-
|
578
|
-
|
579
|
-
# Start up the web browser and run the tests.
|
580
|
-
# ----------------------------------------------------------------------------
|
581
|
-
|
582
|
-
from selenium import webdriver
|
583
|
-
from selenium.common import exceptions as selenium_exceptions
|
584
|
-
from selenium.webdriver.common.keys import Keys as selenium_keys
|
585
|
-
|
586
|
-
driver_arguments = {}
|
587
|
-
if args.browser == "Chrome":
|
588
|
-
import tempfile
|
589
|
-
import shutil
|
590
|
-
|
591
|
-
# We reference shutil to make sure it isn't garbaged collected before we
|
592
|
-
# use it.
|
593
|
-
def directory_cleanup(directory, shutil=shutil):
|
594
|
-
try:
|
595
|
-
shutil.rmtree(directory)
|
596
|
-
except OSError, e:
|
597
|
-
pass
|
598
|
-
|
599
|
-
try:
|
600
|
-
user_data_dir = tempfile.mkdtemp()
|
601
|
-
atexit.register(directory_cleanup, user_data_dir)
|
602
|
-
except:
|
603
|
-
directory_cleanup(user_data_dir)
|
604
|
-
raise
|
605
|
-
|
606
|
-
driver_arguments['chrome_options'] = webdriver.ChromeOptions()
|
607
|
-
# Make printable
|
608
|
-
webdriver.ChromeOptions.__repr__ = lambda self: str(self.__dict__)
|
609
|
-
chrome_flags = [
|
610
|
-
'--user-data-dir=%s' % user_data_dir,
|
611
|
-
'--enable-logging',
|
612
|
-
'--start-maximized',
|
613
|
-
'--disable-default-apps',
|
614
|
-
'--disable-extensions',
|
615
|
-
'--disable-plugins',
|
616
|
-
]
|
617
|
-
chrome_flags += args.flag
|
618
|
-
# Travis-CI uses OpenVZ containers which are incompatible with the sandbox
|
619
|
-
# technology.
|
620
|
-
# See https://code.google.com/p/chromium/issues/detail?id=31077 for more
|
621
|
-
# information.
|
622
|
-
if 'TRAVIS' in os.environ:
|
623
|
-
chrome_flags += [
|
624
|
-
'--no-sandbox',
|
625
|
-
'--disable-setuid-sandbox',
|
626
|
-
'--allow-sandbox-debugging',
|
627
|
-
]
|
628
|
-
for flag in chrome_flags:
|
629
|
-
driver_arguments['chrome_options'].add_argument(flag)
|
630
|
-
|
631
|
-
#driver_arguments['chrome_options'].binary_location = (
|
632
|
-
# '/usr/bin/google-chrome')
|
633
|
-
driver_arguments['executable_path'] = chromedriver
|
634
|
-
|
635
|
-
|
636
|
-
elif args.browser == "Firefox":
|
637
|
-
driver_arguments['firefox_profile'] = webdriver.FirefoxProfile()
|
638
|
-
# Firefox will often pop-up a dialog saying "script is taking too long" or
|
639
|
-
# similar. So we can notice this problem we use "accept" rather then the
|
640
|
-
# default "dismiss".
|
641
|
-
webdriver.DesiredCapabilities.FIREFOX[
|
642
|
-
"unexpectedAlertBehaviour"] = "accept"
|
643
|
-
|
644
|
-
elif args.browser == "PhantomJS":
|
645
|
-
driver_arguments['executable_path'] = phantomjs
|
646
|
-
driver_arguments['service_args'] = ['--remote-debugger-port=9000']
|
647
|
-
|
648
|
-
elif args.browser == "Remote":
|
649
|
-
driver_arguments['command_executor'] = args.remote_executor
|
650
|
-
|
651
|
-
for arg in args.remote_caps:
|
652
|
-
if not arg.strip():
|
653
|
-
continue
|
654
|
-
|
655
|
-
if arg.find('=') < 0:
|
656
|
-
caps.update(getattr(
|
657
|
-
webdriver.DesiredCapabilities, arg.strip().upper()))
|
658
|
-
else:
|
659
|
-
bits = arg.split('=')
|
660
|
-
base = caps
|
661
|
-
for arg in bits[:-2]:
|
662
|
-
if arg not in base:
|
663
|
-
base[arg] = {}
|
664
|
-
base = base[arg]
|
665
|
-
base[bits[-2]] = bits[-1]
|
666
|
-
driver_arguments['desired_capabilities'] = caps
|
667
|
-
|
668
|
-
major_failure = False
|
669
|
-
browser = None
|
670
|
-
session_id = None
|
671
|
-
try:
|
672
|
-
try:
|
673
|
-
if args.verbose:
|
674
|
-
print driver_arguments
|
675
|
-
browser = getattr(webdriver, args.browser)(**driver_arguments)
|
676
|
-
session_id = browser.session_id
|
677
|
-
atexit.register(browser.quit)
|
678
|
-
except:
|
679
|
-
if browser:
|
680
|
-
browser.quit()
|
681
|
-
raise
|
682
|
-
|
683
|
-
# Load an empty page so the body element is always visible
|
684
|
-
browser.get('data:text/html;charset=utf-8,<!DOCTYPE html><html><body>EMPTY</body></html>') # noqa
|
685
|
-
if args.virtual and args.browser == "Firefox":
|
686
|
-
# Calling browser.maximize_window() doesn't work as we don't have a
|
687
|
-
# window manager, so instead we for the size/position.
|
688
|
-
browser.set_window_position(0, 0)
|
689
|
-
browser.set_window_size(*VIRTUAL_SIZE)
|
690
|
-
# Also lets go into full screen mode to get rid of the "Chrome" around
|
691
|
-
# the edges.
|
692
|
-
e = browser.find_element_by_tag_name('body')
|
693
|
-
e.send_keys(selenium_keys.F11)
|
694
|
-
|
695
|
-
url = 'http://localhost:%i/test/test-runner.html?%s' % (
|
696
|
-
port, "|".join(tests))
|
697
|
-
browser.get(url)
|
698
|
-
|
699
|
-
def close_other_windows(browser, url):
|
700
|
-
for win in browser.window_handles:
|
701
|
-
browser.switch_to_window(win)
|
702
|
-
if browser.current_url != url:
|
703
|
-
browser.close()
|
704
|
-
browser.switch_to_window(browser.window_handles[0])
|
705
|
-
|
706
|
-
while True:
|
707
|
-
# Sometimes other windows are accidently opened (such as an extension
|
708
|
-
# popup), close them.
|
709
|
-
if len(browser.window_handles) > 1:
|
710
|
-
close_other_windows(browser, url)
|
711
|
-
|
712
|
-
try:
|
713
|
-
v = browser.execute_script('return window.finished')
|
714
|
-
if v:
|
715
|
-
break
|
716
|
-
|
717
|
-
try:
|
718
|
-
progress = browser.execute_script('return window.getTestRunnerProgress()')
|
719
|
-
status = '%s/%s (%s%%)' % (progress['completed'], progress['total'],
|
720
|
-
100 * progress['completed'] // progress['total'])
|
721
|
-
except selenium_exceptions.WebDriverException, e:
|
722
|
-
status = e
|
723
|
-
|
724
|
-
print 'Running tests...', status
|
725
|
-
sys.stdout.flush()
|
726
|
-
time.sleep(1)
|
727
|
-
|
728
|
-
# Deal with unexpected alerts, sometimes they are dismissed by
|
729
|
-
# alternative means so we have to deal with that case too.
|
730
|
-
except selenium_exceptions.UnexpectedAlertPresentException, e:
|
731
|
-
try:
|
732
|
-
alert = browser.switch_to_alert()
|
733
|
-
sys.stderr.write("""\
|
734
|
-
WARNING: Unexpected alert found!
|
735
|
-
---------------------------------------------------------------------
|
736
|
-
%s
|
737
|
-
---------------------------------------------------------------------
|
738
|
-
""" % alert.text)
|
739
|
-
alert.dismiss()
|
740
|
-
except selenium_exceptions.NoAlertPresentException, e:
|
741
|
-
sys.stderr.write(
|
742
|
-
"WARNING: Unexpected alert"
|
743
|
-
" which dissappeared on it's own!\n"
|
744
|
-
)
|
745
|
-
sys.stderr.flush()
|
746
|
-
|
747
|
-
except Exception, e:
|
748
|
-
import traceback
|
749
|
-
sys.stderr.write(traceback.format_exc())
|
750
|
-
major_failure = True
|
751
|
-
|
752
|
-
finally:
|
753
|
-
output.stopTestRun()
|
754
|
-
|
755
|
-
if args.browser == "Chrome":
|
756
|
-
log_path = os.path.join(user_data_dir, "chrome_debug.log")
|
757
|
-
if os.path.exists(log_path):
|
758
|
-
shutil.copy(log_path, ".")
|
759
|
-
else:
|
760
|
-
print "Unable to find Chrome log file:", log_path
|
761
|
-
|
762
|
-
if summary.testsRun == 0:
|
763
|
-
print
|
764
|
-
print "FAIL: No tests run!"
|
765
|
-
|
766
|
-
sys.stdout.flush()
|
767
|
-
sys.stderr.flush()
|
768
|
-
|
769
|
-
while args.dontexit and browser.window_handles:
|
770
|
-
print "Waiting for you to close the browser...."
|
771
|
-
sys.stdout.flush()
|
772
|
-
sys.stderr.flush()
|
773
|
-
time.sleep(1)
|
774
|
-
|
775
|
-
sys.stdout.flush()
|
776
|
-
sys.stderr.flush()
|
777
|
-
|
778
|
-
# Annotate the success / failure to sauce labs
|
779
|
-
if args.sauce and session_id:
|
780
|
-
base64string = base64.encodestring(
|
781
|
-
'%s:%s' % (sauce_username, sauce_access_key))[:-1]
|
782
|
-
|
783
|
-
custom_data["failures"] = summary.failures
|
784
|
-
custom_data["errors"] = summary.errors
|
785
|
-
custom_data["tests"] = summary.testsRun
|
786
|
-
custom_data["skipped"] = summary.skipped
|
787
|
-
|
788
|
-
body_content = simplejson.dumps({
|
789
|
-
"passed": summary.wasSuccessful(),
|
790
|
-
"custom-data": custom_data,
|
791
|
-
})
|
792
|
-
connection = httplib.HTTPConnection("saucelabs.com")
|
793
|
-
connection.request(
|
794
|
-
'PUT', '/rest/v1/%s/jobs/%s' % (sauce_username, session_id),
|
795
|
-
body_content,
|
796
|
-
headers={"Authorization": "Basic %s" % base64string})
|
797
|
-
result = connection.getresponse()
|
798
|
-
print "Sauce labs updated:", result.status == 200
|
799
|
-
|
800
|
-
import hmac
|
801
|
-
from hashlib import md5
|
802
|
-
key = hmac.new(
|
803
|
-
str("%s:%s" % (sauce_username, session_id)),
|
804
|
-
str(sauce_access_key),
|
805
|
-
md5).hexdigest()
|
806
|
-
url = "https://saucelabs.com/jobs/%s?auth=%s" % (
|
807
|
-
browser.session_id, key)
|
808
|
-
print "Sauce lab output at:", url
|
809
|
-
|
810
|
-
if summary.wasSuccessful() and summary.testsRun > 0 and not major_failure:
|
811
|
-
sys.exit(0)
|
812
|
-
else:
|
813
|
-
sys.exit(1)
|