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.
Files changed (578) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/components/core-a11y-keys/core-a11y-keys.html +335 -0
  3. data/app/assets/components/core-animation/core-animation.html +7 -6
  4. data/app/assets/components/core-animation/web-animations.html +1 -1
  5. data/app/assets/components/core-collapse/core-collapse.html +41 -5
  6. data/app/assets/components/core-component-page/core-component-page.html +1 -1
  7. data/app/assets/components/core-drawer-panel/core-drawer-panel.css +14 -9
  8. data/app/assets/components/core-drawer-panel/core-drawer-panel.html +76 -21
  9. data/app/assets/components/core-drawer-panel/metadata.html +1 -1
  10. data/app/assets/components/core-dropdown/core-dropdown-base.html +117 -0
  11. data/app/assets/components/core-dropdown/core-dropdown.html +305 -0
  12. data/app/assets/components/core-dropdown/metadata.html +62 -0
  13. data/app/assets/components/core-elements/paper-elements.html +2 -0
  14. data/app/assets/components/core-focusable/core-focusable.html +4 -0
  15. data/app/assets/components/core-focusable/core-focusable.js +134 -0
  16. data/app/assets/components/core-focusable/polymer-mixin.js +35 -0
  17. data/app/assets/components/core-header-panel/core-header-panel.css +6 -3
  18. data/app/assets/components/core-header-panel/core-header-panel.html +96 -44
  19. data/app/assets/components/core-header-panel/metadata.html +1 -1
  20. data/app/assets/components/core-icon/core-icon.html +19 -5
  21. data/app/assets/components/core-icons/av-icons.html +57 -31
  22. data/app/assets/components/core-icons/communication-icons.html +42 -44
  23. data/app/assets/components/core-icons/core-icons.html +267 -263
  24. data/app/assets/components/core-icons/device-icons.html +90 -44
  25. data/app/assets/components/core-icons/editor-icons.html +52 -52
  26. data/app/assets/components/core-icons/hardware-icons.html +42 -43
  27. data/app/assets/components/core-icons/image-icons.html +140 -130
  28. data/app/assets/components/core-icons/maps-icons.html +57 -54
  29. data/app/assets/components/core-icons/notification-icons.html +34 -35
  30. data/app/assets/components/core-icons/social-icons.html +38 -37
  31. data/app/assets/components/core-iconset-svg/core-iconset-svg.html +1 -1
  32. data/app/assets/components/core-input/core-input.css +3 -7
  33. data/app/assets/components/core-input/core-input.html +105 -411
  34. data/app/assets/components/core-input/metadata.html +6 -3
  35. data/app/assets/components/core-item/core-item.css +7 -6
  36. data/app/assets/components/core-item/core-item.html +4 -5
  37. data/app/assets/components/core-item/metadata.html +1 -1
  38. data/app/assets/components/core-label/core-label.html +124 -0
  39. data/app/assets/components/core-menu/core-menu.css +3 -3
  40. data/app/assets/components/core-menu/core-menu.html +8 -2
  41. data/app/assets/components/core-menu/core-submenu.css +14 -0
  42. data/app/assets/components/core-menu/core-submenu.html +21 -1
  43. data/app/assets/components/core-overlay/core-overlay-layer.html +1 -0
  44. data/app/assets/components/core-overlay/core-overlay.html +163 -90
  45. data/app/assets/components/core-overlay/gulpfile.js +2 -0
  46. data/app/assets/components/core-overlay/tests/html/core-overlay-basic.html +127 -0
  47. data/app/assets/components/core-overlay/tests/html/core-overlay-positioning-margin.html +153 -0
  48. data/app/assets/components/core-overlay/tests/html/core-overlay-positioning.html +167 -0
  49. data/app/assets/components/core-overlay/tests/html/core-overlay-scroll.html +130 -0
  50. data/app/assets/components/core-overlay/tests/js/htmltests.js +6 -0
  51. data/app/assets/components/core-overlay/tests/runner.html +14 -0
  52. data/app/assets/components/core-overlay/tests/tests.json +6 -0
  53. data/app/assets/components/core-scroll-header-panel/core-scroll-header-panel.html +45 -9
  54. data/app/assets/components/core-scroll-header-panel/metadata.html +1 -1
  55. data/app/assets/components/core-selector/core-selector.html +116 -28
  56. data/app/assets/components/core-selector/metadata.html +1 -1
  57. data/app/assets/components/core-style/core-style.html +4 -4
  58. data/app/assets/components/core-style/elements.html +1 -1
  59. data/app/assets/components/core-style/my-theme.html +1 -1
  60. data/app/assets/components/core-toolbar/core-toolbar.css +14 -7
  61. data/app/assets/components/core-toolbar/core-toolbar.html +88 -7
  62. data/app/assets/components/core-toolbar/metadata.html +1 -1
  63. data/app/assets/components/core-transition/core-transition-css.html +1 -2
  64. data/app/assets/components/core-transition/core-transition-overlay.css +9 -9
  65. data/app/assets/components/core-transition/core-transition.html +1 -1
  66. data/app/assets/components/font-roboto/roboto.html +1 -1
  67. data/app/assets/components/paper-button/metadata.html +2 -2
  68. data/app/assets/components/paper-button/paper-button-base.html +120 -0
  69. data/app/assets/components/paper-button/paper-button.html +114 -145
  70. data/app/assets/components/paper-checkbox/paper-checkbox.css +1 -1
  71. data/app/assets/components/paper-dialog/paper-action-dialog.html +104 -0
  72. data/app/assets/components/paper-dialog/paper-dialog-base.html +81 -0
  73. data/app/assets/components/paper-dialog/paper-dialog-transition.html +1 -1
  74. data/app/assets/components/paper-dialog/paper-dialog.html +68 -143
  75. data/app/assets/components/{paper-dropdown/paper-dropdown.css → paper-dropdown-menu/paper-dropdown-menu.css} +1 -5
  76. data/app/assets/components/paper-dropdown-menu/paper-dropdown-menu.html +181 -0
  77. data/app/assets/components/{polymer/polymer.html → paper-dropdown/paper-dropdown-transition.css} +9 -7
  78. data/app/assets/components/paper-dropdown/paper-dropdown-transition.html +166 -0
  79. data/app/assets/components/paper-dropdown/paper-dropdown.html +69 -143
  80. data/app/assets/components/paper-fab/metadata.html +1 -1
  81. data/app/assets/components/paper-fab/paper-fab.html +140 -16
  82. data/app/assets/components/paper-icon-button/paper-icon-button.html +99 -32
  83. data/app/assets/components/paper-input/metadata.html +1 -4
  84. data/app/assets/components/paper-input/paper-autogrow-textarea.html +157 -0
  85. data/app/assets/components/paper-input/{paper-input.css → paper-input-decorator.css} +25 -25
  86. data/app/assets/components/paper-input/paper-input-decorator.html +468 -0
  87. data/app/assets/components/paper-input/paper-input.html +74 -269
  88. data/app/assets/components/paper-item/metadata.html +1 -1
  89. data/app/assets/components/paper-item/paper-item.html +95 -52
  90. data/app/assets/components/paper-menu-button/metadata.html +1 -1
  91. data/app/assets/components/paper-menu-button/paper-menu-button.css +38 -19
  92. data/app/assets/components/paper-menu-button/paper-menu-button.html +57 -138
  93. data/app/assets/components/paper-progress/paper-progress.css +39 -6
  94. data/app/assets/components/paper-progress/paper-progress.html +30 -4
  95. data/app/assets/components/paper-radio-button/paper-radio-button.html +3 -0
  96. data/app/assets/components/paper-radio-group/paper-radio-group.html +34 -1
  97. data/app/assets/components/paper-ripple/paper-ripple.html +110 -61
  98. data/app/assets/components/paper-shadow/metadata.html +2 -2
  99. data/app/assets/components/paper-shadow/paper-shadow.css +20 -45
  100. data/app/assets/components/paper-shadow/paper-shadow.html +55 -195
  101. data/app/assets/components/paper-slider/paper-slider.css +15 -1
  102. data/app/assets/components/paper-slider/paper-slider.html +98 -57
  103. data/app/assets/components/paper-spinner/paper-spinner.css +311 -0
  104. data/app/assets/components/paper-spinner/paper-spinner.html +116 -0
  105. data/app/assets/components/paper-tabs/paper-tab.css +26 -16
  106. data/app/assets/components/paper-tabs/paper-tab.html +24 -8
  107. data/app/assets/components/paper-tabs/paper-tabs.css +31 -13
  108. data/app/assets/components/paper-tabs/paper-tabs.html +217 -20
  109. data/app/assets/components/paper-toast/paper-toast.html +44 -6
  110. data/app/assets/components/paper-toggle-button/paper-toggle-button.css +7 -1
  111. data/app/assets/components/paper-toggle-button/paper-toggle-button.html +12 -2
  112. data/app/assets/components/sampler-scaffold/sampler-scaffold.css +2 -1
  113. data/app/assets/components/web-animations-next/Gruntfile.js +279 -0
  114. data/app/assets/components/web-animations-next/History.md +76 -0
  115. data/app/assets/components/web-animations-next/package.json +33 -0
  116. data/app/assets/components/web-animations-next/src/animation-constructor.js +139 -0
  117. data/app/assets/components/web-animations-next/src/animation-node.js +31 -0
  118. data/app/assets/components/web-animations-next/src/animation.js +65 -0
  119. data/app/assets/components/web-animations-next/src/apply-preserving-inline-style.js +192 -0
  120. data/app/assets/components/web-animations-next/src/apply.js +25 -0
  121. data/app/assets/components/web-animations-next/src/box-handler.js +57 -0
  122. data/app/assets/components/web-animations-next/src/color-handler.js +62 -0
  123. data/app/assets/components/web-animations-next/src/deprecation.js +42 -0
  124. data/app/assets/components/web-animations-next/src/dev.js +16 -0
  125. data/app/assets/components/web-animations-next/src/dimension-handler.js +167 -0
  126. data/app/assets/components/web-animations-next/src/effect-callback.js +86 -0
  127. data/app/assets/components/web-animations-next/src/effect.js +110 -0
  128. data/app/assets/components/web-animations-next/src/element-animatable.js +19 -0
  129. data/app/assets/components/web-animations-next/src/font-weight-handler.js +42 -0
  130. data/app/assets/components/web-animations-next/src/group-constructors.js +81 -0
  131. data/app/assets/components/web-animations-next/src/handler-utils.js +177 -0
  132. data/app/assets/components/web-animations-next/src/interpolation.js +49 -0
  133. data/app/assets/components/web-animations-next/src/matrix-decomposition.js +452 -0
  134. data/app/assets/components/web-animations-next/src/matrix-interpolation.js +130 -0
  135. data/app/assets/components/web-animations-next/src/maxifill-player.js +162 -0
  136. data/app/assets/components/web-animations-next/src/normalize-keyframes.js +259 -0
  137. data/app/assets/components/web-animations-next/src/number-handler.js +72 -0
  138. data/app/assets/components/web-animations-next/src/player.js +193 -0
  139. data/app/assets/components/web-animations-next/src/position-handler.js +117 -0
  140. data/app/assets/components/web-animations-next/src/property-interpolation.js +62 -0
  141. data/app/assets/components/web-animations-next/src/property-names.js +35 -0
  142. data/app/assets/components/web-animations-next/src/scope.js +20 -0
  143. data/app/assets/components/web-animations-next/src/shadow-handler.js +108 -0
  144. data/app/assets/components/web-animations-next/src/shape-handler.js +85 -0
  145. data/app/assets/components/web-animations-next/src/tick.js +148 -0
  146. data/app/assets/components/web-animations-next/src/timeline.js +77 -0
  147. data/app/assets/components/web-animations-next/src/timing-utilities.js +242 -0
  148. data/app/assets/components/web-animations-next/src/transform-handler.js +262 -0
  149. data/app/assets/components/web-animations-next/src/visibility-handler.js +29 -0
  150. data/app/assets/components/web-animations-next/target-config.js +124 -0
  151. data/app/assets/components/web-animations-next/target-loader.js +13 -0
  152. data/app/assets/components/web-animations-next/templates/boilerplate +13 -0
  153. data/app/assets/components/web-animations-next/templates/runner.html +26 -0
  154. data/app/assets/components/web-animations-next/templates/web-animations.html +18 -0
  155. data/app/assets/components/web-animations-next/templates/web-animations.js +21 -0
  156. data/app/assets/components/web-animations-next/web-animations-next-lite.dev.html +44 -0
  157. data/app/assets/components/web-animations-next/web-animations-next-lite.dev.js +21 -0
  158. data/app/assets/components/web-animations-next/web-animations-next.dev.html +49 -0
  159. data/app/assets/components/web-animations-next/web-animations-next.dev.js +21 -0
  160. data/app/assets/components/web-animations-next/web-animations.dev.html +44 -0
  161. data/app/assets/components/web-animations-next/web-animations.dev.js +21 -0
  162. data/app/assets/components/web-animations-next/web-animations.html +50 -0
  163. data/lib/polymer-paper-rails/version.rb +1 -1
  164. metadata +82 -421
  165. data/app/assets/components/core-animation/README.md +0 -4
  166. data/app/assets/components/core-animation/bower.json +0 -8
  167. data/app/assets/components/core-animation/demo.html +0 -149
  168. data/app/assets/components/core-animation/index.html +0 -22
  169. data/app/assets/components/core-collapse/README.md +0 -4
  170. data/app/assets/components/core-collapse/bower.json +0 -7
  171. data/app/assets/components/core-collapse/demo.html +0 -93
  172. data/app/assets/components/core-collapse/index.html +0 -22
  173. data/app/assets/components/core-component-page/README.md +0 -6
  174. data/app/assets/components/core-component-page/bower.json +0 -8
  175. data/app/assets/components/core-component-page/demo.html +0 -23
  176. data/app/assets/components/core-component-page/index.html +0 -22
  177. data/app/assets/components/core-drawer-panel/README.md +0 -4
  178. data/app/assets/components/core-drawer-panel/bower.json +0 -8
  179. data/app/assets/components/core-drawer-panel/demo.html +0 -73
  180. data/app/assets/components/core-drawer-panel/index.html +0 -22
  181. data/app/assets/components/core-elements/README.md +0 -4
  182. data/app/assets/components/core-elements/bower.json +0 -29
  183. data/app/assets/components/core-elements/demo.html +0 -105
  184. data/app/assets/components/core-elements/demos/core-toolbar.html +0 -98
  185. data/app/assets/components/core-field/README.md +0 -4
  186. data/app/assets/components/core-field/bower.json +0 -7
  187. data/app/assets/components/core-field/demo.html +0 -67
  188. data/app/assets/components/core-field/index.html +0 -22
  189. data/app/assets/components/core-header-panel/README.md +0 -4
  190. data/app/assets/components/core-header-panel/bower.json +0 -7
  191. data/app/assets/components/core-header-panel/demo.html +0 -100
  192. data/app/assets/components/core-header-panel/index.html +0 -23
  193. data/app/assets/components/core-icon-button/README.md +0 -4
  194. data/app/assets/components/core-icon-button/bower.json +0 -7
  195. data/app/assets/components/core-icon-button/demo.html +0 -35
  196. data/app/assets/components/core-icon-button/index.html +0 -22
  197. data/app/assets/components/core-icon/README.md +0 -4
  198. data/app/assets/components/core-icon/bower.json +0 -8
  199. data/app/assets/components/core-icon/demo.html +0 -44
  200. data/app/assets/components/core-icon/index.html +0 -22
  201. data/app/assets/components/core-icons/README.md +0 -4
  202. data/app/assets/components/core-icons/bower.json +0 -9
  203. data/app/assets/components/core-icons/demo.html +0 -96
  204. data/app/assets/components/core-icons/index.html +0 -22
  205. data/app/assets/components/core-iconset-svg/README.md +0 -4
  206. data/app/assets/components/core-iconset-svg/bower.json +0 -8
  207. data/app/assets/components/core-iconset-svg/demo.html +0 -66
  208. data/app/assets/components/core-iconset-svg/index.html +0 -22
  209. data/app/assets/components/core-iconset/README.md +0 -4
  210. data/app/assets/components/core-iconset/bower.json +0 -9
  211. data/app/assets/components/core-iconset/demo.html +0 -62
  212. data/app/assets/components/core-iconset/index.html +0 -22
  213. data/app/assets/components/core-input/README.md +0 -2
  214. data/app/assets/components/core-input/bower.json +0 -6
  215. data/app/assets/components/core-input/demo.html +0 -142
  216. data/app/assets/components/core-input/index.html +0 -22
  217. data/app/assets/components/core-item/README.md +0 -4
  218. data/app/assets/components/core-item/bower.json +0 -8
  219. data/app/assets/components/core-item/demo.html +0 -92
  220. data/app/assets/components/core-item/index.html +0 -22
  221. data/app/assets/components/core-media-query/README.md +0 -4
  222. data/app/assets/components/core-media-query/bower.json +0 -7
  223. data/app/assets/components/core-media-query/demo.html +0 -44
  224. data/app/assets/components/core-media-query/index.html +0 -22
  225. data/app/assets/components/core-menu/README.md +0 -4
  226. data/app/assets/components/core-menu/bower.json +0 -9
  227. data/app/assets/components/core-menu/demo.html +0 -101
  228. data/app/assets/components/core-menu/index.html +0 -22
  229. data/app/assets/components/core-meta/README.md +0 -4
  230. data/app/assets/components/core-meta/bower.json +0 -7
  231. data/app/assets/components/core-meta/demo.html +0 -58
  232. data/app/assets/components/core-meta/index.html +0 -22
  233. data/app/assets/components/core-overlay/README.md +0 -4
  234. data/app/assets/components/core-overlay/bower.json +0 -8
  235. data/app/assets/components/core-overlay/demo.html +0 -155
  236. data/app/assets/components/core-overlay/index.html +0 -22
  237. data/app/assets/components/core-popup-menu/README.md +0 -6
  238. data/app/assets/components/core-popup-menu/bower.json +0 -13
  239. data/app/assets/components/core-popup-menu/demo.html +0 -542
  240. data/app/assets/components/core-popup-menu/index.html +0 -22
  241. data/app/assets/components/core-range/README.md +0 -2
  242. data/app/assets/components/core-range/bower.json +0 -7
  243. data/app/assets/components/core-range/demo.html +0 -64
  244. data/app/assets/components/core-range/index.html +0 -22
  245. data/app/assets/components/core-scroll-header-panel/README.md +0 -4
  246. data/app/assets/components/core-scroll-header-panel/bower.json +0 -11
  247. data/app/assets/components/core-scroll-header-panel/demo.html +0 -111
  248. data/app/assets/components/core-scroll-header-panel/demos/demo1.html +0 -80
  249. data/app/assets/components/core-scroll-header-panel/demos/demo2.html +0 -82
  250. data/app/assets/components/core-scroll-header-panel/demos/demo3.html +0 -81
  251. data/app/assets/components/core-scroll-header-panel/demos/demo4.html +0 -109
  252. data/app/assets/components/core-scroll-header-panel/demos/demo5.html +0 -109
  253. data/app/assets/components/core-scroll-header-panel/demos/demo6.html +0 -113
  254. data/app/assets/components/core-scroll-header-panel/demos/demo7.html +0 -120
  255. data/app/assets/components/core-scroll-header-panel/demos/demo8.html +0 -122
  256. data/app/assets/components/core-scroll-header-panel/demos/demo9.html +0 -100
  257. data/app/assets/components/core-scroll-header-panel/demos/images/bg2.jpg +0 -0
  258. data/app/assets/components/core-scroll-header-panel/demos/images/bg3.jpg +0 -0
  259. data/app/assets/components/core-scroll-header-panel/demos/images/bg5.jpg +0 -0
  260. data/app/assets/components/core-scroll-header-panel/demos/images/bg6.jpg +0 -0
  261. data/app/assets/components/core-scroll-header-panel/demos/images/bg9.jpg +0 -0
  262. data/app/assets/components/core-scroll-header-panel/demos/lorem-ipsum.html +0 -42
  263. data/app/assets/components/core-scroll-header-panel/index.html +0 -22
  264. data/app/assets/components/core-selection/README.md +0 -4
  265. data/app/assets/components/core-selection/bower.json +0 -7
  266. data/app/assets/components/core-selection/demo.html +0 -59
  267. data/app/assets/components/core-selection/index.html +0 -22
  268. data/app/assets/components/core-selector/README.md +0 -4
  269. data/app/assets/components/core-selector/bower.json +0 -8
  270. data/app/assets/components/core-selector/demo.html +0 -106
  271. data/app/assets/components/core-selector/index.html +0 -22
  272. data/app/assets/components/core-style/README.md +0 -4
  273. data/app/assets/components/core-style/bower.json +0 -7
  274. data/app/assets/components/core-style/demo.html +0 -58
  275. data/app/assets/components/core-style/index.html +0 -22
  276. data/app/assets/components/core-toolbar/README.md +0 -4
  277. data/app/assets/components/core-toolbar/bower.json +0 -7
  278. data/app/assets/components/core-toolbar/demo.html +0 -107
  279. data/app/assets/components/core-toolbar/index.html +0 -22
  280. data/app/assets/components/core-transition/README.md +0 -2
  281. data/app/assets/components/core-transition/bower.json +0 -8
  282. data/app/assets/components/core-transition/demo.html +0 -87
  283. data/app/assets/components/core-transition/index.html +0 -22
  284. data/app/assets/components/paper-button/README.md +0 -4
  285. data/app/assets/components/paper-button/bower.json +0 -11
  286. data/app/assets/components/paper-button/demo.html +0 -99
  287. data/app/assets/components/paper-button/demo2.html +0 -136
  288. data/app/assets/components/paper-button/index.html +0 -22
  289. data/app/assets/components/paper-button/paper-button.css +0 -125
  290. data/app/assets/components/paper-checkbox/README.md +0 -4
  291. data/app/assets/components/paper-checkbox/bower.json +0 -8
  292. data/app/assets/components/paper-checkbox/demo.html +0 -113
  293. data/app/assets/components/paper-checkbox/index.html +0 -22
  294. data/app/assets/components/paper-dialog/README.md +0 -4
  295. data/app/assets/components/paper-dialog/bower.json +0 -10
  296. data/app/assets/components/paper-dialog/demo.html +0 -85
  297. data/app/assets/components/paper-dialog/index.html +0 -22
  298. data/app/assets/components/paper-dialog/paper-dialog.css +0 -52
  299. data/app/assets/components/paper-dropdown/README.md +0 -9
  300. data/app/assets/components/paper-dropdown/bower.json +0 -12
  301. data/app/assets/components/paper-dropdown/demo.html +0 -345
  302. data/app/assets/components/paper-dropdown/index.html +0 -22
  303. data/app/assets/components/paper-fab/README.md +0 -4
  304. data/app/assets/components/paper-fab/bower.json +0 -8
  305. data/app/assets/components/paper-fab/demo.html +0 -72
  306. data/app/assets/components/paper-fab/demo2.html +0 -103
  307. data/app/assets/components/paper-fab/index.html +0 -22
  308. data/app/assets/components/paper-fab/paper-fab.css +0 -36
  309. data/app/assets/components/paper-focusable/README.md +0 -4
  310. data/app/assets/components/paper-focusable/bower.json +0 -7
  311. data/app/assets/components/paper-focusable/demo.html +0 -155
  312. data/app/assets/components/paper-icon-button/README.md +0 -4
  313. data/app/assets/components/paper-icon-button/bower.json +0 -9
  314. data/app/assets/components/paper-icon-button/demo.html +0 -102
  315. data/app/assets/components/paper-icon-button/index.html +0 -22
  316. data/app/assets/components/paper-icon-button/paper-icon-button.css +0 -17
  317. data/app/assets/components/paper-icon-button/pulse-ink.css +0 -20
  318. data/app/assets/components/paper-input/README.md +0 -4
  319. data/app/assets/components/paper-input/bower.json +0 -11
  320. data/app/assets/components/paper-input/demo.html +0 -124
  321. data/app/assets/components/paper-input/index.html +0 -22
  322. data/app/assets/components/paper-item/README.md +0 -4
  323. data/app/assets/components/paper-item/bower.json +0 -9
  324. data/app/assets/components/paper-item/demo.html +0 -39
  325. data/app/assets/components/paper-item/index.html +0 -22
  326. data/app/assets/components/paper-item/paper-item.css +0 -43
  327. data/app/assets/components/paper-menu-button/README.md +0 -4
  328. data/app/assets/components/paper-menu-button/bower.json +0 -16
  329. data/app/assets/components/paper-menu-button/demo.html +0 -95
  330. data/app/assets/components/paper-menu-button/index.html +0 -22
  331. data/app/assets/components/paper-menu-button/paper-menu-button-transition.css +0 -19
  332. data/app/assets/components/paper-menu-button/paper-menu-button-transition.html +0 -123
  333. data/app/assets/components/paper-progress/README.md +0 -4
  334. data/app/assets/components/paper-progress/bower.json +0 -8
  335. data/app/assets/components/paper-progress/demo.html +0 -107
  336. data/app/assets/components/paper-progress/index.html +0 -22
  337. data/app/assets/components/paper-radio-button/README.md +0 -4
  338. data/app/assets/components/paper-radio-button/bower.json +0 -7
  339. data/app/assets/components/paper-radio-button/demo.html +0 -75
  340. data/app/assets/components/paper-radio-button/index.html +0 -22
  341. data/app/assets/components/paper-radio-group/README.md +0 -4
  342. data/app/assets/components/paper-radio-group/bower.json +0 -9
  343. data/app/assets/components/paper-radio-group/demo.html +0 -82
  344. data/app/assets/components/paper-radio-group/index.html +0 -22
  345. data/app/assets/components/paper-ripple/README.md +0 -4
  346. data/app/assets/components/paper-ripple/bower.json +0 -9
  347. data/app/assets/components/paper-ripple/demo.html +0 -418
  348. data/app/assets/components/paper-ripple/index.html +0 -22
  349. data/app/assets/components/paper-ripple/raw.html +0 -799
  350. data/app/assets/components/paper-shadow/README.md +0 -4
  351. data/app/assets/components/paper-shadow/bower.json +0 -7
  352. data/app/assets/components/paper-shadow/demo.html +0 -252
  353. data/app/assets/components/paper-shadow/index.html +0 -22
  354. data/app/assets/components/paper-slider/README.md +0 -4
  355. data/app/assets/components/paper-slider/bower.json +0 -9
  356. data/app/assets/components/paper-slider/demo.html +0 -151
  357. data/app/assets/components/paper-slider/index.html +0 -22
  358. data/app/assets/components/paper-tabs/README.md +0 -4
  359. data/app/assets/components/paper-tabs/bower.json +0 -12
  360. data/app/assets/components/paper-tabs/demo.html +0 -166
  361. data/app/assets/components/paper-tabs/index.html +0 -22
  362. data/app/assets/components/paper-toast/README.md +0 -4
  363. data/app/assets/components/paper-toast/bower.json +0 -10
  364. data/app/assets/components/paper-toast/demo.html +0 -67
  365. data/app/assets/components/paper-toast/index.html +0 -22
  366. data/app/assets/components/paper-toggle-button/README.md +0 -4
  367. data/app/assets/components/paper-toggle-button/bower.json +0 -8
  368. data/app/assets/components/paper-toggle-button/demo.html +0 -77
  369. data/app/assets/components/paper-toggle-button/index.html +0 -22
  370. data/app/assets/components/platform/README.md +0 -6
  371. data/app/assets/components/platform/bower.json +0 -16
  372. data/app/assets/components/platform/build.log +0 -35
  373. data/app/assets/components/platform/platform.js.map +0 -1
  374. data/app/assets/components/polymer/README.md +0 -17
  375. data/app/assets/components/polymer/bower.json +0 -8
  376. data/app/assets/components/polymer/build.log +0 -35
  377. data/app/assets/components/polymer/layout.html +0 -286
  378. data/app/assets/components/polymer/polymer.js +0 -14
  379. data/app/assets/components/polymer/polymer.js.map +0 -1
  380. data/app/assets/components/sampler-scaffold/README.md +0 -4
  381. data/app/assets/components/sampler-scaffold/bower.json +0 -12
  382. data/app/assets/components/sampler-scaffold/demo.html +0 -54
  383. data/app/assets/components/sampler-scaffold/demos/checkbox.html +0 -20
  384. data/app/assets/components/sampler-scaffold/demos/color.html +0 -20
  385. data/app/assets/components/sampler-scaffold/demos/radio.html +0 -20
  386. data/app/assets/components/sampler-scaffold/demos/range.html +0 -20
  387. data/app/assets/components/sampler-scaffold/demos/string.html +0 -20
  388. data/app/assets/components/sampler-scaffold/index.html +0 -22
  389. data/app/assets/components/web-animations-js/COPYING +0 -202
  390. data/app/assets/components/web-animations-js/README.md +0 -237
  391. data/app/assets/components/web-animations-js/run-lint.sh +0 -19
  392. data/app/assets/components/web-animations-js/run-tests-android.sh +0 -25
  393. data/app/assets/components/web-animations-js/run-tests.sh +0 -15
  394. data/app/assets/components/web-animations-js/test/bootstrap.js +0 -1266
  395. data/app/assets/components/web-animations-js/test/img/error.png +0 -0
  396. data/app/assets/components/web-animations-js/test/img/success.png +0 -0
  397. data/app/assets/components/web-animations-js/test/img/unknown.png +0 -0
  398. data/app/assets/components/web-animations-js/test/perf/balls-add-compositing.html +0 -147
  399. data/app/assets/components/web-animations-js/test/perf/balls-replace-compositing.html +0 -144
  400. data/app/assets/components/web-animations-js/test/perf/perf.js +0 -158
  401. data/app/assets/components/web-animations-js/test/perf/updating-inline-style-during-animation.html +0 -165
  402. data/app/assets/components/web-animations-js/test/test-generator.html +0 -240
  403. data/app/assets/components/web-animations-js/test/test-results-post.html +0 -3
  404. data/app/assets/components/web-animations-js/test/test-runner.html +0 -810
  405. data/app/assets/components/web-animations-js/test/testcases.js +0 -93
  406. data/app/assets/components/web-animations-js/test/testcases/auto-test-box-shadow-checks.js +0 -42
  407. data/app/assets/components/web-animations-js/test/testcases/auto-test-box-shadow.html +0 -40
  408. data/app/assets/components/web-animations-js/test/testcases/auto-test-calc-checks.js +0 -41
  409. data/app/assets/components/web-animations-js/test/testcases/auto-test-calc.html +0 -156
  410. data/app/assets/components/web-animations-js/test/testcases/auto-test-change-playback-rate-checks.js +0 -23
  411. data/app/assets/components/web-animations-js/test/testcases/auto-test-circular-path-checks.js +0 -65
  412. data/app/assets/components/web-animations-js/test/testcases/auto-test-circular-path.html +0 -83
  413. data/app/assets/components/web-animations-js/test/testcases/auto-test-color-checks.js +0 -101
  414. data/app/assets/components/web-animations-js/test/testcases/auto-test-color-names-checks.js +0 -431
  415. data/app/assets/components/web-animations-js/test/testcases/auto-test-color-names.html +0 -204
  416. data/app/assets/components/web-animations-js/test/testcases/auto-test-color.html +0 -117
  417. data/app/assets/components/web-animations-js/test/testcases/auto-test-composite-transforms-checks.js +0 -45
  418. data/app/assets/components/web-animations-js/test/testcases/auto-test-composite-transforms.html +0 -97
  419. data/app/assets/components/web-animations-js/test/testcases/auto-test-compositor-checks.js +0 -26
  420. data/app/assets/components/web-animations-js/test/testcases/auto-test-compositor.html +0 -68
  421. data/app/assets/components/web-animations-js/test/testcases/auto-test-delay-checks.js +0 -92
  422. data/app/assets/components/web-animations-js/test/testcases/auto-test-delay.html +0 -39
  423. data/app/assets/components/web-animations-js/test/testcases/auto-test-element-animate-checks.js +0 -8
  424. data/app/assets/components/web-animations-js/test/testcases/auto-test-element-animate.html +0 -30
  425. data/app/assets/components/web-animations-js/test/testcases/auto-test-fill-values-checks.js +0 -266
  426. data/app/assets/components/web-animations-js/test/testcases/auto-test-fill-values.html +0 -114
  427. data/app/assets/components/web-animations-js/test/testcases/auto-test-font-weight-checks.js +0 -26
  428. data/app/assets/components/web-animations-js/test/testcases/auto-test-font-weight.html +0 -43
  429. data/app/assets/components/web-animations-js/test/testcases/auto-test-initial-checks.js +0 -74
  430. data/app/assets/components/web-animations-js/test/testcases/auto-test-initial.html +0 -242
  431. data/app/assets/components/web-animations-js/test/testcases/auto-test-inline-style-checks.js +0 -17
  432. data/app/assets/components/web-animations-js/test/testcases/auto-test-inline-style-fallback-checks.js +0 -17
  433. data/app/assets/components/web-animations-js/test/testcases/auto-test-inline-style-fallback.html +0 -78
  434. data/app/assets/components/web-animations-js/test/testcases/auto-test-inline-style-methods-checks.js +0 -17
  435. data/app/assets/components/web-animations-js/test/testcases/auto-test-inline-style-methods.html +0 -70
  436. data/app/assets/components/web-animations-js/test/testcases/auto-test-inline-style.html +0 -69
  437. data/app/assets/components/web-animations-js/test/testcases/auto-test-integer-checks.js +0 -38
  438. data/app/assets/components/web-animations-js/test/testcases/auto-test-integer.html +0 -52
  439. data/app/assets/components/web-animations-js/test/testcases/auto-test-iteration-start-checks.js +0 -506
  440. data/app/assets/components/web-animations-js/test/testcases/auto-test-iteration-start.html +0 -160
  441. data/app/assets/components/web-animations-js/test/testcases/auto-test-iterations-alternate-checks.js +0 -44
  442. data/app/assets/components/web-animations-js/test/testcases/auto-test-iterations-alternate-holes-checks.js +0 -41
  443. data/app/assets/components/web-animations-js/test/testcases/auto-test-iterations-alternate-holes.html +0 -48
  444. data/app/assets/components/web-animations-js/test/testcases/auto-test-iterations-alternate.html +0 -50
  445. data/app/assets/components/web-animations-js/test/testcases/auto-test-iterations-basic-checks.js +0 -162
  446. data/app/assets/components/web-animations-js/test/testcases/auto-test-iterations-basic.html +0 -116
  447. data/app/assets/components/web-animations-js/test/testcases/auto-test-iterations-fill-checks.js +0 -602
  448. data/app/assets/components/web-animations-js/test/testcases/auto-test-iterations-fill.html +0 -167
  449. data/app/assets/components/web-animations-js/test/testcases/auto-test-keyframe-creation-checks.js +0 -67
  450. data/app/assets/components/web-animations-js/test/testcases/auto-test-keyframe-creation.html +0 -109
  451. data/app/assets/components/web-animations-js/test/testcases/auto-test-keyframe-easing-checks.js +0 -65
  452. data/app/assets/components/web-animations-js/test/testcases/auto-test-keyframe-easing.html +0 -64
  453. data/app/assets/components/web-animations-js/test/testcases/auto-test-length-units-checks.js +0 -342
  454. data/app/assets/components/web-animations-js/test/testcases/auto-test-length-units.html +0 -103
  455. data/app/assets/components/web-animations-js/test/testcases/auto-test-matrix-transforms-checks.js +0 -56
  456. data/app/assets/components/web-animations-js/test/testcases/auto-test-matrix-transforms.html +0 -90
  457. data/app/assets/components/web-animations-js/test/testcases/auto-test-motion-path-checks.js +0 -110
  458. data/app/assets/components/web-animations-js/test/testcases/auto-test-motion-path.html +0 -133
  459. data/app/assets/components/web-animations-js/test/testcases/auto-test-non-numeric-checks.js +0 -26
  460. data/app/assets/components/web-animations-js/test/testcases/auto-test-non-numeric.html +0 -42
  461. data/app/assets/components/web-animations-js/test/testcases/auto-test-parent-checks.js +0 -38
  462. data/app/assets/components/web-animations-js/test/testcases/auto-test-parent.html +0 -52
  463. data/app/assets/components/web-animations-js/test/testcases/auto-test-partial-keyframes-checks.js +0 -27
  464. data/app/assets/components/web-animations-js/test/testcases/auto-test-partial-keyframes.html +0 -43
  465. data/app/assets/components/web-animations-js/test/testcases/auto-test-path-checks.js +0 -20
  466. data/app/assets/components/web-animations-js/test/testcases/auto-test-path.html +0 -41
  467. data/app/assets/components/web-animations-js/test/testcases/auto-test-pause-checks.js +0 -79
  468. data/app/assets/components/web-animations-js/test/testcases/auto-test-pause.html +0 -82
  469. data/app/assets/components/web-animations-js/test/testcases/auto-test-perspective-checks.js +0 -37
  470. data/app/assets/components/web-animations-js/test/testcases/auto-test-perspective-origin-checks.js +0 -61
  471. data/app/assets/components/web-animations-js/test/testcases/auto-test-perspective-origin.html +0 -94
  472. data/app/assets/components/web-animations-js/test/testcases/auto-test-perspective.html +0 -79
  473. data/app/assets/components/web-animations-js/test/testcases/auto-test-playback-rate-checks.js +0 -146
  474. data/app/assets/components/web-animations-js/test/testcases/auto-test-playback-rate.html +0 -128
  475. data/app/assets/components/web-animations-js/test/testcases/auto-test-position-list-type-checks.js +0 -73
  476. data/app/assets/components/web-animations-js/test/testcases/auto-test-rectangle-checks.js +0 -23
  477. data/app/assets/components/web-animations-js/test/testcases/auto-test-rectangle.html +0 -57
  478. data/app/assets/components/web-animations-js/test/testcases/auto-test-reparent-checks.js +0 -95
  479. data/app/assets/components/web-animations-js/test/testcases/auto-test-reparent.html +0 -60
  480. data/app/assets/components/web-animations-js/test/testcases/auto-test-seq-speed-checks.js +0 -69
  481. data/app/assets/components/web-animations-js/test/testcases/auto-test-seq-speed.html +0 -86
  482. data/app/assets/components/web-animations-js/test/testcases/auto-test-shorthand-checks.js +0 -197
  483. data/app/assets/components/web-animations-js/test/testcases/auto-test-shorthand.html +0 -115
  484. data/app/assets/components/web-animations-js/test/testcases/auto-test-start-time-checks.js +0 -58
  485. data/app/assets/components/web-animations-js/test/testcases/auto-test-start-time-iterations-checks.js +0 -92
  486. data/app/assets/components/web-animations-js/test/testcases/auto-test-start-time-iterations.html +0 -107
  487. data/app/assets/components/web-animations-js/test/testcases/auto-test-start-time.html +0 -90
  488. data/app/assets/components/web-animations-js/test/testcases/auto-test-svg-anim-checks.js +0 -23
  489. data/app/assets/components/web-animations-js/test/testcases/auto-test-svg-anim.html +0 -39
  490. data/app/assets/components/web-animations-js/test/testcases/auto-test-svg-circle-checks.js +0 -23
  491. data/app/assets/components/web-animations-js/test/testcases/auto-test-svg-circle.html +0 -38
  492. data/app/assets/components/web-animations-js/test/testcases/auto-test-svg-color-checks.js +0 -20
  493. data/app/assets/components/web-animations-js/test/testcases/auto-test-svg-color.html +0 -36
  494. data/app/assets/components/web-animations-js/test/testcases/auto-test-text-shadow-checks.js +0 -20
  495. data/app/assets/components/web-animations-js/test/testcases/auto-test-text-shadow.html +0 -37
  496. data/app/assets/components/web-animations-js/test/testcases/auto-test-timing-functions-checks.js +0 -89
  497. data/app/assets/components/web-animations-js/test/testcases/auto-test-timing-functions.html +0 -77
  498. data/app/assets/components/web-animations-js/test/testcases/auto-test-to-animation-checks.js +0 -58
  499. data/app/assets/components/web-animations-js/test/testcases/auto-test-to-animation.html +0 -83
  500. data/app/assets/components/web-animations-js/test/testcases/auto-test-transform-3d-checks.js +0 -134
  501. data/app/assets/components/web-animations-js/test/testcases/auto-test-transform-3d.html +0 -123
  502. data/app/assets/components/web-animations-js/test/testcases/auto-test-transform-functions-checks.js +0 -160
  503. data/app/assets/components/web-animations-js/test/testcases/auto-test-transform-functions.html +0 -158
  504. data/app/assets/components/web-animations-js/test/testcases/auto-test-transform-origin-checks.js +0 -37
  505. data/app/assets/components/web-animations-js/test/testcases/auto-test-transform-origin.html +0 -80
  506. data/app/assets/components/web-animations-js/test/testcases/auto-test-transform-primitives-checks.js +0 -292
  507. data/app/assets/components/web-animations-js/test/testcases/auto-test-transform-primitives.html +0 -97
  508. data/app/assets/components/web-animations-js/test/testcases/auto-test-transform-units-checks.js +0 -202
  509. data/app/assets/components/web-animations-js/test/testcases/auto-test-transform-units.html +0 -98
  510. data/app/assets/components/web-animations-js/test/testcases/auto-test-visibility-checks.js +0 -54
  511. data/app/assets/components/web-animations-js/test/testcases/auto-test-visibility.html +0 -80
  512. data/app/assets/components/web-animations-js/test/testcases/auto-test-wrapping-bug-checks.js +0 -58
  513. data/app/assets/components/web-animations-js/test/testcases/auto-test-wrapping-bug.html +0 -60
  514. data/app/assets/components/web-animations-js/test/testcases/background.png +0 -0
  515. data/app/assets/components/web-animations-js/test/testcases/disabled-auto-test-change-playback-rate.html +0 -65
  516. data/app/assets/components/web-animations-js/test/testcases/disabled-auto-test-position-list-type.html +0 -103
  517. data/app/assets/components/web-animations-js/test/testcases/disabled-media.html +0 -439
  518. data/app/assets/components/web-animations-js/test/testcases/disabled-test-compositing-order.html +0 -112
  519. data/app/assets/components/web-animations-js/test/testcases/impl-test-deprecation.html +0 -85
  520. data/app/assets/components/web-animations-js/test/testcases/impl-test-from-css-value.html +0 -219
  521. data/app/assets/components/web-animations-js/test/testcases/impl-test-paced-timing-function.html +0 -83
  522. data/app/assets/components/web-animations-js/test/testcases/impl-test-totimelinetime.html +0 -37
  523. data/app/assets/components/web-animations-js/test/testcases/impl-unit-test-position-type.html +0 -256
  524. data/app/assets/components/web-animations-js/test/testcases/manual-test-add-player-onend.html +0 -57
  525. data/app/assets/components/web-animations-js/test/testcases/manual-test-preset-timings.html +0 -71
  526. data/app/assets/components/web-animations-js/test/testcases/manual-test-step.html +0 -88
  527. data/app/assets/components/web-animations-js/test/testcases/small.mp4 +0 -0
  528. data/app/assets/components/web-animations-js/test/testcases/small.webm +0 -0
  529. data/app/assets/components/web-animations-js/test/testcases/test-bounds.html +0 -69
  530. data/app/assets/components/web-animations-js/test/testcases/test-document-timeline.html +0 -53
  531. data/app/assets/components/web-animations-js/test/testcases/test-dynamic-load.html +0 -65
  532. data/app/assets/components/web-animations-js/test/testcases/test-fill-auto.html +0 -78
  533. data/app/assets/components/web-animations-js/test/testcases/test-getcurrent.html +0 -324
  534. data/app/assets/components/web-animations-js/test/testcases/test-keyframe-animation-effect.html +0 -248
  535. data/app/assets/components/web-animations-js/test/testcases/test-keyframe-composite-operation.html +0 -182
  536. data/app/assets/components/web-animations-js/test/testcases/test-null-target.html +0 -66
  537. data/app/assets/components/web-animations-js/test/testcases/test-pause-for-testing.html +0 -52
  538. data/app/assets/components/web-animations-js/test/testcases/test-player-addeventlistener.html +0 -161
  539. data/app/assets/components/web-animations-js/test/testcases/test-player-cleanup.html +0 -79
  540. data/app/assets/components/web-animations-js/test/testcases/test-player-finish-event.html +0 -101
  541. data/app/assets/components/web-animations-js/test/testcases/test-player-sort.html +0 -48
  542. data/app/assets/components/web-animations-js/test/testcases/test-player.html +0 -786
  543. data/app/assets/components/web-animations-js/test/testcases/test-pseudo-element-reference.html +0 -38
  544. data/app/assets/components/web-animations-js/test/testcases/test-repeated-pause.html +0 -54
  545. data/app/assets/components/web-animations-js/test/testcases/test-restart.html +0 -115
  546. data/app/assets/components/web-animations-js/test/testcases/test-reversed-player-active-phase.html +0 -28
  547. data/app/assets/components/web-animations-js/test/testcases/test-rotation-not-reversed.html +0 -55
  548. data/app/assets/components/web-animations-js/test/testcases/test-update-state.html +0 -113
  549. data/app/assets/components/web-animations-js/test/testcases/unit-test-clone.html +0 -80
  550. data/app/assets/components/web-animations-js/test/testcases/unit-test-delay.html +0 -66
  551. data/app/assets/components/web-animations-js/test/testcases/unit-test-dom-operations.html +0 -164
  552. data/app/assets/components/web-animations-js/test/testcases/unit-test-duration.html +0 -66
  553. data/app/assets/components/web-animations-js/test/testcases/unit-test-get-siblings.html +0 -112
  554. data/app/assets/components/web-animations-js/test/testcases/unit-test-modify-timing-params.html +0 -105
  555. data/app/assets/components/web-animations-js/test/testcases/unit-test-null-effect.html +0 -43
  556. data/app/assets/components/web-animations-js/test/testcases/unit-test-set-parent.html +0 -111
  557. data/app/assets/components/web-animations-js/test/testcases/unit-test-testharness-failure.html +0 -54
  558. data/app/assets/components/web-animations-js/test/testcases/unit-test-testharness.html +0 -248
  559. data/app/assets/components/web-animations-js/test/testcases/unit-test-unpause.html +0 -68
  560. data/app/assets/components/web-animations-js/test/testharness_timing.css +0 -75
  561. data/app/assets/components/web-animations-js/test/update-testcases.py +0 -63
  562. data/app/assets/components/web-animations-js/tools/android/config.sh +0 -8
  563. data/app/assets/components/web-animations-js/tools/android/setup.sh +0 -152
  564. data/app/assets/components/web-animations-js/tools/android/stop.sh +0 -20
  565. data/app/assets/components/web-animations-js/tools/python/requirements.txt +0 -12
  566. data/app/assets/components/web-animations-js/tools/python/run-tests.py +0 -813
  567. data/app/assets/components/web-animations-js/tools/python/setup.sh +0 -60
  568. data/app/assets/components/web-animations-js/tutorial/basic-animations/basic-animation-exercise-1.html +0 -62
  569. data/app/assets/components/web-animations-js/tutorial/basic-animations/basic-animation.html +0 -120
  570. data/app/assets/components/web-animations-js/tutorial/iframe-contents.html +0 -29
  571. data/app/assets/components/web-animations-js/tutorial/jquery.js +0 -9555
  572. data/app/assets/components/web-animations-js/tutorial/page-load.js +0 -114
  573. data/app/assets/components/web-animations-js/tutorial/parallel/parallel-exercise-1.html +0 -58
  574. data/app/assets/components/web-animations-js/tutorial/parallel/parallel.html +0 -101
  575. data/app/assets/components/web-animations-js/tutorial/sample-tutorial.html +0 -44
  576. data/app/assets/components/web-animations-js/tutorial/try-it-yourself.js +0 -216
  577. data/app/assets/components/web-animations-js/tutorial/tutorial-style.css +0 -344
  578. data/app/assets/components/web-animations-js/tutorial/tutorial-testing.js +0 -84
@@ -1,165 +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
- This test is based on code written by Cameron Adams and imported from
17
- http://themaninblue.com/experiment/AnimationBenchmark/html
18
- -->
19
- <!doctype html>
20
- <head>
21
- <style>
22
- .ball {
23
- position: absolute;
24
- width: 12px;
25
- height: 12px;
26
- border-radius: 100%;
27
- }
28
- </style>
29
- </head>
30
- <script src="perf.js"></script>
31
- <script src="../../web-animations.js"></script>
32
- <script>
33
- 'use strict';
34
-
35
- var stageWidth = 600;
36
- var stageHeight = 600;
37
- var particleCount = 2500;
38
- var minVelocity = 50;
39
- var maxVelocity = 500;
40
- var particleRadius = 6;
41
- var colors = ['#cc0000', '#ffcc00', '#aaff00', '#0099cc', '#194c99', '#661999'];
42
- var animationDuration = 10;
43
-
44
- var particles = [];
45
- var player;
46
- var testing = true;
47
-
48
- var Particle = function() {
49
- this.element = document.createElement('div');
50
- this.element.className = 'ball';
51
- this.element.style.backgroundColor = colors[Math.floor(Perf.random() * colors.length)];
52
- document.body.appendChild(this.element);
53
- };
54
-
55
- Particle.prototype.generateAnimation = function(duration) {
56
- var keyframes = [];
57
-
58
- var angle = Math.PI * 2 * Perf.random();
59
- var velocity = minVelocity + ((maxVelocity - minVelocity) * Perf.random());
60
- var x = stageWidth / 2;
61
- var y = stageHeight / 2;
62
- var dx = Math.cos(angle) * velocity;
63
- var dy = Math.sin(angle) * velocity;
64
-
65
- var nextCollision = function(lineX, normalX, lineY, normalY) {
66
- var dtx = Infinity;
67
- var dty = Infinity;
68
- if (dx * normalX < 0)
69
- dtx = (lineX - x) / dx;
70
- if (dy * normalY < 0)
71
- dty = (lineY - y) / dy;
72
- var dt = Math.min(dtx, dty);
73
- var hitX = (dtx < dty);
74
- return {
75
- dt: dt,
76
- x: hitX ? lineX : x + (dx * dt),
77
- y: hitX ? y + (dy * dt) : lineY,
78
- dx: hitX ? -dx : dx,
79
- dy: hitX ? dy : -dy,
80
- };
81
- };
82
-
83
- var t = 0;
84
- keyframes.push(this.createKeyframe(0, x, y));
85
- while (t < duration) {
86
- var collisionA = nextCollision(0, 1, 0, 1);
87
- var collisionB = nextCollision(stageWidth, -1, stageHeight, -1);
88
- var collision = collisionA.dt < collisionB.dt ? collisionA : collisionB;
89
- if (t + collision.dt > duration) {
90
- var dt = duration - t;
91
- t = duration;
92
- x += dx * dt;
93
- y += dy * dt;
94
- } else {
95
- t += collision.dt;
96
- x = collision.x;
97
- y = collision.y;
98
- dx = collision.dx;
99
- dy = collision.dy;
100
- }
101
- keyframes.push(this.createKeyframe(t / duration, x, y));
102
- }
103
-
104
- return new Animation(this.element, keyframes, duration);
105
- };
106
-
107
- Particle.prototype.createKeyframe = function(offset, x, y) {
108
- return {
109
- composite: 'add',
110
- offset: offset,
111
- left: x + 'px',
112
- top: y + 'px',
113
- };
114
- };
115
-
116
- Particle.prototype.destroy = function() {
117
- document.body.removeChild(this.element);
118
- };
119
-
120
- var cleanUp = function() {
121
- player.source = null;
122
- for (var i = 0; i < particles.length; i++) {
123
- particles[i].destroy();
124
- }
125
- particles = [];
126
- };
127
-
128
- var raf = window.requestAnimationFrame ||
129
- window.webkitRequestAnimationFrame ||
130
- window.mozRequestAnimationFrame ||
131
- function(callback) { setTimeout(callback, 1000 / 60); };
132
-
133
- var shake = 0;
134
- var shakeParticles = function() {
135
- shake = 20 - shake;
136
- for (var i = 0; i < particles.length; i++) {
137
- particles[i].element.style.setProperty('left', shake + 'px');
138
- particles[i].element.style.setProperty('top', shake + 'px');
139
- }
140
- if (testing) {
141
- raf(shakeParticles);
142
- }
143
- };
144
-
145
- window.addEventListener('load', function () {
146
- var spacing = document.createElement('div');
147
- spacing.style.display = 'inline-block';
148
- spacing.style.width = '600px';
149
- document.body.appendChild(spacing);
150
-
151
- var animationGroup = new AnimationGroup([], {iterations: Infinity, direction: 'alternate'});
152
- for (var i = 0; i < particleCount; i++) {
153
- var particle = new Particle();
154
- animationGroup.append(particle.generateAnimation(animationDuration));
155
- particles.push(particle);
156
- }
157
- player = document.timeline.play(animationGroup);
158
-
159
- raf(shakeParticles);
160
-
161
- Perf.oncomplete = cleanUp;
162
- Perf.start();
163
- });
164
-
165
- </script>
@@ -1,240 +0,0 @@
1
- <!--
2
- Copyright 2012 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
- <style>
17
- iframe {
18
- width: 100%;
19
- height: 600px;
20
- }
21
- .textBox {
22
- width:800px;
23
- height:200px;
24
- }
25
- input#iframeSrc {
26
- width: 200px;
27
- }
28
- </style>
29
-
30
- <input type="text" id="iframeSrc">
31
- <button id="load-button" onclick="loadFile()">Load</button><br>
32
- <iframe id="frame" src=""></iframe>
33
- <div id="userOptions">
34
- <input type="number" id="interval" value=1> Interval <br>
35
- Objects and properties
36
- <button id="generate-button" onclick="startGeneratingExpectations()">Generate</button><br>
37
- <textarea id = "obProp" class = textBox></textarea> <br>
38
- </div>
39
- <div> Outputted Checks </div>
40
- <pre id = "checks"></pre>
41
-
42
- <script src="../web-animations.js"></script>
43
- <script>
44
- "use strict";
45
-
46
- function detectFeatures() {
47
- var style = document.createElement('style');
48
- style.textContent = '' +
49
- 'dummyRuleForTesting {' +
50
- 'width: calc(0px);' +
51
- 'width: -webkit-calc(0px); }';
52
- document.head.appendChild(style);
53
- var transformCandidates = [
54
- 'transform',
55
- 'webkitTransform',
56
- 'msTransform'
57
- ];
58
- var transformProperty = transformCandidates.filter(function(property) {
59
- return property in style.sheet.cssRules[0].style;
60
- })[0];
61
- var calcFunction = style.sheet.cssRules[0].style.width.split('(')[0];
62
- document.head.removeChild(style);
63
- return {
64
- transformProperty: transformProperty,
65
- calcFunction: calcFunction
66
- };
67
- }
68
-
69
- var features = detectFeatures();
70
-
71
- var testCurrentTime;
72
- var testLength = 0;
73
- var lastRun = false;
74
- var frameTime = 100;
75
- var checks = [];
76
- var interval;
77
-
78
- document.getElementById("iframeSrc").value = window.location.search.substring(1) || "testcases/auto-test-calc.html";
79
- document.getElementById("interval").value = "1";
80
- document.getElementById("obProp").value = ".anim, width";
81
-
82
-
83
- function ToCheck(object, initSelctor, properties){
84
- this.object = object;
85
- this.initSelctor = initSelctor;
86
- this.properties = properties;
87
- }
88
-
89
- function getEndTime(timeline) {
90
- var players = timeline.getCurrentPlayers();
91
-
92
- var endTime = 0;
93
- players.forEach(function(player) {
94
- endTime = Math.max(endTime, player.source.endTime);
95
- });
96
- return endTime;
97
- }
98
-
99
- function loadFile(mode, callback) {
100
- if (typeof mode == 'undefined') {
101
- mode = '';
102
- }
103
-
104
- var file = document.getElementById("iframeSrc").value;
105
-
106
- var iframe = document.getElementById("frame");
107
- // We want the frame to always reload even if the src is the same, hence we
108
- // force it to null and then to the value we want.
109
- iframe.onload = function() {
110
- iframe.onload = callback;
111
- iframe.src = file + '#' + mode;
112
- };
113
- iframe.src = '';
114
- }
115
-
116
- function startGeneratingExpectations() {
117
- var obProp = document.getElementById("obProp").value;
118
-
119
- var output = document.getElementById("checks");
120
- output.innerHTML = "";
121
-
122
- loadFile("message", function () {
123
- findElementsToCheck(obProp);
124
-
125
- output.innerHTML += "timing_test(function() {\n";
126
- var testWindow = document.getElementById("frame").contentWindow;
127
- var interval = parseFloat(document.getElementById("interval").value);
128
-
129
- var endTime = Infinity;
130
-
131
- var t = 0;
132
- while(t <= endTime) {
133
- if (typeof testWindow.testharness_timeline == 'undefined') {
134
- alert("Your page doesn't contain testharness_timline, can not generate anything!");
135
- return;
136
- }
137
-
138
- testWindow.testharness_timeline.setTime(t);
139
-
140
- // Update the endTime as it can change dependent on the running animations
141
- // and modifications to them.
142
- endTime = getEndTime(testWindow.window.document.timeline);
143
-
144
- generate(t);
145
- t += interval;
146
- }
147
-
148
- output.innerHTML += '}, "Auto generated tests");\n';
149
- });
150
- }
151
-
152
- function findElementsToCheck(rawString){
153
- // Put all checks into checkStack
154
- checks = [];
155
- rawString = rawString.split("\n");
156
-
157
- for (var x in rawString){
158
- rawString[x] = rawString[x].replace(/\s/g, "");
159
- rawString[x] = rawString[x].split(",");
160
- if (rawString[x][0].length == 0)
161
- continue;
162
- var object = window.frames[0].document.querySelectorAll(rawString[x][0]);
163
- var prop = [];
164
- for (var i = 1; i < rawString[x].length; i++){
165
- prop.push(rawString[x][i]);
166
- }
167
- checks.push(new ToCheck(object, rawString[x][0], prop));
168
- }
169
- }
170
-
171
- function generate(time){
172
- console.log("Generating checks for t=", time);
173
-
174
- // Produce checks at this time
175
- var outputText = " at(" + time + ", function() {\n";
176
- for (var x in checks){
177
- var propslist = [];
178
- for (var i = 0; i < checks[x].object.length; i++){
179
- var propsPrint = "{";
180
- for (var j in checks[x].properties){
181
- var p = checks[x].properties[j];
182
- var isSVG = _WebAnimationsTestingUtilities._propertyIsSVGAttrib(p, checks[x].object[i]);
183
-
184
- if(isSVG) var props = checks[x].object[i].attributes;
185
- else var props = checks[x].object[i].currentStyle ||
186
- getComputedStyle(checks[x].object[i], null);
187
-
188
- if (p == 'ctm') {
189
- var ctm = checks[x].object[i].getCTM();
190
- var value = '{' + ctm.a + ', ' + ctm.b + ', ' + ctm.c + ', ' + ctm.d + ', ' + ctm.e + ', ' + ctm.f + '}'
191
- } else if (p == 'transform') {
192
- var value = props[features.transformProperty];
193
- } else {
194
- var value = isSVG ? props[p].value : props[p];
195
- }
196
- console.log("Node:", checks[x].object[i].cloneNode(), "Property:", checks[x].properties[j], "Value:", value);
197
-
198
- value = value.replace(/[-+]?[0-9]+\.?[0-9]*(?:[eE][-+]?[0-9]+)?/g, function(v) {
199
- v = Number(v);
200
- if (Math.abs(v) < 1e-10) {
201
- v = 0;
202
- }
203
- return ("" + v.toPrecision(4)).replace(/\.?0+$/, '');
204
- });
205
-
206
- propsPrint += "'"+ p + "':'" + value + "'";
207
- if (j < checks[x].properties.length -1) propsPrint += ",";
208
- }
209
- propsPrint += "}";
210
- propslist.push(propsPrint);
211
- }
212
- outputText += printCheck(checks[x].initSelctor, i, propslist, time);
213
- }
214
- outputText += ' });';
215
- var output = document.getElementById("checks");
216
- output.innerHTML += outputText + "<br>";
217
- }
218
-
219
- function printCheck(object, number, properties, time){
220
-
221
- var newCheck = ' assert_styles("' + object + '",';
222
-
223
- // If all the properties are the same for every object, just pass the list.
224
- var allsame = properties.every(function(x) { return x === properties[0] });
225
- if (allsame) {
226
- newCheck += properties[0] + ");\n";
227
-
228
- } else {
229
- // Otherwise give a list with each
230
-
231
- newCheck += " [\n";
232
- for (var j in properties) {
233
- newCheck += ' ' + properties[j] + ",\n";
234
- }
235
- newCheck += " ]);\n";
236
- }
237
-
238
- return newCheck;
239
- }
240
- </script>
@@ -1,3 +0,0 @@
1
- <html><body>
2
- <form method="post" id=form><textarea id=data name=data></textarea></form>
3
- </body></html>
@@ -1,810 +0,0 @@
1
- <!--
2
- Copyright 2012 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>
17
- <meta charset="UTF-8">
18
-
19
- <style>
20
-
21
- #status-box {
22
- position: fixed;
23
- bottom: 0;
24
- right: 0;
25
- background: white;
26
- border: 1px solid black;
27
- padding-right: 5px;
28
- }
29
-
30
- h1 {
31
- display: inline;
32
- }
33
-
34
- table {
35
- border-collapse: collapse;
36
- }
37
-
38
- td {
39
- border: 1px solid black;
40
- }
41
-
42
- iframe {
43
- width: 800px;
44
- height: 600px;
45
- }
46
-
47
- tbody {
48
- color: gray;
49
- }
50
-
51
- td.log ul li {
52
- white-space: pre;
53
- font-family: monospace;
54
- }
55
-
56
- /* Fail styles */
57
- tbody.fail {
58
- color: red;
59
- }
60
-
61
- li.fail {
62
- color: red;
63
- }
64
-
65
- tbody.timeout {
66
- color: yellow;
67
- }
68
-
69
- li.timeout {
70
- color: yellow;
71
- }
72
-
73
-
74
- /* Pass styles */
75
- tbody.pass {
76
- color: green;
77
- }
78
-
79
- li.pass {
80
- color: green;
81
- }
82
-
83
- tbody.pass-expected-failure {
84
- color: #00aa00;
85
- }
86
-
87
- li.pass-expected-failure {
88
- color: #00aa00;
89
- }
90
-
91
- tbody.skipped {
92
- color: #00aa00;
93
- }
94
-
95
- li.skipped {
96
- color: #00aa00;
97
- }
98
-
99
- /* No-test styles */
100
- tbody.no-tests {
101
- color: #ff8a00;
102
- }
103
-
104
- </style>
105
- <script src="browserdetect/bowser.js"></script>
106
- <script src="testcases.js"></script>
107
-
108
- <div id=status-box>
109
- <h1 id=status>Pending</h1>
110
- Tests: <span id=tests></span>
111
- Loading: <span id=loading></span> (<span id=loaded></span>)
112
- Running: <span id=running></span> (<span id=finished></span>)
113
- Posting: <span id=posting></span> (<span id=posted></span>)
114
- </div>
115
-
116
- <table id="results"></table>
117
- <div id="spacer"></div>
118
-
119
- <script>
120
- 'use strict';
121
- window.onerror = function(msg, url, line) {
122
- // Ignore errors caused by webdriver
123
- if (msg.match(/webdriver/))
124
- return;
125
-
126
- if (document.getElementById('javascript-errors') == null) {
127
- document.body.innerHTML = '<pre id="javascript-errors">JAVASCRIPT ERRORS\n\n</pre>';
128
- }
129
-
130
- var e = document.getElementById('javascript-errors');
131
- var msg = 'Javascript Error in ' + url + '\n' +
132
- 'Line ' + line + ': ' + msg + '\n';
133
- e.innerHTML += msg;
134
- };
135
- </script>
136
-
137
- <script>
138
- 'use strict';
139
-
140
- (function() {
141
- window.finished = false;
142
- window.getTestRunnerProgress = function() {
143
- return {
144
- completed: testStates['POSTED'].length,
145
- total: tests.length,
146
- };
147
- }
148
-
149
- var results = [];
150
-
151
- if (/coverage/.test(window.location.hash)) {
152
- // Trigger coverage runs for child tests.
153
- window.__coverage__ = {};
154
- // Share resources loaded by child tests to avoid instrumenting the same
155
- // source file multiple times.
156
- window.__resources__ = {original: {}};
157
- }
158
-
159
- window.addEventListener('load', function() {
160
- document.querySelector('#spacer').style.height =
161
- getComputedStyle(document.querySelector('body')).height;
162
- });
163
- function trueOffsetTop(element) {
164
- var t = 0;
165
- if (element.offsetParent) {
166
- do {
167
- t += element.offsetTop;
168
- } while (element = element.offsetParent);
169
- return t;
170
- }
171
- }
172
-
173
- /**
174
- * Get a value for busting the cache.
175
- */
176
- var cacheBuster = '' + window.Date.now();
177
-
178
- /**
179
- * Get the most accurate version of time possible.
180
- *
181
- * @return {number} Time as this very moment.
182
- */
183
- function now() {
184
- try {
185
- return window.performance.now();
186
- } catch (e) {
187
- return Date.now();
188
- }
189
- }
190
-
191
- /**
192
- * Creates HTML elements in a table for a test.
193
- *
194
- * +-----------+------+-------+
195
- * | Test Name | Link | Count |
196
- * +-----------+------+-------+
197
- * | Log of test run. |
198
- * +--------------------------+
199
- * | iFrame containing test |
200
- * +--------------------------+
201
- *
202
- * @param {String} testName Name of the test suite being run.
203
- * @param {String} testURL The url of the test suite.
204
- * @return {Element} tbody containing newly created table rows.
205
- */
206
- function createTestRows(testName, testURL) {
207
- var tableGroup = document.createElement('tbody');
208
- tableGroup.id = testName.replace('.', '-');
209
-
210
- var basicInfoRow = document.createElement('tr');
211
- basicInfoRow.className = 'info-row';
212
- tableGroup.appendChild(basicInfoRow);
213
- var iframeRow = document.createElement('tr');
214
- tableGroup.appendChild(iframeRow);
215
- var logRow = document.createElement('tr');
216
- tableGroup.appendChild(logRow);
217
-
218
- // Name
219
- var header = document.createElement('h1');
220
- header.textContent = testName;
221
-
222
- var headerCell = document.createElement('td');
223
- headerCell.appendChild(header);
224
- basicInfoRow.appendChild(headerCell);
225
-
226
- // Link
227
- var link = document.createElement('a');
228
- link.textContent = testName;
229
- link.href = testURL;
230
-
231
- var linkCell = document.createElement('td');
232
- linkCell.appendChild(link);
233
- basicInfoRow.appendChild(linkCell);
234
-
235
- // Test count
236
- var countCell = document.createElement('td');
237
- countCell.className = 'count';
238
- basicInfoRow.appendChild(countCell);
239
-
240
- // Timing info
241
- var timingCell = document.createElement('td');
242
- timingCell.className = 'timing';
243
- basicInfoRow.appendChild(timingCell);
244
-
245
- // iframe containing a preview of object
246
- var iframe = document.createElement('iframe');
247
- iframe.src = testURL + '?' + cacheBuster + '#message';
248
-
249
- var iframeCell = document.createElement('td');
250
- iframeCell.colSpan = '4';
251
- iframeCell.appendChild(iframe);
252
- iframeRow.appendChild(iframeCell);
253
-
254
- // table row containing the complete test log
255
- var logCell = document.createElement('td');
256
- logCell.className = 'log';
257
- logCell.colSpan = '4';
258
- logRow.appendChild(logCell);
259
-
260
- /**
261
- * Normally we would use "display: none;" but that causes Firefox to return
262
- * null for getComputedStyle, so instead we have to use this visibility hack.
263
- */
264
- tableGroup.showInfo = function() {
265
- logRow.style.visibility = 'visible';
266
- logRow.style.position = '';
267
- logRow.style.height = 'auto';
268
-
269
- iframeRow.style.visibility = 'visible';
270
- iframeRow.style.position = '';
271
- iframeRow.style.height = 'auto';
272
- };
273
- tableGroup.hideInfo = function() {
274
- logRow.style.visibility = 'hidden';
275
- logRow.style.position = 'absolute';
276
- logRow.style.height = '0';
277
-
278
- iframeRow.style.visibility = 'hidden';
279
- iframeRow.style.position = 'absolute';
280
- iframeRow.style.height = '0';
281
- };
282
- tableGroup.toggleInfo = function() {
283
- if (logRow.style.visibility == 'hidden') {
284
- tableGroup.showInfo();
285
- } else {
286
- tableGroup.hideInfo();
287
- }
288
- };
289
- basicInfoRow.onclick = tableGroup.toggleInfo;
290
-
291
- tableGroup.hideInfo();
292
-
293
- return tableGroup;
294
- }
295
-
296
- /* @type {?number} */ var runTestsId = null;
297
-
298
- /**
299
- * Checks all the tests are in the loaded state and then kicks of running
300
- * the tests.
301
- */
302
- function runTestsIfLoaded() {
303
- if (testStates['LOADING'].length > 0)
304
- return;
305
-
306
- if (runTestsId == null) {
307
- runTestsId = window.setInterval(runTests, 10);
308
- }
309
- }
310
-
311
- function generateCoverageReport() {
312
- // TODO: generate a pretty report, prompt to save the JSON, post it somewhere
313
- for (var file in window.__coverage__) {
314
- var results = window.__coverage__[file];
315
- var hits = 0;
316
- var statements = 0;
317
- for (var stmt in results.s) {
318
- statements++;
319
- if (results.s[stmt] > 0) {
320
- hits++;
321
- }
322
- }
323
- var percent = (100 * hits / statements).toFixed(2);
324
- console.log(file + ' statement coverage ' +
325
- percent + '% (' + hits + '/' + statements + ')');
326
- }
327
- }
328
-
329
- /**
330
- * This object tracks which state a test is in. An individual test should only
331
- * ever be in one of the lists. You use the changeTestState() function to move
332
- * from one state to another.
333
- *
334
- * Tests start off in the loading state and move downwards until ending up in
335
- * the finished state.
336
- */
337
- var testStates = {};
338
- testStates['LOADING'] = []; /* Test which is being loaded. */
339
- testStates['LOADED'] = []; /* Test which have yet to start. */
340
- testStates['RUNNING'] = []; /* Test that is currently running. */
341
- testStates['FINISHED'] = []; /* Test that are finished. */
342
- testStates['POSTING'] = []; /* Test that is currently posting results to server. */
343
- testStates['POSTED'] = []; /* Test which have completed and sent their
344
- results to the server. */
345
-
346
- /**
347
- * Track if we should skip the POSTING state, occurs if posting returns an error.
348
- */
349
- /* @type {Boolean} */ var skipPosting = false;
350
-
351
- /**
352
- * Changes the state of the given test to the given state.
353
- * This function doesn't check that the state transition actually make sense.
354
- *
355
- * @param {Element} test DOM object representing the test. The id will contain
356
- * the test name.
357
- * @param {States} The new state to transition too.
358
- */
359
- function changeTestState(test, newState) {
360
- var i = null;
361
-
362
- if (newState == 'POSTING' && skipPosting) {
363
- newState = 'POSTED';
364
- }
365
-
366
- var oldState = test.state;
367
-
368
- // If we have already posted, we should never leave...
369
- if (oldState == 'POSTED') {
370
- throw 'Unexpected state change! Trying to leave POSTED state to ' + newState;
371
- return;
372
- }
373
-
374
- if (typeof oldState != 'undefined') {
375
- var i = testStates[oldState].indexOf(test);
376
- testStates[oldState].splice(i, 1);
377
- }
378
-
379
- test.state = newState;
380
- testStates[test.state].unshift(test);
381
-
382
- function testSort(a, b) {
383
- return a.id.localeCompare(b.id);
384
- }
385
- testStates[test.state].sort(testSort);
386
-
387
- switch(newState) {
388
- case 'LOADING':
389
- runTestsIfLoaded();
390
- break;
391
-
392
- case 'LOADED':
393
- if (oldState != 'LOADING') {
394
- throw 'Unexpected state change! ' + oldState + ' changing to LOADED';
395
- }
396
- break;
397
-
398
- case 'RUNNING':
399
- if (oldState != 'LOADED') {
400
- throw 'Unexpected state change! ' + oldState + ' changing to RUNNING';
401
- }
402
-
403
- test.start = now();
404
- var testWindow = test.querySelector('iframe').contentWindow;
405
- var msg = {type: 'start', url: testWindow.location.href + ''};
406
- testWindow.postMessage(msg, '*');
407
- break;
408
-
409
- case 'FINISHED':
410
- // If a test doesn't use any timing stuff it could come from the LOADING or
411
- // LOADED state into the FINISHED state bypassing the RUNNING state.
412
- if (oldState != 'LOADING' && oldState != 'LOADED' && oldState != 'RUNNING') {
413
- throw 'Unexpected state change! ' + oldState + ' changing to FINISHED';
414
- }
415
-
416
- var timingInfo = test.querySelector('.timing');
417
- if (test.start) {
418
- test.finished = now();
419
- timingInfo.textContent = (test.finished - test.start).toFixed(2) + 'ms';
420
- } else {
421
- timingInfo.textContent = '(Load only)';
422
- }
423
-
424
- var test_iframe = test.querySelector('iframe');
425
- processResults(test, expectedFailuresForBrowser(test_iframe.contentWindow.expected_failures));
426
-
427
- break;
428
-
429
- case 'POSTING':
430
- if (oldState != 'FINISHED') {
431
- throw 'Unexpected state change! ' + oldState + ' changing to POSTING';
432
- }
433
-
434
- if (test.className == 'fail') {
435
- // Open up the window of the failed result
436
- test.showInfo();
437
- // Scroll to it.
438
- window.scroll(0, trueOffsetTop(test));
439
- }
440
-
441
- // Open the status window for taking of screenshots
442
- var data = new FormData();
443
- data.append('data', JSON.stringify(test.results_processed));
444
-
445
- var xhr = new XMLHttpRequest();
446
- xhr.onload = function (e) {
447
- if (e.target.status >= 400) {
448
- skipPosting = true;
449
- }
450
- // Move from running to finished state
451
- changeTestState(this, 'POSTED');
452
- }.bind(test);
453
- xhr.open('POST', 'test-results-post.html', true);
454
- xhr.send(data);
455
-
456
- break;
457
-
458
- case 'POSTED':
459
- // If we are skipping POSTING, tests can transition straight from FINISHED
460
- // state into the POSTED state.
461
- if (oldState != 'POSTING' && (!skipPosting || oldState != 'FINISHED')) {
462
- throw 'Unexpected state change! ' + oldState + ' changing to POSTED';
463
- }
464
- break;
465
- }
466
- }
467
-
468
- /**
469
- * Elements for reporting the overall status.
470
- */
471
- /* @type {Element} */ var statusElement = document.querySelector('#status');
472
-
473
- /* @type {Element} */ var testElement = document.querySelector('#tests');
474
-
475
- /* @type {Element} */ var loadingElement = document.querySelector('#loading');
476
- /* @type {Element} */ var loadedElement = document.querySelector('#loaded');
477
-
478
- /* @type {Element} */ var runningElement = document.querySelector('#running');
479
- /* @type {Element} */ var finishedElement = document.querySelector('#finished');
480
-
481
- /* @type {Element} */ var postingElement = document.querySelector('#posting');
482
- /* @type {Element} */ var postedElement = document.querySelector('#posted');
483
-
484
- /**
485
- * Update the status dialog with information about the current status.
486
- */
487
- function updateStatus() {
488
- testElement.textContent = tests.length;
489
-
490
- loadingElement.textContent = testStates['LOADING'].length;
491
- loadedElement.textContent = testStates['LOADED'].length;
492
-
493
- runningElement.textContent = testStates['RUNNING'].length;
494
- finishedElement.textContent = testStates['FINISHED'].length;
495
-
496
- postingElement.textContent = testStates['POSTING'].length;
497
- postedElement.textContent = testStates['POSTED'].length;
498
-
499
- if (testStates['LOADED'].length > 0) {
500
- statusElement.textContent = 'Loading';
501
- } else if (testStates['RUNNING'].length > 0) {
502
- statusElement.textContent = 'Running';
503
- } else if (testStates['POSTING'].length > 0) {
504
- statusElement.textContent = 'Posting results';
505
- } else if (testStates['POSTED'].length == tests.length) {
506
- statusElement.textContent = 'Finished';
507
-
508
- window.clearInterval(updateStatusId);
509
- window.clearInterval(runTestsId);
510
- window.finished = true;
511
- if (window.__coverage__) {
512
- generateCoverageReport();
513
- }
514
- }
515
- }
516
-
517
- /* @type {?number} */ var updateStatusId = setInterval(updateStatus, 100);
518
-
519
-
520
- var testRunners = [];
521
-
522
- /**
523
- * Create the iframes for each test.
524
- */
525
- window.onload = function createTestRunners() {
526
- // Filter the tests
527
- var filter = window.location.href.split('?')[1];
528
- if (filter) {
529
- filter = new RegExp(filter);
530
- tests = tests.filter(function(v) {
531
- return filter.exec(v);
532
- });
533
- }
534
-
535
- function testSort(a, b) {
536
- a = a.replace('.', '-');
537
- b = b.replace('.', '-');
538
- return a.localeCompare(b);
539
- }
540
- tests.sort(testSort);
541
-
542
- for (var i = 0; i < tests.length; i++) {
543
- var testName = tests[i];
544
- var testURL = 'testcases/' + testName;
545
-
546
- var test = createTestRows(testName, testURL);
547
- testRunners.unshift(test);
548
-
549
- changeTestState(test, 'LOADING');
550
-
551
- document.querySelector('#results').appendChild(test);
552
- test.querySelector('iframe').contentWindow.onload = function() {
553
- // You can get multiple onload events, only deal with the first one.
554
- if (this.state == 'LOADING') {
555
- changeTestState(this, 'LOADED');
556
- runTestsIfLoaded();
557
- }
558
- }.bind(test);
559
- }
560
-
561
- };
562
-
563
- /**
564
- * Start as many loaded tests as possible, wait for results and then post
565
- * them.
566
- */
567
- function runTests() {
568
- // Start a test running
569
- if (testStates['LOADED'].length > 0 &&
570
- testStates['RUNNING'].length < 1) {
571
- changeTestState(testStates['LOADED'][0], 'RUNNING');
572
- }
573
-
574
- // Start a test posting
575
- if (testStates['FINISHED'].length > 0 &&
576
- testStates['POSTING'].length < 1) {
577
- changeTestState(testStates['FINISHED'][0], 'POSTING');
578
- }
579
-
580
- // Deal with tests which are taking too long...
581
- for (var i in testStates['RUNNING']) {
582
- var test = testStates['RUNNING'][i];
583
- if (now() - test.start > 300e3) {
584
- // Only way to stop all the javascript and anything else running in the
585
- // test is to clear the document.
586
- var test_iframe = test.querySelector('iframe');
587
- test_iframe.src = "data:text/html;charset=utf-8,<!DOCTYPE html><html><body>TIMEOUT</body></html>";
588
-
589
- test.results_raw = [];
590
- changeTestState(test, 'FINISHED');
591
- }
592
- }
593
- }
594
-
595
- /* @type {Object.<string, Object>} */ var testResults = {};
596
- /**
597
- * Callback that occurs when the test has finished running.
598
- */
599
- window.addEventListener(
600
- 'message',
601
- function(evt) {
602
- // If the test timed out, this will fail with a cross-origin error.
603
- try {
604
- var testname = evt.source.location.pathname.split('/').pop().replace('.', '-');
605
- } catch (e) {
606
- return;
607
- }
608
-
609
- var test = document.getElementById(testname);
610
-
611
- // We only respond to complete as postMessage doesn't guarantee order so
612
- // result messages can come in after the complete message.
613
- if (evt.data['type'] != 'complete')
614
- return;
615
-
616
- // Try changing to state FINISHED, but this message may be after the a
617
- // timeout or transition.
618
- try {
619
- test.results_raw = evt.data['tests'];
620
- changeTestState(test, 'FINISHED');
621
- } catch (e) {
622
- console.warn(e);
623
- }
624
- },
625
- false);
626
-
627
-
628
- /**
629
- * Filters expected test failures for ones that match the current browser
630
- * configuration.
631
- *
632
- * @param {Array.<Object>} Test failure expectations for all browser
633
- * configurations.
634
- * @return {Object.<string, string>} Mapping from test regex to failure reason
635
- * for current browser.
636
- */
637
- function expectedFailuresForBrowser(expected_failures) {
638
- var browser_expected_failures = {};
639
- if (typeof expected_failures === 'object') {
640
- expected_failures.forEach(function(expected_failure) {
641
- if (expected_failure.browser_configurations.some(
642
- browserConfigurationMatches)) {
643
- expected_failure.tests.forEach(function(test) {
644
- browser_expected_failures[test] = expected_failure.message;
645
- });
646
- }
647
- });
648
- }
649
- return browser_expected_failures;
650
- }
651
-
652
- /**
653
- * Returns whether the browser configuration pattern matches the browser
654
- * configuration reported by bowser.js.
655
- * Example:
656
- * { name: 'Chrome', version: '28|29' }
657
- * matches browser configuration:
658
- * { name: 'Chrome', webkit: true, chrome: true, version: '28.0' }
659
- *
660
- * @param {Object} Key - RegExp value pairs to check against.
661
- * @return {bool}
662
- */
663
- function browserConfigurationMatches(browser_configuration) {
664
- for (var browser_feature in browser_configuration) {
665
- var valueRegex = new RegExp(browser_configuration[browser_feature]);
666
- if (!valueRegex.test(bowser[browser_feature])) {
667
- return false;
668
- }
669
- }
670
- return true;
671
- }
672
-
673
- /**
674
- * Processes the test's results and put the information into the test object.
675
- *
676
- * @param {Element} test DOM object representing the test.
677
- * @param {Array.<Object>} results List of testharness.js result objects.
678
- */
679
- function processResults(test, browser_expected_failures) {
680
- var counts = {
681
- passed: 0,
682
- failed: 0,
683
- skipped: 0,
684
- expected_failed: 0, // This count is included in the above
685
- total: test.results_raw.length
686
- };
687
- var results = [];
688
- var newResultsDiv = document.createElement('ul');
689
-
690
- for(var i = 0; i < test.results_raw.length; i++) {
691
- var result = test.results_raw[i];
692
- results[i] = result;
693
-
694
- // Invert expected_failures
695
- var expected_failure = null;
696
- for(var tname in browser_expected_failures) {
697
- var tomatch = tname;
698
- if (tname.charAt(0) == '/' && tname.charAt(tname.length-1) == '/') {
699
- tomatch = new RegExp(tname.substr(1, tname.length-2));
700
- }
701
- if (result['name'].match(tomatch)) {
702
- expected_failure = browser_expected_failures[tname];
703
- }
704
- }
705
- if (expected_failure !== null && result.status != result.NOTRUN) {
706
- if (result.status != result.FAIL) {
707
- result.message = "Expected failure (" + expected_failure + "), actually " +
708
- {0: 'PASS', 2: 'TIMEOUT', 3:'NOTRUN'}[result.status] + " " +
709
- result.message;
710
- result.status = result.FAIL;
711
- } else {
712
- result.status = result.PASS;
713
- result.message = "Expected failure (" + expected_failure + "): " + result.message;
714
- }
715
- counts.expected_failed++;
716
- }
717
-
718
- var output = document.createElement('li');
719
- output.innerHTML += result.name + ': ';
720
-
721
- switch (result.status) {
722
- case result.PASS:
723
- if (!expected_failure) {
724
- output.className = 'pass';
725
- } else {
726
- output.className = 'pass-expected-failure';
727
- }
728
- counts.passed++;
729
- break;
730
-
731
- case result.TIMEOUT:
732
- output.className = 'timeout';
733
- counts.failed++;
734
- break;
735
-
736
- case result.NOTRUN:
737
- output.className = 'skipped';
738
- counts.skipped++;
739
- break;
740
-
741
- case result.FAIL:
742
- default:
743
- output.className = 'failed';
744
- counts.failed++;
745
- }
746
-
747
- output.innerHTML += output.className;
748
- if (result.message != null) {
749
- output.innerHTML += ' - ' + result.message;
750
- }
751
- newResultsDiv.appendChild(output);
752
- }
753
- test.querySelector('.log').appendChild(newResultsDiv);
754
-
755
- var debug = '';
756
- try {
757
- debug = test.querySelector('iframe').contentDocument.getElementById('debug').innerText;
758
- } catch (e) {
759
- debug = 'No debug... :(';
760
- }
761
-
762
- if (counts.total > 0) {
763
- test.results_processed = {
764
- type: 'result',
765
- testName: test.id,
766
- results: results,
767
- debug: debug
768
- };
769
-
770
- if (counts.failed == 0) {
771
- if (counts.expected_failed > 0) {
772
- test.className = 'pass-expected-failure';
773
- } else if (counts.skipped > 0) {
774
- test.className = 'skipped';
775
- } else {
776
- test.className = 'pass';
777
- }
778
- } else {
779
- test.className = 'fail';
780
- }
781
-
782
- var summary = counts.total + ' tests; ';
783
- if (counts.passed > 0) {
784
- summary += ' ' + counts.passed + ' passed';
785
- if (counts.expected_failed > 0) {
786
- summary += ' (with ' + counts.expected_failed + ' expected failures)';
787
- }
788
- }
789
- if (counts.failed > 0) {
790
- summary += ' ' + counts.failed + ' failed';
791
- }
792
- if (counts.skipped > 0) {
793
- summary += ' ' + counts.skipped + ' skipped';
794
- }
795
- test.querySelector('.count').textContent = summary;
796
- } else {
797
- test.results_processed = {
798
- type: 'result',
799
- testName: test.id,
800
- results: [],
801
- };
802
- test.className = 'no-tests';
803
- test.querySelector('.count').textContent = 'TIMEOUT';
804
- }
805
- }
806
-
807
- })();
808
-
809
-
810
- </script>