k4compiler 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1898) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +20 -0
  3. data/.gitmodules +3 -0
  4. data/.rspec +2 -0
  5. data/Gemfile +4 -0
  6. data/Guardfile +8 -0
  7. data/LICENSE.txt +22 -0
  8. data/README.md +29 -0
  9. data/Rakefile +1 -0
  10. data/k4compiler.gemspec +50 -0
  11. data/lib/k4compiler.rb +26 -0
  12. data/lib/k4compiler/compiler.rb +41 -0
  13. data/lib/k4compiler/compiler/base.rb +24 -0
  14. data/lib/k4compiler/compiler/closure.rb +96 -0
  15. data/lib/k4compiler/compiler/markdown.rb +78 -0
  16. data/lib/k4compiler/compiler/scss.rb +31 -0
  17. data/lib/k4compiler/config.rb +59 -0
  18. data/lib/k4compiler/version.rb +3 -0
  19. data/spec/k4compiler/compiler/base_spec.rb +40 -0
  20. data/spec/k4compiler/compiler/closure/compiled-src/hello-with-closure-compiled-script.js +18317 -0
  21. data/spec/k4compiler/compiler/closure/src/hello-compiled-script.js +15 -0
  22. data/spec/k4compiler/compiler/closure/src/hello-with-closure.js +15 -0
  23. data/spec/k4compiler/compiler/closure/src/hello.js +15 -0
  24. data/spec/k4compiler/compiler/closure_spec.rb +159 -0
  25. data/spec/k4compiler/compiler/markdown_spec.rb +153 -0
  26. data/spec/k4compiler/compiler/scss/_body.scss +5 -0
  27. data/spec/k4compiler/compiler/scss/sample.scss +9 -0
  28. data/spec/k4compiler/compiler/scss_spec.rb +70 -0
  29. data/spec/k4compiler/compiler_spec.rb +75 -0
  30. data/spec/k4compiler/config_spec.rb +116 -0
  31. data/spec/k4compiler_spec.rb +17 -0
  32. data/spec/spec_helper.rb +8 -0
  33. data/third_party/.gitkeep +1 -0
  34. data/third_party/closure-compiler-20130603/COPYING +202 -0
  35. data/third_party/closure-compiler-20130603/README +292 -0
  36. data/third_party/closure-compiler-20130603/compiler.jar +0 -0
  37. data/third_party/closure-library/.gitignore +12 -0
  38. data/third_party/closure-library/AUTHORS +17 -0
  39. data/third_party/closure-library/CONTRIBUTING +5 -0
  40. data/third_party/closure-library/LICENSE +176 -0
  41. data/third_party/closure-library/README +6 -0
  42. data/third_party/closure-library/all_tests.html +113 -0
  43. data/third_party/closure-library/alltests.js +16 -0
  44. data/third_party/closure-library/closure/bin/build/closurebuilder.py +262 -0
  45. data/third_party/closure-library/closure/bin/build/depstree.py +189 -0
  46. data/third_party/closure-library/closure/bin/build/depstree_test.py +127 -0
  47. data/third_party/closure-library/closure/bin/build/depswriter.py +202 -0
  48. data/third_party/closure-library/closure/bin/build/jscompiler.py +135 -0
  49. data/third_party/closure-library/closure/bin/build/jscompiler_test.py +120 -0
  50. data/third_party/closure-library/closure/bin/build/source.py +121 -0
  51. data/third_party/closure-library/closure/bin/build/source_test.py +134 -0
  52. data/third_party/closure-library/closure/bin/build/treescan.py +78 -0
  53. data/third_party/closure-library/closure/bin/calcdeps.py +590 -0
  54. data/third_party/closure-library/closure/bin/labs/code/generate_jsdoc.py +171 -0
  55. data/third_party/closure-library/closure/bin/labs/code/generate_jsdoc_test.py +167 -0
  56. data/third_party/closure-library/closure/bin/labs/code/run_py_tests.sh +28 -0
  57. data/third_party/closure-library/closure/bin/scopify.py +211 -0
  58. data/third_party/closure-library/closure/css/inlay/g-base.css +82 -0
  59. data/third_party/closure-library/closure/css/inlay/g-fixed.css +173 -0
  60. data/third_party/closure-library/closure/css/inlay/g-ratio.css +253 -0
  61. data/third_party/closure-library/closure/goog/a11y/aria/announcer.js +108 -0
  62. data/third_party/closure-library/closure/goog/a11y/aria/announcer_test.html +97 -0
  63. data/third_party/closure-library/closure/goog/a11y/aria/aria.js +362 -0
  64. data/third_party/closure-library/closure/goog/a11y/aria/aria_test.html +263 -0
  65. data/third_party/closure-library/closure/goog/a11y/aria/attributes.js +389 -0
  66. data/third_party/closure-library/closure/goog/a11y/aria/datatables.js +68 -0
  67. data/third_party/closure-library/closure/goog/a11y/aria/roles.js +216 -0
  68. data/third_party/closure-library/closure/goog/array/array.js +1507 -0
  69. data/third_party/closure-library/closure/goog/array/array_test.html +1674 -0
  70. data/third_party/closure-library/closure/goog/asserts/asserts.js +293 -0
  71. data/third_party/closure-library/closure/goog/asserts/asserts_test.html +178 -0
  72. data/third_party/closure-library/closure/goog/async/animationdelay.js +270 -0
  73. data/third_party/closure-library/closure/goog/async/animationdelay_test.html +93 -0
  74. data/third_party/closure-library/closure/goog/async/conditionaldelay.js +235 -0
  75. data/third_party/closure-library/closure/goog/async/conditionaldelay_test.html +227 -0
  76. data/third_party/closure-library/closure/goog/async/delay.js +177 -0
  77. data/third_party/closure-library/closure/goog/async/delay_test.html +148 -0
  78. data/third_party/closure-library/closure/goog/async/nexttick.js +174 -0
  79. data/third_party/closure-library/closure/goog/async/nexttick_test.html +137 -0
  80. data/third_party/closure-library/closure/goog/async/throttle.js +189 -0
  81. data/third_party/closure-library/closure/goog/async/throttle_test.html +102 -0
  82. data/third_party/closure-library/closure/goog/base.js +1593 -0
  83. data/third_party/closure-library/closure/goog/base_test.html +1206 -0
  84. data/third_party/closure-library/closure/goog/bootstrap/nodejs.js +91 -0
  85. data/third_party/closure-library/closure/goog/bootstrap/webworkers.js +37 -0
  86. data/third_party/closure-library/closure/goog/color/alpha.js +467 -0
  87. data/third_party/closure-library/closure/goog/color/alpha_test.html +301 -0
  88. data/third_party/closure-library/closure/goog/color/color.js +773 -0
  89. data/third_party/closure-library/closure/goog/color/color_test.html +661 -0
  90. data/third_party/closure-library/closure/goog/color/names.js +176 -0
  91. data/third_party/closure-library/closure/goog/crypt/aes.js +1027 -0
  92. data/third_party/closure-library/closure/goog/crypt/aes_test.html +593 -0
  93. data/third_party/closure-library/closure/goog/crypt/arc4.js +162 -0
  94. data/third_party/closure-library/closure/goog/crypt/arc4_test.html +63 -0
  95. data/third_party/closure-library/closure/goog/crypt/base64.js +272 -0
  96. data/third_party/closure-library/closure/goog/crypt/base64_test.html +117 -0
  97. data/third_party/closure-library/closure/goog/crypt/basen.js +242 -0
  98. data/third_party/closure-library/closure/goog/crypt/basen_test.html +167 -0
  99. data/third_party/closure-library/closure/goog/crypt/blobhasher.js +284 -0
  100. data/third_party/closure-library/closure/goog/crypt/blobhasher_test.html +385 -0
  101. data/third_party/closure-library/closure/goog/crypt/blockcipher.js +52 -0
  102. data/third_party/closure-library/closure/goog/crypt/cbc.js +150 -0
  103. data/third_party/closure-library/closure/goog/crypt/cbc_test.html +18 -0
  104. data/third_party/closure-library/closure/goog/crypt/cbc_test.js +100 -0
  105. data/third_party/closure-library/closure/goog/crypt/crypt.js +155 -0
  106. data/third_party/closure-library/closure/goog/crypt/crypt_perf.html +85 -0
  107. data/third_party/closure-library/closure/goog/crypt/crypt_test.html +98 -0
  108. data/third_party/closure-library/closure/goog/crypt/hash.js +62 -0
  109. data/third_party/closure-library/closure/goog/crypt/hash32.js +184 -0
  110. data/third_party/closure-library/closure/goog/crypt/hash32_test.html +287 -0
  111. data/third_party/closure-library/closure/goog/crypt/hashtester.js +243 -0
  112. data/third_party/closure-library/closure/goog/crypt/hmac.js +162 -0
  113. data/third_party/closure-library/closure/goog/crypt/hmac_test.html +113 -0
  114. data/third_party/closure-library/closure/goog/crypt/md5.js +429 -0
  115. data/third_party/closure-library/closure/goog/crypt/md5_perf.html +39 -0
  116. data/third_party/closure-library/closure/goog/crypt/md5_test.html +152 -0
  117. data/third_party/closure-library/closure/goog/crypt/pbkdf2.js +127 -0
  118. data/third_party/closure-library/closure/goog/crypt/pbkdf2_test.html +68 -0
  119. data/third_party/closure-library/closure/goog/crypt/sha1.js +275 -0
  120. data/third_party/closure-library/closure/goog/crypt/sha1_perf.html +40 -0
  121. data/third_party/closure-library/closure/goog/crypt/sha1_test.html +79 -0
  122. data/third_party/closure-library/closure/goog/crypt/sha2.js +275 -0
  123. data/third_party/closure-library/closure/goog/crypt/sha224.js +53 -0
  124. data/third_party/closure-library/closure/goog/crypt/sha224_perf.html +40 -0
  125. data/third_party/closure-library/closure/goog/crypt/sha224_test.html +57 -0
  126. data/third_party/closure-library/closure/goog/crypt/sha256.js +53 -0
  127. data/third_party/closure-library/closure/goog/crypt/sha256_perf.html +40 -0
  128. data/third_party/closure-library/closure/goog/crypt/sha256_test.html +66 -0
  129. data/third_party/closure-library/closure/goog/css/autocomplete.css +43 -0
  130. data/third_party/closure-library/closure/goog/css/bubble.css +84 -0
  131. data/third_party/closure-library/closure/goog/css/button.css +38 -0
  132. data/third_party/closure-library/closure/goog/css/charpicker.css +206 -0
  133. data/third_party/closure-library/closure/goog/css/checkbox.css +38 -0
  134. data/third_party/closure-library/closure/goog/css/colormenubutton.css +25 -0
  135. data/third_party/closure-library/closure/goog/css/colorpalette.css +54 -0
  136. data/third_party/closure-library/closure/goog/css/colorpicker-simplegrid.css +49 -0
  137. data/third_party/closure-library/closure/goog/css/combobox.css +54 -0
  138. data/third_party/closure-library/closure/goog/css/common.css +41 -0
  139. data/third_party/closure-library/closure/goog/css/css3button.css +77 -0
  140. data/third_party/closure-library/closure/goog/css/css3menubutton.css +23 -0
  141. data/third_party/closure-library/closure/goog/css/custombutton.css +164 -0
  142. data/third_party/closure-library/closure/goog/css/datepicker.css +148 -0
  143. data/third_party/closure-library/closure/goog/css/dialog.css +72 -0
  144. data/third_party/closure-library/closure/goog/css/dimensionpicker.css +47 -0
  145. data/third_party/closure-library/closure/goog/css/dragdropdetector.css +48 -0
  146. data/third_party/closure-library/closure/goog/css/editor/bubble.css +73 -0
  147. data/third_party/closure-library/closure/goog/css/editor/dialog.css +66 -0
  148. data/third_party/closure-library/closure/goog/css/editor/equationeditor.css +113 -0
  149. data/third_party/closure-library/closure/goog/css/editor/linkdialog.css +36 -0
  150. data/third_party/closure-library/closure/goog/css/editortoolbar.css +225 -0
  151. data/third_party/closure-library/closure/goog/css/filteredmenu.css +30 -0
  152. data/third_party/closure-library/closure/goog/css/filterobservingmenuitem.css +25 -0
  153. data/third_party/closure-library/closure/goog/css/flatbutton.css +64 -0
  154. data/third_party/closure-library/closure/goog/css/flatmenubutton.css +63 -0
  155. data/third_party/closure-library/closure/goog/css/hovercard.css +51 -0
  156. data/third_party/closure-library/closure/goog/css/hsvapalette.css +231 -0
  157. data/third_party/closure-library/closure/goog/css/hsvpalette.css +179 -0
  158. data/third_party/closure-library/closure/goog/css/imagelessbutton.css +160 -0
  159. data/third_party/closure-library/closure/goog/css/imagelessmenubutton.css +23 -0
  160. data/third_party/closure-library/closure/goog/css/inputdatepicker.css +12 -0
  161. data/third_party/closure-library/closure/goog/css/linkbutton.css +26 -0
  162. data/third_party/closure-library/closure/goog/css/menu.css +27 -0
  163. data/third_party/closure-library/closure/goog/css/menubar.css +57 -0
  164. data/third_party/closure-library/closure/goog/css/menubutton.css +169 -0
  165. data/third_party/closure-library/closure/goog/css/menuitem.css +148 -0
  166. data/third_party/closure-library/closure/goog/css/menuseparator.css +19 -0
  167. data/third_party/closure-library/closure/goog/css/multitestrunner.css +121 -0
  168. data/third_party/closure-library/closure/goog/css/offline.css +147 -0
  169. data/third_party/closure-library/closure/goog/css/palette.css +36 -0
  170. data/third_party/closure-library/closure/goog/css/popupdatepicker.css +17 -0
  171. data/third_party/closure-library/closure/goog/css/roundedpanel.css +29 -0
  172. data/third_party/closure-library/closure/goog/css/roundedtab.css +158 -0
  173. data/third_party/closure-library/closure/goog/css/submenu.css +38 -0
  174. data/third_party/closure-library/closure/goog/css/tab.css +105 -0
  175. data/third_party/closure-library/closure/goog/css/tabbar.css +52 -0
  176. data/third_party/closure-library/closure/goog/css/tablesorter.css +14 -0
  177. data/third_party/closure-library/closure/goog/css/toolbar.css +400 -0
  178. data/third_party/closure-library/closure/goog/css/tooltip.css +14 -0
  179. data/third_party/closure-library/closure/goog/css/tree.css +146 -0
  180. data/third_party/closure-library/closure/goog/css/tristatemenuitem.css +43 -0
  181. data/third_party/closure-library/closure/goog/cssom/cssom.js +449 -0
  182. data/third_party/closure-library/closure/goog/cssom/cssom_test.html +343 -0
  183. data/third_party/closure-library/closure/goog/cssom/cssom_test_import_1.css +11 -0
  184. data/third_party/closure-library/closure/goog/cssom/cssom_test_import_2.css +10 -0
  185. data/third_party/closure-library/closure/goog/cssom/cssom_test_link_1.css +10 -0
  186. data/third_party/closure-library/closure/goog/cssom/iframe/style.js +1023 -0
  187. data/third_party/closure-library/closure/goog/cssom/iframe/style_test.html +391 -0
  188. data/third_party/closure-library/closure/goog/cssom/iframe/style_test_import.css +10 -0
  189. data/third_party/closure-library/closure/goog/datasource/datamanager.js +559 -0
  190. data/third_party/closure-library/closure/goog/datasource/datasource.js +656 -0
  191. data/third_party/closure-library/closure/goog/datasource/datasource_test.html +265 -0
  192. data/third_party/closure-library/closure/goog/datasource/expr.js +544 -0
  193. data/third_party/closure-library/closure/goog/datasource/expr_test.html +97 -0
  194. data/third_party/closure-library/closure/goog/datasource/fastdatanode.js +811 -0
  195. data/third_party/closure-library/closure/goog/datasource/fastdatanode_test.html +254 -0
  196. data/third_party/closure-library/closure/goog/datasource/jsdatasource.js +460 -0
  197. data/third_party/closure-library/closure/goog/datasource/jsondatasource.js +148 -0
  198. data/third_party/closure-library/closure/goog/datasource/jsxmlhttpdatasource.js +195 -0
  199. data/third_party/closure-library/closure/goog/datasource/jsxmlhttpdatasource_test.html +94 -0
  200. data/third_party/closure-library/closure/goog/datasource/xmldatasource.js +415 -0
  201. data/third_party/closure-library/closure/goog/date/date.js +1718 -0
  202. data/third_party/closure-library/closure/goog/date/date_test.html +1392 -0
  203. data/third_party/closure-library/closure/goog/date/datelike.js +27 -0
  204. data/third_party/closure-library/closure/goog/date/daterange.js +413 -0
  205. data/third_party/closure-library/closure/goog/date/daterange_test.html +253 -0
  206. data/third_party/closure-library/closure/goog/date/relative.js +465 -0
  207. data/third_party/closure-library/closure/goog/date/relative_test.html +267 -0
  208. data/third_party/closure-library/closure/goog/date/utcdatetime.js +179 -0
  209. data/third_party/closure-library/closure/goog/date/utcdatetime_test.html +124 -0
  210. data/third_party/closure-library/closure/goog/db/cursor.js +214 -0
  211. data/third_party/closure-library/closure/goog/db/db.js +182 -0
  212. data/third_party/closure-library/closure/goog/db/db_test.html +1657 -0
  213. data/third_party/closure-library/closure/goog/db/error.js +359 -0
  214. data/third_party/closure-library/closure/goog/db/index.js +245 -0
  215. data/third_party/closure-library/closure/goog/db/indexeddb.js +337 -0
  216. data/third_party/closure-library/closure/goog/db/keyrange.js +117 -0
  217. data/third_party/closure-library/closure/goog/db/objectstore.js +399 -0
  218. data/third_party/closure-library/closure/goog/db/old_db_test.html +1244 -0
  219. data/third_party/closure-library/closure/goog/db/transaction.js +218 -0
  220. data/third_party/closure-library/closure/goog/debug/console.js +207 -0
  221. data/third_party/closure-library/closure/goog/debug/console_test.html +195 -0
  222. data/third_party/closure-library/closure/goog/debug/debug.js +501 -0
  223. data/third_party/closure-library/closure/goog/debug/debug_test.html +68 -0
  224. data/third_party/closure-library/closure/goog/debug/debugwindow.js +615 -0
  225. data/third_party/closure-library/closure/goog/debug/debugwindow_test.html +29 -0
  226. data/third_party/closure-library/closure/goog/debug/devcss/devcss.js +444 -0
  227. data/third_party/closure-library/closure/goog/debug/devcss/devcss_test.html +365 -0
  228. data/third_party/closure-library/closure/goog/debug/devcss/devcssrunner.js +26 -0
  229. data/third_party/closure-library/closure/goog/debug/divconsole.js +141 -0
  230. data/third_party/closure-library/closure/goog/debug/enhanceerror_test.html +138 -0
  231. data/third_party/closure-library/closure/goog/debug/entrypointregistry.js +158 -0
  232. data/third_party/closure-library/closure/goog/debug/entrypointregistry_test.html +87 -0
  233. data/third_party/closure-library/closure/goog/debug/error.js +51 -0
  234. data/third_party/closure-library/closure/goog/debug/error_test.html +101 -0
  235. data/third_party/closure-library/closure/goog/debug/errorhandler.js +363 -0
  236. data/third_party/closure-library/closure/goog/debug/errorhandler_async_test.html +112 -0
  237. data/third_party/closure-library/closure/goog/debug/errorhandler_test.html +292 -0
  238. data/third_party/closure-library/closure/goog/debug/errorhandlerweakdep.js +38 -0
  239. data/third_party/closure-library/closure/goog/debug/errorreporter.js +376 -0
  240. data/third_party/closure-library/closure/goog/debug/errorreporter_test.html +351 -0
  241. data/third_party/closure-library/closure/goog/debug/fancywindow.js +362 -0
  242. data/third_party/closure-library/closure/goog/debug/formatter.js +316 -0
  243. data/third_party/closure-library/closure/goog/debug/fpsdisplay.js +162 -0
  244. data/third_party/closure-library/closure/goog/debug/fpsdisplay_test.html +53 -0
  245. data/third_party/closure-library/closure/goog/debug/gcdiagnostics.js +143 -0
  246. data/third_party/closure-library/closure/goog/debug/logbuffer.js +147 -0
  247. data/third_party/closure-library/closure/goog/debug/logbuffer_test.html +105 -0
  248. data/third_party/closure-library/closure/goog/debug/logger.js +853 -0
  249. data/third_party/closure-library/closure/goog/debug/logger_test.html +208 -0
  250. data/third_party/closure-library/closure/goog/debug/logrecord.js +271 -0
  251. data/third_party/closure-library/closure/goog/debug/logrecordserializer.js +121 -0
  252. data/third_party/closure-library/closure/goog/debug/logrecordserializer_test.html +96 -0
  253. data/third_party/closure-library/closure/goog/debug/reflect.js +178 -0
  254. data/third_party/closure-library/closure/goog/debug/reflect_test.html +101 -0
  255. data/third_party/closure-library/closure/goog/debug/relativetimeprovider.js +83 -0
  256. data/third_party/closure-library/closure/goog/debug/tracer.js +724 -0
  257. data/third_party/closure-library/closure/goog/debug/tracer_test.html +57 -0
  258. data/third_party/closure-library/closure/goog/demos/advancedtooltip.html +78 -0
  259. data/third_party/closure-library/closure/goog/demos/animationqueue.html +149 -0
  260. data/third_party/closure-library/closure/goog/demos/autocomplete-basic.html +56 -0
  261. data/third_party/closure-library/closure/goog/demos/autocompleteremote.html +40 -0
  262. data/third_party/closure-library/closure/goog/demos/autocompleteremotedata.js +18 -0
  263. data/third_party/closure-library/closure/goog/demos/autocompleterichremote.html +137 -0
  264. data/third_party/closure-library/closure/goog/demos/autocompleterichremotedata.js +33 -0
  265. data/third_party/closure-library/closure/goog/demos/bidiinput.html +72 -0
  266. data/third_party/closure-library/closure/goog/demos/blobhasher.html +61 -0
  267. data/third_party/closure-library/closure/goog/demos/bubble.html +250 -0
  268. data/third_party/closure-library/closure/goog/demos/button.html +395 -0
  269. data/third_party/closure-library/closure/goog/demos/charcounter.html +57 -0
  270. data/third_party/closure-library/closure/goog/demos/charpicker.html +66 -0
  271. data/third_party/closure-library/closure/goog/demos/checkbox.html +122 -0
  272. data/third_party/closure-library/closure/goog/demos/color-contrast.html +60 -0
  273. data/third_party/closure-library/closure/goog/demos/colormenubutton.html +221 -0
  274. data/third_party/closure-library/closure/goog/demos/colorpicker.html +43 -0
  275. data/third_party/closure-library/closure/goog/demos/combobox.html +160 -0
  276. data/third_party/closure-library/closure/goog/demos/container.html +670 -0
  277. data/third_party/closure-library/closure/goog/demos/control.html +477 -0
  278. data/third_party/closure-library/closure/goog/demos/css/demo.css +75 -0
  279. data/third_party/closure-library/closure/goog/demos/css/emojipicker.css +36 -0
  280. data/third_party/closure-library/closure/goog/demos/css/emojisprite.css +92 -0
  281. data/third_party/closure-library/closure/goog/demos/css3button.html +166 -0
  282. data/third_party/closure-library/closure/goog/demos/css3menubutton.html +285 -0
  283. data/third_party/closure-library/closure/goog/demos/cssspriteanimation.html +80 -0
  284. data/third_party/closure-library/closure/goog/demos/datepicker.html +183 -0
  285. data/third_party/closure-library/closure/goog/demos/debug.html +118 -0
  286. data/third_party/closure-library/closure/goog/demos/depsgraph.html +220 -0
  287. data/third_party/closure-library/closure/goog/demos/dialog.html +156 -0
  288. data/third_party/closure-library/closure/goog/demos/dimensionpicker.html +108 -0
  289. data/third_party/closure-library/closure/goog/demos/dimensionpicker_rtl.html +123 -0
  290. data/third_party/closure-library/closure/goog/demos/dom_selection.html +88 -0
  291. data/third_party/closure-library/closure/goog/demos/drag.html +191 -0
  292. data/third_party/closure-library/closure/goog/demos/dragdrop.html +263 -0
  293. data/third_party/closure-library/closure/goog/demos/dragdropdetector.html +46 -0
  294. data/third_party/closure-library/closure/goog/demos/dragdropdetector_target.html +17 -0
  295. data/third_party/closure-library/closure/goog/demos/dragger.html +83 -0
  296. data/third_party/closure-library/closure/goog/demos/draglistgroup.html +273 -0
  297. data/third_party/closure-library/closure/goog/demos/dragscrollsupport.html +133 -0
  298. data/third_party/closure-library/closure/goog/demos/drilldownrow.html +78 -0
  299. data/third_party/closure-library/closure/goog/demos/editor/deps.js +21 -0
  300. data/third_party/closure-library/closure/goog/demos/editor/editor.html +139 -0
  301. data/third_party/closure-library/closure/goog/demos/editor/equationeditor.html +36 -0
  302. data/third_party/closure-library/closure/goog/demos/editor/equationeditor.js +40 -0
  303. data/third_party/closure-library/closure/goog/demos/editor/field_basic.html +74 -0
  304. data/third_party/closure-library/closure/goog/demos/editor/helloworld.html +91 -0
  305. data/third_party/closure-library/closure/goog/demos/editor/helloworld.js +81 -0
  306. data/third_party/closure-library/closure/goog/demos/editor/helloworld_test.html +75 -0
  307. data/third_party/closure-library/closure/goog/demos/editor/helloworlddialog.js +171 -0
  308. data/third_party/closure-library/closure/goog/demos/editor/helloworlddialog_test.html +100 -0
  309. data/third_party/closure-library/closure/goog/demos/editor/helloworlddialogplugin.js +116 -0
  310. data/third_party/closure-library/closure/goog/demos/editor/helloworlddialogplugin_test.html +198 -0
  311. data/third_party/closure-library/closure/goog/demos/editor/seamlessfield.html +106 -0
  312. data/third_party/closure-library/closure/goog/demos/editor/tableeditor.html +93 -0
  313. data/third_party/closure-library/closure/goog/demos/effects.html +162 -0
  314. data/third_party/closure-library/closure/goog/demos/emoji/200.gif +0 -0
  315. data/third_party/closure-library/closure/goog/demos/emoji/201.gif +0 -0
  316. data/third_party/closure-library/closure/goog/demos/emoji/202.gif +0 -0
  317. data/third_party/closure-library/closure/goog/demos/emoji/203.gif +0 -0
  318. data/third_party/closure-library/closure/goog/demos/emoji/204.gif +0 -0
  319. data/third_party/closure-library/closure/goog/demos/emoji/205.gif +0 -0
  320. data/third_party/closure-library/closure/goog/demos/emoji/206.gif +0 -0
  321. data/third_party/closure-library/closure/goog/demos/emoji/2BC.gif +0 -0
  322. data/third_party/closure-library/closure/goog/demos/emoji/2BD.gif +0 -0
  323. data/third_party/closure-library/closure/goog/demos/emoji/2BE.gif +0 -0
  324. data/third_party/closure-library/closure/goog/demos/emoji/2BF.gif +0 -0
  325. data/third_party/closure-library/closure/goog/demos/emoji/2C0.gif +0 -0
  326. data/third_party/closure-library/closure/goog/demos/emoji/2C1.gif +0 -0
  327. data/third_party/closure-library/closure/goog/demos/emoji/2C2.gif +0 -0
  328. data/third_party/closure-library/closure/goog/demos/emoji/2C3.gif +0 -0
  329. data/third_party/closure-library/closure/goog/demos/emoji/2C4.gif +0 -0
  330. data/third_party/closure-library/closure/goog/demos/emoji/2C5.gif +0 -0
  331. data/third_party/closure-library/closure/goog/demos/emoji/2C6.gif +0 -0
  332. data/third_party/closure-library/closure/goog/demos/emoji/2C7.gif +0 -0
  333. data/third_party/closure-library/closure/goog/demos/emoji/2C8.gif +0 -0
  334. data/third_party/closure-library/closure/goog/demos/emoji/2C9.gif +0 -0
  335. data/third_party/closure-library/closure/goog/demos/emoji/2CA.gif +0 -0
  336. data/third_party/closure-library/closure/goog/demos/emoji/2CB.gif +0 -0
  337. data/third_party/closure-library/closure/goog/demos/emoji/2CC.gif +0 -0
  338. data/third_party/closure-library/closure/goog/demos/emoji/2CD.gif +0 -0
  339. data/third_party/closure-library/closure/goog/demos/emoji/2CE.gif +0 -0
  340. data/third_party/closure-library/closure/goog/demos/emoji/2CF.gif +0 -0
  341. data/third_party/closure-library/closure/goog/demos/emoji/2D0.gif +0 -0
  342. data/third_party/closure-library/closure/goog/demos/emoji/2D1.gif +0 -0
  343. data/third_party/closure-library/closure/goog/demos/emoji/2D2.gif +0 -0
  344. data/third_party/closure-library/closure/goog/demos/emoji/2D3.gif +0 -0
  345. data/third_party/closure-library/closure/goog/demos/emoji/2D4.gif +0 -0
  346. data/third_party/closure-library/closure/goog/demos/emoji/2D5.gif +0 -0
  347. data/third_party/closure-library/closure/goog/demos/emoji/2D6.gif +0 -0
  348. data/third_party/closure-library/closure/goog/demos/emoji/2D7.gif +0 -0
  349. data/third_party/closure-library/closure/goog/demos/emoji/2D8.gif +0 -0
  350. data/third_party/closure-library/closure/goog/demos/emoji/2D9.gif +0 -0
  351. data/third_party/closure-library/closure/goog/demos/emoji/2DA.gif +0 -0
  352. data/third_party/closure-library/closure/goog/demos/emoji/2DB.gif +0 -0
  353. data/third_party/closure-library/closure/goog/demos/emoji/2DC.gif +0 -0
  354. data/third_party/closure-library/closure/goog/demos/emoji/2DD.gif +0 -0
  355. data/third_party/closure-library/closure/goog/demos/emoji/2DE.gif +0 -0
  356. data/third_party/closure-library/closure/goog/demos/emoji/2DF.gif +0 -0
  357. data/third_party/closure-library/closure/goog/demos/emoji/2E0.gif +0 -0
  358. data/third_party/closure-library/closure/goog/demos/emoji/2E1.gif +0 -0
  359. data/third_party/closure-library/closure/goog/demos/emoji/2E2.gif +0 -0
  360. data/third_party/closure-library/closure/goog/demos/emoji/2E3.gif +0 -0
  361. data/third_party/closure-library/closure/goog/demos/emoji/2E4.gif +0 -0
  362. data/third_party/closure-library/closure/goog/demos/emoji/2E5.gif +0 -0
  363. data/third_party/closure-library/closure/goog/demos/emoji/2E6.gif +0 -0
  364. data/third_party/closure-library/closure/goog/demos/emoji/2E7.gif +0 -0
  365. data/third_party/closure-library/closure/goog/demos/emoji/2E8.gif +0 -0
  366. data/third_party/closure-library/closure/goog/demos/emoji/2E9.gif +0 -0
  367. data/third_party/closure-library/closure/goog/demos/emoji/2EA.gif +0 -0
  368. data/third_party/closure-library/closure/goog/demos/emoji/2EB.gif +0 -0
  369. data/third_party/closure-library/closure/goog/demos/emoji/2EC.gif +0 -0
  370. data/third_party/closure-library/closure/goog/demos/emoji/2ED.gif +0 -0
  371. data/third_party/closure-library/closure/goog/demos/emoji/2EE.gif +0 -0
  372. data/third_party/closure-library/closure/goog/demos/emoji/2EF.gif +0 -0
  373. data/third_party/closure-library/closure/goog/demos/emoji/2F0.gif +0 -0
  374. data/third_party/closure-library/closure/goog/demos/emoji/2F1.gif +0 -0
  375. data/third_party/closure-library/closure/goog/demos/emoji/2F2.gif +0 -0
  376. data/third_party/closure-library/closure/goog/demos/emoji/2F3.gif +0 -0
  377. data/third_party/closure-library/closure/goog/demos/emoji/2F4.gif +0 -0
  378. data/third_party/closure-library/closure/goog/demos/emoji/2F5.gif +0 -0
  379. data/third_party/closure-library/closure/goog/demos/emoji/2F6.gif +0 -0
  380. data/third_party/closure-library/closure/goog/demos/emoji/2F7.gif +0 -0
  381. data/third_party/closure-library/closure/goog/demos/emoji/2F8.gif +0 -0
  382. data/third_party/closure-library/closure/goog/demos/emoji/2F9.gif +0 -0
  383. data/third_party/closure-library/closure/goog/demos/emoji/2FA.gif +0 -0
  384. data/third_party/closure-library/closure/goog/demos/emoji/2FB.gif +0 -0
  385. data/third_party/closure-library/closure/goog/demos/emoji/2FC.gif +0 -0
  386. data/third_party/closure-library/closure/goog/demos/emoji/2FD.gif +0 -0
  387. data/third_party/closure-library/closure/goog/demos/emoji/2FE.gif +0 -0
  388. data/third_party/closure-library/closure/goog/demos/emoji/2FF.gif +0 -0
  389. data/third_party/closure-library/closure/goog/demos/emoji/none.gif +0 -0
  390. data/third_party/closure-library/closure/goog/demos/emoji/sprite.png +0 -0
  391. data/third_party/closure-library/closure/goog/demos/emoji/sprite2.png +0 -0
  392. data/third_party/closure-library/closure/goog/demos/emoji/unknown.gif +0 -0
  393. data/third_party/closure-library/closure/goog/demos/event-propagation.html +192 -0
  394. data/third_party/closure-library/closure/goog/demos/events.html +99 -0
  395. data/third_party/closure-library/closure/goog/demos/eventtarget.html +70 -0
  396. data/third_party/closure-library/closure/goog/demos/filedrophandler.html +65 -0
  397. data/third_party/closure-library/closure/goog/demos/filteredmenu.html +118 -0
  398. data/third_party/closure-library/closure/goog/demos/focushandler.html +58 -0
  399. data/third_party/closure-library/closure/goog/demos/fpsdisplay.html +50 -0
  400. data/third_party/closure-library/closure/goog/demos/fx/css3/transition.html +222 -0
  401. data/third_party/closure-library/closure/goog/demos/gauge.html +158 -0
  402. data/third_party/closure-library/closure/goog/demos/graphics/advancedcoordinates.html +141 -0
  403. data/third_party/closure-library/closure/goog/demos/graphics/advancedcoordinates2.html +130 -0
  404. data/third_party/closure-library/closure/goog/demos/graphics/basicelements.html +264 -0
  405. data/third_party/closure-library/closure/goog/demos/graphics/events.html +114 -0
  406. data/third_party/closure-library/closure/goog/demos/graphics/modifyelements.html +195 -0
  407. data/third_party/closure-library/closure/goog/demos/graphics/subpixel.html +80 -0
  408. data/third_party/closure-library/closure/goog/demos/graphics/tiger.html +105 -0
  409. data/third_party/closure-library/closure/goog/demos/graphics/tigerdata.js +2841 -0
  410. data/third_party/closure-library/closure/goog/demos/history1.html +132 -0
  411. data/third_party/closure-library/closure/goog/demos/history2.html +119 -0
  412. data/third_party/closure-library/closure/goog/demos/history3.html +116 -0
  413. data/third_party/closure-library/closure/goog/demos/history3js.html +48 -0
  414. data/third_party/closure-library/closure/goog/demos/history_blank.html +26 -0
  415. data/third_party/closure-library/closure/goog/demos/hovercard.html +177 -0
  416. data/third_party/closure-library/closure/goog/demos/hsvapalette.html +55 -0
  417. data/third_party/closure-library/closure/goog/demos/hsvpalette.html +56 -0
  418. data/third_party/closure-library/closure/goog/demos/html5history.html +87 -0
  419. data/third_party/closure-library/closure/goog/demos/imagelessbutton.html +221 -0
  420. data/third_party/closure-library/closure/goog/demos/imagelessmenubutton.html +285 -0
  421. data/third_party/closure-library/closure/goog/demos/index.html +20 -0
  422. data/third_party/closure-library/closure/goog/demos/index_nav.html +255 -0
  423. data/third_party/closure-library/closure/goog/demos/index_splash.html +27 -0
  424. data/third_party/closure-library/closure/goog/demos/inline_block_quirks.html +125 -0
  425. data/third_party/closure-library/closure/goog/demos/inline_block_standards.html +126 -0
  426. data/third_party/closure-library/closure/goog/demos/inputdatepicker.html +60 -0
  427. data/third_party/closure-library/closure/goog/demos/inputhandler.html +88 -0
  428. data/third_party/closure-library/closure/goog/demos/jsonprettyprinter.html +80 -0
  429. data/third_party/closure-library/closure/goog/demos/keyboardshortcuts.html +112 -0
  430. data/third_party/closure-library/closure/goog/demos/keyhandler.html +118 -0
  431. data/third_party/closure-library/closure/goog/demos/labelinput.html +42 -0
  432. data/third_party/closure-library/closure/goog/demos/menu.html +220 -0
  433. data/third_party/closure-library/closure/goog/demos/menubar.html +211 -0
  434. data/third_party/closure-library/closure/goog/demos/menubutton.html +380 -0
  435. data/third_party/closure-library/closure/goog/demos/menubutton_frame.html +27 -0
  436. data/third_party/closure-library/closure/goog/demos/menuitem.html +164 -0
  437. data/third_party/closure-library/closure/goog/demos/mousewheelhandler.html +109 -0
  438. data/third_party/closure-library/closure/goog/demos/offline.html +268 -0
  439. data/third_party/closure-library/closure/goog/demos/onlinehandler.html +79 -0
  440. data/third_party/closure-library/closure/goog/demos/palette.html +302 -0
  441. data/third_party/closure-library/closure/goog/demos/pastehandler.html +54 -0
  442. data/third_party/closure-library/closure/goog/demos/pixeldensitymonitor.html +51 -0
  443. data/third_party/closure-library/closure/goog/demos/plaintextspellchecker.html +106 -0
  444. data/third_party/closure-library/closure/goog/demos/popup.html +206 -0
  445. data/third_party/closure-library/closure/goog/demos/popupcolorpicker.html +49 -0
  446. data/third_party/closure-library/closure/goog/demos/popupdatepicker.html +53 -0
  447. data/third_party/closure-library/closure/goog/demos/popupemojipicker.html +407 -0
  448. data/third_party/closure-library/closure/goog/demos/popupmenu.html +116 -0
  449. data/third_party/closure-library/closure/goog/demos/progressbar.html +97 -0
  450. data/third_party/closure-library/closure/goog/demos/prompt.html +92 -0
  451. data/third_party/closure-library/closure/goog/demos/quadtree.html +107 -0
  452. data/third_party/closure-library/closure/goog/demos/ratings.html +121 -0
  453. data/third_party/closure-library/closure/goog/demos/richtextspellchecker.html +92 -0
  454. data/third_party/closure-library/closure/goog/demos/roundedpanel.html +139 -0
  455. data/third_party/closure-library/closure/goog/demos/samplecomponent.html +75 -0
  456. data/third_party/closure-library/closure/goog/demos/samplecomponent.js +197 -0
  457. data/third_party/closure-library/closure/goog/demos/scrollfloater.html +113 -0
  458. data/third_party/closure-library/closure/goog/demos/select.html +324 -0
  459. data/third_party/closure-library/closure/goog/demos/selectionmenubutton.html +186 -0
  460. data/third_party/closure-library/closure/goog/demos/serverchart.html +122 -0
  461. data/third_party/closure-library/closure/goog/demos/slider.html +128 -0
  462. data/third_party/closure-library/closure/goog/demos/splitbehavior.html +163 -0
  463. data/third_party/closure-library/closure/goog/demos/splitpane.html +243 -0
  464. data/third_party/closure-library/closure/goog/demos/stopevent.html +171 -0
  465. data/third_party/closure-library/closure/goog/demos/submenus.html +130 -0
  466. data/third_party/closure-library/closure/goog/demos/submenus2.html +150 -0
  467. data/third_party/closure-library/closure/goog/demos/tabbar.html +289 -0
  468. data/third_party/closure-library/closure/goog/demos/tablesorter.html +116 -0
  469. data/third_party/closure-library/closure/goog/demos/tabpane.html +302 -0
  470. data/third_party/closure-library/closure/goog/demos/textarea.html +128 -0
  471. data/third_party/closure-library/closure/goog/demos/timers.html +291 -0
  472. data/third_party/closure-library/closure/goog/demos/toolbar.html +703 -0
  473. data/third_party/closure-library/closure/goog/demos/tooltip.html +91 -0
  474. data/third_party/closure-library/closure/goog/demos/tracer.html +92 -0
  475. data/third_party/closure-library/closure/goog/demos/tree/demo.html +126 -0
  476. data/third_party/closure-library/closure/goog/demos/tree/testdata.js +260 -0
  477. data/third_party/closure-library/closure/goog/demos/tweakui.html +121 -0
  478. data/third_party/closure-library/closure/goog/demos/twothumbslider.html +121 -0
  479. data/third_party/closure-library/closure/goog/demos/useragent.html +214 -0
  480. data/third_party/closure-library/closure/goog/demos/viewportsizemonitor.html +71 -0
  481. data/third_party/closure-library/closure/goog/demos/xpc/blank.html +7 -0
  482. data/third_party/closure-library/closure/goog/demos/xpc/index.html +89 -0
  483. data/third_party/closure-library/closure/goog/demos/xpc/inner.html +58 -0
  484. data/third_party/closure-library/closure/goog/demos/xpc/minimal/blank.html +7 -0
  485. data/third_party/closure-library/closure/goog/demos/xpc/minimal/index.html +105 -0
  486. data/third_party/closure-library/closure/goog/demos/xpc/minimal/inner.html +75 -0
  487. data/third_party/closure-library/closure/goog/demos/xpc/minimal/relay.html +7 -0
  488. data/third_party/closure-library/closure/goog/demos/xpc/relay.html +16 -0
  489. data/third_party/closure-library/closure/goog/demos/xpc/xpcdemo.js +307 -0
  490. data/third_party/closure-library/closure/goog/demos/zippy.html +149 -0
  491. data/third_party/closure-library/closure/goog/deps.js +911 -0
  492. data/third_party/closure-library/closure/goog/disposable/disposable.js +294 -0
  493. data/third_party/closure-library/closure/goog/disposable/disposable_test.html +307 -0
  494. data/third_party/closure-library/closure/goog/disposable/idisposable.js +45 -0
  495. data/third_party/closure-library/closure/goog/dom/a11y.js +169 -0
  496. data/third_party/closure-library/closure/goog/dom/abstractmultirange.js +77 -0
  497. data/third_party/closure-library/closure/goog/dom/abstractrange.js +528 -0
  498. data/third_party/closure-library/closure/goog/dom/abstractrange_test.html +73 -0
  499. data/third_party/closure-library/closure/goog/dom/annotate.js +355 -0
  500. data/third_party/closure-library/closure/goog/dom/annotate_test.html +215 -0
  501. data/third_party/closure-library/closure/goog/dom/browserfeature.js +67 -0
  502. data/third_party/closure-library/closure/goog/dom/browserrange/abstractrange.js +352 -0
  503. data/third_party/closure-library/closure/goog/dom/browserrange/browserrange.js +150 -0
  504. data/third_party/closure-library/closure/goog/dom/browserrange/browserrange_test.html +638 -0
  505. data/third_party/closure-library/closure/goog/dom/browserrange/geckorange.js +86 -0
  506. data/third_party/closure-library/closure/goog/dom/browserrange/ierange.js +952 -0
  507. data/third_party/closure-library/closure/goog/dom/browserrange/operarange.js +83 -0
  508. data/third_party/closure-library/closure/goog/dom/browserrange/w3crange.js +365 -0
  509. data/third_party/closure-library/closure/goog/dom/browserrange/webkitrange.js +112 -0
  510. data/third_party/closure-library/closure/goog/dom/bufferedviewportsizemonitor.js +202 -0
  511. data/third_party/closure-library/closure/goog/dom/bufferedviewportsizemonitor_test.html +17 -0
  512. data/third_party/closure-library/closure/goog/dom/bufferedviewportsizemonitor_test.js +130 -0
  513. data/third_party/closure-library/closure/goog/dom/classes.js +227 -0
  514. data/third_party/closure-library/closure/goog/dom/classes_quirks_test.html +63 -0
  515. data/third_party/closure-library/closure/goog/dom/classes_test.html +64 -0
  516. data/third_party/closure-library/closure/goog/dom/classes_test.js +231 -0
  517. data/third_party/closure-library/closure/goog/dom/classlist.js +271 -0
  518. data/third_party/closure-library/closure/goog/dom/classlist_test.html +26 -0
  519. data/third_party/closure-library/closure/goog/dom/classlist_test.js +244 -0
  520. data/third_party/closure-library/closure/goog/dom/controlrange.js +505 -0
  521. data/third_party/closure-library/closure/goog/dom/controlrange_test.html +246 -0
  522. data/third_party/closure-library/closure/goog/dom/dataset.js +135 -0
  523. data/third_party/closure-library/closure/goog/dom/dataset_test.html +117 -0
  524. data/third_party/closure-library/closure/goog/dom/dom.js +2700 -0
  525. data/third_party/closure-library/closure/goog/dom/dom_quirks_test.html +113 -0
  526. data/third_party/closure-library/closure/goog/dom/dom_test.html +113 -0
  527. data/third_party/closure-library/closure/goog/dom/dom_test.js +1421 -0
  528. data/third_party/closure-library/closure/goog/dom/fontsizemonitor.js +159 -0
  529. data/third_party/closure-library/closure/goog/dom/fontsizemonitor_test.html +284 -0
  530. data/third_party/closure-library/closure/goog/dom/forms.js +414 -0
  531. data/third_party/closure-library/closure/goog/dom/forms_test.html +501 -0
  532. data/third_party/closure-library/closure/goog/dom/fullscreen.js +124 -0
  533. data/third_party/closure-library/closure/goog/dom/iframe.js +163 -0
  534. data/third_party/closure-library/closure/goog/dom/iframe_test.html +88 -0
  535. data/third_party/closure-library/closure/goog/dom/iter.js +127 -0
  536. data/third_party/closure-library/closure/goog/dom/iter_test.html +97 -0
  537. data/third_party/closure-library/closure/goog/dom/multirange.js +519 -0
  538. data/third_party/closure-library/closure/goog/dom/multirange_test.html +67 -0
  539. data/third_party/closure-library/closure/goog/dom/nodeiterator.js +86 -0
  540. data/third_party/closure-library/closure/goog/dom/nodeiterator_test.html +49 -0
  541. data/third_party/closure-library/closure/goog/dom/nodeoffset.js +112 -0
  542. data/third_party/closure-library/closure/goog/dom/nodeoffset_test.html +88 -0
  543. data/third_party/closure-library/closure/goog/dom/pattern/abstractpattern.js +60 -0
  544. data/third_party/closure-library/closure/goog/dom/pattern/allchildren.js +75 -0
  545. data/third_party/closure-library/closure/goog/dom/pattern/callback/callback.js +82 -0
  546. data/third_party/closure-library/closure/goog/dom/pattern/callback/counter.js +72 -0
  547. data/third_party/closure-library/closure/goog/dom/pattern/callback/test.js +77 -0
  548. data/third_party/closure-library/closure/goog/dom/pattern/childmatches.js +154 -0
  549. data/third_party/closure-library/closure/goog/dom/pattern/endtag.js +53 -0
  550. data/third_party/closure-library/closure/goog/dom/pattern/fulltag.js +93 -0
  551. data/third_party/closure-library/closure/goog/dom/pattern/matcher.js +150 -0
  552. data/third_party/closure-library/closure/goog/dom/pattern/matcher_test.html +204 -0
  553. data/third_party/closure-library/closure/goog/dom/pattern/nodetype.js +58 -0
  554. data/third_party/closure-library/closure/goog/dom/pattern/pattern.js +93 -0
  555. data/third_party/closure-library/closure/goog/dom/pattern/pattern_test.html +614 -0
  556. data/third_party/closure-library/closure/goog/dom/pattern/repeat.js +190 -0
  557. data/third_party/closure-library/closure/goog/dom/pattern/sequence.js +141 -0
  558. data/third_party/closure-library/closure/goog/dom/pattern/starttag.js +53 -0
  559. data/third_party/closure-library/closure/goog/dom/pattern/tag.js +150 -0
  560. data/third_party/closure-library/closure/goog/dom/pattern/text.js +70 -0
  561. data/third_party/closure-library/closure/goog/dom/range.js +226 -0
  562. data/third_party/closure-library/closure/goog/dom/range_test.html +735 -0
  563. data/third_party/closure-library/closure/goog/dom/rangeendpoint.js +32 -0
  564. data/third_party/closure-library/closure/goog/dom/savedcaretrange.js +215 -0
  565. data/third_party/closure-library/closure/goog/dom/savedcaretrange_test.html +257 -0
  566. data/third_party/closure-library/closure/goog/dom/savedrange.js +74 -0
  567. data/third_party/closure-library/closure/goog/dom/savedrange_test.html +61 -0
  568. data/third_party/closure-library/closure/goog/dom/selection.js +470 -0
  569. data/third_party/closure-library/closure/goog/dom/selection_test.html +329 -0
  570. data/third_party/closure-library/closure/goog/dom/tagiterator.js +367 -0
  571. data/third_party/closure-library/closure/goog/dom/tagiterator_test.html +589 -0
  572. data/third_party/closure-library/closure/goog/dom/tagname.js +159 -0
  573. data/third_party/closure-library/closure/goog/dom/tagname_test.html +37 -0
  574. data/third_party/closure-library/closure/goog/dom/textrange.js +630 -0
  575. data/third_party/closure-library/closure/goog/dom/textrange_test.html +342 -0
  576. data/third_party/closure-library/closure/goog/dom/textrangeiterator.js +244 -0
  577. data/third_party/closure-library/closure/goog/dom/textrangeiterator_test.html +142 -0
  578. data/third_party/closure-library/closure/goog/dom/vendor.js +62 -0
  579. data/third_party/closure-library/closure/goog/dom/vendor_test.html +202 -0
  580. data/third_party/closure-library/closure/goog/dom/viewportsizemonitor.js +180 -0
  581. data/third_party/closure-library/closure/goog/dom/viewportsizemonitor_test.html +138 -0
  582. data/third_party/closure-library/closure/goog/dom/xml.js +204 -0
  583. data/third_party/closure-library/closure/goog/dom/xml_test.html +103 -0
  584. data/third_party/closure-library/closure/goog/editor/browserfeature.js +273 -0
  585. data/third_party/closure-library/closure/goog/editor/browserfeature_test.html +124 -0
  586. data/third_party/closure-library/closure/goog/editor/clicktoeditwrapper.js +435 -0
  587. data/third_party/closure-library/closure/goog/editor/clicktoeditwrapper_test.html +137 -0
  588. data/third_party/closure-library/closure/goog/editor/command.js +76 -0
  589. data/third_party/closure-library/closure/goog/editor/contenteditablefield.js +110 -0
  590. data/third_party/closure-library/closure/goog/editor/contenteditablefield_test.html +62 -0
  591. data/third_party/closure-library/closure/goog/editor/defines.js +34 -0
  592. data/third_party/closure-library/closure/goog/editor/field.js +2725 -0
  593. data/third_party/closure-library/closure/goog/editor/field_test.html +32 -0
  594. data/third_party/closure-library/closure/goog/editor/field_test.js +1278 -0
  595. data/third_party/closure-library/closure/goog/editor/focus.js +32 -0
  596. data/third_party/closure-library/closure/goog/editor/focus_test.html +66 -0
  597. data/third_party/closure-library/closure/goog/editor/icontent.js +296 -0
  598. data/third_party/closure-library/closure/goog/editor/icontent_test.html +232 -0
  599. data/third_party/closure-library/closure/goog/editor/link.js +359 -0
  600. data/third_party/closure-library/closure/goog/editor/link_test.html +252 -0
  601. data/third_party/closure-library/closure/goog/editor/node.js +483 -0
  602. data/third_party/closure-library/closure/goog/editor/node_test.html +631 -0
  603. data/third_party/closure-library/closure/goog/editor/plugin.js +463 -0
  604. data/third_party/closure-library/closure/goog/editor/plugin_test.html +187 -0
  605. data/third_party/closure-library/closure/goog/editor/plugins/abstractbubbleplugin.js +630 -0
  606. data/third_party/closure-library/closure/goog/editor/plugins/abstractbubbleplugin_test.html +313 -0
  607. data/third_party/closure-library/closure/goog/editor/plugins/abstractdialogplugin.js +334 -0
  608. data/third_party/closure-library/closure/goog/editor/plugins/abstractdialogplugin_test.html +404 -0
  609. data/third_party/closure-library/closure/goog/editor/plugins/abstracttabhandler.js +78 -0
  610. data/third_party/closure-library/closure/goog/editor/plugins/abstracttabhandler_test.html +91 -0
  611. data/third_party/closure-library/closure/goog/editor/plugins/basictextformatter.js +1750 -0
  612. data/third_party/closure-library/closure/goog/editor/plugins/basictextformatter_test.html +1171 -0
  613. data/third_party/closure-library/closure/goog/editor/plugins/blockquote.js +479 -0
  614. data/third_party/closure-library/closure/goog/editor/plugins/blockquote_test.html +212 -0
  615. data/third_party/closure-library/closure/goog/editor/plugins/emoticons.js +88 -0
  616. data/third_party/closure-library/closure/goog/editor/plugins/emoticons_test.html +92 -0
  617. data/third_party/closure-library/closure/goog/editor/plugins/enterhandler.js +767 -0
  618. data/third_party/closure-library/closure/goog/editor/plugins/enterhandler_test.html +754 -0
  619. data/third_party/closure-library/closure/goog/editor/plugins/equationeditorbubble.js +153 -0
  620. data/third_party/closure-library/closure/goog/editor/plugins/equationeditorplugin.js +215 -0
  621. data/third_party/closure-library/closure/goog/editor/plugins/equationeditorplugin_test.html +120 -0
  622. data/third_party/closure-library/closure/goog/editor/plugins/firststrong.js +326 -0
  623. data/third_party/closure-library/closure/goog/editor/plugins/firststrong_test.html +411 -0
  624. data/third_party/closure-library/closure/goog/editor/plugins/headerformatter.js +95 -0
  625. data/third_party/closure-library/closure/goog/editor/plugins/headerformatter_test.html +100 -0
  626. data/third_party/closure-library/closure/goog/editor/plugins/linkbubble.js +562 -0
  627. data/third_party/closure-library/closure/goog/editor/plugins/linkbubble_test.html +375 -0
  628. data/third_party/closure-library/closure/goog/editor/plugins/linkdialogplugin.js +437 -0
  629. data/third_party/closure-library/closure/goog/editor/plugins/linkdialogplugin_test.html +740 -0
  630. data/third_party/closure-library/closure/goog/editor/plugins/linkshortcutplugin.js +63 -0
  631. data/third_party/closure-library/closure/goog/editor/plugins/linkshortcutplugin_test.html +70 -0
  632. data/third_party/closure-library/closure/goog/editor/plugins/listtabhandler.js +66 -0
  633. data/third_party/closure-library/closure/goog/editor/plugins/listtabhandler_test.html +177 -0
  634. data/third_party/closure-library/closure/goog/editor/plugins/loremipsum.js +188 -0
  635. data/third_party/closure-library/closure/goog/editor/plugins/loremipsum_test.html +169 -0
  636. data/third_party/closure-library/closure/goog/editor/plugins/removeformatting.js +779 -0
  637. data/third_party/closure-library/closure/goog/editor/plugins/removeformatting_test.html +961 -0
  638. data/third_party/closure-library/closure/goog/editor/plugins/spacestabhandler.js +93 -0
  639. data/third_party/closure-library/closure/goog/editor/plugins/spacestabhandler_test.html +186 -0
  640. data/third_party/closure-library/closure/goog/editor/plugins/tableeditor.js +472 -0
  641. data/third_party/closure-library/closure/goog/editor/plugins/tableeditor_test.html +299 -0
  642. data/third_party/closure-library/closure/goog/editor/plugins/tagonenterhandler.js +742 -0
  643. data/third_party/closure-library/closure/goog/editor/plugins/tagonenterhandler_test.html +549 -0
  644. data/third_party/closure-library/closure/goog/editor/plugins/undoredo.js +1015 -0
  645. data/third_party/closure-library/closure/goog/editor/plugins/undoredo_test.html +525 -0
  646. data/third_party/closure-library/closure/goog/editor/plugins/undoredomanager.js +337 -0
  647. data/third_party/closure-library/closure/goog/editor/plugins/undoredomanager_test.html +394 -0
  648. data/third_party/closure-library/closure/goog/editor/plugins/undoredostate.js +86 -0
  649. data/third_party/closure-library/closure/goog/editor/plugins/undoredostate_test.html +44 -0
  650. data/third_party/closure-library/closure/goog/editor/range.js +632 -0
  651. data/third_party/closure-library/closure/goog/editor/range_test.html +1004 -0
  652. data/third_party/closure-library/closure/goog/editor/seamlessfield.js +738 -0
  653. data/third_party/closure-library/closure/goog/editor/seamlessfield_quirks_test.html +28 -0
  654. data/third_party/closure-library/closure/goog/editor/seamlessfield_test.html +32 -0
  655. data/third_party/closure-library/closure/goog/editor/seamlessfield_test.js +472 -0
  656. data/third_party/closure-library/closure/goog/editor/style.js +222 -0
  657. data/third_party/closure-library/closure/goog/editor/style_test.html +177 -0
  658. data/third_party/closure-library/closure/goog/editor/table.js +567 -0
  659. data/third_party/closure-library/closure/goog/editor/table_test.html +529 -0
  660. data/third_party/closure-library/closure/goog/events/actioneventwrapper.js +136 -0
  661. data/third_party/closure-library/closure/goog/events/actioneventwrapper_test.html +211 -0
  662. data/third_party/closure-library/closure/goog/events/actionhandler.js +181 -0
  663. data/third_party/closure-library/closure/goog/events/actionhandler_test.html +82 -0
  664. data/third_party/closure-library/closure/goog/events/browserevent.js +411 -0
  665. data/third_party/closure-library/closure/goog/events/browserevent_test.html +161 -0
  666. data/third_party/closure-library/closure/goog/events/browserfeature.js +85 -0
  667. data/third_party/closure-library/closure/goog/events/event.js +154 -0
  668. data/third_party/closure-library/closure/goog/events/event_test.html +66 -0
  669. data/third_party/closure-library/closure/goog/events/eventhandler.js +291 -0
  670. data/third_party/closure-library/closure/goog/events/eventhandler_test.html +254 -0
  671. data/third_party/closure-library/closure/goog/events/events.js +1095 -0
  672. data/third_party/closure-library/closure/goog/events/events_test.html +659 -0
  673. data/third_party/closure-library/closure/goog/events/eventtarget.js +401 -0
  674. data/third_party/closure-library/closure/goog/events/eventtarget_test.html +70 -0
  675. data/third_party/closure-library/closure/goog/events/eventtarget_via_googevents_test.html +85 -0
  676. data/third_party/closure-library/closure/goog/events/eventtarget_via_w3cinterface_test.html +49 -0
  677. data/third_party/closure-library/closure/goog/events/eventtargettester.js +1028 -0
  678. data/third_party/closure-library/closure/goog/events/eventtype.js +165 -0
  679. data/third_party/closure-library/closure/goog/events/eventwrapper.js +66 -0
  680. data/third_party/closure-library/closure/goog/events/filedrophandler.js +221 -0
  681. data/third_party/closure-library/closure/goog/events/filedrophandler_test.html +258 -0
  682. data/third_party/closure-library/closure/goog/events/focushandler.js +106 -0
  683. data/third_party/closure-library/closure/goog/events/imehandler.js +363 -0
  684. data/third_party/closure-library/closure/goog/events/imehandler_test.html +269 -0
  685. data/third_party/closure-library/closure/goog/events/inputhandler.js +213 -0
  686. data/third_party/closure-library/closure/goog/events/keycodes.js +377 -0
  687. data/third_party/closure-library/closure/goog/events/keycodes_test.html +125 -0
  688. data/third_party/closure-library/closure/goog/events/keyhandler.js +556 -0
  689. data/third_party/closure-library/closure/goog/events/keyhandler_test.html +727 -0
  690. data/third_party/closure-library/closure/goog/events/keynames.js +132 -0
  691. data/third_party/closure-library/closure/goog/events/listenable.js +323 -0
  692. data/third_party/closure-library/closure/goog/events/listenable_test.html +31 -0
  693. data/third_party/closure-library/closure/goog/events/listener.js +131 -0
  694. data/third_party/closure-library/closure/goog/events/listenermap.js +299 -0
  695. data/third_party/closure-library/closure/goog/events/listenermap_test.html +19 -0
  696. data/third_party/closure-library/closure/goog/events/listenermap_test.js +116 -0
  697. data/third_party/closure-library/closure/goog/events/mousewheelhandler.js +295 -0
  698. data/third_party/closure-library/closure/goog/events/mousewheelhandler_test.html +385 -0
  699. data/third_party/closure-library/closure/goog/events/onlinehandler.js +162 -0
  700. data/third_party/closure-library/closure/goog/events/onlinelistener_test.html +160 -0
  701. data/third_party/closure-library/closure/goog/events/pastehandler.js +515 -0
  702. data/third_party/closure-library/closure/goog/events/pastehandler_test.html +414 -0
  703. data/third_party/closure-library/closure/goog/format/emailaddress.js +332 -0
  704. data/third_party/closure-library/closure/goog/format/emailaddress_test.html +192 -0
  705. data/third_party/closure-library/closure/goog/format/format.js +491 -0
  706. data/third_party/closure-library/closure/goog/format/format_test.html +302 -0
  707. data/third_party/closure-library/closure/goog/format/htmlprettyprinter.js +407 -0
  708. data/third_party/closure-library/closure/goog/format/htmlprettyprinter_test.html +205 -0
  709. data/third_party/closure-library/closure/goog/format/jsonprettyprinter.js +413 -0
  710. data/third_party/closure-library/closure/goog/format/jsonprettyprinter_test.html +111 -0
  711. data/third_party/closure-library/closure/goog/fs/entry.js +272 -0
  712. data/third_party/closure-library/closure/goog/fs/entryimpl.js +399 -0
  713. data/third_party/closure-library/closure/goog/fs/error.js +102 -0
  714. data/third_party/closure-library/closure/goog/fs/filereader.js +288 -0
  715. data/third_party/closure-library/closure/goog/fs/filesaver.js +176 -0
  716. data/third_party/closure-library/closure/goog/fs/filesystem.js +41 -0
  717. data/third_party/closure-library/closure/goog/fs/filesystemimpl.js +64 -0
  718. data/third_party/closure-library/closure/goog/fs/filewriter.js +110 -0
  719. data/third_party/closure-library/closure/goog/fs/fs.js +253 -0
  720. data/third_party/closure-library/closure/goog/fs/fs_test.html +754 -0
  721. data/third_party/closure-library/closure/goog/fs/progressevent.js +68 -0
  722. data/third_party/closure-library/closure/goog/functions/functions.js +255 -0
  723. data/third_party/closure-library/closure/goog/functions/functions_test.html +223 -0
  724. data/third_party/closure-library/closure/goog/fx/abstractdragdrop.js +1517 -0
  725. data/third_party/closure-library/closure/goog/fx/abstractdragdrop_test.html +663 -0
  726. data/third_party/closure-library/closure/goog/fx/anim/anim.js +210 -0
  727. data/third_party/closure-library/closure/goog/fx/anim/anim_test.html +225 -0
  728. data/third_party/closure-library/closure/goog/fx/animation.js +530 -0
  729. data/third_party/closure-library/closure/goog/fx/animation_test.html +117 -0
  730. data/third_party/closure-library/closure/goog/fx/animationqueue.js +307 -0
  731. data/third_party/closure-library/closure/goog/fx/animationqueue_test.html +316 -0
  732. data/third_party/closure-library/closure/goog/fx/css3/fx.js +62 -0
  733. data/third_party/closure-library/closure/goog/fx/css3/transition.js +196 -0
  734. data/third_party/closure-library/closure/goog/fx/css3/transition_test.html +224 -0
  735. data/third_party/closure-library/closure/goog/fx/cssspriteanimation.js +113 -0
  736. data/third_party/closure-library/closure/goog/fx/cssspriteanimation_test.html +126 -0
  737. data/third_party/closure-library/closure/goog/fx/dom.js +653 -0
  738. data/third_party/closure-library/closure/goog/fx/dragdrop.js +50 -0
  739. data/third_party/closure-library/closure/goog/fx/dragdropgroup.js +109 -0
  740. data/third_party/closure-library/closure/goog/fx/dragdropgroup_test.html +234 -0
  741. data/third_party/closure-library/closure/goog/fx/dragger.js +795 -0
  742. data/third_party/closure-library/closure/goog/fx/dragger_test.html +449 -0
  743. data/third_party/closure-library/closure/goog/fx/draglistgroup.js +1301 -0
  744. data/third_party/closure-library/closure/goog/fx/draglistgroup_test.html +403 -0
  745. data/third_party/closure-library/closure/goog/fx/dragscrollsupport.js +299 -0
  746. data/third_party/closure-library/closure/goog/fx/dragscrollsupport_test.html +354 -0
  747. data/third_party/closure-library/closure/goog/fx/easing.js +50 -0
  748. data/third_party/closure-library/closure/goog/fx/fx.js +32 -0
  749. data/third_party/closure-library/closure/goog/fx/fx_test.html +100 -0
  750. data/third_party/closure-library/closure/goog/fx/transition.js +75 -0
  751. data/third_party/closure-library/closure/goog/fx/transitionbase.js +237 -0
  752. data/third_party/closure-library/closure/goog/gears/basestore.js +521 -0
  753. data/third_party/closure-library/closure/goog/gears/basestore_test.html +247 -0
  754. data/third_party/closure-library/closure/goog/gears/database.js +934 -0
  755. data/third_party/closure-library/closure/goog/gears/database_test.html +699 -0
  756. data/third_party/closure-library/closure/goog/gears/gears.js +228 -0
  757. data/third_party/closure-library/closure/goog/gears/gears_test.html +78 -0
  758. data/third_party/closure-library/closure/goog/gears/httprequest.js +80 -0
  759. data/third_party/closure-library/closure/goog/gears/loggerclient.js +130 -0
  760. data/third_party/closure-library/closure/goog/gears/loggerclient_test.html +172 -0
  761. data/third_party/closure-library/closure/goog/gears/loggerserver.js +157 -0
  762. data/third_party/closure-library/closure/goog/gears/loggerserver_test.html +119 -0
  763. data/third_party/closure-library/closure/goog/gears/logstore.js +478 -0
  764. data/third_party/closure-library/closure/goog/gears/logstore_test.html +600 -0
  765. data/third_party/closure-library/closure/goog/gears/managedresourcestore.js +555 -0
  766. data/third_party/closure-library/closure/goog/gears/managedresourcestore_test.html +453 -0
  767. data/third_party/closure-library/closure/goog/gears/multipartformdata.js +204 -0
  768. data/third_party/closure-library/closure/goog/gears/multipartformdata_test.html +221 -0
  769. data/third_party/closure-library/closure/goog/gears/statustype.js +37 -0
  770. data/third_party/closure-library/closure/goog/gears/urlcapture.js +370 -0
  771. data/third_party/closure-library/closure/goog/gears/urlcapture_test.html +392 -0
  772. data/third_party/closure-library/closure/goog/gears/worker.js +200 -0
  773. data/third_party/closure-library/closure/goog/gears/workerchannel.js +205 -0
  774. data/third_party/closure-library/closure/goog/gears/workerchannel_test.html +207 -0
  775. data/third_party/closure-library/closure/goog/gears/workerpool.js +240 -0
  776. data/third_party/closure-library/closure/goog/gears/workerpool_test.html +204 -0
  777. data/third_party/closure-library/closure/goog/graphics/abstractgraphics.js +441 -0
  778. data/third_party/closure-library/closure/goog/graphics/affinetransform.js +587 -0
  779. data/third_party/closure-library/closure/goog/graphics/affinetransform_test.html +360 -0
  780. data/third_party/closure-library/closure/goog/graphics/canvaselement.js +792 -0
  781. data/third_party/closure-library/closure/goog/graphics/canvasgraphics.js +665 -0
  782. data/third_party/closure-library/closure/goog/graphics/element.js +151 -0
  783. data/third_party/closure-library/closure/goog/graphics/ellipseelement.js +64 -0
  784. data/third_party/closure-library/closure/goog/graphics/ext/coordinates.js +159 -0
  785. data/third_party/closure-library/closure/goog/graphics/ext/coordinates_test.html +74 -0
  786. data/third_party/closure-library/closure/goog/graphics/ext/element.js +968 -0
  787. data/third_party/closure-library/closure/goog/graphics/ext/element_test.html +144 -0
  788. data/third_party/closure-library/closure/goog/graphics/ext/ellipse.js +59 -0
  789. data/third_party/closure-library/closure/goog/graphics/ext/ext.js +29 -0
  790. data/third_party/closure-library/closure/goog/graphics/ext/graphics.js +215 -0
  791. data/third_party/closure-library/closure/goog/graphics/ext/group.js +215 -0
  792. data/third_party/closure-library/closure/goog/graphics/ext/image.js +63 -0
  793. data/third_party/closure-library/closure/goog/graphics/ext/path.js +142 -0
  794. data/third_party/closure-library/closure/goog/graphics/ext/path_test.html +46 -0
  795. data/third_party/closure-library/closure/goog/graphics/ext/rectangle.js +54 -0
  796. data/third_party/closure-library/closure/goog/graphics/ext/shape.js +146 -0
  797. data/third_party/closure-library/closure/goog/graphics/ext/strokeandfillelement.js +70 -0
  798. data/third_party/closure-library/closure/goog/graphics/fill.js +46 -0
  799. data/third_party/closure-library/closure/goog/graphics/font.js +63 -0
  800. data/third_party/closure-library/closure/goog/graphics/graphics.js +135 -0
  801. data/third_party/closure-library/closure/goog/graphics/groupelement.js +59 -0
  802. data/third_party/closure-library/closure/goog/graphics/imageelement.js +70 -0
  803. data/third_party/closure-library/closure/goog/graphics/lineargradient.js +174 -0
  804. data/third_party/closure-library/closure/goog/graphics/path.js +512 -0
  805. data/third_party/closure-library/closure/goog/graphics/path_test.html +359 -0
  806. data/third_party/closure-library/closure/goog/graphics/pathelement.js +55 -0
  807. data/third_party/closure-library/closure/goog/graphics/paths.js +86 -0
  808. data/third_party/closure-library/closure/goog/graphics/paths_test.html +98 -0
  809. data/third_party/closure-library/closure/goog/graphics/rectelement.js +64 -0
  810. data/third_party/closure-library/closure/goog/graphics/solidfill.js +74 -0
  811. data/third_party/closure-library/closure/goog/graphics/solidfill_test.html +53 -0
  812. data/third_party/closure-library/closure/goog/graphics/stroke.js +67 -0
  813. data/third_party/closure-library/closure/goog/graphics/strokeandfillelement.js +115 -0
  814. data/third_party/closure-library/closure/goog/graphics/svgelement.js +279 -0
  815. data/third_party/closure-library/closure/goog/graphics/svggraphics.js +857 -0
  816. data/third_party/closure-library/closure/goog/graphics/svggraphics_test.html +83 -0
  817. data/third_party/closure-library/closure/goog/graphics/textelement.js +56 -0
  818. data/third_party/closure-library/closure/goog/graphics/vmlelement.js +433 -0
  819. data/third_party/closure-library/closure/goog/graphics/vmlgraphics.js +893 -0
  820. data/third_party/closure-library/closure/goog/history/event.js +54 -0
  821. data/third_party/closure-library/closure/goog/history/eventtype.js +30 -0
  822. data/third_party/closure-library/closure/goog/history/history.js +998 -0
  823. data/third_party/closure-library/closure/goog/history/history_test.html +19 -0
  824. data/third_party/closure-library/closure/goog/history/history_test.js +54 -0
  825. data/third_party/closure-library/closure/goog/history/html5history.js +303 -0
  826. data/third_party/closure-library/closure/goog/history/html5history_test.html +163 -0
  827. data/third_party/closure-library/closure/goog/i18n/bidi.js +806 -0
  828. data/third_party/closure-library/closure/goog/i18n/bidi_test.html +425 -0
  829. data/third_party/closure-library/closure/goog/i18n/bidiformatter.js +490 -0
  830. data/third_party/closure-library/closure/goog/i18n/bidiformatter_test.html +343 -0
  831. data/third_party/closure-library/closure/goog/i18n/charlistdecompressor.js +157 -0
  832. data/third_party/closure-library/closure/goog/i18n/charlistdecompressor_test.html +65 -0
  833. data/third_party/closure-library/closure/goog/i18n/charpickerdata.js +3185 -0
  834. data/third_party/closure-library/closure/goog/i18n/collation.js +58 -0
  835. data/third_party/closure-library/closure/goog/i18n/collation_test.html +63 -0
  836. data/third_party/closure-library/closure/goog/i18n/compactnumberformatsymbols.js +7973 -0
  837. data/third_party/closure-library/closure/goog/i18n/compactnumberformatsymbols_ext.js +27549 -0
  838. data/third_party/closure-library/closure/goog/i18n/currency.js +424 -0
  839. data/third_party/closure-library/closure/goog/i18n/currency_test.html +204 -0
  840. data/third_party/closure-library/closure/goog/i18n/currencycodemap.js +210 -0
  841. data/third_party/closure-library/closure/goog/i18n/datetimeformat.js +673 -0
  842. data/third_party/closure-library/closure/goog/i18n/datetimeformat_test.html +532 -0
  843. data/third_party/closure-library/closure/goog/i18n/datetimeparse.js +1129 -0
  844. data/third_party/closure-library/closure/goog/i18n/datetimeparse_test.html +766 -0
  845. data/third_party/closure-library/closure/goog/i18n/datetimepatterns.js +1854 -0
  846. data/third_party/closure-library/closure/goog/i18n/datetimepatternsext.js +10947 -0
  847. data/third_party/closure-library/closure/goog/i18n/datetimesymbols.js +3713 -0
  848. data/third_party/closure-library/closure/goog/i18n/datetimesymbolsext.js +21152 -0
  849. data/third_party/closure-library/closure/goog/i18n/graphemebreak.js +214 -0
  850. data/third_party/closure-library/closure/goog/i18n/graphemebreak_test.html +80 -0
  851. data/third_party/closure-library/closure/goog/i18n/messageformat.js +771 -0
  852. data/third_party/closure-library/closure/goog/i18n/messageformat_test.html +471 -0
  853. data/third_party/closure-library/closure/goog/i18n/mime.js +111 -0
  854. data/third_party/closure-library/closure/goog/i18n/mime_test.html +51 -0
  855. data/third_party/closure-library/closure/goog/i18n/numberformat.js +1228 -0
  856. data/third_party/closure-library/closure/goog/i18n/numberformat_test.html +985 -0
  857. data/third_party/closure-library/closure/goog/i18n/numberformatsymbols.js +3416 -0
  858. data/third_party/closure-library/closure/goog/i18n/numberformatsymbolsext.js +11887 -0
  859. data/third_party/closure-library/closure/goog/i18n/ordinalrules.js +589 -0
  860. data/third_party/closure-library/closure/goog/i18n/pluralrules.js +859 -0
  861. data/third_party/closure-library/closure/goog/i18n/timezone.js +340 -0
  862. data/third_party/closure-library/closure/goog/i18n/timezone_test.html +163 -0
  863. data/third_party/closure-library/closure/goog/i18n/uchar.js +1368 -0
  864. data/third_party/closure-library/closure/goog/i18n/uchar/localnamefetcher.js +73 -0
  865. data/third_party/closure-library/closure/goog/i18n/uchar/localnamefetcher_test.html +62 -0
  866. data/third_party/closure-library/closure/goog/i18n/uchar/namefetcher.js +70 -0
  867. data/third_party/closure-library/closure/goog/i18n/uchar/remotenamefetcher.js +281 -0
  868. data/third_party/closure-library/closure/goog/i18n/uchar/remotenamefetcher_test.html +111 -0
  869. data/third_party/closure-library/closure/goog/i18n/uchar_test.html +133 -0
  870. data/third_party/closure-library/closure/goog/images/blank.gif +0 -0
  871. data/third_party/closure-library/closure/goog/images/bubble_close.jpg +0 -0
  872. data/third_party/closure-library/closure/goog/images/bubble_left.gif +0 -0
  873. data/third_party/closure-library/closure/goog/images/bubble_right.gif +0 -0
  874. data/third_party/closure-library/closure/goog/images/button-bg.gif +0 -0
  875. data/third_party/closure-library/closure/goog/images/check-outline.gif +0 -0
  876. data/third_party/closure-library/closure/goog/images/check-sprite.gif +0 -0
  877. data/third_party/closure-library/closure/goog/images/check.gif +0 -0
  878. data/third_party/closure-library/closure/goog/images/close_box.gif +0 -0
  879. data/third_party/closure-library/closure/goog/images/color-swatch-tick.gif +0 -0
  880. data/third_party/closure-library/closure/goog/images/dialog_close_box.gif +0 -0
  881. data/third_party/closure-library/closure/goog/images/dimension-highlighted.png +0 -0
  882. data/third_party/closure-library/closure/goog/images/dimension-unhighlighted.png +0 -0
  883. data/third_party/closure-library/closure/goog/images/dropdn.gif +0 -0
  884. data/third_party/closure-library/closure/goog/images/dropdn_disabled.gif +0 -0
  885. data/third_party/closure-library/closure/goog/images/dropdown.gif +0 -0
  886. data/third_party/closure-library/closure/goog/images/gears_bluedot.gif +0 -0
  887. data/third_party/closure-library/closure/goog/images/gears_offline.gif +0 -0
  888. data/third_party/closure-library/closure/goog/images/gears_online.gif +0 -0
  889. data/third_party/closure-library/closure/goog/images/gears_paused.gif +0 -0
  890. data/third_party/closure-library/closure/goog/images/gears_syncing.gif +0 -0
  891. data/third_party/closure-library/closure/goog/images/hsv-sprite-sm.gif +0 -0
  892. data/third_party/closure-library/closure/goog/images/hsv-sprite-sm.png +0 -0
  893. data/third_party/closure-library/closure/goog/images/hsv-sprite.gif +0 -0
  894. data/third_party/closure-library/closure/goog/images/hsv-sprite.png +0 -0
  895. data/third_party/closure-library/closure/goog/images/hsva-sprite-sm.gif +0 -0
  896. data/third_party/closure-library/closure/goog/images/hsva-sprite-sm.png +0 -0
  897. data/third_party/closure-library/closure/goog/images/hsva-sprite.gif +0 -0
  898. data/third_party/closure-library/closure/goog/images/hsva-sprite.png +0 -0
  899. data/third_party/closure-library/closure/goog/images/left_anchor_bubble_bot.gif +0 -0
  900. data/third_party/closure-library/closure/goog/images/left_anchor_bubble_top.gif +0 -0
  901. data/third_party/closure-library/closure/goog/images/menu-arrows.gif +0 -0
  902. data/third_party/closure-library/closure/goog/images/minus.png +0 -0
  903. data/third_party/closure-library/closure/goog/images/no_anchor_bubble_bot.gif +0 -0
  904. data/third_party/closure-library/closure/goog/images/no_anchor_bubble_top.gif +0 -0
  905. data/third_party/closure-library/closure/goog/images/offlineicons.png +0 -0
  906. data/third_party/closure-library/closure/goog/images/plus.png +0 -0
  907. data/third_party/closure-library/closure/goog/images/ratingstars.gif +0 -0
  908. data/third_party/closure-library/closure/goog/images/right_anchor_bubble_bot.gif +0 -0
  909. data/third_party/closure-library/closure/goog/images/right_anchor_bubble_top.gif +0 -0
  910. data/third_party/closure-library/closure/goog/images/toolbar-bg.png +0 -0
  911. data/third_party/closure-library/closure/goog/images/toolbar-separator.gif +0 -0
  912. data/third_party/closure-library/closure/goog/images/toolbar_icons.gif +0 -0
  913. data/third_party/closure-library/closure/goog/images/tree/I.png +0 -0
  914. data/third_party/closure-library/closure/goog/images/tree/cleardot.gif +0 -0
  915. data/third_party/closure-library/closure/goog/images/tree/tree.gif +0 -0
  916. data/third_party/closure-library/closure/goog/images/tree/tree.png +0 -0
  917. data/third_party/closure-library/closure/goog/images/ui_controls.jpg +0 -0
  918. data/third_party/closure-library/closure/goog/iter/iter.js +702 -0
  919. data/third_party/closure-library/closure/goog/iter/iter_test.html +479 -0
  920. data/third_party/closure-library/closure/goog/json/evaljsonprocessor.js +66 -0
  921. data/third_party/closure-library/closure/goog/json/json.js +349 -0
  922. data/third_party/closure-library/closure/goog/json/json_perf.html +116 -0
  923. data/third_party/closure-library/closure/goog/json/json_test.html +569 -0
  924. data/third_party/closure-library/closure/goog/json/nativejsonprocessor.js +73 -0
  925. data/third_party/closure-library/closure/goog/json/processor.js +33 -0
  926. data/third_party/closure-library/closure/goog/json/processor_test.html +89 -0
  927. data/third_party/closure-library/closure/goog/labs/classdef/classdef.js +162 -0
  928. data/third_party/closure-library/closure/goog/labs/classdef/classdef_test.html +103 -0
  929. data/third_party/closure-library/closure/goog/labs/events/touch.js +82 -0
  930. data/third_party/closure-library/closure/goog/labs/events/touch_test.html +19 -0
  931. data/third_party/closure-library/closure/goog/labs/events/touch_test.js +96 -0
  932. data/third_party/closure-library/closure/goog/labs/format/csv.js +391 -0
  933. data/third_party/closure-library/closure/goog/labs/format/csv_test.html +20 -0
  934. data/third_party/closure-library/closure/goog/labs/format/csv_test.js +169 -0
  935. data/third_party/closure-library/closure/goog/labs/mock/mock.js +733 -0
  936. data/third_party/closure-library/closure/goog/labs/mock/mock_test.html +416 -0
  937. data/third_party/closure-library/closure/goog/labs/net/image.js +93 -0
  938. data/third_party/closure-library/closure/goog/labs/net/image_test.html +21 -0
  939. data/third_party/closure-library/closure/goog/labs/net/image_test.js +128 -0
  940. data/third_party/closure-library/closure/goog/labs/net/testdata/cleardot.gif +0 -0
  941. data/third_party/closure-library/closure/goog/labs/net/testdata/xhr_test_json.data +2 -0
  942. data/third_party/closure-library/closure/goog/labs/net/testdata/xhr_test_text.data +1 -0
  943. data/third_party/closure-library/closure/goog/labs/net/webchannel.js +188 -0
  944. data/third_party/closure-library/closure/goog/labs/net/webchannel/basetestchannel.js +639 -0
  945. data/third_party/closure-library/closure/goog/labs/net/webchannel/channel.js +195 -0
  946. data/third_party/closure-library/closure/goog/labs/net/webchannel/requeststats.js +391 -0
  947. data/third_party/closure-library/closure/goog/labs/net/webchannel/webchannelbase.js +2171 -0
  948. data/third_party/closure-library/closure/goog/labs/net/webchannel/webchannelbase_test.html +22 -0
  949. data/third_party/closure-library/closure/goog/labs/net/webchannel/webchannelbase_test.js +1400 -0
  950. data/third_party/closure-library/closure/goog/labs/net/webchannel/webchannelbasetransport.js +274 -0
  951. data/third_party/closure-library/closure/goog/labs/net/webchannel/webchannelbasetransport_test.html +228 -0
  952. data/third_party/closure-library/closure/goog/labs/net/webchannel/webchanneldebug.js +298 -0
  953. data/third_party/closure-library/closure/goog/labs/net/webchannel/webchannelrequest.js +1291 -0
  954. data/third_party/closure-library/closure/goog/labs/net/webchannel/webchannelrequest_test.html +287 -0
  955. data/third_party/closure-library/closure/goog/labs/net/webchanneltransport.js +74 -0
  956. data/third_party/closure-library/closure/goog/labs/net/webchanneltransportfactory.js +35 -0
  957. data/third_party/closure-library/closure/goog/labs/net/xhr.js +449 -0
  958. data/third_party/closure-library/closure/goog/labs/net/xhr_test.html +455 -0
  959. data/third_party/closure-library/closure/goog/labs/object/object.js +46 -0
  960. data/third_party/closure-library/closure/goog/labs/object/object_test.html +56 -0
  961. data/third_party/closure-library/closure/goog/labs/observe/notice.js +63 -0
  962. data/third_party/closure-library/closure/goog/labs/observe/observable.js +77 -0
  963. data/third_party/closure-library/closure/goog/labs/observe/observableset.js +180 -0
  964. data/third_party/closure-library/closure/goog/labs/observe/observableset_test.html +207 -0
  965. data/third_party/closure-library/closure/goog/labs/observe/observationset.js +156 -0
  966. data/third_party/closure-library/closure/goog/labs/observe/observationset_test.html +252 -0
  967. data/third_party/closure-library/closure/goog/labs/observe/observer.js +100 -0
  968. data/third_party/closure-library/closure/goog/labs/observe/observer_test.html +65 -0
  969. data/third_party/closure-library/closure/goog/labs/observe/simpleobservable.js +129 -0
  970. data/third_party/closure-library/closure/goog/labs/observe/simpleobservable_test.html +196 -0
  971. data/third_party/closure-library/closure/goog/labs/structs/map.js +339 -0
  972. data/third_party/closure-library/closure/goog/labs/structs/map_perf.js +201 -0
  973. data/third_party/closure-library/closure/goog/labs/structs/map_test.html +434 -0
  974. data/third_party/closure-library/closure/goog/labs/structs/multimap.js +279 -0
  975. data/third_party/closure-library/closure/goog/labs/structs/multimap_test.html +332 -0
  976. data/third_party/closure-library/closure/goog/labs/style/pixeldensitymonitor.js +178 -0
  977. data/third_party/closure-library/closure/goog/labs/style/pixeldensitymonitor_test.html +17 -0
  978. data/third_party/closure-library/closure/goog/labs/style/pixeldensitymonitor_test.js +146 -0
  979. data/third_party/closure-library/closure/goog/labs/testing/assertthat.js +59 -0
  980. data/third_party/closure-library/closure/goog/labs/testing/assertthat_test.html +73 -0
  981. data/third_party/closure-library/closure/goog/labs/testing/decoratormatcher.js +94 -0
  982. data/third_party/closure-library/closure/goog/labs/testing/decoratormatcher_test.html +43 -0
  983. data/third_party/closure-library/closure/goog/labs/testing/dictionarymatcher.js +266 -0
  984. data/third_party/closure-library/closure/goog/labs/testing/dictionarymatcher_test.html +70 -0
  985. data/third_party/closure-library/closure/goog/labs/testing/logicmatcher.js +206 -0
  986. data/third_party/closure-library/closure/goog/labs/testing/logicmatcher_test.html +59 -0
  987. data/third_party/closure-library/closure/goog/labs/testing/matcher.js +51 -0
  988. data/third_party/closure-library/closure/goog/labs/testing/numbermatcher.js +334 -0
  989. data/third_party/closure-library/closure/goog/labs/testing/numbermatcher_test.html +79 -0
  990. data/third_party/closure-library/closure/goog/labs/testing/objectmatcher.js +306 -0
  991. data/third_party/closure-library/closure/goog/labs/testing/objectmatcher_test.html +102 -0
  992. data/third_party/closure-library/closure/goog/labs/testing/stringmatcher.js +402 -0
  993. data/third_party/closure-library/closure/goog/labs/testing/stringmatcher_test.html +101 -0
  994. data/third_party/closure-library/closure/goog/labs/useragent/browser.js +189 -0
  995. data/third_party/closure-library/closure/goog/labs/useragent/browser_test.html +21 -0
  996. data/third_party/closure-library/closure/goog/labs/useragent/browser_test.js +193 -0
  997. data/third_party/closure-library/closure/goog/labs/useragent/device.js +64 -0
  998. data/third_party/closure-library/closure/goog/labs/useragent/device_test.html +21 -0
  999. data/third_party/closure-library/closure/goog/labs/useragent/device_test.js +88 -0
  1000. data/third_party/closure-library/closure/goog/labs/useragent/engine.js +144 -0
  1001. data/third_party/closure-library/closure/goog/labs/useragent/engine_test.html +21 -0
  1002. data/third_party/closure-library/closure/goog/labs/useragent/engine_test.js +164 -0
  1003. data/third_party/closure-library/closure/goog/labs/useragent/platform.js +193 -0
  1004. data/third_party/closure-library/closure/goog/labs/useragent/platform_test.html +21 -0
  1005. data/third_party/closure-library/closure/goog/labs/useragent/platform_test.js +256 -0
  1006. data/third_party/closure-library/closure/goog/labs/useragent/test_agents.js +272 -0
  1007. data/third_party/closure-library/closure/goog/labs/useragent/util.js +89 -0
  1008. data/third_party/closure-library/closure/goog/labs/useragent/util_test.html +22 -0
  1009. data/third_party/closure-library/closure/goog/labs/useragent/util_test.js +60 -0
  1010. data/third_party/closure-library/closure/goog/locale/countries.js +291 -0
  1011. data/third_party/closure-library/closure/goog/locale/countrylanguagenames_test.html +237 -0
  1012. data/third_party/closure-library/closure/goog/locale/defaultlocalenameconstants.js +907 -0
  1013. data/third_party/closure-library/closure/goog/locale/genericfontnames.js +73 -0
  1014. data/third_party/closure-library/closure/goog/locale/genericfontnames_test.html +97 -0
  1015. data/third_party/closure-library/closure/goog/locale/genericfontnamesdata.js +327 -0
  1016. data/third_party/closure-library/closure/goog/locale/locale.js +403 -0
  1017. data/third_party/closure-library/closure/goog/locale/nativenameconstants.js +1354 -0
  1018. data/third_party/closure-library/closure/goog/locale/scriptToLanguages.js +482 -0
  1019. data/third_party/closure-library/closure/goog/locale/timezonedetection.js +117 -0
  1020. data/third_party/closure-library/closure/goog/locale/timezonedetection_test.html +130 -0
  1021. data/third_party/closure-library/closure/goog/locale/timezonefingerprint.js +248 -0
  1022. data/third_party/closure-library/closure/goog/locale/timezonelist.js +131 -0
  1023. data/third_party/closure-library/closure/goog/locale/timezonelist_test.html +165 -0
  1024. data/third_party/closure-library/closure/goog/log/log.js +183 -0
  1025. data/third_party/closure-library/closure/goog/log/log_test.js +169 -0
  1026. data/third_party/closure-library/closure/goog/math/bezier.js +311 -0
  1027. data/third_party/closure-library/closure/goog/math/bezier_test.html +112 -0
  1028. data/third_party/closure-library/closure/goog/math/box.js +369 -0
  1029. data/third_party/closure-library/closure/goog/math/box_test.html +298 -0
  1030. data/third_party/closure-library/closure/goog/math/coordinate.js +233 -0
  1031. data/third_party/closure-library/closure/goog/math/coordinate3.js +169 -0
  1032. data/third_party/closure-library/closure/goog/math/coordinate3_test.html +204 -0
  1033. data/third_party/closure-library/closure/goog/math/coordinate_test.html +159 -0
  1034. data/third_party/closure-library/closure/goog/math/exponentialbackoff.js +103 -0
  1035. data/third_party/closure-library/closure/goog/math/exponentialbackoff_test.html +67 -0
  1036. data/third_party/closure-library/closure/goog/math/integer.js +737 -0
  1037. data/third_party/closure-library/closure/goog/math/integer_test.html +1653 -0
  1038. data/third_party/closure-library/closure/goog/math/interpolator/interpolator1.js +64 -0
  1039. data/third_party/closure-library/closure/goog/math/interpolator/linear1.js +82 -0
  1040. data/third_party/closure-library/closure/goog/math/interpolator/linear1_test.html +87 -0
  1041. data/third_party/closure-library/closure/goog/math/interpolator/pchip1.js +81 -0
  1042. data/third_party/closure-library/closure/goog/math/interpolator/pchip1_test.html +74 -0
  1043. data/third_party/closure-library/closure/goog/math/interpolator/spline1.js +202 -0
  1044. data/third_party/closure-library/closure/goog/math/interpolator/spline1_test.html +103 -0
  1045. data/third_party/closure-library/closure/goog/math/line.js +177 -0
  1046. data/third_party/closure-library/closure/goog/math/line_test.html +62 -0
  1047. data/third_party/closure-library/closure/goog/math/long.js +802 -0
  1048. data/third_party/closure-library/closure/goog/math/long_test.html +1571 -0
  1049. data/third_party/closure-library/closure/goog/math/math.js +387 -0
  1050. data/third_party/closure-library/closure/goog/math/math_test.html +292 -0
  1051. data/third_party/closure-library/closure/goog/math/matrix.js +675 -0
  1052. data/third_party/closure-library/closure/goog/math/matrix_test.html +434 -0
  1053. data/third_party/closure-library/closure/goog/math/range.js +144 -0
  1054. data/third_party/closure-library/closure/goog/math/range_test.html +103 -0
  1055. data/third_party/closure-library/closure/goog/math/rangeset.js +394 -0
  1056. data/third_party/closure-library/closure/goog/math/rangeset_test.html +664 -0
  1057. data/third_party/closure-library/closure/goog/math/rect.js +463 -0
  1058. data/third_party/closure-library/closure/goog/math/rect_test.html +444 -0
  1059. data/third_party/closure-library/closure/goog/math/size.js +206 -0
  1060. data/third_party/closure-library/closure/goog/math/size_test.html +180 -0
  1061. data/third_party/closure-library/closure/goog/math/tdma.js +73 -0
  1062. data/third_party/closure-library/closure/goog/math/tdma_test.html +33 -0
  1063. data/third_party/closure-library/closure/goog/math/vec2.js +283 -0
  1064. data/third_party/closure-library/closure/goog/math/vec2_test.html +225 -0
  1065. data/third_party/closure-library/closure/goog/math/vec3.js +308 -0
  1066. data/third_party/closure-library/closure/goog/math/vec3_test.html +221 -0
  1067. data/third_party/closure-library/closure/goog/memoize/memoize.js +102 -0
  1068. data/third_party/closure-library/closure/goog/memoize/memoize_test.html +157 -0
  1069. data/third_party/closure-library/closure/goog/messaging/abstractchannel.js +210 -0
  1070. data/third_party/closure-library/closure/goog/messaging/abstractchannel_test.html +89 -0
  1071. data/third_party/closure-library/closure/goog/messaging/bufferedchannel.js +287 -0
  1072. data/third_party/closure-library/closure/goog/messaging/bufferedchannel_test.html +283 -0
  1073. data/third_party/closure-library/closure/goog/messaging/deferredchannel.js +98 -0
  1074. data/third_party/closure-library/closure/goog/messaging/deferredchannel_test.html +113 -0
  1075. data/third_party/closure-library/closure/goog/messaging/loggerclient.js +131 -0
  1076. data/third_party/closure-library/closure/goog/messaging/loggerclient_test.html +102 -0
  1077. data/third_party/closure-library/closure/goog/messaging/loggerserver.js +98 -0
  1078. data/third_party/closure-library/closure/goog/messaging/loggerserver_test.html +101 -0
  1079. data/third_party/closure-library/closure/goog/messaging/messagechannel.js +116 -0
  1080. data/third_party/closure-library/closure/goog/messaging/messaging.js +34 -0
  1081. data/third_party/closure-library/closure/goog/messaging/messaging_test.html +42 -0
  1082. data/third_party/closure-library/closure/goog/messaging/multichannel.js +302 -0
  1083. data/third_party/closure-library/closure/goog/messaging/multichannel_test.html +122 -0
  1084. data/third_party/closure-library/closure/goog/messaging/portcaller.js +151 -0
  1085. data/third_party/closure-library/closure/goog/messaging/portcaller_test.html +65 -0
  1086. data/third_party/closure-library/closure/goog/messaging/portchannel.js +401 -0
  1087. data/third_party/closure-library/closure/goog/messaging/portchannel_test.html +392 -0
  1088. data/third_party/closure-library/closure/goog/messaging/portnetwork.js +78 -0
  1089. data/third_party/closure-library/closure/goog/messaging/portnetwork_test.html +74 -0
  1090. data/third_party/closure-library/closure/goog/messaging/portoperator.js +197 -0
  1091. data/third_party/closure-library/closure/goog/messaging/portoperator_test.html +112 -0
  1092. data/third_party/closure-library/closure/goog/messaging/respondingchannel.js +236 -0
  1093. data/third_party/closure-library/closure/goog/messaging/respondingchannel_test.html +161 -0
  1094. data/third_party/closure-library/closure/goog/messaging/testdata/portchannel_inner.html +28 -0
  1095. data/third_party/closure-library/closure/goog/messaging/testdata/portchannel_worker.js +37 -0
  1096. data/third_party/closure-library/closure/goog/messaging/testdata/portchannel_wrong_origin_inner.html +29 -0
  1097. data/third_party/closure-library/closure/goog/messaging/testdata/portnetwork_inner.html +34 -0
  1098. data/third_party/closure-library/closure/goog/messaging/testdata/portnetwork_worker1.js +32 -0
  1099. data/third_party/closure-library/closure/goog/messaging/testdata/portnetwork_worker2.js +32 -0
  1100. data/third_party/closure-library/closure/goog/module/abstractmoduleloader.js +56 -0
  1101. data/third_party/closure-library/closure/goog/module/basemodule.js +45 -0
  1102. data/third_party/closure-library/closure/goog/module/loader.js +269 -0
  1103. data/third_party/closure-library/closure/goog/module/module.js +166 -0
  1104. data/third_party/closure-library/closure/goog/module/moduleinfo.js +335 -0
  1105. data/third_party/closure-library/closure/goog/module/moduleinfo_test.html +108 -0
  1106. data/third_party/closure-library/closure/goog/module/moduleloadcallback.js +84 -0
  1107. data/third_party/closure-library/closure/goog/module/moduleloadcallback_test.html +57 -0
  1108. data/third_party/closure-library/closure/goog/module/moduleloader.js +462 -0
  1109. data/third_party/closure-library/closure/goog/module/moduleloader_test.html +30 -0
  1110. data/third_party/closure-library/closure/goog/module/moduleloader_test.js +438 -0
  1111. data/third_party/closure-library/closure/goog/module/modulemanager.js +1370 -0
  1112. data/third_party/closure-library/closure/goog/module/modulemanager_test.html +2143 -0
  1113. data/third_party/closure-library/closure/goog/module/testdata/modA_1.js +23 -0
  1114. data/third_party/closure-library/closure/goog/module/testdata/modA_2.js +27 -0
  1115. data/third_party/closure-library/closure/goog/module/testdata/modB_1.js +31 -0
  1116. data/third_party/closure-library/closure/goog/net/browserchannel.js +2757 -0
  1117. data/third_party/closure-library/closure/goog/net/browserchannel_test.html +1328 -0
  1118. data/third_party/closure-library/closure/goog/net/browsertestchannel.js +618 -0
  1119. data/third_party/closure-library/closure/goog/net/bulkloader.js +181 -0
  1120. data/third_party/closure-library/closure/goog/net/bulkloader_test.html +233 -0
  1121. data/third_party/closure-library/closure/goog/net/bulkloaderhelper.js +127 -0
  1122. data/third_party/closure-library/closure/goog/net/channeldebug.js +300 -0
  1123. data/third_party/closure-library/closure/goog/net/channelrequest.js +1312 -0
  1124. data/third_party/closure-library/closure/goog/net/channelrequest_test.html +280 -0
  1125. data/third_party/closure-library/closure/goog/net/cookies.js +370 -0
  1126. data/third_party/closure-library/closure/goog/net/cookies_test.html +266 -0
  1127. data/third_party/closure-library/closure/goog/net/crossdomainrpc.js +849 -0
  1128. data/third_party/closure-library/closure/goog/net/crossdomainrpc_test.css +7 -0
  1129. data/third_party/closure-library/closure/goog/net/crossdomainrpc_test.gif +0 -0
  1130. data/third_party/closure-library/closure/goog/net/crossdomainrpc_test.html +120 -0
  1131. data/third_party/closure-library/closure/goog/net/crossdomainrpc_test_response.html +59 -0
  1132. data/third_party/closure-library/closure/goog/net/errorcode.js +130 -0
  1133. data/third_party/closure-library/closure/goog/net/eventtype.js +37 -0
  1134. data/third_party/closure-library/closure/goog/net/filedownloader.js +743 -0
  1135. data/third_party/closure-library/closure/goog/net/filedownloader_test.html +372 -0
  1136. data/third_party/closure-library/closure/goog/net/httpstatus.js +111 -0
  1137. data/third_party/closure-library/closure/goog/net/iframe_xhr_test.html +147 -0
  1138. data/third_party/closure-library/closure/goog/net/iframe_xhr_test_response.html +17 -0
  1139. data/third_party/closure-library/closure/goog/net/iframeio.js +1355 -0
  1140. data/third_party/closure-library/closure/goog/net/iframeio_different_base_test.data +2 -0
  1141. data/third_party/closure-library/closure/goog/net/iframeio_different_base_test.html +44 -0
  1142. data/third_party/closure-library/closure/goog/net/iframeio_test.html +402 -0
  1143. data/third_party/closure-library/closure/goog/net/iframeloadmonitor.js +200 -0
  1144. data/third_party/closure-library/closure/goog/net/iframeloadmonitor_test.html +113 -0
  1145. data/third_party/closure-library/closure/goog/net/iframeloadmonitor_test_frame.html +12 -0
  1146. data/third_party/closure-library/closure/goog/net/iframeloadmonitor_test_frame2.html +12 -0
  1147. data/third_party/closure-library/closure/goog/net/iframeloadmonitor_test_frame3.html +12 -0
  1148. data/third_party/closure-library/closure/goog/net/imageloader.js +292 -0
  1149. data/third_party/closure-library/closure/goog/net/imageloader_test.html +302 -0
  1150. data/third_party/closure-library/closure/goog/net/imageloader_testimg1.gif +0 -0
  1151. data/third_party/closure-library/closure/goog/net/imageloader_testimg2.gif +0 -0
  1152. data/third_party/closure-library/closure/goog/net/imageloader_testimg3.gif +0 -0
  1153. data/third_party/closure-library/closure/goog/net/ipaddress.js +511 -0
  1154. data/third_party/closure-library/closure/goog/net/ipaddress_test.html +227 -0
  1155. data/third_party/closure-library/closure/goog/net/jsloader.js +366 -0
  1156. data/third_party/closure-library/closure/goog/net/jsloader_test.html +142 -0
  1157. data/third_party/closure-library/closure/goog/net/jsonp.js +338 -0
  1158. data/third_party/closure-library/closure/goog/net/jsonp_test.html +327 -0
  1159. data/third_party/closure-library/closure/goog/net/mockiframeio.js +319 -0
  1160. data/third_party/closure-library/closure/goog/net/multiiframeloadmonitor.js +117 -0
  1161. data/third_party/closure-library/closure/goog/net/multiiframeloadmonitor_test.html +172 -0
  1162. data/third_party/closure-library/closure/goog/net/networkstatusmonitor.js +47 -0
  1163. data/third_party/closure-library/closure/goog/net/networktester.js +383 -0
  1164. data/third_party/closure-library/closure/goog/net/networktester_test.html +227 -0
  1165. data/third_party/closure-library/closure/goog/net/testdata/jsloader_test1.js +23 -0
  1166. data/third_party/closure-library/closure/goog/net/testdata/jsloader_test2.js +23 -0
  1167. data/third_party/closure-library/closure/goog/net/testdata/jsloader_test3.js +23 -0
  1168. data/third_party/closure-library/closure/goog/net/testdata/jsloader_test4.js +23 -0
  1169. data/third_party/closure-library/closure/goog/net/tmpnetwork.js +164 -0
  1170. data/third_party/closure-library/closure/goog/net/websocket.js +505 -0
  1171. data/third_party/closure-library/closure/goog/net/websocket_test.html +367 -0
  1172. data/third_party/closure-library/closure/goog/net/wrapperxmlhttpfactory.js +68 -0
  1173. data/third_party/closure-library/closure/goog/net/xhrio.js +1191 -0
  1174. data/third_party/closure-library/closure/goog/net/xhrio_test.html +732 -0
  1175. data/third_party/closure-library/closure/goog/net/xhriopool.js +80 -0
  1176. data/third_party/closure-library/closure/goog/net/xhrmanager.js +787 -0
  1177. data/third_party/closure-library/closure/goog/net/xhrmanager_test.html +123 -0
  1178. data/third_party/closure-library/closure/goog/net/xmlhttp.js +228 -0
  1179. data/third_party/closure-library/closure/goog/net/xmlhttpfactory.js +64 -0
  1180. data/third_party/closure-library/closure/goog/net/xpc/crosspagechannel.js +805 -0
  1181. data/third_party/closure-library/closure/goog/net/xpc/crosspagechannel_test.html +1024 -0
  1182. data/third_party/closure-library/closure/goog/net/xpc/crosspagechannelrole.js +30 -0
  1183. data/third_party/closure-library/closure/goog/net/xpc/frameelementmethodtransport.js +254 -0
  1184. data/third_party/closure-library/closure/goog/net/xpc/iframepollingtransport.js +921 -0
  1185. data/third_party/closure-library/closure/goog/net/xpc/iframepollingtransport_test.html +295 -0
  1186. data/third_party/closure-library/closure/goog/net/xpc/iframerelaytransport.js +394 -0
  1187. data/third_party/closure-library/closure/goog/net/xpc/nativemessagingtransport.js +649 -0
  1188. data/third_party/closure-library/closure/goog/net/xpc/nativemessagingtransport_test.html +304 -0
  1189. data/third_party/closure-library/closure/goog/net/xpc/nixtransport.js +479 -0
  1190. data/third_party/closure-library/closure/goog/net/xpc/relay.js +72 -0
  1191. data/third_party/closure-library/closure/goog/net/xpc/testdata/access_checker.html +29 -0
  1192. data/third_party/closure-library/closure/goog/net/xpc/testdata/inner_peer.html +96 -0
  1193. data/third_party/closure-library/closure/goog/net/xpc/transport.js +105 -0
  1194. data/third_party/closure-library/closure/goog/net/xpc/xpc.js +293 -0
  1195. data/third_party/closure-library/closure/goog/object/object.js +635 -0
  1196. data/third_party/closure-library/closure/goog/object/object_test.html +466 -0
  1197. data/third_party/closure-library/closure/goog/positioning/absoluteposition.js +74 -0
  1198. data/third_party/closure-library/closure/goog/positioning/abstractposition.js +48 -0
  1199. data/third_party/closure-library/closure/goog/positioning/anchoredposition.js +92 -0
  1200. data/third_party/closure-library/closure/goog/positioning/anchoredposition_test.html +77 -0
  1201. data/third_party/closure-library/closure/goog/positioning/anchoredviewportposition.js +191 -0
  1202. data/third_party/closure-library/closure/goog/positioning/anchoredviewportposition_test.html +174 -0
  1203. data/third_party/closure-library/closure/goog/positioning/anchoredviewportposition_test_iframe.html +35 -0
  1204. data/third_party/closure-library/closure/goog/positioning/clientposition.js +88 -0
  1205. data/third_party/closure-library/closure/goog/positioning/clientposition_test.html +22 -0
  1206. data/third_party/closure-library/closure/goog/positioning/clientposition_test.js +122 -0
  1207. data/third_party/closure-library/closure/goog/positioning/menuanchoredposition.js +71 -0
  1208. data/third_party/closure-library/closure/goog/positioning/menuanchoredposition_test.html +119 -0
  1209. data/third_party/closure-library/closure/goog/positioning/positioning.js +557 -0
  1210. data/third_party/closure-library/closure/goog/positioning/positioning_test.html +199 -0
  1211. data/third_party/closure-library/closure/goog/positioning/positioning_test.js +1168 -0
  1212. data/third_party/closure-library/closure/goog/positioning/positioning_test_iframe1.html +16 -0
  1213. data/third_party/closure-library/closure/goog/positioning/positioning_test_iframe2.html +13 -0
  1214. data/third_party/closure-library/closure/goog/positioning/positioning_test_quirk.html +9 -0
  1215. data/third_party/closure-library/closure/goog/positioning/positioning_test_standard.html +13 -0
  1216. data/third_party/closure-library/closure/goog/positioning/viewportclientposition.js +121 -0
  1217. data/third_party/closure-library/closure/goog/positioning/viewportclientposition_test.html +189 -0
  1218. data/third_party/closure-library/closure/goog/positioning/viewportposition.js +64 -0
  1219. data/third_party/closure-library/closure/goog/proto/proto.js +44 -0
  1220. data/third_party/closure-library/closure/goog/proto/serializer.js +69 -0
  1221. data/third_party/closure-library/closure/goog/proto/serializer_test.html +43 -0
  1222. data/third_party/closure-library/closure/goog/proto2/descriptor.js +200 -0
  1223. data/third_party/closure-library/closure/goog/proto2/descriptor_test.html +60 -0
  1224. data/third_party/closure-library/closure/goog/proto2/fielddescriptor.js +291 -0
  1225. data/third_party/closure-library/closure/goog/proto2/fielddescriptor_test.html +132 -0
  1226. data/third_party/closure-library/closure/goog/proto2/lazydeserializer.js +70 -0
  1227. data/third_party/closure-library/closure/goog/proto2/message.js +840 -0
  1228. data/third_party/closure-library/closure/goog/proto2/message_test.html +467 -0
  1229. data/third_party/closure-library/closure/goog/proto2/objectserializer.js +159 -0
  1230. data/third_party/closure-library/closure/goog/proto2/objectserializer_test.html +489 -0
  1231. data/third_party/closure-library/closure/goog/proto2/package_test.pb.js +166 -0
  1232. data/third_party/closure-library/closure/goog/proto2/pbliteserializer.js +193 -0
  1233. data/third_party/closure-library/closure/goog/proto2/pbliteserializer_test.html +504 -0
  1234. data/third_party/closure-library/closure/goog/proto2/proto_test.html +693 -0
  1235. data/third_party/closure-library/closure/goog/proto2/serializer.js +174 -0
  1236. data/third_party/closure-library/closure/goog/proto2/test.pb.js +2876 -0
  1237. data/third_party/closure-library/closure/goog/proto2/textformatserializer.js +995 -0
  1238. data/third_party/closure-library/closure/goog/proto2/textformatserializer_test.html +21 -0
  1239. data/third_party/closure-library/closure/goog/proto2/textformatserializer_test.js +629 -0
  1240. data/third_party/closure-library/closure/goog/proto2/util.js +54 -0
  1241. data/third_party/closure-library/closure/goog/pubsub/pubsub.js +326 -0
  1242. data/third_party/closure-library/closure/goog/pubsub/pubsub_perf.html +298 -0
  1243. data/third_party/closure-library/closure/goog/pubsub/pubsub_test.html +635 -0
  1244. data/third_party/closure-library/closure/goog/reflect/reflect.js +77 -0
  1245. data/third_party/closure-library/closure/goog/result/chain_test.html +236 -0
  1246. data/third_party/closure-library/closure/goog/result/combine_test.html +229 -0
  1247. data/third_party/closure-library/closure/goog/result/deferredadaptor.js +57 -0
  1248. data/third_party/closure-library/closure/goog/result/deferredadaptor_test.html +86 -0
  1249. data/third_party/closure-library/closure/goog/result/dependentresult.js +44 -0
  1250. data/third_party/closure-library/closure/goog/result/result_interface.js +109 -0
  1251. data/third_party/closure-library/closure/goog/result/resultutil.js +550 -0
  1252. data/third_party/closure-library/closure/goog/result/resultutil_test.html +46 -0
  1253. data/third_party/closure-library/closure/goog/result/simpleresult.js +217 -0
  1254. data/third_party/closure-library/closure/goog/result/simpleresult_test.html +271 -0
  1255. data/third_party/closure-library/closure/goog/result/transform_test.html +153 -0
  1256. data/third_party/closure-library/closure/goog/result/wait_test.html +211 -0
  1257. data/third_party/closure-library/closure/goog/soy/data.js +132 -0
  1258. data/third_party/closure-library/closure/goog/soy/renderer.js +266 -0
  1259. data/third_party/closure-library/closure/goog/soy/renderer_test.html +172 -0
  1260. data/third_party/closure-library/closure/goog/soy/soy.js +205 -0
  1261. data/third_party/closure-library/closure/goog/soy/soy_test.html +230 -0
  1262. data/third_party/closure-library/closure/goog/soy/soy_test.js +175 -0
  1263. data/third_party/closure-library/closure/goog/spell/spellcheck.js +475 -0
  1264. data/third_party/closure-library/closure/goog/spell/spellcheck_test.html +112 -0
  1265. data/third_party/closure-library/closure/goog/stats/basicstat.js +271 -0
  1266. data/third_party/closure-library/closure/goog/stats/basicstat_test.html +167 -0
  1267. data/third_party/closure-library/closure/goog/storage/collectablestorage.js +100 -0
  1268. data/third_party/closure-library/closure/goog/storage/collectablestorage_test.html +76 -0
  1269. data/third_party/closure-library/closure/goog/storage/encryptedstorage.js +201 -0
  1270. data/third_party/closure-library/closure/goog/storage/encryptedstorage_test.html +160 -0
  1271. data/third_party/closure-library/closure/goog/storage/errorcode.js +30 -0
  1272. data/third_party/closure-library/closure/goog/storage/expiringstorage.js +142 -0
  1273. data/third_party/closure-library/closure/goog/storage/expiringstorage_test.html +90 -0
  1274. data/third_party/closure-library/closure/goog/storage/mechanism/errorcode.js +31 -0
  1275. data/third_party/closure-library/closure/goog/storage/mechanism/errorhandlingmechanism.js +128 -0
  1276. data/third_party/closure-library/closure/goog/storage/mechanism/errorhandlingmechanism_test.html +83 -0
  1277. data/third_party/closure-library/closure/goog/storage/mechanism/html5localstorage.js +45 -0
  1278. data/third_party/closure-library/closure/goog/storage/mechanism/html5localstorage_test.html +60 -0
  1279. data/third_party/closure-library/closure/goog/storage/mechanism/html5sessionstorage.js +46 -0
  1280. data/third_party/closure-library/closure/goog/storage/mechanism/html5sessionstorage_test.html +61 -0
  1281. data/third_party/closure-library/closure/goog/storage/mechanism/html5webstorage.js +176 -0
  1282. data/third_party/closure-library/closure/goog/storage/mechanism/html5webstorage_test.html +122 -0
  1283. data/third_party/closure-library/closure/goog/storage/mechanism/ieuserdata.js +283 -0
  1284. data/third_party/closure-library/closure/goog/storage/mechanism/ieuserdata_test.html +78 -0
  1285. data/third_party/closure-library/closure/goog/storage/mechanism/iterablemechanism.js +86 -0
  1286. data/third_party/closure-library/closure/goog/storage/mechanism/iterablemechanismtester.js +117 -0
  1287. data/third_party/closure-library/closure/goog/storage/mechanism/mechanism.js +56 -0
  1288. data/third_party/closure-library/closure/goog/storage/mechanism/mechanismfactory.js +113 -0
  1289. data/third_party/closure-library/closure/goog/storage/mechanism/mechanismfactory_test.html +58 -0
  1290. data/third_party/closure-library/closure/goog/storage/mechanism/mechanismseparationtester.js +91 -0
  1291. data/third_party/closure-library/closure/goog/storage/mechanism/mechanismsharingtester.js +87 -0
  1292. data/third_party/closure-library/closure/goog/storage/mechanism/mechanismtester.js +200 -0
  1293. data/third_party/closure-library/closure/goog/storage/mechanism/prefixedmechanism.js +97 -0
  1294. data/third_party/closure-library/closure/goog/storage/mechanism/prefixedmechanism_test.html +66 -0
  1295. data/third_party/closure-library/closure/goog/storage/richstorage.js +149 -0
  1296. data/third_party/closure-library/closure/goog/storage/richstorage_test.html +87 -0
  1297. data/third_party/closure-library/closure/goog/storage/storage.js +111 -0
  1298. data/third_party/closure-library/closure/goog/storage/storage_test.html +64 -0
  1299. data/third_party/closure-library/closure/goog/storage/storage_test.js +60 -0
  1300. data/third_party/closure-library/closure/goog/string/linkify.js +236 -0
  1301. data/third_party/closure-library/closure/goog/string/linkify_test.html +441 -0
  1302. data/third_party/closure-library/closure/goog/string/newlines.js +153 -0
  1303. data/third_party/closure-library/closure/goog/string/newlines_test.html +19 -0
  1304. data/third_party/closure-library/closure/goog/string/newlines_test.js +87 -0
  1305. data/third_party/closure-library/closure/goog/string/parser.js +38 -0
  1306. data/third_party/closure-library/closure/goog/string/path.js +169 -0
  1307. data/third_party/closure-library/closure/goog/string/path_test.html +111 -0
  1308. data/third_party/closure-library/closure/goog/string/string.js +1378 -0
  1309. data/third_party/closure-library/closure/goog/string/string_test.html +19 -0
  1310. data/third_party/closure-library/closure/goog/string/string_test.js +1173 -0
  1311. data/third_party/closure-library/closure/goog/string/stringbuffer.js +103 -0
  1312. data/third_party/closure-library/closure/goog/string/stringbuffer_test.html +101 -0
  1313. data/third_party/closure-library/closure/goog/string/stringformat.js +251 -0
  1314. data/third_party/closure-library/closure/goog/string/stringformat_test.html +223 -0
  1315. data/third_party/closure-library/closure/goog/string/stringifier.js +38 -0
  1316. data/third_party/closure-library/closure/goog/structs/avltree.js +835 -0
  1317. data/third_party/closure-library/closure/goog/structs/avltree_test.html +303 -0
  1318. data/third_party/closure-library/closure/goog/structs/circularbuffer.js +223 -0
  1319. data/third_party/closure-library/closure/goog/structs/circularbuffer_test.html +105 -0
  1320. data/third_party/closure-library/closure/goog/structs/collection.js +55 -0
  1321. data/third_party/closure-library/closure/goog/structs/collection_test.html +57 -0
  1322. data/third_party/closure-library/closure/goog/structs/heap.js +333 -0
  1323. data/third_party/closure-library/closure/goog/structs/heap_test.html +220 -0
  1324. data/third_party/closure-library/closure/goog/structs/inversionmap.js +159 -0
  1325. data/third_party/closure-library/closure/goog/structs/inversionmap_test.html +157 -0
  1326. data/third_party/closure-library/closure/goog/structs/linkedmap.js +473 -0
  1327. data/third_party/closure-library/closure/goog/structs/linkedmap_test.html +300 -0
  1328. data/third_party/closure-library/closure/goog/structs/map.js +449 -0
  1329. data/third_party/closure-library/closure/goog/structs/map_test.html +430 -0
  1330. data/third_party/closure-library/closure/goog/structs/node.js +74 -0
  1331. data/third_party/closure-library/closure/goog/structs/pool.js +381 -0
  1332. data/third_party/closure-library/closure/goog/structs/pool_test.html +291 -0
  1333. data/third_party/closure-library/closure/goog/structs/prioritypool.js +184 -0
  1334. data/third_party/closure-library/closure/goog/structs/prioritypool_test.html +588 -0
  1335. data/third_party/closure-library/closure/goog/structs/priorityqueue.js +64 -0
  1336. data/third_party/closure-library/closure/goog/structs/priorityqueue_test.html +179 -0
  1337. data/third_party/closure-library/closure/goog/structs/quadtree.js +571 -0
  1338. data/third_party/closure-library/closure/goog/structs/quadtree_test.html +179 -0
  1339. data/third_party/closure-library/closure/goog/structs/queue.js +157 -0
  1340. data/third_party/closure-library/closure/goog/structs/queue_test.html +140 -0
  1341. data/third_party/closure-library/closure/goog/structs/set.js +274 -0
  1342. data/third_party/closure-library/closure/goog/structs/set_perf.html +271 -0
  1343. data/third_party/closure-library/closure/goog/structs/set_test.html +581 -0
  1344. data/third_party/closure-library/closure/goog/structs/simplepool.js +205 -0
  1345. data/third_party/closure-library/closure/goog/structs/stringset.js +403 -0
  1346. data/third_party/closure-library/closure/goog/structs/stringset_test.html +265 -0
  1347. data/third_party/closure-library/closure/goog/structs/structs.js +351 -0
  1348. data/third_party/closure-library/closure/goog/structs/structs_test.html +1050 -0
  1349. data/third_party/closure-library/closure/goog/structs/treenode.js +428 -0
  1350. data/third_party/closure-library/closure/goog/structs/treenode_test.html +370 -0
  1351. data/third_party/closure-library/closure/goog/structs/trie.js +368 -0
  1352. data/third_party/closure-library/closure/goog/structs/trie_test.html +378 -0
  1353. data/third_party/closure-library/closure/goog/style/bidi.js +182 -0
  1354. data/third_party/closure-library/closure/goog/style/bidi_test.html +211 -0
  1355. data/third_party/closure-library/closure/goog/style/cursor.js +115 -0
  1356. data/third_party/closure-library/closure/goog/style/cursor_test.html +132 -0
  1357. data/third_party/closure-library/closure/goog/style/style.js +2087 -0
  1358. data/third_party/closure-library/closure/goog/style/style_quirks_test.html +530 -0
  1359. data/third_party/closure-library/closure/goog/style/style_test.html +518 -0
  1360. data/third_party/closure-library/closure/goog/style/style_test.js +2602 -0
  1361. data/third_party/closure-library/closure/goog/style/style_test_iframe_quirk.html +27 -0
  1362. data/third_party/closure-library/closure/goog/style/style_test_iframe_standard.html +30 -0
  1363. data/third_party/closure-library/closure/goog/style/style_test_quirk.html +9 -0
  1364. data/third_party/closure-library/closure/goog/style/style_test_standard.html +11 -0
  1365. data/third_party/closure-library/closure/goog/style/style_webkit_scrollbars_test.html +79 -0
  1366. data/third_party/closure-library/closure/goog/style/stylescrollbartester.js +78 -0
  1367. data/third_party/closure-library/closure/goog/style/transition.js +138 -0
  1368. data/third_party/closure-library/closure/goog/style/transition_test.html +124 -0
  1369. data/third_party/closure-library/closure/goog/testing/asserts.js +1243 -0
  1370. data/third_party/closure-library/closure/goog/testing/asserts_test.html +1150 -0
  1371. data/third_party/closure-library/closure/goog/testing/async/mockcontrol.js +174 -0
  1372. data/third_party/closure-library/closure/goog/testing/async/mockcontrol_test.html +223 -0
  1373. data/third_party/closure-library/closure/goog/testing/asynctestcase.js +824 -0
  1374. data/third_party/closure-library/closure/goog/testing/asynctestcase_async_test.html +102 -0
  1375. data/third_party/closure-library/closure/goog/testing/asynctestcase_noasync_test.html +98 -0
  1376. data/third_party/closure-library/closure/goog/testing/asynctestcase_test.html +58 -0
  1377. data/third_party/closure-library/closure/goog/testing/benchmark.js +88 -0
  1378. data/third_party/closure-library/closure/goog/testing/continuationtestcase.js +689 -0
  1379. data/third_party/closure-library/closure/goog/testing/continuationtestcase_test.html +352 -0
  1380. data/third_party/closure-library/closure/goog/testing/deferredtestcase.js +155 -0
  1381. data/third_party/closure-library/closure/goog/testing/deferredtestcase_test.html +140 -0
  1382. data/third_party/closure-library/closure/goog/testing/dom.js +608 -0
  1383. data/third_party/closure-library/closure/goog/testing/dom_test.html +438 -0
  1384. data/third_party/closure-library/closure/goog/testing/editor/dom.js +293 -0
  1385. data/third_party/closure-library/closure/goog/testing/editor/dom_test.html +295 -0
  1386. data/third_party/closure-library/closure/goog/testing/editor/fieldmock.js +99 -0
  1387. data/third_party/closure-library/closure/goog/testing/editor/testhelper.js +176 -0
  1388. data/third_party/closure-library/closure/goog/testing/editor/testhelper_test.html +177 -0
  1389. data/third_party/closure-library/closure/goog/testing/events/eventobserver.js +86 -0
  1390. data/third_party/closure-library/closure/goog/testing/events/eventobserver_test.html +70 -0
  1391. data/third_party/closure-library/closure/goog/testing/events/events.js +713 -0
  1392. data/third_party/closure-library/closure/goog/testing/events/events_test.html +614 -0
  1393. data/third_party/closure-library/closure/goog/testing/events/matchers.js +41 -0
  1394. data/third_party/closure-library/closure/goog/testing/events/matchers_test.html +40 -0
  1395. data/third_party/closure-library/closure/goog/testing/events/onlinehandler.js +64 -0
  1396. data/third_party/closure-library/closure/goog/testing/events/onlinehandler_test.html +89 -0
  1397. data/third_party/closure-library/closure/goog/testing/expectedfailures.js +236 -0
  1398. data/third_party/closure-library/closure/goog/testing/expectedfailures_test.html +122 -0
  1399. data/third_party/closure-library/closure/goog/testing/fs/blob.js +116 -0
  1400. data/third_party/closure-library/closure/goog/testing/fs/blob_test.html +65 -0
  1401. data/third_party/closure-library/closure/goog/testing/fs/directoryentry_test.html +313 -0
  1402. data/third_party/closure-library/closure/goog/testing/fs/entry.js +621 -0
  1403. data/third_party/closure-library/closure/goog/testing/fs/entry_test.html +227 -0
  1404. data/third_party/closure-library/closure/goog/testing/fs/file.js +52 -0
  1405. data/third_party/closure-library/closure/goog/testing/fs/fileentry_test.html +93 -0
  1406. data/third_party/closure-library/closure/goog/testing/fs/filereader.js +272 -0
  1407. data/third_party/closure-library/closure/goog/testing/fs/filereader_test.html +236 -0
  1408. data/third_party/closure-library/closure/goog/testing/fs/filesystem.js +63 -0
  1409. data/third_party/closure-library/closure/goog/testing/fs/filewriter.js +261 -0
  1410. data/third_party/closure-library/closure/goog/testing/fs/filewriter_test.html +325 -0
  1411. data/third_party/closure-library/closure/goog/testing/fs/fs.js +147 -0
  1412. data/third_party/closure-library/closure/goog/testing/fs/fs_test.html +53 -0
  1413. data/third_party/closure-library/closure/goog/testing/fs/integration_test.html +223 -0
  1414. data/third_party/closure-library/closure/goog/testing/fs/progressevent.js +81 -0
  1415. data/third_party/closure-library/closure/goog/testing/functionmock.js +177 -0
  1416. data/third_party/closure-library/closure/goog/testing/functionmock_test.html +511 -0
  1417. data/third_party/closure-library/closure/goog/testing/graphics.js +64 -0
  1418. data/third_party/closure-library/closure/goog/testing/i18n/asserts.js +77 -0
  1419. data/third_party/closure-library/closure/goog/testing/i18n/asserts_test.html +19 -0
  1420. data/third_party/closure-library/closure/goog/testing/i18n/asserts_test.js +67 -0
  1421. data/third_party/closure-library/closure/goog/testing/jsunit.js +156 -0
  1422. data/third_party/closure-library/closure/goog/testing/loosemock.js +240 -0
  1423. data/third_party/closure-library/closure/goog/testing/loosemock_test.html +343 -0
  1424. data/third_party/closure-library/closure/goog/testing/messaging/mockmessagechannel.js +79 -0
  1425. data/third_party/closure-library/closure/goog/testing/messaging/mockmessageevent.js +100 -0
  1426. data/third_party/closure-library/closure/goog/testing/messaging/mockmessageport.js +85 -0
  1427. data/third_party/closure-library/closure/goog/testing/messaging/mockportnetwork.js +65 -0
  1428. data/third_party/closure-library/closure/goog/testing/mock.js +619 -0
  1429. data/third_party/closure-library/closure/goog/testing/mock_test.html +264 -0
  1430. data/third_party/closure-library/closure/goog/testing/mockclassfactory.js +578 -0
  1431. data/third_party/closure-library/closure/goog/testing/mockclassfactory_test.html +241 -0
  1432. data/third_party/closure-library/closure/goog/testing/mockclock.js +520 -0
  1433. data/third_party/closure-library/closure/goog/testing/mockclock_test.html +504 -0
  1434. data/third_party/closure-library/closure/goog/testing/mockcontrol.js +219 -0
  1435. data/third_party/closure-library/closure/goog/testing/mockcontrol_test.html +127 -0
  1436. data/third_party/closure-library/closure/goog/testing/mockinterface.js +45 -0
  1437. data/third_party/closure-library/closure/goog/testing/mockmatchers.js +395 -0
  1438. data/third_party/closure-library/closure/goog/testing/mockmatchers_test.html +388 -0
  1439. data/third_party/closure-library/closure/goog/testing/mockrandom.js +126 -0
  1440. data/third_party/closure-library/closure/goog/testing/mockrandom_test.html +56 -0
  1441. data/third_party/closure-library/closure/goog/testing/mockrange.js +66 -0
  1442. data/third_party/closure-library/closure/goog/testing/mockrange_test.html +41 -0
  1443. data/third_party/closure-library/closure/goog/testing/mockstorage.js +107 -0
  1444. data/third_party/closure-library/closure/goog/testing/mockstorage_test.html +78 -0
  1445. data/third_party/closure-library/closure/goog/testing/mockuseragent.js +141 -0
  1446. data/third_party/closure-library/closure/goog/testing/mockuseragent_test.html +59 -0
  1447. data/third_party/closure-library/closure/goog/testing/multitestrunner.js +1439 -0
  1448. data/third_party/closure-library/closure/goog/testing/net/xhrio.js +709 -0
  1449. data/third_party/closure-library/closure/goog/testing/net/xhrio_test.html +384 -0
  1450. data/third_party/closure-library/closure/goog/testing/net/xhriopool.js +64 -0
  1451. data/third_party/closure-library/closure/goog/testing/objectpropertystring.js +67 -0
  1452. data/third_party/closure-library/closure/goog/testing/performancetable.css +46 -0
  1453. data/third_party/closure-library/closure/goog/testing/performancetable.js +190 -0
  1454. data/third_party/closure-library/closure/goog/testing/performancetimer.js +405 -0
  1455. data/third_party/closure-library/closure/goog/testing/performancetimer_test.html +201 -0
  1456. data/third_party/closure-library/closure/goog/testing/propertyreplacer.js +243 -0
  1457. data/third_party/closure-library/closure/goog/testing/propertyreplacer_test.html +368 -0
  1458. data/third_party/closure-library/closure/goog/testing/proto2/proto2.js +127 -0
  1459. data/third_party/closure-library/closure/goog/testing/proto2/proto2_test.html +117 -0
  1460. data/third_party/closure-library/closure/goog/testing/pseudorandom.js +179 -0
  1461. data/third_party/closure-library/closure/goog/testing/pseudorandom_test.html +98 -0
  1462. data/third_party/closure-library/closure/goog/testing/recordfunction.js +201 -0
  1463. data/third_party/closure-library/closure/goog/testing/recordfunction_test.html +159 -0
  1464. data/third_party/closure-library/closure/goog/testing/shardingtestcase.js +122 -0
  1465. data/third_party/closure-library/closure/goog/testing/shardingtestcase_test.html +34 -0
  1466. data/third_party/closure-library/closure/goog/testing/singleton.js +46 -0
  1467. data/third_party/closure-library/closure/goog/testing/singleton_test.html +39 -0
  1468. data/third_party/closure-library/closure/goog/testing/stacktrace.js +555 -0
  1469. data/third_party/closure-library/closure/goog/testing/stacktrace_test.html +327 -0
  1470. data/third_party/closure-library/closure/goog/testing/storage/fakemechanism.js +66 -0
  1471. data/third_party/closure-library/closure/goog/testing/strictmock.js +128 -0
  1472. data/third_party/closure-library/closure/goog/testing/strictmock_test.html +412 -0
  1473. data/third_party/closure-library/closure/goog/testing/style/layoutasserts.js +310 -0
  1474. data/third_party/closure-library/closure/goog/testing/style/layoutasserts_test.html +269 -0
  1475. data/third_party/closure-library/closure/goog/testing/style/style.js +101 -0
  1476. data/third_party/closure-library/closure/goog/testing/style/style_test.html +162 -0
  1477. data/third_party/closure-library/closure/goog/testing/testcase.js +1233 -0
  1478. data/third_party/closure-library/closure/goog/testing/testqueue.js +66 -0
  1479. data/third_party/closure-library/closure/goog/testing/testrunner.js +399 -0
  1480. data/third_party/closure-library/closure/goog/testing/ui/rendererasserts.js +56 -0
  1481. data/third_party/closure-library/closure/goog/testing/ui/rendererasserts_test.html +52 -0
  1482. data/third_party/closure-library/closure/goog/testing/ui/rendererharness.js +176 -0
  1483. data/third_party/closure-library/closure/goog/testing/ui/style.js +137 -0
  1484. data/third_party/closure-library/closure/goog/testing/ui/style_reference.html +27 -0
  1485. data/third_party/closure-library/closure/goog/testing/ui/style_test.html +130 -0
  1486. data/third_party/closure-library/closure/goog/timer/timer.js +291 -0
  1487. data/third_party/closure-library/closure/goog/timer/timer_test.html +118 -0
  1488. data/third_party/closure-library/closure/goog/tweak/entries.js +997 -0
  1489. data/third_party/closure-library/closure/goog/tweak/entries_test.html +94 -0
  1490. data/third_party/closure-library/closure/goog/tweak/registry.js +310 -0
  1491. data/third_party/closure-library/closure/goog/tweak/registry_test.html +145 -0
  1492. data/third_party/closure-library/closure/goog/tweak/testhelpers.js +119 -0
  1493. data/third_party/closure-library/closure/goog/tweak/tweak.js +301 -0
  1494. data/third_party/closure-library/closure/goog/tweak/tweakui.js +817 -0
  1495. data/third_party/closure-library/closure/goog/tweak/tweakui_test.html +280 -0
  1496. data/third_party/closure-library/closure/goog/ui/abstractspellchecker.js +1138 -0
  1497. data/third_party/closure-library/closure/goog/ui/ac/ac.js +50 -0
  1498. data/third_party/closure-library/closure/goog/ui/ac/ac_test.html +204 -0
  1499. data/third_party/closure-library/closure/goog/ui/ac/arraymatcher.js +162 -0
  1500. data/third_party/closure-library/closure/goog/ui/ac/arraymatcher_test.html +130 -0
  1501. data/third_party/closure-library/closure/goog/ui/ac/autocomplete.js +919 -0
  1502. data/third_party/closure-library/closure/goog/ui/ac/autocomplete_test.html +1613 -0
  1503. data/third_party/closure-library/closure/goog/ui/ac/inputhandler.js +1308 -0
  1504. data/third_party/closure-library/closure/goog/ui/ac/inputhandler_test.html +685 -0
  1505. data/third_party/closure-library/closure/goog/ui/ac/remote.js +114 -0
  1506. data/third_party/closure-library/closure/goog/ui/ac/remotearraymatcher.js +271 -0
  1507. data/third_party/closure-library/closure/goog/ui/ac/remotearraymatcher_test.html +73 -0
  1508. data/third_party/closure-library/closure/goog/ui/ac/renderer.js +1023 -0
  1509. data/third_party/closure-library/closure/goog/ui/ac/renderer_test.html +606 -0
  1510. data/third_party/closure-library/closure/goog/ui/ac/renderoptions.js +80 -0
  1511. data/third_party/closure-library/closure/goog/ui/ac/richinputhandler.js +58 -0
  1512. data/third_party/closure-library/closure/goog/ui/ac/richremote.js +107 -0
  1513. data/third_party/closure-library/closure/goog/ui/ac/richremotearraymatcher.js +125 -0
  1514. data/third_party/closure-library/closure/goog/ui/activitymonitor.js +347 -0
  1515. data/third_party/closure-library/closure/goog/ui/activitymonitor_test.html +150 -0
  1516. data/third_party/closure-library/closure/goog/ui/advancedtooltip.js +366 -0
  1517. data/third_party/closure-library/closure/goog/ui/advancedtooltip_test.html +296 -0
  1518. data/third_party/closure-library/closure/goog/ui/animatedzippy.js +199 -0
  1519. data/third_party/closure-library/closure/goog/ui/animatedzippy_test.html +139 -0
  1520. data/third_party/closure-library/closure/goog/ui/attachablemenu.js +473 -0
  1521. data/third_party/closure-library/closure/goog/ui/bidiinput.js +178 -0
  1522. data/third_party/closure-library/closure/goog/ui/bidiinput_test.html +131 -0
  1523. data/third_party/closure-library/closure/goog/ui/bubble.js +472 -0
  1524. data/third_party/closure-library/closure/goog/ui/button.js +213 -0
  1525. data/third_party/closure-library/closure/goog/ui/button_perf.html +176 -0
  1526. data/third_party/closure-library/closure/goog/ui/button_test.html +257 -0
  1527. data/third_party/closure-library/closure/goog/ui/buttonrenderer.js +214 -0
  1528. data/third_party/closure-library/closure/goog/ui/buttonrenderer_test.html +223 -0
  1529. data/third_party/closure-library/closure/goog/ui/buttonside.js +41 -0
  1530. data/third_party/closure-library/closure/goog/ui/charcounter.js +199 -0
  1531. data/third_party/closure-library/closure/goog/ui/charpicker.js +880 -0
  1532. data/third_party/closure-library/closure/goog/ui/charpicker_test.html +88 -0
  1533. data/third_party/closure-library/closure/goog/ui/checkbox.js +269 -0
  1534. data/third_party/closure-library/closure/goog/ui/checkbox_test.html +370 -0
  1535. data/third_party/closure-library/closure/goog/ui/checkboxmenuitem.js +53 -0
  1536. data/third_party/closure-library/closure/goog/ui/checkboxrenderer.js +171 -0
  1537. data/third_party/closure-library/closure/goog/ui/colorbutton.js +58 -0
  1538. data/third_party/closure-library/closure/goog/ui/colorbutton_test.html +70 -0
  1539. data/third_party/closure-library/closure/goog/ui/colorbuttonrenderer.js +72 -0
  1540. data/third_party/closure-library/closure/goog/ui/colormenubutton.js +215 -0
  1541. data/third_party/closure-library/closure/goog/ui/colormenubuttonrenderer.js +144 -0
  1542. data/third_party/closure-library/closure/goog/ui/colormenubuttonrenderer_test.html +88 -0
  1543. data/third_party/closure-library/closure/goog/ui/colorpalette.js +177 -0
  1544. data/third_party/closure-library/closure/goog/ui/colorpalette_test.html +174 -0
  1545. data/third_party/closure-library/closure/goog/ui/colorpicker.js +344 -0
  1546. data/third_party/closure-library/closure/goog/ui/colorsplitbehavior.js +60 -0
  1547. data/third_party/closure-library/closure/goog/ui/combobox.js +961 -0
  1548. data/third_party/closure-library/closure/goog/ui/combobox_test.html +292 -0
  1549. data/third_party/closure-library/closure/goog/ui/component.js +1300 -0
  1550. data/third_party/closure-library/closure/goog/ui/component_test.html +889 -0
  1551. data/third_party/closure-library/closure/goog/ui/container.js +1322 -0
  1552. data/third_party/closure-library/closure/goog/ui/container_perf.html +55 -0
  1553. data/third_party/closure-library/closure/goog/ui/container_test.html +458 -0
  1554. data/third_party/closure-library/closure/goog/ui/containerrenderer.js +371 -0
  1555. data/third_party/closure-library/closure/goog/ui/containerrenderer_test.html +228 -0
  1556. data/third_party/closure-library/closure/goog/ui/containerscroller.js +222 -0
  1557. data/third_party/closure-library/closure/goog/ui/containerscroller_test.html +214 -0
  1558. data/third_party/closure-library/closure/goog/ui/control.js +1387 -0
  1559. data/third_party/closure-library/closure/goog/ui/control_perf.html +166 -0
  1560. data/third_party/closure-library/closure/goog/ui/control_test.html +2142 -0
  1561. data/third_party/closure-library/closure/goog/ui/controlcontent.js +28 -0
  1562. data/third_party/closure-library/closure/goog/ui/controlrenderer.js +855 -0
  1563. data/third_party/closure-library/closure/goog/ui/controlrenderer_test.html +1100 -0
  1564. data/third_party/closure-library/closure/goog/ui/cookieeditor.js +183 -0
  1565. data/third_party/closure-library/closure/goog/ui/cookieeditor_test.html +107 -0
  1566. data/third_party/closure-library/closure/goog/ui/css3buttonrenderer.js +152 -0
  1567. data/third_party/closure-library/closure/goog/ui/css3menubuttonrenderer.js +147 -0
  1568. data/third_party/closure-library/closure/goog/ui/cssnames.js +29 -0
  1569. data/third_party/closure-library/closure/goog/ui/custombutton.js +58 -0
  1570. data/third_party/closure-library/closure/goog/ui/custombuttonrenderer.js +267 -0
  1571. data/third_party/closure-library/closure/goog/ui/customcolorpalette.js +139 -0
  1572. data/third_party/closure-library/closure/goog/ui/customcolorpalette_test.html +60 -0
  1573. data/third_party/closure-library/closure/goog/ui/datepicker.js +1369 -0
  1574. data/third_party/closure-library/closure/goog/ui/datepicker_test.html +252 -0
  1575. data/third_party/closure-library/closure/goog/ui/datepickerrenderer.js +55 -0
  1576. data/third_party/closure-library/closure/goog/ui/decorate.js +38 -0
  1577. data/third_party/closure-library/closure/goog/ui/decorate_test.html +114 -0
  1578. data/third_party/closure-library/closure/goog/ui/defaultdatepickerrenderer.js +202 -0
  1579. data/third_party/closure-library/closure/goog/ui/dialog.js +1556 -0
  1580. data/third_party/closure-library/closure/goog/ui/dialog_test.html +776 -0
  1581. data/third_party/closure-library/closure/goog/ui/dimensionpicker.js +305 -0
  1582. data/third_party/closure-library/closure/goog/ui/dimensionpicker_test.html +171 -0
  1583. data/third_party/closure-library/closure/goog/ui/dimensionpickerrenderer.js +416 -0
  1584. data/third_party/closure-library/closure/goog/ui/dimensionpickerrenderer_test.html +49 -0
  1585. data/third_party/closure-library/closure/goog/ui/dragdropdetector.js +642 -0
  1586. data/third_party/closure-library/closure/goog/ui/drilldownrow.js +486 -0
  1587. data/third_party/closure-library/closure/goog/ui/drilldownrow_test.html +92 -0
  1588. data/third_party/closure-library/closure/goog/ui/editor/abstractdialog.js +440 -0
  1589. data/third_party/closure-library/closure/goog/ui/editor/abstractdialog_test.html +473 -0
  1590. data/third_party/closure-library/closure/goog/ui/editor/bubble.js +525 -0
  1591. data/third_party/closure-library/closure/goog/ui/editor/bubble_test.html +264 -0
  1592. data/third_party/closure-library/closure/goog/ui/editor/defaulttoolbar.js +1065 -0
  1593. data/third_party/closure-library/closure/goog/ui/editor/equationeditordialog.js +123 -0
  1594. data/third_party/closure-library/closure/goog/ui/editor/equationeditorokevent.js +49 -0
  1595. data/third_party/closure-library/closure/goog/ui/editor/linkdialog.js +1064 -0
  1596. data/third_party/closure-library/closure/goog/ui/editor/linkdialog_test.html +653 -0
  1597. data/third_party/closure-library/closure/goog/ui/editor/messages.js +123 -0
  1598. data/third_party/closure-library/closure/goog/ui/editor/tabpane.js +198 -0
  1599. data/third_party/closure-library/closure/goog/ui/editor/toolbarcontroller.js +295 -0
  1600. data/third_party/closure-library/closure/goog/ui/editor/toolbarfactory.js +440 -0
  1601. data/third_party/closure-library/closure/goog/ui/editor/toolbarfactory_test.html +73 -0
  1602. data/third_party/closure-library/closure/goog/ui/emoji/emoji.js +72 -0
  1603. data/third_party/closure-library/closure/goog/ui/emoji/emojipalette.js +288 -0
  1604. data/third_party/closure-library/closure/goog/ui/emoji/emojipaletterenderer.js +208 -0
  1605. data/third_party/closure-library/closure/goog/ui/emoji/emojipicker.js +804 -0
  1606. data/third_party/closure-library/closure/goog/ui/emoji/emojipicker_test.html +913 -0
  1607. data/third_party/closure-library/closure/goog/ui/emoji/fast_nonprogressive_emojipicker_test.html +256 -0
  1608. data/third_party/closure-library/closure/goog/ui/emoji/fast_progressive_emojipicker_test.html +256 -0
  1609. data/third_party/closure-library/closure/goog/ui/emoji/popupemojipicker.js +410 -0
  1610. data/third_party/closure-library/closure/goog/ui/emoji/popupemojipicker_test.html +80 -0
  1611. data/third_party/closure-library/closure/goog/ui/emoji/progressiveemojipaletterenderer.js +98 -0
  1612. data/third_party/closure-library/closure/goog/ui/emoji/spriteinfo.js +212 -0
  1613. data/third_party/closure-library/closure/goog/ui/emoji/spriteinfo_test.html +51 -0
  1614. data/third_party/closure-library/closure/goog/ui/equation/arrowpalette.js +47 -0
  1615. data/third_party/closure-library/closure/goog/ui/equation/changeevent.js +37 -0
  1616. data/third_party/closure-library/closure/goog/ui/equation/comparisonpalette.js +56 -0
  1617. data/third_party/closure-library/closure/goog/ui/equation/editorpane.js +93 -0
  1618. data/third_party/closure-library/closure/goog/ui/equation/equationeditor.js +220 -0
  1619. data/third_party/closure-library/closure/goog/ui/equation/equationeditordialog.js +137 -0
  1620. data/third_party/closure-library/closure/goog/ui/equation/greekpalette.js +75 -0
  1621. data/third_party/closure-library/closure/goog/ui/equation/imagerenderer.js +190 -0
  1622. data/third_party/closure-library/closure/goog/ui/equation/mathpalette.js +55 -0
  1623. data/third_party/closure-library/closure/goog/ui/equation/menupalette.js +86 -0
  1624. data/third_party/closure-library/closure/goog/ui/equation/palette.js +288 -0
  1625. data/third_party/closure-library/closure/goog/ui/equation/palettemanager.js +203 -0
  1626. data/third_party/closure-library/closure/goog/ui/equation/symbolpalette.js +74 -0
  1627. data/third_party/closure-library/closure/goog/ui/equation/texeditor.js +141 -0
  1628. data/third_party/closure-library/closure/goog/ui/equation/texpane.js +444 -0
  1629. data/third_party/closure-library/closure/goog/ui/filteredmenu.js +575 -0
  1630. data/third_party/closure-library/closure/goog/ui/filteredmenu_test.html +321 -0
  1631. data/third_party/closure-library/closure/goog/ui/filterobservingmenuitem.js +97 -0
  1632. data/third_party/closure-library/closure/goog/ui/filterobservingmenuitemrenderer.js +62 -0
  1633. data/third_party/closure-library/closure/goog/ui/flatbuttonrenderer.js +146 -0
  1634. data/third_party/closure-library/closure/goog/ui/flatmenubuttonrenderer.js +238 -0
  1635. data/third_party/closure-library/closure/goog/ui/formpost.js +109 -0
  1636. data/third_party/closure-library/closure/goog/ui/formpost_test.html +105 -0
  1637. data/third_party/closure-library/closure/goog/ui/gauge.js +1011 -0
  1638. data/third_party/closure-library/closure/goog/ui/gaugetheme.js +169 -0
  1639. data/third_party/closure-library/closure/goog/ui/hovercard.js +456 -0
  1640. data/third_party/closure-library/closure/goog/ui/hovercard_test.html +360 -0
  1641. data/third_party/closure-library/closure/goog/ui/hsvapalette.js +298 -0
  1642. data/third_party/closure-library/closure/goog/ui/hsvapalette_test.html +152 -0
  1643. data/third_party/closure-library/closure/goog/ui/hsvpalette.js +505 -0
  1644. data/third_party/closure-library/closure/goog/ui/hsvpalette_test.html +219 -0
  1645. data/third_party/closure-library/closure/goog/ui/idgenerator.js +57 -0
  1646. data/third_party/closure-library/closure/goog/ui/idletimer.js +299 -0
  1647. data/third_party/closure-library/closure/goog/ui/idletimer_test.html +100 -0
  1648. data/third_party/closure-library/closure/goog/ui/iframemask.js +257 -0
  1649. data/third_party/closure-library/closure/goog/ui/iframemask_test.html +230 -0
  1650. data/third_party/closure-library/closure/goog/ui/imagelessbuttonrenderer.js +204 -0
  1651. data/third_party/closure-library/closure/goog/ui/imagelessmenubuttonrenderer.js +207 -0
  1652. data/third_party/closure-library/closure/goog/ui/inputdatepicker.js +305 -0
  1653. data/third_party/closure-library/closure/goog/ui/inputdatepicker_test.html +111 -0
  1654. data/third_party/closure-library/closure/goog/ui/itemevent.js +50 -0
  1655. data/third_party/closure-library/closure/goog/ui/keyboardshortcuthandler.js +1017 -0
  1656. data/third_party/closure-library/closure/goog/ui/keyboardshortcuthandler_test.html +702 -0
  1657. data/third_party/closure-library/closure/goog/ui/labelinput.js +592 -0
  1658. data/third_party/closure-library/closure/goog/ui/labelinput_test.html +252 -0
  1659. data/third_party/closure-library/closure/goog/ui/linkbuttonrenderer.js +67 -0
  1660. data/third_party/closure-library/closure/goog/ui/media/flashobject.js +631 -0
  1661. data/third_party/closure-library/closure/goog/ui/media/flashobject_test.html +236 -0
  1662. data/third_party/closure-library/closure/goog/ui/media/flickr.js +308 -0
  1663. data/third_party/closure-library/closure/goog/ui/media/flickr_test.html +114 -0
  1664. data/third_party/closure-library/closure/goog/ui/media/googlevideo.js +281 -0
  1665. data/third_party/closure-library/closure/goog/ui/media/googlevideo_test.html +105 -0
  1666. data/third_party/closure-library/closure/goog/ui/media/media.js +285 -0
  1667. data/third_party/closure-library/closure/goog/ui/media/media_test.html +118 -0
  1668. data/third_party/closure-library/closure/goog/ui/media/mediamodel.js +960 -0
  1669. data/third_party/closure-library/closure/goog/ui/media/mediamodel_test.html +108 -0
  1670. data/third_party/closure-library/closure/goog/ui/media/mp3.js +228 -0
  1671. data/third_party/closure-library/closure/goog/ui/media/mp3_test.html +78 -0
  1672. data/third_party/closure-library/closure/goog/ui/media/photo.js +142 -0
  1673. data/third_party/closure-library/closure/goog/ui/media/photo_test.html +62 -0
  1674. data/third_party/closure-library/closure/goog/ui/media/picasa.js +321 -0
  1675. data/third_party/closure-library/closure/goog/ui/media/picasa_test.html +121 -0
  1676. data/third_party/closure-library/closure/goog/ui/media/vimeo.js +276 -0
  1677. data/third_party/closure-library/closure/goog/ui/media/vimeo_test.html +102 -0
  1678. data/third_party/closure-library/closure/goog/ui/media/youtube.js +357 -0
  1679. data/third_party/closure-library/closure/goog/ui/media/youtube_test.html +243 -0
  1680. data/third_party/closure-library/closure/goog/ui/menu.js +476 -0
  1681. data/third_party/closure-library/closure/goog/ui/menu_test.html +167 -0
  1682. data/third_party/closure-library/closure/goog/ui/menubar.js +44 -0
  1683. data/third_party/closure-library/closure/goog/ui/menubardecorator.js +35 -0
  1684. data/third_party/closure-library/closure/goog/ui/menubarrenderer.js +74 -0
  1685. data/third_party/closure-library/closure/goog/ui/menubase.js +190 -0
  1686. data/third_party/closure-library/closure/goog/ui/menubutton.js +903 -0
  1687. data/third_party/closure-library/closure/goog/ui/menubutton_test.html +637 -0
  1688. data/third_party/closure-library/closure/goog/ui/menubutton_test_frame.html +41 -0
  1689. data/third_party/closure-library/closure/goog/ui/menubuttonrenderer.js +266 -0
  1690. data/third_party/closure-library/closure/goog/ui/menubuttonrenderer_test.html +179 -0
  1691. data/third_party/closure-library/closure/goog/ui/menuheader.js +62 -0
  1692. data/third_party/closure-library/closure/goog/ui/menuheaderrenderer.js +54 -0
  1693. data/third_party/closure-library/closure/goog/ui/menuitem.js +233 -0
  1694. data/third_party/closure-library/closure/goog/ui/menuitem_test.html +559 -0
  1695. data/third_party/closure-library/closure/goog/ui/menuitemrenderer.js +358 -0
  1696. data/third_party/closure-library/closure/goog/ui/menuitemrenderer_test.html +201 -0
  1697. data/third_party/closure-library/closure/goog/ui/menurenderer.js +123 -0
  1698. data/third_party/closure-library/closure/goog/ui/menuseparator.js +51 -0
  1699. data/third_party/closure-library/closure/goog/ui/menuseparatorrenderer.js +113 -0
  1700. data/third_party/closure-library/closure/goog/ui/menuseparatorrenderer_test.html +61 -0
  1701. data/third_party/closure-library/closure/goog/ui/mockactivitymonitor.js +71 -0
  1702. data/third_party/closure-library/closure/goog/ui/mockactivitymonitor_test.html +19 -0
  1703. data/third_party/closure-library/closure/goog/ui/mockactivitymonitor_test.js +94 -0
  1704. data/third_party/closure-library/closure/goog/ui/modalpopup.js +698 -0
  1705. data/third_party/closure-library/closure/goog/ui/modalpopup_test.html +419 -0
  1706. data/third_party/closure-library/closure/goog/ui/nativebuttonrenderer.js +207 -0
  1707. data/third_party/closure-library/closure/goog/ui/nativebuttonrenderer_test.html +214 -0
  1708. data/third_party/closure-library/closure/goog/ui/offlineinstalldialog.js +1089 -0
  1709. data/third_party/closure-library/closure/goog/ui/offlinestatuscard.js +580 -0
  1710. data/third_party/closure-library/closure/goog/ui/offlinestatuscomponent.js +540 -0
  1711. data/third_party/closure-library/closure/goog/ui/option.js +68 -0
  1712. data/third_party/closure-library/closure/goog/ui/palette.js +598 -0
  1713. data/third_party/closure-library/closure/goog/ui/palette_test.html +135 -0
  1714. data/third_party/closure-library/closure/goog/ui/paletterenderer.js +372 -0
  1715. data/third_party/closure-library/closure/goog/ui/paletterenderer_test.html +83 -0
  1716. data/third_party/closure-library/closure/goog/ui/plaintextspellchecker.js +672 -0
  1717. data/third_party/closure-library/closure/goog/ui/plaintextspellchecker_test.html +239 -0
  1718. data/third_party/closure-library/closure/goog/ui/popup.js +344 -0
  1719. data/third_party/closure-library/closure/goog/ui/popup_test.html +137 -0
  1720. data/third_party/closure-library/closure/goog/ui/popupbase.js +822 -0
  1721. data/third_party/closure-library/closure/goog/ui/popupbase_test.html +484 -0
  1722. data/third_party/closure-library/closure/goog/ui/popupcolorpicker.js +441 -0
  1723. data/third_party/closure-library/closure/goog/ui/popupcolorpicker_test.html +71 -0
  1724. data/third_party/closure-library/closure/goog/ui/popupdatepicker.js +273 -0
  1725. data/third_party/closure-library/closure/goog/ui/popupmenu.js +557 -0
  1726. data/third_party/closure-library/closure/goog/ui/popupmenu_test.html +308 -0
  1727. data/third_party/closure-library/closure/goog/ui/progressbar.js +401 -0
  1728. data/third_party/closure-library/closure/goog/ui/prompt.js +405 -0
  1729. data/third_party/closure-library/closure/goog/ui/prompt_test.html +144 -0
  1730. data/third_party/closure-library/closure/goog/ui/rangemodel.js +302 -0
  1731. data/third_party/closure-library/closure/goog/ui/rangemodel_test.html +270 -0
  1732. data/third_party/closure-library/closure/goog/ui/ratings.js +451 -0
  1733. data/third_party/closure-library/closure/goog/ui/registry.js +167 -0
  1734. data/third_party/closure-library/closure/goog/ui/registry_test.html +237 -0
  1735. data/third_party/closure-library/closure/goog/ui/richtextspellchecker.js +626 -0
  1736. data/third_party/closure-library/closure/goog/ui/richtextspellchecker_test.html +247 -0
  1737. data/third_party/closure-library/closure/goog/ui/roundedpanel.js +625 -0
  1738. data/third_party/closure-library/closure/goog/ui/roundedpanel_test.html +57 -0
  1739. data/third_party/closure-library/closure/goog/ui/roundedtabrenderer.js +197 -0
  1740. data/third_party/closure-library/closure/goog/ui/scrollfloater.js +585 -0
  1741. data/third_party/closure-library/closure/goog/ui/scrollfloater_test.html +144 -0
  1742. data/third_party/closure-library/closure/goog/ui/select.js +434 -0
  1743. data/third_party/closure-library/closure/goog/ui/select_test.html +235 -0
  1744. data/third_party/closure-library/closure/goog/ui/selectionmenubutton.js +299 -0
  1745. data/third_party/closure-library/closure/goog/ui/selectionmenubutton_test.html +237 -0
  1746. data/third_party/closure-library/closure/goog/ui/selectionmodel.js +300 -0
  1747. data/third_party/closure-library/closure/goog/ui/selectionmodel_test.html +225 -0
  1748. data/third_party/closure-library/closure/goog/ui/separator.js +80 -0
  1749. data/third_party/closure-library/closure/goog/ui/serverchart.js +1837 -0
  1750. data/third_party/closure-library/closure/goog/ui/serverchart_test.html +638 -0
  1751. data/third_party/closure-library/closure/goog/ui/slider.js +126 -0
  1752. data/third_party/closure-library/closure/goog/ui/sliderbase.js +1592 -0
  1753. data/third_party/closure-library/closure/goog/ui/sliderbase_test.html +897 -0
  1754. data/third_party/closure-library/closure/goog/ui/splitbehavior.js +340 -0
  1755. data/third_party/closure-library/closure/goog/ui/splitbehavior_test.html +161 -0
  1756. data/third_party/closure-library/closure/goog/ui/splitpane.js +898 -0
  1757. data/third_party/closure-library/closure/goog/ui/splitpane_test.html +229 -0
  1758. data/third_party/closure-library/closure/goog/ui/style/app/buttonrenderer.js +201 -0
  1759. data/third_party/closure-library/closure/goog/ui/style/app/buttonrenderer_test.html +155 -0
  1760. data/third_party/closure-library/closure/goog/ui/style/app/menubuttonrenderer.js +233 -0
  1761. data/third_party/closure-library/closure/goog/ui/style/app/menubuttonrenderer_test.html +167 -0
  1762. data/third_party/closure-library/closure/goog/ui/style/app/primaryactionbuttonrenderer.js +88 -0
  1763. data/third_party/closure-library/closure/goog/ui/style/app/primaryactionbuttonrenderer_test.html +76 -0
  1764. data/third_party/closure-library/closure/goog/ui/submenu.js +667 -0
  1765. data/third_party/closure-library/closure/goog/ui/submenu_test.html +563 -0
  1766. data/third_party/closure-library/closure/goog/ui/submenurenderer.js +233 -0
  1767. data/third_party/closure-library/closure/goog/ui/tab.js +102 -0
  1768. data/third_party/closure-library/closure/goog/ui/tab_test.html +62 -0
  1769. data/third_party/closure-library/closure/goog/ui/tabbar.js +394 -0
  1770. data/third_party/closure-library/closure/goog/ui/tabbar_test.html +612 -0
  1771. data/third_party/closure-library/closure/goog/ui/tabbarrenderer.js +175 -0
  1772. data/third_party/closure-library/closure/goog/ui/tabbarrenderer_test.html +138 -0
  1773. data/third_party/closure-library/closure/goog/ui/tablesorter.js +325 -0
  1774. data/third_party/closure-library/closure/goog/ui/tablesorter_test.html +197 -0
  1775. data/third_party/closure-library/closure/goog/ui/tabpane.js +675 -0
  1776. data/third_party/closure-library/closure/goog/ui/tabpane_test.html +107 -0
  1777. data/third_party/closure-library/closure/goog/ui/tabrenderer.js +153 -0
  1778. data/third_party/closure-library/closure/goog/ui/tabrenderer_test.html +135 -0
  1779. data/third_party/closure-library/closure/goog/ui/textarea.js +577 -0
  1780. data/third_party/closure-library/closure/goog/ui/textarea_test.html +314 -0
  1781. data/third_party/closure-library/closure/goog/ui/textarearenderer.js +169 -0
  1782. data/third_party/closure-library/closure/goog/ui/togglebutton.js +58 -0
  1783. data/third_party/closure-library/closure/goog/ui/toolbar.js +46 -0
  1784. data/third_party/closure-library/closure/goog/ui/toolbarbutton.js +55 -0
  1785. data/third_party/closure-library/closure/goog/ui/toolbarbuttonrenderer.js +57 -0
  1786. data/third_party/closure-library/closure/goog/ui/toolbarcolormenubutton.js +58 -0
  1787. data/third_party/closure-library/closure/goog/ui/toolbarcolormenubuttonrenderer.js +98 -0
  1788. data/third_party/closure-library/closure/goog/ui/toolbarcolormenubuttonrenderer_test.html +66 -0
  1789. data/third_party/closure-library/closure/goog/ui/toolbarmenubutton.js +57 -0
  1790. data/third_party/closure-library/closure/goog/ui/toolbarmenubuttonrenderer.js +57 -0
  1791. data/third_party/closure-library/closure/goog/ui/toolbarrenderer.js +99 -0
  1792. data/third_party/closure-library/closure/goog/ui/toolbarselect.js +56 -0
  1793. data/third_party/closure-library/closure/goog/ui/toolbarseparator.js +53 -0
  1794. data/third_party/closure-library/closure/goog/ui/toolbarseparatorrenderer.js +91 -0
  1795. data/third_party/closure-library/closure/goog/ui/toolbartogglebutton.js +54 -0
  1796. data/third_party/closure-library/closure/goog/ui/tooltip.js +999 -0
  1797. data/third_party/closure-library/closure/goog/ui/tooltip_test.html +380 -0
  1798. data/third_party/closure-library/closure/goog/ui/tree/basenode.js +1458 -0
  1799. data/third_party/closure-library/closure/goog/ui/tree/basenode_test.html +232 -0
  1800. data/third_party/closure-library/closure/goog/ui/tree/treecontrol.js +663 -0
  1801. data/third_party/closure-library/closure/goog/ui/tree/treecontrol_test.html +113 -0
  1802. data/third_party/closure-library/closure/goog/ui/tree/treenode.js +107 -0
  1803. data/third_party/closure-library/closure/goog/ui/tree/typeahead.js +332 -0
  1804. data/third_party/closure-library/closure/goog/ui/tree/typeahead_test.html +133 -0
  1805. data/third_party/closure-library/closure/goog/ui/tristatemenuitem.js +184 -0
  1806. data/third_party/closure-library/closure/goog/ui/tristatemenuitemrenderer.js +84 -0
  1807. data/third_party/closure-library/closure/goog/ui/twothumbslider.js +157 -0
  1808. data/third_party/closure-library/closure/goog/ui/twothumbslider_test.html +39 -0
  1809. data/third_party/closure-library/closure/goog/ui/zippy.js +445 -0
  1810. data/third_party/closure-library/closure/goog/ui/zippy_test.html +315 -0
  1811. data/third_party/closure-library/closure/goog/uri/uri.js +1502 -0
  1812. data/third_party/closure-library/closure/goog/uri/uri_test.html +21 -0
  1813. data/third_party/closure-library/closure/goog/uri/uri_test.js +1048 -0
  1814. data/third_party/closure-library/closure/goog/uri/utils.js +1053 -0
  1815. data/third_party/closure-library/closure/goog/uri/utils_test.html +562 -0
  1816. data/third_party/closure-library/closure/goog/useragent/adobereader.js +90 -0
  1817. data/third_party/closure-library/closure/goog/useragent/adobereader_test.html +34 -0
  1818. data/third_party/closure-library/closure/goog/useragent/flash.js +153 -0
  1819. data/third_party/closure-library/closure/goog/useragent/flash_test.html +34 -0
  1820. data/third_party/closure-library/closure/goog/useragent/iphoto.js +87 -0
  1821. data/third_party/closure-library/closure/goog/useragent/jscript.js +95 -0
  1822. data/third_party/closure-library/closure/goog/useragent/jscript_test.html +65 -0
  1823. data/third_party/closure-library/closure/goog/useragent/picasa.js +112 -0
  1824. data/third_party/closure-library/closure/goog/useragent/platform.js +82 -0
  1825. data/third_party/closure-library/closure/goog/useragent/platform_test.html +182 -0
  1826. data/third_party/closure-library/closure/goog/useragent/product.js +253 -0
  1827. data/third_party/closure-library/closure/goog/useragent/product_isversion.js +140 -0
  1828. data/third_party/closure-library/closure/goog/useragent/product_test.html +380 -0
  1829. data/third_party/closure-library/closure/goog/useragent/useragent.js +599 -0
  1830. data/third_party/closure-library/closure/goog/useragent/useragent_quirks_test.html +27 -0
  1831. data/third_party/closure-library/closure/goog/useragent/useragent_test.html +300 -0
  1832. data/third_party/closure-library/closure/goog/vec/float32array.js +110 -0
  1833. data/third_party/closure-library/closure/goog/vec/float32array_test.html +69 -0
  1834. data/third_party/closure-library/closure/goog/vec/float64array.js +117 -0
  1835. data/third_party/closure-library/closure/goog/vec/float64array_test.html +69 -0
  1836. data/third_party/closure-library/closure/goog/vec/mat3.js +1211 -0
  1837. data/third_party/closure-library/closure/goog/vec/mat3_test.html +465 -0
  1838. data/third_party/closure-library/closure/goog/vec/mat3d.js +1039 -0
  1839. data/third_party/closure-library/closure/goog/vec/mat3d_test.html +432 -0
  1840. data/third_party/closure-library/closure/goog/vec/mat3f.js +1039 -0
  1841. data/third_party/closure-library/closure/goog/vec/mat3f_test.html +432 -0
  1842. data/third_party/closure-library/closure/goog/vec/mat4.js +1822 -0
  1843. data/third_party/closure-library/closure/goog/vec/mat4_test.html +781 -0
  1844. data/third_party/closure-library/closure/goog/vec/mat4d.js +1769 -0
  1845. data/third_party/closure-library/closure/goog/vec/mat4d_test.html +738 -0
  1846. data/third_party/closure-library/closure/goog/vec/mat4f.js +1769 -0
  1847. data/third_party/closure-library/closure/goog/vec/mat4f_test.html +738 -0
  1848. data/third_party/closure-library/closure/goog/vec/matrix3.js +720 -0
  1849. data/third_party/closure-library/closure/goog/vec/matrix3_test.html +301 -0
  1850. data/third_party/closure-library/closure/goog/vec/matrix4.js +1405 -0
  1851. data/third_party/closure-library/closure/goog/vec/matrix4_test.html +626 -0
  1852. data/third_party/closure-library/closure/goog/vec/quaternion.js +458 -0
  1853. data/third_party/closure-library/closure/goog/vec/quaternion_test.html +195 -0
  1854. data/third_party/closure-library/closure/goog/vec/ray.js +94 -0
  1855. data/third_party/closure-library/closure/goog/vec/ray_test.html +66 -0
  1856. data/third_party/closure-library/closure/goog/vec/vec.js +73 -0
  1857. data/third_party/closure-library/closure/goog/vec/vec2.js +376 -0
  1858. data/third_party/closure-library/closure/goog/vec/vec2_test.html +216 -0
  1859. data/third_party/closure-library/closure/goog/vec/vec2d.js +325 -0
  1860. data/third_party/closure-library/closure/goog/vec/vec2d_test.html +208 -0
  1861. data/third_party/closure-library/closure/goog/vec/vec2f.js +325 -0
  1862. data/third_party/closure-library/closure/goog/vec/vec2f_test.html +208 -0
  1863. data/third_party/closure-library/closure/goog/vec/vec3.js +474 -0
  1864. data/third_party/closure-library/closure/goog/vec/vec3_test.html +258 -0
  1865. data/third_party/closure-library/closure/goog/vec/vec3d.js +358 -0
  1866. data/third_party/closure-library/closure/goog/vec/vec3d_test.html +232 -0
  1867. data/third_party/closure-library/closure/goog/vec/vec3f.js +358 -0
  1868. data/third_party/closure-library/closure/goog/vec/vec3f_test.html +232 -0
  1869. data/third_party/closure-library/closure/goog/vec/vec4.js +406 -0
  1870. data/third_party/closure-library/closure/goog/vec/vec4_test.html +192 -0
  1871. data/third_party/closure-library/closure/goog/vec/vec4d.js +293 -0
  1872. data/third_party/closure-library/closure/goog/vec/vec4d_test.html +168 -0
  1873. data/third_party/closure-library/closure/goog/vec/vec4f.js +293 -0
  1874. data/third_party/closure-library/closure/goog/vec/vec4f_test.html +168 -0
  1875. data/third_party/closure-library/closure/goog/vec/vec_array_perf.html +443 -0
  1876. data/third_party/closure-library/closure/goog/vec/vec_perf.html +101 -0
  1877. data/third_party/closure-library/closure/goog/webgl/webgl.js +2194 -0
  1878. data/third_party/closure-library/closure/goog/window/window.js +225 -0
  1879. data/third_party/closure-library/closure/goog/window/window_test.html +239 -0
  1880. data/third_party/closure-library/closure/known_issues/testdata/closure_library_warnings.txt +47 -0
  1881. data/third_party/closure-library/third_party/closure/goog/base.js +2 -0
  1882. data/third_party/closure-library/third_party/closure/goog/caja/string/html/htmlparser.js +611 -0
  1883. data/third_party/closure-library/third_party/closure/goog/caja/string/html/htmlsanitizer.js +605 -0
  1884. data/third_party/closure-library/third_party/closure/goog/deps.js +20 -0
  1885. data/third_party/closure-library/third_party/closure/goog/dojo/dom/query.js +1543 -0
  1886. data/third_party/closure-library/third_party/closure/goog/dojo/dom/query_compiled_test.html +65 -0
  1887. data/third_party/closure-library/third_party/closure/goog/dojo/dom/query_test.html +64 -0
  1888. data/third_party/closure-library/third_party/closure/goog/dojo/dom/query_test.js +158 -0
  1889. data/third_party/closure-library/third_party/closure/goog/jpeg_encoder/jpeg_encoder_basic.js +751 -0
  1890. data/third_party/closure-library/third_party/closure/goog/loremipsum/text/loremipsum.js +712 -0
  1891. data/third_party/closure-library/third_party/closure/goog/loremipsum/text/loremipsum_test.html +60 -0
  1892. data/third_party/closure-library/third_party/closure/goog/mochikit/async/deferred.js +764 -0
  1893. data/third_party/closure-library/third_party/closure/goog/mochikit/async/deferred_async_test.html +144 -0
  1894. data/third_party/closure-library/third_party/closure/goog/mochikit/async/deferred_test.html +877 -0
  1895. data/third_party/closure-library/third_party/closure/goog/mochikit/async/deferredlist.js +205 -0
  1896. data/third_party/closure-library/third_party/closure/goog/mochikit/async/deferredlist_test.html +504 -0
  1897. data/third_party/closure-library/third_party/closure/goog/osapi/osapi.js +95 -0
  1898. metadata +2054 -0
@@ -0,0 +1,2602 @@
1
+ // Copyright 2011 The Closure Library Authors. All Rights Reserved.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS-IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ /**
16
+ * @fileoverview Shared unit tests for styles.
17
+ */
18
+
19
+ /** @suppress {extraProvide} */
20
+ goog.provide('goog.style_test');
21
+
22
+ goog.require('goog.array');
23
+ goog.require('goog.color');
24
+ goog.require('goog.dom');
25
+ goog.require('goog.events.BrowserEvent');
26
+ goog.require('goog.math.Box');
27
+ goog.require('goog.math.Coordinate');
28
+ goog.require('goog.math.Rect');
29
+ goog.require('goog.math.Size');
30
+ goog.require('goog.object');
31
+ goog.require('goog.string');
32
+ goog.require('goog.style');
33
+ goog.require('goog.testing.ExpectedFailures');
34
+ goog.require('goog.testing.PropertyReplacer');
35
+ goog.require('goog.testing.asserts');
36
+ goog.require('goog.testing.jsunit');
37
+ goog.require('goog.userAgent');
38
+ goog.require('goog.userAgent.product');
39
+ goog.require('goog.userAgent.product.isVersion');
40
+ goog.setTestOnly('goog.style_test');
41
+
42
+ // IE before version 6 will always be border box in compat mode.
43
+ var isBorderBox = goog.dom.isCss1CompatMode() ?
44
+ (goog.userAgent.IE && !goog.userAgent.isVersionOrHigher('6')) :
45
+ true;
46
+ var EPSILON = 2;
47
+ var expectedFailures = new goog.testing.ExpectedFailures();
48
+ var $ = goog.dom.getElement;
49
+ var propertyReplacer = new goog.testing.PropertyReplacer();
50
+ var UserAgents = {
51
+ GECKO: 'GECKO',
52
+ IE: 'IE',
53
+ OPERA: 'OPERA',
54
+ WEBKIT: 'WEBKIT'
55
+ };
56
+
57
+
58
+ function setUpPage() {
59
+ var viewportSize = goog.dom.getViewportSize();
60
+ // When the window is too short or not wide enough, some tests, especially
61
+ // those for off-screen elements, fail. Oddly, the most reliable
62
+ // indicator is a width of zero (which is of course erroneous), since
63
+ // height sometimes includes a scroll bar. We can make no assumptions on
64
+ // window size on the Selenium farm.
65
+ if (goog.userAgent.IE && viewportSize.width < 300) {
66
+ // Move to origin, since IE won't resize outside the screen.
67
+ window.moveTo(0, 0);
68
+ window.resizeTo(640, 480);
69
+ }
70
+ }
71
+
72
+ function setUp() {
73
+ window.scrollTo(0, 0);
74
+ }
75
+
76
+ function tearDown() {
77
+ expectedFailures.handleTearDown();
78
+ var testVisibleDiv2 = goog.dom.getElement('test-visible2');
79
+ testVisibleDiv2.setAttribute('style', '');
80
+ testVisibleDiv2.innerHTML = '';
81
+ var testViewport = goog.dom.getElement('test-viewport');
82
+ testViewport.setAttribute('style', '');
83
+ testViewport.innerHTML = '';
84
+ propertyReplacer.reset();
85
+ reinitializeUserAgent();
86
+ }
87
+
88
+ function testSetStyle() {
89
+ var el = $('span1');
90
+ goog.style.setStyle(el, 'textDecoration', 'underline');
91
+ assertEquals('Should be underline', 'underline', el.style.textDecoration);
92
+ }
93
+
94
+ function testSetStyleMap() {
95
+ var el = $('span6');
96
+
97
+ var styles = {
98
+ 'background-color': 'blue',
99
+ 'font-size': '100px',
100
+ textAlign: 'center'
101
+ };
102
+
103
+ goog.style.setStyle(el, styles);
104
+
105
+ var answers = {
106
+ backgroundColor: 'blue',
107
+ fontSize: '100px',
108
+ textAlign: 'center'
109
+ };
110
+
111
+ goog.object.forEach(answers, function(value, style) {
112
+ assertEquals('Should be ' + value, value, el.style[style]);
113
+ });
114
+ }
115
+
116
+ function testSetStyleWithNonCamelizedString() {
117
+ var el = $('span5');
118
+ goog.style.setStyle(el, 'text-decoration', 'underline');
119
+ assertEquals('Should be underline', 'underline', el.style.textDecoration);
120
+ }
121
+
122
+ function testGetStyle() {
123
+ var el = goog.dom.getElement('styleTest3');
124
+ goog.style.setStyle(el, 'width', '80px');
125
+ goog.style.setStyle(el, 'textDecoration', 'underline');
126
+
127
+ assertEquals('80px', goog.style.getStyle(el, 'width'));
128
+ assertEquals('underline', goog.style.getStyle(el, 'textDecoration'));
129
+ assertEquals('underline', goog.style.getStyle(el, 'text-decoration'));
130
+ // Non set properties are always empty strings.
131
+ assertEquals('', goog.style.getStyle(el, 'border'));
132
+ }
133
+
134
+ function testGetStyleMsFilter() {
135
+ // Element with -ms-filter style set.
136
+ var e = goog.dom.getElement('msFilter');
137
+
138
+ if (goog.userAgent.IE && goog.userAgent.isDocumentModeOrHigher(8)) {
139
+ // Only IE8 supports -ms-filter and returns it as value for the "filter"
140
+ // property. When in compatibility mode, -ms-filter is not supported
141
+ // and IE8 behaves as IE7 so the other case will apply.
142
+ assertEquals('alpha(opacity=0)', goog.style.getStyle(e, 'filter'));
143
+ } else {
144
+ // Any other browser does not support ms-filter so it returns empty string.
145
+ assertEquals('', goog.style.getStyle(e, 'filter'));
146
+ }
147
+ }
148
+
149
+ function testGetStyleFilter() {
150
+ // Element with filter style set.
151
+ var e = goog.dom.getElement('filter');
152
+
153
+ if (goog.userAgent.IE) {
154
+ // Filter supported.
155
+ assertEquals('alpha(opacity=0)', goog.style.getStyle(e, 'filter'));
156
+ } else {
157
+ assertEquals('', goog.style.getStyle(e, 'filter'));
158
+ }
159
+ }
160
+
161
+ function testGetComputedStyleMsFilter() {
162
+ // Element with -ms-filter style set.
163
+ var e = goog.dom.getElement('msFilter');
164
+
165
+ if (goog.userAgent.IE) {
166
+ // IE always returns empty string for computed styles.
167
+ assertEquals('', goog.style.getComputedStyle(e, 'filter'));
168
+ } else {
169
+ // Non IE returns 'none' for filter as it is an SVG property
170
+ assertEquals('none', goog.style.getComputedStyle(e, 'filter'));
171
+ }
172
+ }
173
+
174
+ function testGetComputedStyleFilter() {
175
+ // Element with filter style set.
176
+ var e = goog.dom.getElement('filter');
177
+
178
+ if (goog.userAgent.IE) {
179
+ // IE always returns empty string for computed styles.
180
+ assertEquals('', goog.style.getComputedStyle(e, 'filter'));
181
+ } else {
182
+ // Non IE returns 'none' for filter as it is an SVG property
183
+ assertEquals('none', goog.style.getComputedStyle(e, 'filter'));
184
+ }
185
+ }
186
+
187
+ function testGetComputedPosition() {
188
+ assertEquals('position not set', 'static',
189
+ goog.style.getComputedPosition($('position-unset')));
190
+ assertEquals('position:relative in style attribute', 'relative',
191
+ goog.style.getComputedPosition($('style-position-relative')));
192
+ if (goog.userAgent.IE && !goog.dom.isCss1CompatMode()) {
193
+ assertEquals('position:fixed in style attribute', 'static',
194
+ goog.style.getComputedPosition($('style-position-fixed')));
195
+ } else {
196
+ assertEquals('position:fixed in style attribute', 'fixed',
197
+ goog.style.getComputedPosition($('style-position-fixed')));
198
+ }
199
+ assertEquals('position:absolute in css', 'absolute',
200
+ goog.style.getComputedPosition($('css-position-absolute')));
201
+ }
202
+
203
+ function testGetComputedOverflowXAndY() {
204
+ assertEquals('overflow-x:scroll in style attribute', 'scroll',
205
+ goog.style.getComputedOverflowX($('style-overflow-scroll')));
206
+ assertEquals('overflow-y:scroll in style attribute', 'scroll',
207
+ goog.style.getComputedOverflowY($('style-overflow-scroll')));
208
+ assertEquals('overflow-x:hidden in css', 'hidden',
209
+ goog.style.getComputedOverflowX($('css-overflow-hidden')));
210
+ assertEquals('overflow-y:hidden in css', 'hidden',
211
+ goog.style.getComputedOverflowY($('css-overflow-hidden')));
212
+ }
213
+
214
+ function testGetComputedZIndex() {
215
+ assertEquals('z-index:200 in style attribute', '200',
216
+ '' + goog.style.getComputedZIndex($('style-z-index-200')));
217
+ assertEquals('z-index:200 in css', '200',
218
+ '' + goog.style.getComputedZIndex($('css-z-index-200')));
219
+ }
220
+
221
+ function testGetComputedTextAlign() {
222
+ assertEquals('text-align:right in style attribute', 'right',
223
+ goog.style.getComputedTextAlign($('style-text-align-right')));
224
+ assertEquals(
225
+ 'text-align:right inherited from parent', 'right',
226
+ goog.style.getComputedTextAlign($('style-text-align-right-inner')));
227
+ assertEquals('text-align:center in css', 'center',
228
+ goog.style.getComputedTextAlign($('css-text-align-center')));
229
+ }
230
+
231
+ function testGetComputedCursor() {
232
+ assertEquals('cursor:move in style attribute', 'move',
233
+ goog.style.getComputedCursor($('style-cursor-move')));
234
+ assertEquals('cursor:move inherited from parent', 'move',
235
+ goog.style.getComputedCursor($('style-cursor-move-inner')));
236
+ assertEquals('cursor:poiner in css', 'pointer',
237
+ goog.style.getComputedCursor($('css-cursor-pointer')));
238
+ }
239
+
240
+ function testGetBackgroundColor() {
241
+ var dest = $('bgcolorDest');
242
+
243
+ for (var i = 0; $('bgcolorTest' + i); i++) {
244
+ var src = $('bgcolorTest' + i);
245
+ var bgColor = goog.style.getBackgroundColor(src);
246
+
247
+ dest.style.backgroundColor = bgColor;
248
+ assertEquals('Background colors should be equal',
249
+ goog.style.getBackgroundColor(src),
250
+ goog.style.getBackgroundColor(dest));
251
+
252
+ try {
253
+ // goog.color.parse throws a generic exception if handed input it
254
+ // doesn't understand.
255
+ var c = goog.color.parse(bgColor);
256
+ assertEquals('rgb(255,0,0)', goog.color.hexToRgbStyle(c.hex));
257
+ } catch (e) {
258
+ // Internet Explorer is unable to parse colors correctly after test 4.
259
+ // Other browsers may vary, but all should be able to handle straight
260
+ // hex input.
261
+ assertFalse('Should be able to parse color "' + bgColor + '"', i < 5);
262
+ }
263
+ }
264
+ }
265
+
266
+ function testSetPosition() {
267
+ var el = $('testEl');
268
+
269
+ goog.style.setPosition(el, 100, 100);
270
+ assertEquals('100px', el.style.left);
271
+ assertEquals('100px', el.style.top);
272
+
273
+ goog.style.setPosition(el, '50px', '25px');
274
+ assertEquals('50px', el.style.left);
275
+ assertEquals('25px', el.style.top);
276
+
277
+ goog.style.setPosition(el, '10ex', '25px');
278
+ assertEquals('10ex', el.style.left);
279
+ assertEquals('25px', el.style.top);
280
+
281
+ goog.style.setPosition(el, '10%', '25%');
282
+ assertEquals('10%', el.style.left);
283
+ assertEquals('25%', el.style.top);
284
+
285
+ // ignores stupid units
286
+ goog.style.setPosition(el, 0, 0);
287
+ // TODO(user): IE errors if you set these values. Should we make setStyle
288
+ // catch these? Or leave it up to the app. Fixing the tests for now.
289
+ //goog.style.setPosition(el, '10rainbows', '25rainbows');
290
+ assertEquals('0px', el.style.left);
291
+ assertEquals('0px', el.style.top);
292
+
293
+
294
+ goog.style.setPosition(el, new goog.math.Coordinate(20, 40));
295
+ assertEquals('20px', el.style.left);
296
+ assertEquals('40px', el.style.top);
297
+ }
298
+
299
+ function testGetClientPositionAbsPositionElement() {
300
+ var div = goog.dom.createDom('DIV');
301
+ div.style.position = 'absolute';
302
+ div.style.left = '100px';
303
+ div.style.top = '200px';
304
+ document.body.appendChild(div);
305
+ var pos = goog.style.getClientPosition(div);
306
+ assertEquals(100, pos.x);
307
+ assertEquals(200, pos.y);
308
+ }
309
+
310
+ function testGetClientPositionNestedElements() {
311
+ var innerDiv = goog.dom.createDom('DIV');
312
+ innerDiv.style.position = 'relative';
313
+ innerDiv.style.left = '-10px';
314
+ innerDiv.style.top = '-10px';
315
+ var div = goog.dom.createDom('DIV');
316
+ div.style.position = 'absolute';
317
+ div.style.left = '150px';
318
+ div.style.top = '250px';
319
+ div.appendChild(innerDiv);
320
+ document.body.appendChild(div);
321
+ var pos = goog.style.getClientPosition(innerDiv);
322
+ assertEquals(140, pos.x);
323
+ assertEquals(240, pos.y);
324
+ }
325
+
326
+ function testGetClientPositionOfOffscreenElement() {
327
+ var div = goog.dom.createDom('DIV');
328
+ div.style.position = 'absolute';
329
+ div.style.left = '2000px';
330
+ div.style.top = '2000px';
331
+ div.style.width = '10px';
332
+ div.style.height = '10px';
333
+ document.body.appendChild(div);
334
+
335
+ try {
336
+ window.scroll(0, 0);
337
+ var pos = goog.style.getClientPosition(div);
338
+ assertEquals(2000, pos.x);
339
+ assertEquals(2000, pos.y);
340
+
341
+ // The following tests do not work in Gecko 1.8 and below, due to an
342
+ // obscure off-by-one bug in goog.style.getPageOffset. Same for IE.
343
+ if (!goog.userAgent.IE &&
344
+ !(goog.userAgent.GECKO && !goog.userAgent.isVersionOrHigher('1.9'))) {
345
+ window.scroll(1, 1);
346
+ var pos = goog.style.getClientPosition(div);
347
+ assertEquals(1999, pos.x);
348
+ assertRoughlyEquals(1999, pos.y, 0.5);
349
+
350
+ window.scroll(2, 2);
351
+ pos = goog.style.getClientPosition(div);
352
+ assertEquals(1998, pos.x);
353
+ assertRoughlyEquals(1998, pos.y, 0.5);
354
+
355
+ window.scroll(100, 100);
356
+ pos = goog.style.getClientPosition(div);
357
+ assertEquals(1900, pos.x);
358
+ assertRoughlyEquals(1900, pos.y, 0.5);
359
+ }
360
+ }
361
+ finally {
362
+ window.scroll(0, 0);
363
+ document.body.removeChild(div);
364
+ }
365
+ }
366
+
367
+ function testGetClientPositionOfOrphanElement() {
368
+ var orphanElem = document.createElement('DIV');
369
+ var pos = goog.style.getClientPosition(orphanElem);
370
+ assertEquals(0, pos.x);
371
+ assertEquals(0, pos.y);
372
+ }
373
+
374
+ function testGetClientPositionEvent() {
375
+ var mockEvent = {};
376
+ mockEvent.clientX = 100;
377
+ mockEvent.clientY = 200;
378
+ var pos = goog.style.getClientPosition(mockEvent);
379
+ assertEquals(100, pos.x);
380
+ assertEquals(200, pos.y);
381
+ }
382
+
383
+ function testGetClientPositionTouchEvent() {
384
+ var mockTouchEvent = {};
385
+
386
+ mockTouchEvent.targetTouches = [{}];
387
+ mockTouchEvent.targetTouches[0].clientX = 100;
388
+ mockTouchEvent.targetTouches[0].clientY = 200;
389
+
390
+ mockTouchEvent.touches = [{}];
391
+ mockTouchEvent.touches[0].clientX = 100;
392
+ mockTouchEvent.touches[0].clientY = 200;
393
+
394
+ var pos = goog.style.getClientPosition(mockTouchEvent);
395
+ assertEquals(100, pos.x);
396
+ assertEquals(200, pos.y);
397
+ }
398
+
399
+ function testGetClientPositionAbstractedTouchEvent() {
400
+ var e = new goog.events.BrowserEvent();
401
+ e.event_ = {};
402
+ e.event_.touches = [{}];
403
+ e.event_.touches[0].clientX = 100;
404
+ e.event_.touches[0].clientY = 200;
405
+ e.event_.targetTouches = [{}];
406
+ e.event_.targetTouches[0].clientX = 100;
407
+ e.event_.targetTouches[0].clientY = 200;
408
+ var pos = goog.style.getClientPosition(e);
409
+ assertEquals(100, pos.x);
410
+ assertEquals(200, pos.y);
411
+ }
412
+
413
+ function testGetPageOffsetAbsPositionedElement() {
414
+ var div = goog.dom.createDom('DIV');
415
+ div.style.position = 'absolute';
416
+ div.style.left = '100px';
417
+ div.style.top = '200px';
418
+ document.body.appendChild(div);
419
+ var pos = goog.style.getPageOffset(div);
420
+ assertEquals(100, pos.x);
421
+ assertEquals(200, pos.y);
422
+ }
423
+
424
+ function testGetPageOffsetNestedElements() {
425
+ var innerDiv = goog.dom.createDom('DIV');
426
+ innerDiv.style.position = 'relative';
427
+ innerDiv.style.left = '-10px';
428
+ innerDiv.style.top = '-10px';
429
+ var div = goog.dom.createDom('DIV');
430
+ div.style.position = 'absolute';
431
+ div.style.left = '150px';
432
+ div.style.top = '250px';
433
+ div.appendChild(innerDiv);
434
+ document.body.appendChild(div);
435
+ var pos = goog.style.getPageOffset(innerDiv);
436
+ assertRoughlyEquals(140, pos.x, 0.1);
437
+ assertRoughlyEquals(240, pos.y, 0.1);
438
+ }
439
+
440
+ function testGetPageOffsetWithBodyPadding() {
441
+ document.body.style.margin = '40px';
442
+ document.body.style.padding = '60px';
443
+ document.body.style.borderWidth = '70px';
444
+ try {
445
+ var div = goog.dom.createDom('DIV');
446
+ div.style.position = 'absolute';
447
+ div.style.left = '100px';
448
+ div.style.top = '200px';
449
+ // Margin will affect position, but padding and borders should not.
450
+ div.style.margin = '1px';
451
+ div.style.padding = '2px';
452
+ div.style.borderWidth = '3px';
453
+ document.body.appendChild(div);
454
+ var pos = goog.style.getPageOffset(div);
455
+ assertRoughlyEquals(101, pos.x, 0.1);
456
+ assertRoughlyEquals(201, pos.y, 0.1);
457
+ }
458
+ finally {
459
+ document.body.removeChild(div);
460
+ document.body.style.margin = '';
461
+ document.body.style.padding = '';
462
+ document.body.style.borderWidth = '';
463
+ }
464
+ }
465
+
466
+ function testGetPageOffsetWithDocumentElementPadding() {
467
+ document.documentElement.style.margin = '40px';
468
+ document.documentElement.style.padding = '60px';
469
+ document.documentElement.style.borderWidth = '70px';
470
+ try {
471
+ var div = goog.dom.createDom('DIV');
472
+ div.style.position = 'absolute';
473
+ div.style.left = '100px';
474
+ div.style.top = '200px';
475
+ // Margin will affect position, but padding and borders should not.
476
+ div.style.margin = '1px';
477
+ div.style.padding = '2px';
478
+ div.style.borderWidth = '3px';
479
+ document.body.appendChild(div);
480
+ var pos = goog.style.getPageOffset(div);
481
+ // FF3 (but not beyond) gets confused by document margins.
482
+ if (goog.userAgent.GECKO && goog.userAgent.isVersionOrHigher('1.9') &&
483
+ !goog.userAgent.isVersionOrHigher('1.9.1')) {
484
+ assertEquals(141, pos.x);
485
+ assertEquals(241, pos.y);
486
+ } else {
487
+ assertRoughlyEquals(101, pos.x, 0.1);
488
+ assertRoughlyEquals(201, pos.y, 0.1);
489
+ }
490
+ }
491
+ finally {
492
+ document.body.removeChild(div);
493
+ document.documentElement.style.margin = '';
494
+ document.documentElement.style.padding = '';
495
+ document.documentElement.style.borderWidth = '';
496
+ }
497
+ }
498
+
499
+ function testGetPageOffsetElementOffscreen() {
500
+ var div = goog.dom.createDom('DIV');
501
+ div.style.position = 'absolute';
502
+ div.style.left = '10000px';
503
+ div.style.top = '20000px';
504
+ document.body.appendChild(div);
505
+ window.scroll(0, 0);
506
+ try {
507
+ var pos = goog.style.getPageOffset(div);
508
+ assertEquals(10000, pos.x);
509
+ assertEquals(20000, pos.y);
510
+
511
+ // The following tests do not work in Gecko 1.8 and below, due to an
512
+ // obscure off-by-one bug in goog.style.getPageOffset. Same for IE.
513
+ if (!(goog.userAgent.IE) &&
514
+ !(goog.userAgent.GECKO && !goog.userAgent.isVersionOrHigher('1.9'))) {
515
+ window.scroll(1, 1);
516
+ pos = goog.style.getPageOffset(div);
517
+ assertEquals(10000, pos.x);
518
+ assertRoughlyEquals(20000, pos.y, 0.5);
519
+
520
+ window.scroll(1000, 2000);
521
+ pos = goog.style.getPageOffset(div);
522
+ assertEquals(10000, pos.x);
523
+ assertRoughlyEquals(20000, pos.y, 1);
524
+
525
+ window.scroll(10000, 20000);
526
+ pos = goog.style.getPageOffset(div);
527
+ assertEquals(10000, pos.x);
528
+ assertRoughlyEquals(20000, pos.y, 1);
529
+ }
530
+ }
531
+ // Undo changes.
532
+ finally {
533
+ document.body.removeChild(div);
534
+ window.scroll(0, 0);
535
+ }
536
+ }
537
+
538
+ function testGetPageOffsetFixedPositionElements() {
539
+ // Skip these tests in certain browsers.
540
+ // position:fixed is not supported in IE before version 7
541
+ if (!goog.userAgent.IE || !goog.userAgent.isVersionOrHigher('6')) {
542
+ // Test with a position fixed element
543
+ var div = goog.dom.createDom('DIV');
544
+ div.style.position = 'fixed';
545
+ div.style.top = '10px';
546
+ div.style.left = '10px';
547
+ document.body.appendChild(div);
548
+ var pos = goog.style.getPageOffset(div);
549
+ assertEquals(10, pos.x);
550
+ assertEquals(10, pos.y);
551
+
552
+ // Test with a position fixed element as parent
553
+ var innerDiv = goog.dom.createDom('DIV');
554
+ div = goog.dom.createDom('DIV');
555
+ div.style.position = 'fixed';
556
+ div.style.top = '10px';
557
+ div.style.left = '10px';
558
+ div.style.padding = '5px';
559
+ div.appendChild(innerDiv);
560
+ document.body.appendChild(div);
561
+ pos = goog.style.getPageOffset(innerDiv);
562
+ assertEquals(15, pos.x);
563
+ assertEquals(15, pos.y);
564
+ }
565
+ }
566
+
567
+ function testGetPositionTolerantToNoDocumentElementBorder() {
568
+ // In IE, removing the border on the document element undoes the normal
569
+ // 2-pixel offset. Ensure that we're correctly compensating for both cases.
570
+ try {
571
+ document.documentElement.style.borderWidth = '0';
572
+ var div = goog.dom.createDom('DIV');
573
+ div.style.position = 'absolute';
574
+ div.style.left = '100px';
575
+ div.style.top = '200px';
576
+ document.body.appendChild(div);
577
+
578
+ // Test all major positioning methods.
579
+ // Disabled for IE8 and below - IE8 returns dimensions multiplied by 100.
580
+ expectedFailures.expectFailureFor(
581
+ goog.userAgent.IE && !goog.userAgent.isVersionOrHigher(9));
582
+ try {
583
+ // Test all major positioning methods.
584
+ var pos = goog.style.getClientPosition(div);
585
+ assertEquals(100, pos.x);
586
+ assertRoughlyEquals(200, pos.y, .1);
587
+ var offset = goog.style.getPageOffset(div);
588
+ assertEquals(100, offset.x);
589
+ assertRoughlyEquals(200, offset.y, .1);
590
+ } catch (e) {
591
+ expectedFailures.handleException(e);
592
+ }
593
+ } finally {
594
+ document.documentElement.style.borderWidth = '';
595
+ }
596
+ }
597
+
598
+ function testSetSize() {
599
+ var el = $('testEl');
600
+
601
+ goog.style.setSize(el, 100, 100);
602
+ assertEquals('100px', el.style.width);
603
+ assertEquals('100px', el.style.height);
604
+
605
+ goog.style.setSize(el, '50px', '25px');
606
+ assertEquals('should be "50px"', '50px', el.style.width);
607
+ assertEquals('should be "25px"', '25px', el.style.height);
608
+
609
+ goog.style.setSize(el, '10ex', '25px');
610
+ assertEquals('10ex', el.style.width);
611
+ assertEquals('25px', el.style.height);
612
+
613
+ goog.style.setSize(el, '10%', '25%');
614
+ assertEquals('10%', el.style.width);
615
+ assertEquals('25%', el.style.height);
616
+
617
+ // ignores stupid units
618
+ goog.style.setSize(el, 0, 0);
619
+ // TODO(user): IE errors if you set these values. Should we make setStyle
620
+ // catch these? Or leave it up to the app. Fixing the tests for now.
621
+ //goog.style.setSize(el, '10rainbows', '25rainbows');
622
+ assertEquals('0px', el.style.width);
623
+ assertEquals('0px', el.style.height);
624
+
625
+ goog.style.setSize(el, new goog.math.Size(20, 40));
626
+ assertEquals('20px', el.style.width);
627
+ assertEquals('40px', el.style.height);
628
+ }
629
+
630
+ function testSetWidthAndHeight() {
631
+ var el = $('testEl');
632
+
633
+ // Replicate all of the setSize tests above.
634
+
635
+ goog.style.setWidth(el, 100);
636
+ goog.style.setHeight(el, 100);
637
+ assertEquals('100px', el.style.width);
638
+ assertEquals('100px', el.style.height);
639
+
640
+ goog.style.setWidth(el, '50px');
641
+ goog.style.setHeight(el, '25px');
642
+ assertEquals('should be "50px"', '50px', el.style.width);
643
+ assertEquals('should be "25px"', '25px', el.style.height);
644
+
645
+ goog.style.setWidth(el, '10ex');
646
+ goog.style.setHeight(el, '25px');
647
+ assertEquals('10ex', el.style.width);
648
+ assertEquals('25px', el.style.height);
649
+
650
+ goog.style.setWidth(el, '10%');
651
+ goog.style.setHeight(el, '25%');
652
+ assertEquals('10%', el.style.width);
653
+ assertEquals('25%', el.style.height);
654
+
655
+ goog.style.setWidth(el, 0);
656
+ goog.style.setHeight(el, 0);
657
+ assertEquals('0px', el.style.width);
658
+ assertEquals('0px', el.style.height);
659
+
660
+ goog.style.setWidth(el, 20);
661
+ goog.style.setHeight(el, 40);
662
+ assertEquals('20px', el.style.width);
663
+ assertEquals('40px', el.style.height);
664
+
665
+ // Additional tests testing each separately.
666
+ goog.style.setWidth(el, '');
667
+ goog.style.setHeight(el, '');
668
+ assertEquals('', el.style.width);
669
+ assertEquals('', el.style.height);
670
+
671
+ goog.style.setHeight(el, 20);
672
+ assertEquals('', el.style.width);
673
+ assertEquals('20px', el.style.height);
674
+
675
+ goog.style.setWidth(el, 40);
676
+ assertEquals('40px', el.style.width);
677
+ assertEquals('20px', el.style.height);
678
+ }
679
+
680
+ function testGetSize() {
681
+ var el = $('testEl');
682
+ goog.style.setSize(el, 100, 100);
683
+
684
+ var dims = goog.style.getSize(el);
685
+ assertEquals(100, dims.width);
686
+ assertEquals(100, dims.height);
687
+
688
+ goog.style.setStyle(el, 'display', 'none');
689
+ dims = goog.style.getSize(el);
690
+ assertEquals(100, dims.width);
691
+ assertEquals(100, dims.height);
692
+
693
+ el = $('testEl5');
694
+ goog.style.setSize(el, 100, 100);
695
+ dims = goog.style.getSize(el);
696
+ assertEquals(100, dims.width);
697
+ assertEquals(100, dims.height);
698
+
699
+ el = $('span0');
700
+ dims = goog.style.getSize(el);
701
+ assertNotEquals(0, dims.width);
702
+ assertNotEquals(0, dims.height);
703
+
704
+ el = $('table1');
705
+ dims = goog.style.getSize(el);
706
+ assertNotEquals(0, dims.width);
707
+ assertNotEquals(0, dims.height);
708
+
709
+ el = $('td1');
710
+ dims = goog.style.getSize(el);
711
+ assertNotEquals(0, dims.width);
712
+ assertNotEquals(0, dims.height);
713
+
714
+ el = $('li1');
715
+ dims = goog.style.getSize(el);
716
+ assertNotEquals(0, dims.width);
717
+ assertNotEquals(0, dims.height);
718
+
719
+ el = goog.dom.getElementsByTagNameAndClass('html')[0];
720
+ dims = goog.style.getSize(el);
721
+ assertNotEquals(0, dims.width);
722
+ assertNotEquals(0, dims.height);
723
+
724
+ el = goog.dom.getElementsByTagNameAndClass('body')[0];
725
+ dims = goog.style.getSize(el);
726
+ assertNotEquals(0, dims.width);
727
+ assertNotEquals(0, dims.height);
728
+ }
729
+
730
+ function testGetSizeSvgElements() {
731
+ var svgEl = document.createElementNS &&
732
+ document.createElementNS('http://www.w3.org/2000/svg', 'svg');
733
+ if (!svgEl || svgEl.getAttribute('transform') == '' ||
734
+ (goog.userAgent.WEBKIT && !goog.userAgent.isVersionOrHigher(534.8))) {
735
+ // SVG not supported, or getBoundingClientRect not supported on SVG
736
+ // elements.
737
+ return;
738
+ }
739
+
740
+ document.body.appendChild(svgEl);
741
+ var el = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
742
+ el.setAttribute('x', 10);
743
+ el.setAttribute('y', 10);
744
+ el.setAttribute('width', 32);
745
+ el.setAttribute('height', 21);
746
+ el.setAttribute('fill', '#000');
747
+
748
+ svgEl.appendChild(el);
749
+
750
+ var dims = goog.style.getSize(el);
751
+ assertEquals(32, dims.width);
752
+ assertRoughlyEquals(21, dims.height, 0.01);
753
+
754
+ dims = goog.style.getSize(svgEl);
755
+ if (goog.userAgent.WEBKIT) {
756
+ // The size of the <svg> will be the viewport size on WebKit browsers.
757
+ assertTrue(dims.width >= 32);
758
+ assertTrue(dims.height >= 21);
759
+ } else {
760
+ assertEquals(32, dims.width);
761
+ assertRoughlyEquals(21, dims.height, 0.01);
762
+ }
763
+
764
+ el.style.visibility = 'none';
765
+
766
+ dims = goog.style.getSize(el);
767
+ assertEquals(32, dims.width);
768
+ assertRoughlyEquals(21, dims.height, 0.01);
769
+
770
+ dims = goog.style.getSize(svgEl);
771
+ if (goog.userAgent.WEBKIT) {
772
+ // The size of the <svg> will be the viewport size on WebKit browsers.
773
+ assertTrue(dims.width >= 32);
774
+ assertTrue(dims.height >= 21);
775
+ } else {
776
+ assertEquals(32, dims.width);
777
+ assertRoughlyEquals(21, dims.height, 0.01);
778
+ }
779
+ }
780
+
781
+ function testGetSizeInlineBlock() {
782
+ var el = $('height-test-inner');
783
+ var dims = goog.style.getSize(el);
784
+ assertNotEquals(0, dims.height);
785
+ }
786
+
787
+ function testGetSizeTransformedRotated() {
788
+ if (!hasWebkitTransform()) return;
789
+
790
+ var el = $('rotated');
791
+ goog.style.setSize(el, 300, 200);
792
+
793
+ var noRotateDims = goog.style.getTransformedSize(el);
794
+ assertEquals(300, noRotateDims.width);
795
+ assertEquals(200, noRotateDims.height);
796
+
797
+ el.style.webkitTransform = 'rotate(180deg)';
798
+ var rotate180Dims = goog.style.getTransformedSize(el);
799
+ assertEquals(300, rotate180Dims.width);
800
+ assertEquals(200, rotate180Dims.height);
801
+
802
+ el.style.webkitTransform = 'rotate(90deg)';
803
+ var rotate90ClockwiseDims = goog.style.getTransformedSize(el);
804
+ assertEquals(200, rotate90ClockwiseDims.width);
805
+ assertEquals(300, rotate90ClockwiseDims.height);
806
+
807
+ el.style.webkitTransform = 'rotate(-90deg)';
808
+ var rotate90CounterClockwiseDims = goog.style.getTransformedSize(el);
809
+ assertEquals(200, rotate90CounterClockwiseDims.width);
810
+ assertEquals(300, rotate90CounterClockwiseDims.height);
811
+ }
812
+
813
+ function testGetSizeTransformedScaled() {
814
+ if (!hasWebkitTransform()) return;
815
+
816
+ var el = $('scaled');
817
+ goog.style.setSize(el, 300, 200);
818
+
819
+ var noScaleDims = goog.style.getTransformedSize(el);
820
+ assertEquals(300, noScaleDims.width);
821
+ assertEquals(200, noScaleDims.height);
822
+
823
+ el.style.webkitTransform = 'scale(2, 0.5)';
824
+ var scaledDims = goog.style.getTransformedSize(el);
825
+ assertEquals(600, scaledDims.width);
826
+ assertEquals(100, scaledDims.height);
827
+ }
828
+
829
+ function hasWebkitTransform() {
830
+ return 'webkitTransform' in document.body.style;
831
+ }
832
+
833
+ function testGetSizeOfOrphanElement() {
834
+ var orphanElem = document.createElement('DIV');
835
+ var size = goog.style.getSize(orphanElem);
836
+ assertEquals(0, size.width);
837
+ assertEquals(0, size.height);
838
+ }
839
+
840
+ function testGetBounds() {
841
+ var el = $('testEl');
842
+
843
+ var dims = goog.style.getSize(el);
844
+ var pos = goog.style.getPageOffset(el);
845
+
846
+ var rect = goog.style.getBounds(el);
847
+
848
+ // Relies on getSize and getPageOffset being correct.
849
+ assertEquals(dims.width, rect.width);
850
+ assertEquals(dims.height, rect.height);
851
+ assertEquals(pos.x, rect.left);
852
+ assertEquals(pos.y, rect.top);
853
+ }
854
+
855
+ function testInstallStyles() {
856
+ var el = $('installTest0');
857
+ var originalBackground = goog.style.getBackgroundColor(el);
858
+
859
+ // Uses background-color because it's easy to get the computed value
860
+ var result = goog.style.installStyles(
861
+ '#installTest0 { background-color: rgb(255, 192, 203); }');
862
+
863
+ // For some odd reason, the change in computed style does not register on
864
+ // Chrome 19 unless the style property is touched. The behavior goes
865
+ // away again in Chrome 20.
866
+ // TODO(nnaze): Remove special caseing once we switch the testing image
867
+ // to Chrome 20 or higher.
868
+ if (isChrome19()) {
869
+ el.style.display = '';
870
+ }
871
+
872
+ assertColorRgbEquals('rgb(255,192,203)', goog.style.getBackgroundColor(el));
873
+
874
+ goog.style.uninstallStyles(result);
875
+ assertEquals(originalBackground, goog.style.getBackgroundColor(el));
876
+ }
877
+
878
+ function testSetStyles() {
879
+ var el = $('installTest1');
880
+
881
+ // Change to pink
882
+ var ss = goog.style.installStyles(
883
+ '#installTest1 { background-color: rgb(255, 192, 203); }');
884
+
885
+ // For some odd reason, the change in computed style does not register on
886
+ // Chrome 19 unless the style property is touched. The behavior goes
887
+ // away again in Chrome 20.
888
+ // TODO(nnaze): Remove special caseing once we switch the testing image
889
+ // to Chrome 20 or higher.
890
+ if (isChrome19()) {
891
+ el.style.display = '';
892
+ }
893
+
894
+ assertColorRgbEquals('rgb(255,192,203)', goog.style.getBackgroundColor(el));
895
+
896
+ // Now change to orange
897
+ goog.style.setStyles(ss,
898
+ '#installTest1 { background-color: rgb(255, 255, 0); }');
899
+ assertColorRgbEquals('rgb(255,255,0)', goog.style.getBackgroundColor(el));
900
+ }
901
+
902
+ function assertColorRgbEquals(expected, actual) {
903
+ assertEquals(expected,
904
+ goog.color.hexToRgbStyle(goog.color.parse(actual).hex));
905
+ }
906
+
907
+ function isChrome19() {
908
+ return goog.userAgent.product.CHROME &&
909
+ goog.string.startsWith(goog.userAgent.product.VERSION, '19.');
910
+ }
911
+
912
+ function testIsRightToLeft() {
913
+ assertFalse(goog.style.isRightToLeft($('rtl1')));
914
+ assertTrue(goog.style.isRightToLeft($('rtl2')));
915
+ assertFalse(goog.style.isRightToLeft($('rtl3')));
916
+ assertFalse(goog.style.isRightToLeft($('rtl4')));
917
+ assertTrue(goog.style.isRightToLeft($('rtl5')));
918
+ assertFalse(goog.style.isRightToLeft($('rtl6')));
919
+ assertTrue(goog.style.isRightToLeft($('rtl7')));
920
+ assertFalse(goog.style.isRightToLeft($('rtl8')));
921
+ assertTrue(goog.style.isRightToLeft($('rtl9')));
922
+ assertFalse(goog.style.isRightToLeft($('rtl10')));
923
+ }
924
+
925
+ function testPosWithAbsoluteAndScroll() {
926
+ var el = $('pos-scroll-abs');
927
+ var el1 = $('pos-scroll-abs-1');
928
+ var el2 = $('pos-scroll-abs-2');
929
+
930
+ el1.scrollTop = 200;
931
+ var pos = goog.style.getPageOffset(el2);
932
+
933
+ assertEquals(200, pos.x);
934
+ // Don't bother with IE in quirks mode
935
+ if (!goog.userAgent.IE || document.compatMode == 'CSS1Compat') {
936
+ assertRoughlyEquals(300, pos.y, .1);
937
+ }
938
+ }
939
+
940
+ function testPosWithAbsoluteAndWindowScroll() {
941
+ window.scrollBy(0, 200);
942
+ var el = $('abs-upper-left');
943
+ var pos = goog.style.getPageOffset(el);
944
+ assertRoughlyEquals('Top should be about 0', 0, pos.y, 0.1);
945
+ }
946
+
947
+ function testGetBorderBoxSize() {
948
+ // Strict mode
949
+ var getBorderBoxSize = goog.style.getBorderBoxSize;
950
+
951
+ var el = $('size-a');
952
+ var rect = getBorderBoxSize(el);
953
+ assertEquals('width:100px', 100, rect.width);
954
+ assertEquals('height:100px', 100, rect.height);
955
+
956
+ // with border: 10px
957
+ el = $('size-b');
958
+ rect = getBorderBoxSize(el);
959
+ assertEquals('width:100px;border:10px', isBorderBox ? 100 : 120, rect.width);
960
+ assertEquals('height:100px;border:10px', isBorderBox ? 100 : 120,
961
+ rect.height);
962
+
963
+ // with border: 10px; padding: 10px
964
+ el = $('size-c');
965
+ rect = getBorderBoxSize(el);
966
+ assertEquals('width:100px;border:10px;padding:10px',
967
+ isBorderBox ? 100 : 140, rect.width);
968
+ assertEquals('height:100px;border:10px;padding:10px',
969
+ isBorderBox ? 100 : 140, rect.height);
970
+
971
+ // size, padding and borders are all in non pixel units
972
+ // all we test here is that we get a number out
973
+ el = $('size-d');
974
+ rect = getBorderBoxSize(el);
975
+ assertEquals('number', typeof rect.width);
976
+ assertEquals('number', typeof rect.height);
977
+ assertFalse(isNaN(rect.width));
978
+ assertFalse(isNaN(rect.height));
979
+ }
980
+
981
+ function testGetContentBoxSize() {
982
+ // Strict mode
983
+ var getContentBoxSize = goog.style.getContentBoxSize;
984
+
985
+ var el = $('size-a');
986
+ var rect = getContentBoxSize(el);
987
+ assertEquals('width:100px', 100, rect.width);
988
+ assertEquals('height:100px', 100, rect.height);
989
+
990
+ // with border: 10px
991
+ el = $('size-b');
992
+ rect = getContentBoxSize(el);
993
+ assertEquals('width:100px;border:10px',
994
+ isBorderBox ? 80 : 100, rect.width);
995
+ assertEquals('height:100px;border:10px',
996
+ isBorderBox ? 80 : 100, rect.height);
997
+
998
+ // with border: 10px; padding: 10px
999
+ el = $('size-c');
1000
+ rect = getContentBoxSize(el);
1001
+ assertEquals('width:100px;border:10px;padding:10px',
1002
+ isBorderBox ? 60 : 100, rect.width);
1003
+ assertEquals('height:100px;border:10px;padding:10px',
1004
+ isBorderBox ? 60 : 100, rect.height);
1005
+
1006
+ // size, padding and borders are all in non pixel units
1007
+ // all we test here is that we get a number out
1008
+ el = $('size-d');
1009
+ rect = getContentBoxSize(el);
1010
+ assertEquals('number', typeof rect.width);
1011
+ assertEquals('number', typeof rect.height);
1012
+ assertFalse(isNaN(rect.width));
1013
+ assertFalse(isNaN(rect.height));
1014
+
1015
+ // test whether getContentBoxSize works when width and height
1016
+ // aren't explicitly set, but the default of 'auto'.
1017
+ // 'size-f' has no margin, border, or padding, so offsetWidth/Height
1018
+ // should match the content box size
1019
+ el = $('size-f');
1020
+ rect = getContentBoxSize(el);
1021
+ assertEquals(el.offsetWidth, rect.width);
1022
+ assertEquals(el.offsetHeight, rect.height);
1023
+ }
1024
+
1025
+ function testSetBorderBoxSize() {
1026
+ // Strict mode
1027
+ var el = $('size-e');
1028
+ var Size = goog.math.Size;
1029
+ var setBorderBoxSize = goog.style.setBorderBoxSize;
1030
+
1031
+ // Clean up
1032
+ // style element has 100x100, no border and no padding
1033
+ el.style.padding = '';
1034
+ el.style.margin = '';
1035
+ el.style.borderWidth = '';
1036
+ el.style.width = '';
1037
+ el.style.height = '';
1038
+
1039
+ setBorderBoxSize(el, new Size(100, 100));
1040
+
1041
+ assertEquals(100, el.offsetWidth);
1042
+ assertEquals(100, el.offsetHeight);
1043
+
1044
+ el.style.borderWidth = '10px';
1045
+ setBorderBoxSize(el, new Size(100, 100));
1046
+
1047
+ assertEquals('width:100px;border:10px', 100, el.offsetWidth);
1048
+ assertEquals('height:100px;border:10px', 100, el.offsetHeight);
1049
+
1050
+ el.style.padding = '10px';
1051
+ setBorderBoxSize(el, new Size(100, 100));
1052
+ assertEquals(100, el.offsetWidth);
1053
+ assertEquals(100, el.offsetHeight);
1054
+
1055
+ el.style.borderWidth = '0';
1056
+ setBorderBoxSize(el, new Size(100, 100));
1057
+ assertEquals(100, el.offsetWidth);
1058
+ assertEquals(100, el.offsetHeight);
1059
+
1060
+ if (goog.userAgent.GECKO) {
1061
+ assertEquals('border-box', el.style.MozBoxSizing);
1062
+ } else if (goog.userAgent.WEBKIT) {
1063
+ assertEquals('border-box', el.style.WebkitBoxSizing);
1064
+ } else if (goog.userAgent.OPERA ||
1065
+ goog.userAgent.IE && goog.userAgent.isDocumentModeOrHigher(8)) {
1066
+ assertEquals('border-box', el.style.boxSizing);
1067
+ }
1068
+
1069
+ // Try a negative width/height.
1070
+ setBorderBoxSize(el, new Size(-10, -10));
1071
+
1072
+ // Setting the border box smaller than the borders will just give you
1073
+ // a content box of size 0.
1074
+ // NOTE(nicksantos): I'm not really sure why IE7 is special here.
1075
+ var isIeLt8Quirks = goog.userAgent.IE &&
1076
+ !goog.userAgent.isDocumentModeOrHigher(8) &&
1077
+ !goog.dom.isCss1CompatMode();
1078
+ assertEquals(20, el.offsetWidth);
1079
+ assertEquals(isIeLt8Quirks ? 39 : 20, el.offsetHeight);
1080
+ }
1081
+
1082
+ function testSetContentBoxSize() {
1083
+ // Strict mode
1084
+ var el = $('size-e');
1085
+ var Size = goog.math.Size;
1086
+ var setContentBoxSize = goog.style.setContentBoxSize;
1087
+
1088
+ // Clean up
1089
+ // style element has 100x100, no border and no padding
1090
+ el.style.padding = '';
1091
+ el.style.margin = '';
1092
+ el.style.borderWidth = '';
1093
+ el.style.width = '';
1094
+ el.style.height = '';
1095
+
1096
+ setContentBoxSize(el, new Size(100, 100));
1097
+
1098
+ assertEquals(100, el.offsetWidth);
1099
+ assertEquals(100, el.offsetHeight);
1100
+
1101
+ el.style.borderWidth = '10px';
1102
+ setContentBoxSize(el, new Size(100, 100));
1103
+ assertEquals('width:100px;border-width:10px', 120, el.offsetWidth);
1104
+ assertEquals('height:100px;border-width:10px', 120, el.offsetHeight);
1105
+
1106
+ el.style.padding = '10px';
1107
+ setContentBoxSize(el, new Size(100, 100));
1108
+ assertEquals('width:100px;border-width:10px;padding:10px',
1109
+ 140, el.offsetWidth);
1110
+ assertEquals('height:100px;border-width:10px;padding:10px',
1111
+ 140, el.offsetHeight);
1112
+
1113
+ el.style.borderWidth = '0';
1114
+ setContentBoxSize(el, new Size(100, 100));
1115
+ assertEquals('width:100px;padding:10px', 120, el.offsetWidth);
1116
+ assertEquals('height:100px;padding:10px', 120, el.offsetHeight);
1117
+
1118
+ if (goog.userAgent.GECKO) {
1119
+ assertEquals('content-box', el.style.MozBoxSizing);
1120
+ } else if (goog.userAgent.WEBKIT) {
1121
+ assertEquals('content-box', el.style.WebkitBoxSizing);
1122
+ } else if (goog.userAgent.OPERA ||
1123
+ goog.userAgent.IE && goog.userAgent.isDocumentModeOrHigher(8)) {
1124
+ assertEquals('content-box', el.style.boxSizing);
1125
+ }
1126
+
1127
+ // Try a negative width/height.
1128
+ setContentBoxSize(el, new Size(-10, -10));
1129
+
1130
+ // NOTE(nicksantos): I'm not really sure why IE7 is special here.
1131
+ var isIeLt8Quirks = goog.userAgent.IE &&
1132
+ !goog.userAgent.isDocumentModeOrHigher('8') &&
1133
+ !goog.dom.isCss1CompatMode();
1134
+ assertEquals(20, el.offsetWidth);
1135
+ assertEquals(isIeLt8Quirks ? 39 : 20, el.offsetHeight);
1136
+ }
1137
+
1138
+ function testGetPaddingBox() {
1139
+ // Strict mode
1140
+ var el = $('size-e');
1141
+ var Size = goog.math.Size;
1142
+ var getPaddingBox = goog.style.getPaddingBox;
1143
+
1144
+ // Clean up
1145
+ // style element has 100x100, no border and no padding
1146
+ el.style.padding = '';
1147
+ el.style.margin = '';
1148
+ el.style.borderWidth = '';
1149
+ el.style.width = '';
1150
+ el.style.height = '';
1151
+
1152
+ el.style.padding = '10px';
1153
+ var rect = getPaddingBox(el);
1154
+ assertEquals(10, rect.left);
1155
+ assertEquals(10, rect.right);
1156
+ assertEquals(10, rect.top);
1157
+ assertEquals(10, rect.bottom);
1158
+
1159
+ el.style.padding = '0';
1160
+ rect = getPaddingBox(el);
1161
+ assertEquals(0, rect.left);
1162
+ assertEquals(0, rect.right);
1163
+ assertEquals(0, rect.top);
1164
+ assertEquals(0, rect.bottom);
1165
+
1166
+ el.style.padding = '1px 2px 3px 4px';
1167
+ rect = getPaddingBox(el);
1168
+ assertEquals(1, rect.top);
1169
+ assertEquals(2, rect.right);
1170
+ assertEquals(3, rect.bottom);
1171
+ assertEquals(4, rect.left);
1172
+
1173
+ el.style.padding = '1mm 2em 3ex 4%';
1174
+ rect = getPaddingBox(el);
1175
+ assertFalse(isNaN(rect.top));
1176
+ assertFalse(isNaN(rect.right));
1177
+ assertFalse(isNaN(rect.bottom));
1178
+ assertFalse(isNaN(rect.left));
1179
+ assertTrue(rect.top >= 0);
1180
+ assertTrue(rect.right >= 0);
1181
+ assertTrue(rect.bottom >= 0);
1182
+ assertTrue(rect.left >= 0);
1183
+ }
1184
+
1185
+ function testGetPaddingBoxUnattached() {
1186
+ var el = document.createElement('div');
1187
+ var box = goog.style.getPaddingBox(el);
1188
+ if (goog.userAgent.WEBKIT) {
1189
+ assertTrue(isNaN(box.top));
1190
+ assertTrue(isNaN(box.right));
1191
+ assertTrue(isNaN(box.bottom));
1192
+ assertTrue(isNaN(box.left));
1193
+ } else {
1194
+ assertObjectEquals(new goog.math.Box(0, 0, 0, 0), box);
1195
+ }
1196
+ }
1197
+
1198
+ function testGetMarginBox() {
1199
+ // Strict mode
1200
+ var el = $('size-e');
1201
+ var Size = goog.math.Size;
1202
+ var getMarginBox = goog.style.getMarginBox;
1203
+
1204
+ // Clean up
1205
+ // style element has 100x100, no border and no padding
1206
+ el.style.padding = '';
1207
+ el.style.margin = '';
1208
+ el.style.borderWidth = '';
1209
+ el.style.width = '';
1210
+ el.style.height = '';
1211
+
1212
+ el.style.margin = '10px';
1213
+ var rect = getMarginBox(el);
1214
+ assertEquals(10, rect.left);
1215
+ // In webkit the right margin is the calculated distance from right edge and
1216
+ // not the computed right margin so it is not reliable.
1217
+ // See https://bugs.webkit.org/show_bug.cgi?id=19828
1218
+ if (!goog.userAgent.WEBKIT) {
1219
+ assertEquals(10, rect.right);
1220
+ }
1221
+ assertEquals(10, rect.top);
1222
+ assertEquals(10, rect.bottom);
1223
+
1224
+ el.style.margin = '0';
1225
+ rect = getMarginBox(el);
1226
+ assertEquals(0, rect.left);
1227
+ // In webkit the right margin is the calculated distance from right edge and
1228
+ // not the computed right margin so it is not reliable.
1229
+ // See https://bugs.webkit.org/show_bug.cgi?id=19828
1230
+ if (!goog.userAgent.WEBKIT) {
1231
+ assertEquals(0, rect.right);
1232
+ }
1233
+ assertEquals(0, rect.top);
1234
+ assertEquals(0, rect.bottom);
1235
+
1236
+ el.style.margin = '1px 2px 3px 4px';
1237
+ rect = getMarginBox(el);
1238
+ assertEquals(1, rect.top);
1239
+ // In webkit the right margin is the calculated distance from right edge and
1240
+ // not the computed right margin so it is not reliable.
1241
+ // See https://bugs.webkit.org/show_bug.cgi?id=19828
1242
+ if (!goog.userAgent.WEBKIT) {
1243
+ assertEquals(2, rect.right);
1244
+ }
1245
+ assertEquals(3, rect.bottom);
1246
+ assertEquals(4, rect.left);
1247
+
1248
+ el.style.margin = '1mm 2em 3ex 4%';
1249
+ rect = getMarginBox(el);
1250
+ assertFalse(isNaN(rect.top));
1251
+ assertFalse(isNaN(rect.right));
1252
+ assertFalse(isNaN(rect.bottom));
1253
+ assertFalse(isNaN(rect.left));
1254
+ assertTrue(rect.top >= 0);
1255
+ // In webkit the right margin is the calculated distance from right edge and
1256
+ // not the computed right margin so it is not reliable.
1257
+ // See https://bugs.webkit.org/show_bug.cgi?id=19828
1258
+ if (!goog.userAgent.WEBKIT) {
1259
+ assertTrue(rect.right >= 0);
1260
+ }
1261
+ assertTrue(rect.bottom >= 0);
1262
+ assertTrue(rect.left >= 0);
1263
+ }
1264
+
1265
+ function testGetBorderBox() {
1266
+ // Strict mode
1267
+ var el = $('size-e');
1268
+ var Size = goog.math.Size;
1269
+ var getBorderBox = goog.style.getBorderBox;
1270
+
1271
+ // Clean up
1272
+ // style element has 100x100, no border and no padding
1273
+ el.style.padding = '';
1274
+ el.style.margin = '';
1275
+ el.style.borderWidth = '';
1276
+ el.style.width = '';
1277
+ el.style.height = '';
1278
+
1279
+ el.style.borderWidth = '10px';
1280
+ var rect = getBorderBox(el);
1281
+ assertEquals(10, rect.left);
1282
+ assertEquals(10, rect.right);
1283
+ assertEquals(10, rect.top);
1284
+ assertEquals(10, rect.bottom);
1285
+
1286
+ el.style.borderWidth = '0';
1287
+ rect = getBorderBox(el);
1288
+ assertEquals(0, rect.left);
1289
+ assertEquals(0, rect.right);
1290
+ assertEquals(0, rect.top);
1291
+ assertEquals(0, rect.bottom);
1292
+
1293
+ el.style.borderWidth = '1px 2px 3px 4px';
1294
+ rect = getBorderBox(el);
1295
+ assertEquals(1, rect.top);
1296
+ assertEquals(2, rect.right);
1297
+ assertEquals(3, rect.bottom);
1298
+ assertEquals(4, rect.left);
1299
+
1300
+ // % does not work for border widths in IE
1301
+ el.style.borderWidth = '1mm 2em 3ex 4pt';
1302
+ rect = getBorderBox(el);
1303
+ assertFalse(isNaN(rect.top));
1304
+ assertFalse(isNaN(rect.right));
1305
+ assertFalse(isNaN(rect.bottom));
1306
+ assertFalse(isNaN(rect.left));
1307
+ assertTrue(rect.top >= 0);
1308
+ assertTrue(rect.right >= 0);
1309
+ assertTrue(rect.bottom >= 0);
1310
+ assertTrue(rect.left >= 0);
1311
+
1312
+ el.style.borderWidth = 'thin medium thick 1px';
1313
+ rect = getBorderBox(el);
1314
+ assertFalse(isNaN(rect.top));
1315
+ assertFalse(isNaN(rect.right));
1316
+ assertFalse(isNaN(rect.bottom));
1317
+ assertFalse(isNaN(rect.left));
1318
+ assertTrue(rect.top >= 0);
1319
+ assertTrue(rect.right >= 0);
1320
+ assertTrue(rect.bottom >= 0);
1321
+ assertTrue(rect.left >= 0);
1322
+ }
1323
+
1324
+ function testGetFontFamily() {
1325
+ // I tried to use common fonts for these tests. It's possible the test fails
1326
+ // because the testing platform doesn't have one of these fonts installed:
1327
+ // Comic Sans MS or Century Schoolbook L
1328
+ // Times
1329
+ // Helvetica
1330
+
1331
+ var tmpFont = goog.style.getFontFamily($('font-tag'));
1332
+ assertTrue('FontFamily should be detectable when set via <font face>',
1333
+ 'Times' == tmpFont || 'Times New Roman' == tmpFont);
1334
+ tmpFont = goog.style.getFontFamily($('small-text'));
1335
+ assertTrue('Multiword fonts should be reported with quotes stripped.',
1336
+ 'Comic Sans MS' == tmpFont ||
1337
+ 'Century Schoolbook L' == tmpFont);
1338
+ // Firefox fails this test & retuns a generic 'monospace' instead of the
1339
+ // actually displayed font (e.g., "Times New").
1340
+ //tmpFont = goog.style.getFontFamily($('pre-font'));
1341
+ //assertEquals('<pre> tags should use a fixed-width font',
1342
+ // 'Times New',
1343
+ // tmpFont);
1344
+ tmpFont = goog.style.getFontFamily($('inherit-font'));
1345
+ assertEquals('Explicitly inherited fonts should be detectable',
1346
+ 'Helvetica',
1347
+ tmpFont);
1348
+ tmpFont = goog.style.getFontFamily($('times-font-family'));
1349
+ assertEquals('Font-family set via style attribute should be detected',
1350
+ 'Times',
1351
+ tmpFont);
1352
+ tmpFont = goog.style.getFontFamily($('bold-font'));
1353
+ assertEquals('Implicitly inherited font should be detected',
1354
+ 'Helvetica',
1355
+ tmpFont);
1356
+ tmpFont = goog.style.getFontFamily($('css-html-tag-redefinition'));
1357
+ assertEquals('HTML tag CSS rewrites should be detected',
1358
+ 'Times',
1359
+ tmpFont);
1360
+ tmpFont = goog.style.getFontFamily($('no-text-font-styles'));
1361
+ assertEquals('Font family should exist even with no text',
1362
+ 'Helvetica',
1363
+ tmpFont);
1364
+ tmpFont = goog.style.getFontFamily($('icon-font'));
1365
+ assertNotEquals('icon is a special font-family value',
1366
+ 'icon',
1367
+ tmpFont.toLowerCase());
1368
+ tmpFont = goog.style.getFontFamily($('font-style-badfont'));
1369
+ // Firefox fails this test and reports the specified "badFont", which is
1370
+ // obviously not displayed.
1371
+ //assertEquals('Invalid fonts should not be returned',
1372
+ // 'Helvetica',
1373
+ // tmpFont);
1374
+ tmpFont = goog.style.getFontFamily($('img-font-test'));
1375
+ assertTrue('Even img tags should inherit the document body\'s font',
1376
+ tmpFont != '');
1377
+ tmpFont = goog.style.getFontFamily($('nested-font'));
1378
+ assertEquals('An element with nested content should be unaffected.',
1379
+ 'Arial',
1380
+ tmpFont);
1381
+ }
1382
+
1383
+ function testGetFontSize() {
1384
+ assertEquals('Font size should be determined even without any text',
1385
+ 30,
1386
+ goog.style.getFontSize($('no-text-font-styles')));
1387
+ assertEquals('A 5em font should be 5x larger than its parent.',
1388
+ 150,
1389
+ goog.style.getFontSize($('css-html-tag-redefinition')));
1390
+ assertTrue('Setting font size=-1 should result in a positive font size.',
1391
+ goog.style.getFontSize($('font-tag')) > 0);
1392
+ assertEquals('Inheriting a 50% font-size should have no additional effect',
1393
+ goog.style.getFontSize($('font-style-badfont')),
1394
+ goog.style.getFontSize($('inherit-50pct-font')));
1395
+ assertTrue('In pretty much any display, 3in should be > 8px',
1396
+ goog.style.getFontSize($('times-font-family')) >
1397
+ goog.style.getFontSize($('no-text-font-styles')));
1398
+ assertTrue('With no applied styles, font-size should still be defined.',
1399
+ goog.style.getFontSize($('no-font-style')) > 0);
1400
+ assertEquals('50% of 30px is 15',
1401
+ 15,
1402
+ goog.style.getFontSize($('font-style-badfont')));
1403
+ assertTrue('x-small text should be smaller than small text',
1404
+ goog.style.getFontSize($('x-small-text')) <
1405
+ goog.style.getFontSize($('small-text')));
1406
+ // IE fails this test, the decimal portion of px lengths isn't reported
1407
+ // by getCascadedStyle. Firefox passes, but only because it ignores the
1408
+ // decimals altogether.
1409
+ //assertEquals('12.5px should be the same as 0.5em nested in a 25px node.',
1410
+ // goog.style.getFontSize($('font-size-12-point-5-px')),
1411
+ // goog.style.getFontSize($('font-size-50-pct-of-25-px')));
1412
+
1413
+ assertEquals('Font size should not doubly count em values',
1414
+ 2, goog.style.getFontSize($('em-font-size')));
1415
+ }
1416
+
1417
+ function testGetLengthUnits() {
1418
+ assertEquals('px', goog.style.getLengthUnits('15px'));
1419
+ assertEquals('%', goog.style.getLengthUnits('99%'));
1420
+ assertNull(goog.style.getLengthUnits(''));
1421
+ }
1422
+
1423
+ function testParseStyleAttribute() {
1424
+ var css = 'left: 0px; text-align: center';
1425
+ var expected = {'left': '0px', 'textAlign': 'center'};
1426
+
1427
+ assertObjectEquals(expected, goog.style.parseStyleAttribute(css));
1428
+ }
1429
+
1430
+ function testToStyleAttribute() {
1431
+ var object = {'left': '0px', 'textAlign': 'center'};
1432
+ var expected = 'left:0px;text-align:center;';
1433
+
1434
+ assertEquals(expected, goog.style.toStyleAttribute(object));
1435
+ }
1436
+
1437
+ function testStyleAttributePassthrough() {
1438
+ var object = {'left': '0px', 'textAlign': 'center'};
1439
+
1440
+ assertObjectEquals(object,
1441
+ goog.style.parseStyleAttribute(goog.style.toStyleAttribute(object)));
1442
+ }
1443
+
1444
+ function testGetFloat() {
1445
+ assertEquals('', goog.style.getFloat($('no-float')));
1446
+ assertEquals('none', goog.style.getFloat($('float-none')));
1447
+ assertEquals('left', goog.style.getFloat($('float-left')));
1448
+ }
1449
+
1450
+ function testSetFloat() {
1451
+ var el = $('float-test');
1452
+
1453
+ goog.style.setFloat(el, 'left');
1454
+ assertEquals('left', goog.style.getFloat(el));
1455
+
1456
+ goog.style.setFloat(el, 'right');
1457
+ assertEquals('right', goog.style.getFloat(el));
1458
+
1459
+ goog.style.setFloat(el, 'none');
1460
+ assertEquals('none', goog.style.getFloat(el));
1461
+
1462
+ goog.style.setFloat(el, '');
1463
+ assertEquals('', goog.style.getFloat(el));
1464
+ }
1465
+
1466
+ function testIsElementShown() {
1467
+ var el = $('testEl');
1468
+
1469
+ goog.style.setElementShown(el, false);
1470
+ assertFalse(goog.style.isElementShown(el));
1471
+
1472
+ goog.style.setElementShown(el, true);
1473
+ assertTrue(goog.style.isElementShown(el));
1474
+ }
1475
+
1476
+ function testGetOpacity() {
1477
+ var el1 = {
1478
+ style: {
1479
+ opacity: '0.3'
1480
+ }
1481
+ };
1482
+
1483
+ var el2 = {
1484
+ style: {
1485
+ MozOpacity: '0.1'
1486
+ }
1487
+ };
1488
+
1489
+ var el3 = {
1490
+ style: {
1491
+ filter: 'some:other,filter;alpha(opacity=25.5);alpha(more=100);'
1492
+ }
1493
+ };
1494
+
1495
+ assertEquals(0.3, goog.style.getOpacity(el1));
1496
+ assertEquals(0.1, goog.style.getOpacity(el2));
1497
+ assertEquals(0.255, goog.style.getOpacity(el3));
1498
+
1499
+ el1.style.opacity = '0';
1500
+ el2.style.MozOpacity = '0';
1501
+ el3.style.filter = 'some:other,filter;alpha(opacity=0);alpha(more=100);';
1502
+
1503
+ assertEquals(0, goog.style.getOpacity(el1));
1504
+ assertEquals(0, goog.style.getOpacity(el2));
1505
+ assertEquals(0, goog.style.getOpacity(el3));
1506
+
1507
+ el1.style.opacity = '';
1508
+ el2.style.MozOpacity = '';
1509
+ el3.style.filter = '';
1510
+
1511
+ assertEquals('', goog.style.getOpacity(el1));
1512
+ assertEquals('', goog.style.getOpacity(el2));
1513
+ assertEquals('', goog.style.getOpacity(el3));
1514
+
1515
+ var el4 = {
1516
+ style: {}
1517
+ };
1518
+
1519
+ assertEquals('', goog.style.getOpacity(el4));
1520
+ assertEquals('', goog.style.getOpacity($('test-opacity')));
1521
+ }
1522
+
1523
+ function testSetOpacity() {
1524
+ var el1 = {
1525
+ style: {
1526
+ opacity: '0.3'
1527
+ }
1528
+ };
1529
+ goog.style.setOpacity(el1, 0.8);
1530
+
1531
+ var el2 = {
1532
+ style: {
1533
+ MozOpacity: '0.1'
1534
+ }
1535
+ };
1536
+ goog.style.setOpacity(el2, 0.5);
1537
+
1538
+ var el3 = {
1539
+ style: {
1540
+ filter: 'alpha(opacity=25)'
1541
+ }
1542
+ };
1543
+ goog.style.setOpacity(el3, 0.1);
1544
+
1545
+ assertEquals(0.8, Number(el1.style.opacity));
1546
+ assertEquals(0.5, Number(el2.style.MozOpacity));
1547
+ assertEquals('alpha(opacity=10)', el3.style.filter);
1548
+
1549
+ goog.style.setOpacity(el1, 0);
1550
+ goog.style.setOpacity(el2, 0);
1551
+ goog.style.setOpacity(el3, 0);
1552
+
1553
+ assertEquals(0, Number(el1.style.opacity));
1554
+ assertEquals(0, Number(el2.style.MozOpacity));
1555
+ assertEquals('alpha(opacity=0)', el3.style.filter);
1556
+
1557
+ goog.style.setOpacity(el1, '');
1558
+ goog.style.setOpacity(el2, '');
1559
+ goog.style.setOpacity(el3, '');
1560
+
1561
+ assertEquals('', el1.style.opacity);
1562
+ assertEquals('', el2.style.MozOpacity);
1563
+ assertEquals('', el3.style.filter);
1564
+ }
1565
+
1566
+ function testFramedPageOffset() {
1567
+ // Set up a complicated iframe ancestor chain.
1568
+ var iframe = goog.dom.getElement('test-frame-offset');
1569
+ var iframeDoc = goog.dom.getFrameContentDocument(iframe);
1570
+ var iframeWindow = goog.dom.getWindow(iframeDoc);
1571
+
1572
+ var iframePos = 'style="display:block;position:absolute;' +
1573
+ 'top:50px;left:50px;width:50px;height:50px;"';
1574
+ iframeDoc.write('<iframe id="test-frame-offset-2" ' +
1575
+ iframePos + '></iframe>' +
1576
+ '<div id="test-element-2" ' +
1577
+ ' style="position:absolute;left:300px;top:300px">hi mom!</div>');
1578
+ iframeDoc.close();
1579
+ var iframe2 = iframeDoc.getElementById('test-frame-offset-2');
1580
+ var testElement2 = iframeDoc.getElementById('test-element-2');
1581
+ var iframeDoc2 = goog.dom.getFrameContentDocument(iframe2);
1582
+ var iframeWindow2 = goog.dom.getWindow(iframeDoc2);
1583
+
1584
+ iframeDoc2.write(
1585
+ '<div id="test-element-3" ' +
1586
+ ' style="position:absolute;left:500px;top:500px">hi mom!</div>');
1587
+ iframeDoc2.close();
1588
+ var testElement3 = iframeDoc2.getElementById('test-element-3');
1589
+
1590
+ assertCoordinateApprox(300, 300, 0,
1591
+ goog.style.getPageOffset(testElement2));
1592
+ assertCoordinateApprox(500, 500, 0,
1593
+ goog.style.getPageOffset(testElement3));
1594
+
1595
+ assertCoordinateApprox(350, 350, 0,
1596
+ goog.style.getFramedPageOffset(testElement2, window));
1597
+ assertCoordinateApprox(300, 300, 0,
1598
+ goog.style.getFramedPageOffset(testElement2, iframeWindow));
1599
+
1600
+ assertCoordinateApprox(600, 600, 0,
1601
+ goog.style.getFramedPageOffset(testElement3, window));
1602
+ assertCoordinateApprox(550, 550, 0,
1603
+ goog.style.getFramedPageOffset(testElement3, iframeWindow));
1604
+ assertCoordinateApprox(500, 500, 0,
1605
+ goog.style.getFramedPageOffset(testElement3, iframeWindow2));
1606
+
1607
+ // Scroll the iframes a bit.
1608
+ window.scrollBy(0, 5);
1609
+ iframeWindow.scrollBy(0, 11);
1610
+ iframeWindow2.scrollBy(0, 18);
1611
+
1612
+ // On Firefox 2, scrolling inner iframes causes off by one errors
1613
+ // in the page position, because we're using screen coords to compute them.
1614
+ assertCoordinateApprox(300, 300, 2,
1615
+ goog.style.getPageOffset(testElement2));
1616
+ assertCoordinateApprox(500, 500, 2,
1617
+ goog.style.getPageOffset(testElement3));
1618
+
1619
+ assertCoordinateApprox(350, 350 - 11, 2,
1620
+ goog.style.getFramedPageOffset(testElement2, window));
1621
+ assertCoordinateApprox(300, 300, 2,
1622
+ goog.style.getFramedPageOffset(testElement2, iframeWindow));
1623
+
1624
+ assertCoordinateApprox(600, 600 - 18 - 11, 2,
1625
+ goog.style.getFramedPageOffset(testElement3, window));
1626
+ assertCoordinateApprox(550, 550 - 18, 2,
1627
+ goog.style.getFramedPageOffset(testElement3, iframeWindow));
1628
+ assertCoordinateApprox(500, 500, 2,
1629
+ goog.style.getFramedPageOffset(testElement3, iframeWindow2));
1630
+ }
1631
+
1632
+
1633
+ /**
1634
+ * Asserts that the coordinate is approximately equal to the given
1635
+ * x and y coordinates, give or take delta.
1636
+ */
1637
+ function assertCoordinateApprox(x, y, delta, coord) {
1638
+ assertTrue('Expected x: ' + x + ', actual x: ' + coord.x,
1639
+ coord.x >= x - delta && coord.x <= x + delta);
1640
+ assertTrue('Expected y: ' + y + ', actual y: ' + coord.y,
1641
+ coord.y >= y - delta && coord.y <= y + delta);
1642
+ }
1643
+
1644
+ function testTranslateRectForAnotherFrame() {
1645
+ var rect = new goog.math.Rect(1, 2, 3, 4);
1646
+ var thisDom = goog.dom.getDomHelper();
1647
+ goog.style.translateRectForAnotherFrame(rect, thisDom, thisDom);
1648
+ assertEquals(1, rect.left);
1649
+ assertEquals(2, rect.top);
1650
+ assertEquals(3, rect.width);
1651
+ assertEquals(4, rect.height);
1652
+
1653
+ var iframe = $('test-translate-frame-standard');
1654
+ var iframeDoc = goog.dom.getFrameContentDocument(iframe);
1655
+ var iframeDom = goog.dom.getDomHelper(iframeDoc);
1656
+ // Cannot rely on iframe starting at origin.
1657
+ iframeDom.getWindow().scrollTo(0, 0);
1658
+ // iframe is at (100, 150) and its body is not scrolled.
1659
+ rect = new goog.math.Rect(1, 2, 3, 4);
1660
+ goog.style.translateRectForAnotherFrame(rect, iframeDom, thisDom);
1661
+ assertEquals(1 + 100, rect.left);
1662
+ assertRoughlyEquals(2 + 150, rect.top, .1);
1663
+ assertEquals(3, rect.width);
1664
+ assertEquals(4, rect.height);
1665
+
1666
+ iframeDom.getWindow().scrollTo(11, 13);
1667
+ rect = new goog.math.Rect(1, 2, 3, 4);
1668
+ goog.style.translateRectForAnotherFrame(rect, iframeDom, thisDom);
1669
+ assertEquals(1 + 100 - 11, rect.left);
1670
+ assertRoughlyEquals(2 + 150 - 13, rect.top, .1);
1671
+ assertEquals(3, rect.width);
1672
+ assertEquals(4, rect.height);
1673
+
1674
+ iframe = $('test-translate-frame-quirk');
1675
+ iframeDoc = goog.dom.getFrameContentDocument(iframe);
1676
+ iframeDom = goog.dom.getDomHelper(iframeDoc);
1677
+ // Cannot rely on iframe starting at origin.
1678
+ iframeDom.getWindow().scrollTo(0, 0);
1679
+ // iframe is at (100, 350) and its body is not scrolled.
1680
+ rect = new goog.math.Rect(1, 2, 3, 4);
1681
+ goog.style.translateRectForAnotherFrame(rect, iframeDom, thisDom);
1682
+ assertEquals(1 + 100, rect.left);
1683
+ assertRoughlyEquals(2 + 350, rect.top, .1);
1684
+ assertEquals(3, rect.width);
1685
+ assertEquals(4, rect.height);
1686
+
1687
+ iframeDom.getWindow().scrollTo(11, 13);
1688
+ rect = new goog.math.Rect(1, 2, 3, 4);
1689
+ goog.style.translateRectForAnotherFrame(rect, iframeDom, thisDom);
1690
+ assertEquals(1 + 100 - 11, rect.left);
1691
+ assertRoughlyEquals(2 + 350 - 13, rect.top, .1);
1692
+ assertEquals(3, rect.width);
1693
+ assertEquals(4, rect.height);
1694
+ }
1695
+
1696
+ function testGetVisibleRectForElement() {
1697
+ var container = goog.dom.getElement('test-visible');
1698
+ var el = goog.dom.getElement('test-visible-el');
1699
+ var dom = goog.dom.getDomHelper(el);
1700
+ var winScroll = dom.getDocumentScroll();
1701
+ var winSize = dom.getViewportSize();
1702
+
1703
+ // Skip this test if the window size is small. Firefox3/Linux in Selenium
1704
+ // sometimes fails without this check.
1705
+ if (winSize.width < 20 || winSize.height < 20) {
1706
+ return;
1707
+ }
1708
+
1709
+ // Move the container element to the window's viewport.
1710
+ var h = winSize.height < 100 ? winSize.height / 2 : 100;
1711
+ goog.style.setSize(container, winSize.width / 2, h);
1712
+ goog.style.setPosition(container, 8, winScroll.y + winSize.height - h);
1713
+ var visible = goog.style.getVisibleRectForElement(el);
1714
+ var bounds = goog.style.getBounds(container);
1715
+ // VisibleRect == Bounds rect of the offsetParent
1716
+ assertNotNull(visible);
1717
+ assertEquals(bounds.left, visible.left);
1718
+ assertEquals(bounds.top, visible.top);
1719
+ assertEquals(bounds.left + bounds.width, visible.right);
1720
+ assertEquals(bounds.top + bounds.height, visible.bottom);
1721
+
1722
+ // Move a part of the container element to outside of the viewpoert.
1723
+ goog.style.setPosition(container, 8, winScroll.y + winSize.height - h / 2);
1724
+ visible = goog.style.getVisibleRectForElement(el);
1725
+ bounds = goog.style.getBounds(container);
1726
+ // Confirm VisibleRect == Intersection of the bounds rect of the
1727
+ // offsetParent and the viewport.
1728
+ assertNotNull(visible);
1729
+ assertEquals(bounds.left, visible.left);
1730
+ assertEquals(bounds.top, visible.top);
1731
+ assertEquals(bounds.left + bounds.width, visible.right);
1732
+ assertEquals(winScroll.y + winSize.height, visible.bottom);
1733
+
1734
+ // Move the container element to outside of the viewpoert.
1735
+ goog.style.setPosition(container, 8, winScroll.y + winSize.height * 2);
1736
+ visible = goog.style.getVisibleRectForElement(el);
1737
+ assertNull(visible);
1738
+
1739
+ // Test the case with body element of height 0
1740
+ var iframe = goog.dom.getElement('test-visible-frame');
1741
+ var iframeDoc = goog.dom.getFrameContentDocument(iframe);
1742
+ el = iframeDoc.getElementById('test-visible');
1743
+ visible = goog.style.getVisibleRectForElement(el);
1744
+
1745
+ var iframeViewportSize = goog.dom.getDomHelper(el).getViewportSize();
1746
+ // NOTE(user): For iframe, the clipping viewport is always the iframe
1747
+ // viewport, and not the actual browser viewport.
1748
+ assertNotNull(visible);
1749
+ assertEquals(0, visible.top);
1750
+ assertEquals(iframeViewportSize.height, visible.bottom);
1751
+ assertEquals(0, visible.left);
1752
+ assertEquals(iframeViewportSize.width, visible.right);
1753
+ }
1754
+
1755
+ function testGetVisibleRectForElementWithBodyScrolled() {
1756
+ var container = goog.dom.getElement('test-visible2');
1757
+ var dom = goog.dom.getDomHelper(container);
1758
+ var el = dom.createDom('div', undefined, 'Test');
1759
+ el.style.position = 'absolute';
1760
+ dom.append(container, el);
1761
+
1762
+ container.style.position = 'absolute';
1763
+ goog.style.setPosition(container, 20, 500);
1764
+ goog.style.setSize(container, 100, 150);
1765
+
1766
+ // Scroll body container such that container is exactly at top.
1767
+ window.scrollTo(0, 500);
1768
+ var visibleRect = goog.style.getVisibleRectForElement(el);
1769
+ assertNotNull(visibleRect);
1770
+ assertRoughlyEquals(500, visibleRect.top, EPSILON);
1771
+ assertRoughlyEquals(20, visibleRect.left, EPSILON);
1772
+ assertRoughlyEquals(650, visibleRect.bottom, EPSILON);
1773
+ assertRoughlyEquals(120, visibleRect.right, EPSILON);
1774
+
1775
+ // Top 100px is clipped by window viewport.
1776
+ window.scrollTo(0, 600);
1777
+ var visibleRect = goog.style.getVisibleRectForElement(el);
1778
+ assertNotNull(visibleRect);
1779
+ assertRoughlyEquals(600, visibleRect.top, EPSILON);
1780
+ assertRoughlyEquals(20, visibleRect.left, EPSILON);
1781
+ assertRoughlyEquals(650, visibleRect.bottom, EPSILON);
1782
+ assertRoughlyEquals(120, visibleRect.right, EPSILON);
1783
+
1784
+ var winSize = dom.getViewportSize();
1785
+
1786
+ // Left 50px is clipped by window viewport.
1787
+ // Right part is clipped by window viewport.
1788
+ goog.style.setSize(container, 10000, 150);
1789
+ window.scrollTo(70, 500);
1790
+ var visibleRect = goog.style.getVisibleRectForElement(el);
1791
+ assertNotNull(visibleRect);
1792
+ assertRoughlyEquals(500, visibleRect.top, EPSILON);
1793
+ assertRoughlyEquals(70, visibleRect.left, EPSILON);
1794
+ assertRoughlyEquals(650, visibleRect.bottom, EPSILON);
1795
+ assertRoughlyEquals(70 + winSize.width, visibleRect.right, EPSILON);
1796
+
1797
+ // Bottom part is clipped by window viewport.
1798
+ goog.style.setSize(container, 100, 2000);
1799
+ window.scrollTo(0, 500);
1800
+ var visibleRect = goog.style.getVisibleRectForElement(el);
1801
+ assertNotNull(visibleRect);
1802
+ assertRoughlyEquals(500, visibleRect.top, EPSILON);
1803
+ assertRoughlyEquals(20, visibleRect.left, EPSILON);
1804
+ assertRoughlyEquals(120, visibleRect.right, EPSILON);
1805
+ assertRoughlyEquals(500 + winSize.height, visibleRect.bottom, EPSILON);
1806
+
1807
+ goog.style.setPosition(container, 10000, 10000);
1808
+ assertNull(goog.style.getVisibleRectForElement(el));
1809
+ }
1810
+
1811
+ function testGetVisibleRectForElementWithNestedAreaAndNonOffsetAncestor() {
1812
+ // IE7 quirks mode somehow consider container2 below as offset parent
1813
+ // of the element, which is incorrect.
1814
+ if (goog.userAgent.IE && !goog.userAgent.isDocumentModeOrHigher(8) &&
1815
+ !goog.dom.isCss1CompatMode()) {
1816
+ return;
1817
+ }
1818
+
1819
+ var container = goog.dom.getElement('test-visible2');
1820
+ var dom = goog.dom.getDomHelper(container);
1821
+ var container2 = dom.createDom('div');
1822
+ var el = dom.createDom('div', undefined, 'Test');
1823
+ el.style.position = 'absolute';
1824
+ dom.append(container, container2);
1825
+ dom.append(container2, el);
1826
+
1827
+ container.style.position = 'absolute';
1828
+ goog.style.setPosition(container, 20, 500);
1829
+ goog.style.setSize(container, 100, 150);
1830
+
1831
+ // container2 is a scrollable container but is not an offsetParent of
1832
+ // the element. It is ignored in the computation.
1833
+ container2.style.overflow = 'hidden';
1834
+ container2.style.marginTop = '50px';
1835
+ container2.style.marginLeft = '100px';
1836
+ goog.style.setSize(container2, 150, 100);
1837
+
1838
+ // Scroll body container such that container is exactly at top.
1839
+ window.scrollTo(0, 500);
1840
+ var visibleRect = goog.style.getVisibleRectForElement(el);
1841
+ assertNotNull(visibleRect);
1842
+ assertRoughlyEquals(500, visibleRect.top, EPSILON);
1843
+ assertRoughlyEquals(20, visibleRect.left, EPSILON);
1844
+ assertRoughlyEquals(650, visibleRect.bottom, EPSILON);
1845
+ assertRoughlyEquals(120, visibleRect.right, EPSILON);
1846
+
1847
+ // Top 100px is clipped by window viewport.
1848
+ window.scrollTo(0, 600);
1849
+ var visibleRect = goog.style.getVisibleRectForElement(el);
1850
+ assertNotNull(visibleRect);
1851
+ assertRoughlyEquals(600, visibleRect.top, EPSILON);
1852
+ assertRoughlyEquals(20, visibleRect.left, EPSILON);
1853
+ assertRoughlyEquals(650, visibleRect.bottom, EPSILON);
1854
+ assertRoughlyEquals(120, visibleRect.right, EPSILON);
1855
+
1856
+ var winSize = dom.getViewportSize();
1857
+
1858
+ // Left 50px is clipped by window viewport.
1859
+ // Right part is clipped by window viewport.
1860
+ goog.style.setSize(container, 10000, 150);
1861
+ window.scrollTo(70, 500);
1862
+ var visibleRect = goog.style.getVisibleRectForElement(el);
1863
+ assertNotNull(visibleRect);
1864
+ assertRoughlyEquals(500, visibleRect.top, EPSILON);
1865
+ assertRoughlyEquals(70, visibleRect.left, EPSILON);
1866
+ assertRoughlyEquals(650, visibleRect.bottom, EPSILON);
1867
+ assertRoughlyEquals(70 + winSize.width, visibleRect.right, EPSILON);
1868
+
1869
+ // Bottom part is clipped by window viewport.
1870
+ goog.style.setSize(container, 100, 2000);
1871
+ window.scrollTo(0, 500);
1872
+ var visibleRect = goog.style.getVisibleRectForElement(el);
1873
+ assertNotNull(visibleRect);
1874
+ assertRoughlyEquals(500, visibleRect.top, EPSILON);
1875
+ assertRoughlyEquals(20, visibleRect.left, EPSILON);
1876
+ assertRoughlyEquals(120, visibleRect.right, EPSILON);
1877
+ assertRoughlyEquals(500 + winSize.height, visibleRect.bottom, EPSILON);
1878
+
1879
+ goog.style.setPosition(container, 10000, 10000);
1880
+ assertNull(goog.style.getVisibleRectForElement(el));
1881
+ }
1882
+
1883
+ function testGetVisibleRectForElementInsideNestedScrollableArea() {
1884
+ var container = goog.dom.getElement('test-visible2');
1885
+ var dom = goog.dom.getDomHelper(container);
1886
+ var container2 = dom.createDom('div');
1887
+ var el = dom.createDom('div', undefined, 'Test');
1888
+ el.style.position = 'absolute';
1889
+ dom.append(container, container2);
1890
+ dom.append(container2, el);
1891
+
1892
+ container.style.position = 'absolute';
1893
+ goog.style.setPosition(container, 100 /* left */, 500 /* top */);
1894
+ goog.style.setSize(container, 300 /* width */, 300 /* height */);
1895
+
1896
+ container2.style.overflow = 'hidden';
1897
+ container2.style.position = 'relative';
1898
+ goog.style.setPosition(container2, 100, 50);
1899
+ goog.style.setSize(container2, 150, 100);
1900
+
1901
+ // Scroll body container such that container is exactly at top.
1902
+ window.scrollTo(0, 500);
1903
+ var visibleRect = goog.style.getVisibleRectForElement(el);
1904
+ assertNotNull(visibleRect);
1905
+ assertRoughlyEquals(550, visibleRect.top, EPSILON);
1906
+ assertRoughlyEquals(200, visibleRect.left, EPSILON);
1907
+ assertRoughlyEquals(650, visibleRect.bottom, EPSILON);
1908
+ assertRoughlyEquals(350, visibleRect.right, EPSILON);
1909
+
1910
+ // Left 50px is clipped by container.
1911
+ goog.style.setPosition(container2, -50, 50);
1912
+ var visibleRect = goog.style.getVisibleRectForElement(el);
1913
+ assertNotNull(visibleRect);
1914
+ assertRoughlyEquals(550, visibleRect.top, EPSILON);
1915
+ assertRoughlyEquals(100, visibleRect.left, EPSILON);
1916
+ assertRoughlyEquals(650, visibleRect.bottom, EPSILON);
1917
+ assertRoughlyEquals(200, visibleRect.right, EPSILON);
1918
+
1919
+ // Right part is clipped by container.
1920
+ goog.style.setPosition(container2, 100, 50);
1921
+ goog.style.setWidth(container2, 1000, 100);
1922
+ var visibleRect = goog.style.getVisibleRectForElement(el);
1923
+ assertNotNull(visibleRect);
1924
+ assertRoughlyEquals(550, visibleRect.top, EPSILON);
1925
+ assertRoughlyEquals(200, visibleRect.left, EPSILON);
1926
+ assertRoughlyEquals(650, visibleRect.bottom, EPSILON);
1927
+ assertRoughlyEquals(400, visibleRect.right, EPSILON);
1928
+
1929
+ // Top 50px is clipped by container.
1930
+ goog.style.setStyle(container2, 'width', '150px');
1931
+ goog.style.setStyle(container2, 'top', '-50px');
1932
+ var visibleRect = goog.style.getVisibleRectForElement(el);
1933
+ assertNotNull(visibleRect);
1934
+ assertRoughlyEquals(500, visibleRect.top, EPSILON);
1935
+ assertRoughlyEquals(200, visibleRect.left, EPSILON);
1936
+ assertRoughlyEquals(550, visibleRect.bottom, EPSILON);
1937
+ assertRoughlyEquals(350, visibleRect.right, EPSILON);
1938
+
1939
+ // Bottom part is clipped by container.
1940
+ goog.style.setStyle(container2, 'top', '50px');
1941
+ goog.style.setStyle(container2, 'height', '1000px');
1942
+ var visibleRect = goog.style.getVisibleRectForElement(el);
1943
+ assertNotNull(visibleRect);
1944
+ assertRoughlyEquals(550, visibleRect.top, EPSILON);
1945
+ assertRoughlyEquals(200, visibleRect.left, EPSILON);
1946
+ assertRoughlyEquals(800, visibleRect.bottom, EPSILON);
1947
+ assertRoughlyEquals(350, visibleRect.right, EPSILON);
1948
+
1949
+ // Outside viewport.
1950
+ goog.style.setStyle(container2, 'top', '10000px');
1951
+ goog.style.setStyle(container2, 'left', '10000px');
1952
+ assertNull(goog.style.getVisibleRectForElement(el));
1953
+ }
1954
+
1955
+ function testGeckoMacOrX11RoundPosition() {
1956
+ if ((goog.userAgent.MAC || goog.userAgent.X11) && goog.userAgent.GECKO &&
1957
+ goog.userAgent.isVersionOrHigher('1.9')) {
1958
+
1959
+ var pos = new goog.math.Coordinate(1.5, 1.4);
1960
+ var el = document.createElement('div');
1961
+ goog.style.setPosition(el, pos);
1962
+ assertEquals('The left position should have been rounded',
1963
+ '2px', el.style.left);
1964
+ assertEquals('The top position should have been rounded',
1965
+ '1px', el.style.top);
1966
+ }
1967
+ }
1968
+
1969
+ function testScrollIntoContainerViewQuirks() {
1970
+ if (goog.dom.isCss1CompatMode()) return;
1971
+
1972
+ var container = goog.dom.getElement('scrollable-container');
1973
+
1974
+ // Scroll the minimum amount to make the elements visible.
1975
+ goog.style.scrollIntoContainerView(goog.dom.getElement('item7'), container);
1976
+ assertEquals('scroll to item7', 79, container.scrollTop);
1977
+ goog.style.scrollIntoContainerView(goog.dom.getElement('item8'), container);
1978
+ assertEquals('scroll to item8', 100, container.scrollTop);
1979
+ goog.style.scrollIntoContainerView(goog.dom.getElement('item7'), container);
1980
+ assertEquals('item7 still visible', 100, container.scrollTop);
1981
+ goog.style.scrollIntoContainerView(goog.dom.getElement('item1'), container);
1982
+ assertEquals('scroll to item1', 17, container.scrollTop);
1983
+
1984
+ // Center the element in the first argument.
1985
+ goog.style.scrollIntoContainerView(goog.dom.getElement('item1'), container,
1986
+ true);
1987
+ assertEquals('center item1', 0, container.scrollTop);
1988
+ goog.style.scrollIntoContainerView(goog.dom.getElement('item4'), container,
1989
+ true);
1990
+ assertEquals('center item4', 48, container.scrollTop);
1991
+
1992
+ // The element is higher than the container.
1993
+ goog.dom.getElement('item3').style.height = '140px';
1994
+ goog.style.scrollIntoContainerView(goog.dom.getElement('item3'), container);
1995
+ assertEquals('show item3 with increased height', 59, container.scrollTop);
1996
+ goog.style.scrollIntoContainerView(goog.dom.getElement('item3'), container,
1997
+ true);
1998
+ assertEquals('center item3 with increased height', 87, container.scrollTop);
1999
+ goog.dom.getElement('item3').style.height = '';
2000
+
2001
+ // Scroll to non-integer position.
2002
+ goog.dom.getElement('item4').style.height = '21px';
2003
+ goog.style.scrollIntoContainerView(goog.dom.getElement('item4'), container,
2004
+ true);
2005
+ assertEquals('scroll position is rounded down', 48, container.scrollTop);
2006
+ goog.dom.getElement('item4').style.height = '';
2007
+ }
2008
+
2009
+ function testScrollIntoContainerViewStandard() {
2010
+ if (!goog.dom.isCss1CompatMode()) return;
2011
+
2012
+ var container = goog.dom.getElement('scrollable-container');
2013
+
2014
+ // Scroll the minimum amount to make the elements visible.
2015
+ goog.style.scrollIntoContainerView(goog.dom.getElement('item7'), container);
2016
+ assertEquals('scroll to item7', 115, container.scrollTop);
2017
+ goog.style.scrollIntoContainerView(goog.dom.getElement('item8'), container);
2018
+ assertEquals('scroll to item8', 148, container.scrollTop);
2019
+ goog.style.scrollIntoContainerView(goog.dom.getElement('item7'), container);
2020
+ assertEquals('item7 still visible', 148, container.scrollTop);
2021
+ goog.style.scrollIntoContainerView(goog.dom.getElement('item1'), container);
2022
+ assertEquals('scroll to item1', 17, container.scrollTop);
2023
+
2024
+ // Center the element in the first argument.
2025
+ goog.style.scrollIntoContainerView(
2026
+ goog.dom.getElement('item1'), container, true);
2027
+ assertEquals('center item1', 0, container.scrollTop);
2028
+ goog.style.scrollIntoContainerView(
2029
+ goog.dom.getElement('item4'), container, true);
2030
+ assertEquals('center item4', 66, container.scrollTop);
2031
+
2032
+ // The element is higher than the container.
2033
+ goog.dom.getElement('item3').style.height = '140px';
2034
+ goog.style.scrollIntoContainerView(goog.dom.getElement('item3'), container);
2035
+ assertEquals('show item3 with increased height', 83, container.scrollTop);
2036
+ goog.style.scrollIntoContainerView(
2037
+ goog.dom.getElement('item3'), container, true);
2038
+ assertEquals('center item3 with increased height', 93, container.scrollTop);
2039
+ goog.dom.getElement('item3').style.height = '';
2040
+
2041
+ // Scroll to non-integer position.
2042
+ goog.dom.getElement('item4').style.height = '21px';
2043
+ goog.style.scrollIntoContainerView(
2044
+ goog.dom.getElement('item4'), container, true);
2045
+ assertEquals('scroll position is rounded down', 66, container.scrollTop);
2046
+ goog.dom.getElement('item4').style.height = '';
2047
+ }
2048
+
2049
+ function testOffsetParent() {
2050
+ var parent = goog.dom.getElement('offset-parent');
2051
+ var child = goog.dom.getElement('offset-child');
2052
+ assertEquals(parent, goog.style.getOffsetParent(child));
2053
+ }
2054
+
2055
+ function testOverflowOffsetParent() {
2056
+ var parent = goog.dom.getElement('offset-parent-overflow');
2057
+ var child = goog.dom.getElement('offset-child-overflow');
2058
+ assertEquals(parent, goog.style.getOffsetParent(child));
2059
+ }
2060
+
2061
+ function testGetViewportPageOffset() {
2062
+ expectedFailures.expectFailureFor(
2063
+ goog.userAgent.IE && !goog.userAgent.isVersionOrHigher(9),
2064
+ 'Test has been flaky for ie8-winxp image. Disabling.');
2065
+
2066
+ var testViewport = goog.dom.getElement('test-viewport');
2067
+ testViewport.style.height = '5000px';
2068
+ testViewport.style.width = '5000px';
2069
+ var offset = goog.style.getViewportPageOffset(document);
2070
+ assertEquals(0, offset.x);
2071
+ assertEquals(0, offset.y);
2072
+
2073
+ window.scrollTo(0, 100);
2074
+ offset = goog.style.getViewportPageOffset(document);
2075
+ assertEquals(0, offset.x);
2076
+ assertEquals(100, offset.y);
2077
+
2078
+ window.scrollTo(100, 0);
2079
+ offset = goog.style.getViewportPageOffset(document);
2080
+ assertEquals(100, offset.x);
2081
+ assertEquals(0, offset.y);
2082
+ }
2083
+
2084
+ function testGetsTranslation() {
2085
+ var element = document.getElementById('translation');
2086
+
2087
+ expectedFailures.expectFailureFor(
2088
+ goog.userAgent.IE && !goog.userAgent.product.isVersion(9),
2089
+ 'CSS transforms were only introduced in IE9');
2090
+
2091
+ // First check the element is actually translated, and we haven't missed
2092
+ // one of the vendor-specific transform properties
2093
+ var position = goog.style.getClientPosition(element);
2094
+ var translation = goog.style.getCssTranslation(element);
2095
+ var expectedTranslation = new goog.math.Coordinate(20, 30);
2096
+
2097
+ expectedFailures.run(function() {
2098
+ assertEquals(30, position.x);
2099
+ assertRoughlyEquals(40, position.y, .1);
2100
+ assertObjectEquals(expectedTranslation, translation);
2101
+ });
2102
+ }
2103
+
2104
+
2105
+ /**
2106
+ * Return whether a given user agent has been detected.
2107
+ * @param {number} agent Value in UserAgents.
2108
+ * @return {boolean} Whether the user agent has been detected.
2109
+ */
2110
+ function getUserAgentDetected_(agent) {
2111
+ switch (agent) {
2112
+ case UserAgents.GECKO:
2113
+ return goog.userAgent.detectedGecko_;
2114
+ case UserAgents.IE:
2115
+ return goog.userAgent.detectedIe_;
2116
+ case UserAgents.OPERA:
2117
+ return goog.userAgent.detectedOpera_;
2118
+ case UserAgents.WEBKIT:
2119
+ return goog.userAgent.detectedWebkit_;
2120
+ }
2121
+ return null;
2122
+ }
2123
+
2124
+
2125
+ /**
2126
+ * Rerun the initialization code to set all of the goog.userAgent constants.
2127
+ */
2128
+ function reinitializeUserAgent() {
2129
+ goog.userAgent.init_();
2130
+
2131
+ // Unfortunately we can't isolate the useragent setting in a function
2132
+ // we can call, because things rely on it compiling to nothing when
2133
+ // one of the ASSUME flags is set, and the compiler isn't smart enough
2134
+ // to do that when the setting is done inside a function that's inlined.
2135
+ goog.userAgent.OPERA = goog.userAgent.detectedOpera_;
2136
+ goog.userAgent.IE = goog.userAgent.detectedIe_;
2137
+ goog.userAgent.GECKO = goog.userAgent.detectedGecko_;
2138
+ goog.userAgent.WEBKIT = goog.userAgent.detectedWebkit_;
2139
+ goog.userAgent.MOBILE = goog.userAgent.detectedMobile_;
2140
+ goog.userAgent.SAFARI = goog.userAgent.WEBKIT;
2141
+
2142
+ goog.userAgent.PLATFORM = goog.userAgent.determinePlatform_();
2143
+ goog.userAgent.initPlatform_();
2144
+
2145
+ goog.userAgent.VERSION = goog.userAgent.determineVersion_();
2146
+ }
2147
+
2148
+
2149
+ /**
2150
+ * Test browser detection for a user agent configuration.
2151
+ * @param {Array.<number>} expectedAgents Array of expected userAgents.
2152
+ * @param {string} uaString User agent string.
2153
+ * @param {string=} opt_product Navigator product string.
2154
+ * @param {string=} opt_vendor Navigator vendor string.
2155
+ */
2156
+ function assertUserAgent(expectedAgents, uaString, opt_product, opt_vendor) {
2157
+ var mockGlobal = {
2158
+ 'navigator': {
2159
+ 'userAgent': uaString,
2160
+ 'product': opt_product,
2161
+ 'vendor': opt_vendor
2162
+ }
2163
+ };
2164
+ propertyReplacer.set(goog, 'global', mockGlobal);
2165
+ reinitializeUserAgent();
2166
+ for (var ua in UserAgents) {
2167
+ var isExpected = goog.array.contains(expectedAgents, UserAgents[ua]);
2168
+ assertEquals(isExpected, getUserAgentDetected_(UserAgents[ua]));
2169
+ }
2170
+ }
2171
+
2172
+
2173
+ /**
2174
+ * Test for the proper vendor style name for a CSS property
2175
+ * with a vendor prefix for Webkit.
2176
+ */
2177
+ function testGetVendorStyleNameWebkit() {
2178
+ var mockElement = {
2179
+ 'style': {
2180
+ 'WebkitTransform': ''
2181
+ }
2182
+ };
2183
+
2184
+ assertUserAgent([UserAgents.WEBKIT], 'WebKit');
2185
+ assertEquals('-webkit-transform',
2186
+ goog.style.getVendorStyleName_(mockElement, 'transform'));
2187
+ }
2188
+
2189
+
2190
+ /**
2191
+ * Test for the proper vendor style name for a CSS property
2192
+ * when it exists without a vendor prefix for Webkit.
2193
+ */
2194
+ function testGetVendorStyleNameWebkitNoPrefix() {
2195
+ var mockElement = {
2196
+ 'style': {
2197
+ 'WebkitTransform': '',
2198
+ 'transform': ''
2199
+ }
2200
+ };
2201
+
2202
+ assertUserAgent([UserAgents.WEBKIT], 'WebKit');
2203
+ assertEquals(
2204
+ 'transform',
2205
+ goog.style.getVendorStyleName_(mockElement, 'transform'));
2206
+ }
2207
+
2208
+
2209
+ /**
2210
+ * Test for the proper vendor style name for a CSS property
2211
+ * with a vendor prefix for Gecko.
2212
+ */
2213
+ function testGetVendorStyleNameGecko() {
2214
+ var mockElement = {
2215
+ 'style': {
2216
+ 'MozTransform': ''
2217
+ }
2218
+ };
2219
+
2220
+ assertUserAgent([UserAgents.GECKO], 'Gecko', 'Gecko');
2221
+ assertEquals('-moz-transform',
2222
+ goog.style.getVendorStyleName_(mockElement, 'transform'));
2223
+ }
2224
+
2225
+
2226
+ /**
2227
+ * Test for the proper vendor style name for a CSS property
2228
+ * when it exists without a vendor prefix for Gecko.
2229
+ */
2230
+ function testGetVendorStyleNameGeckoNoPrefix() {
2231
+ var mockElement = {
2232
+ 'style': {
2233
+ 'MozTransform': '',
2234
+ 'transform': ''
2235
+ }
2236
+ };
2237
+
2238
+ assertUserAgent([UserAgents.GECKO], 'Gecko', 'Gecko');
2239
+ assertEquals(
2240
+ 'transform',
2241
+ goog.style.getVendorStyleName_(mockElement, 'transform'));
2242
+ }
2243
+
2244
+
2245
+ /**
2246
+ * Test for the proper vendor style name for a CSS property
2247
+ * with a vendor prefix for IE.
2248
+ */
2249
+ function testGetVendorStyleNameIE() {
2250
+ var mockElement = {
2251
+ 'style': {
2252
+ 'msTransform': ''
2253
+ }
2254
+ };
2255
+
2256
+ assertUserAgent([UserAgents.IE], 'MSIE');
2257
+ assertEquals('-ms-transform',
2258
+ goog.style.getVendorStyleName_(mockElement, 'transform'));
2259
+ }
2260
+
2261
+
2262
+ /**
2263
+ * Test for the proper vendor style name for a CSS property
2264
+ * when it exists without a vendor prefix for IE.
2265
+ */
2266
+ function testGetVendorStyleNameIENoPrefix() {
2267
+ var mockElement = {
2268
+ 'style': {
2269
+ 'msTransform': '',
2270
+ 'transform': ''
2271
+ }
2272
+ };
2273
+
2274
+ assertUserAgent([UserAgents.IE], 'MSIE');
2275
+ assertEquals(
2276
+ 'transform',
2277
+ goog.style.getVendorStyleName_(mockElement, 'transform'));
2278
+ }
2279
+
2280
+
2281
+ /**
2282
+ * Test for the proper vendor style name for a CSS property
2283
+ * with a vendor prefix for Opera.
2284
+ */
2285
+ function testGetVendorStyleNameOpera() {
2286
+ var mockElement = {
2287
+ 'style': {
2288
+ 'OTransform': ''
2289
+ }
2290
+ };
2291
+
2292
+ assertUserAgent([UserAgents.OPERA], 'Opera');
2293
+ assertEquals('-o-transform',
2294
+ goog.style.getVendorStyleName_(mockElement, 'transform'));
2295
+ }
2296
+
2297
+
2298
+ /**
2299
+ * Test for the proper vendor style name for a CSS property
2300
+ * when it exists without a vendor prefix for Opera.
2301
+ */
2302
+ function testGetVendorStyleNameOperaNoPrefix() {
2303
+ var mockElement = {
2304
+ 'style': {
2305
+ 'OTransform': '',
2306
+ 'transform': ''
2307
+ }
2308
+ };
2309
+
2310
+ assertUserAgent([UserAgents.OPERA], 'Opera');
2311
+ assertEquals(
2312
+ 'transform',
2313
+ goog.style.getVendorStyleName_(mockElement, 'transform'));
2314
+ }
2315
+
2316
+
2317
+ /**
2318
+ * Test for the proper vendor style name for a CSS property
2319
+ * with a vendor prefix for Webkit.
2320
+ */
2321
+ function testGetVendorJsStyleNameWebkit() {
2322
+ var mockElement = {
2323
+ 'style': {
2324
+ 'WebkitTransform': ''
2325
+ }
2326
+ };
2327
+
2328
+ assertUserAgent([UserAgents.WEBKIT], 'WebKit');
2329
+ assertEquals('WebkitTransform',
2330
+ goog.style.getVendorJsStyleName_(mockElement, 'transform'));
2331
+ }
2332
+
2333
+
2334
+ /**
2335
+ * Test for the proper vendor style name for a CSS property
2336
+ * when it exists without a vendor prefix for Webkit.
2337
+ */
2338
+ function testGetVendorJsStyleNameWebkitNoPrefix() {
2339
+ var mockElement = {
2340
+ 'style': {
2341
+ 'WebkitTransform': '',
2342
+ 'transform': ''
2343
+ }
2344
+ };
2345
+
2346
+ assertUserAgent([UserAgents.WEBKIT], 'WebKit');
2347
+ assertEquals(
2348
+ 'transform',
2349
+ goog.style.getVendorJsStyleName_(mockElement, 'transform'));
2350
+ }
2351
+
2352
+
2353
+ /**
2354
+ * Test for the proper vendor style name for a CSS property
2355
+ * with a vendor prefix for Gecko.
2356
+ */
2357
+ function testGetVendorJsStyleNameGecko() {
2358
+ var mockElement = {
2359
+ 'style': {
2360
+ 'MozTransform': ''
2361
+ }
2362
+ };
2363
+
2364
+ assertUserAgent([UserAgents.GECKO], 'Gecko', 'Gecko');
2365
+ assertEquals('MozTransform',
2366
+ goog.style.getVendorJsStyleName_(mockElement, 'transform'));
2367
+ }
2368
+
2369
+
2370
+ /**
2371
+ * Test for the proper vendor style name for a CSS property
2372
+ * when it exists without a vendor prefix for Gecko.
2373
+ */
2374
+ function testGetVendorJsStyleNameGeckoNoPrefix() {
2375
+ var mockElement = {
2376
+ 'style': {
2377
+ 'MozTransform': '',
2378
+ 'transform': ''
2379
+ }
2380
+ };
2381
+
2382
+ assertUserAgent([UserAgents.GECKO], 'Gecko', 'Gecko');
2383
+ assertEquals(
2384
+ 'transform',
2385
+ goog.style.getVendorJsStyleName_(mockElement, 'transform'));
2386
+ }
2387
+
2388
+
2389
+ /**
2390
+ * Test for the proper vendor style name for a CSS property
2391
+ * with a vendor prefix for IE.
2392
+ */
2393
+ function testGetVendorJsStyleNameIE() {
2394
+ var mockElement = {
2395
+ 'style': {
2396
+ 'msTransform': ''
2397
+ }
2398
+ };
2399
+
2400
+ assertUserAgent([UserAgents.IE], 'MSIE');
2401
+ assertEquals('msTransform',
2402
+ goog.style.getVendorJsStyleName_(mockElement, 'transform'));
2403
+ }
2404
+
2405
+
2406
+ /**
2407
+ * Test for the proper vendor style name for a CSS property
2408
+ * when it exists without a vendor prefix for IE.
2409
+ */
2410
+ function testGetVendorJsStyleNameIENoPrefix() {
2411
+ var mockElement = {
2412
+ 'style': {
2413
+ 'msTransform': '',
2414
+ 'transform': ''
2415
+ }
2416
+ };
2417
+
2418
+ assertUserAgent([UserAgents.IE], 'MSIE');
2419
+ assertEquals(
2420
+ 'transform',
2421
+ goog.style.getVendorJsStyleName_(mockElement, 'transform'));
2422
+ }
2423
+
2424
+
2425
+ /**
2426
+ * Test for the proper vendor style name for a CSS property
2427
+ * with a vendor prefix for Opera.
2428
+ */
2429
+ function testGetVendorJsStyleNameOpera() {
2430
+ var mockElement = {
2431
+ 'style': {
2432
+ 'OTransform': ''
2433
+ }
2434
+ };
2435
+
2436
+ assertUserAgent([UserAgents.OPERA], 'Opera');
2437
+ assertEquals('OTransform',
2438
+ goog.style.getVendorJsStyleName_(mockElement, 'transform'));
2439
+ }
2440
+
2441
+
2442
+ /**
2443
+ * Test for the proper vendor style name for a CSS property
2444
+ * when it exists without a vendor prefix for Opera.
2445
+ */
2446
+ function testGetVendorJsStyleNameOperaNoPrefix() {
2447
+ var mockElement = {
2448
+ 'style': {
2449
+ 'OTransform': '',
2450
+ 'transform': ''
2451
+ }
2452
+ };
2453
+
2454
+ assertUserAgent([UserAgents.OPERA], 'Opera');
2455
+ assertEquals(
2456
+ 'transform',
2457
+ goog.style.getVendorJsStyleName_(mockElement, 'transform'));
2458
+ }
2459
+
2460
+
2461
+ /**
2462
+ * Test for the setting a style name for a CSS property
2463
+ * with a vendor prefix for Webkit.
2464
+ */
2465
+ function testSetVendorStyleWebkit() {
2466
+ var mockElement = {
2467
+ 'style': {
2468
+ 'WebkitTransform': ''
2469
+ }
2470
+ };
2471
+ var styleValue = 'translate3d(0,0,0)';
2472
+
2473
+ assertUserAgent([UserAgents.WEBKIT], 'WebKit');
2474
+ goog.style.setStyle(mockElement, 'transform', styleValue);
2475
+ assertEquals(styleValue, mockElement.style.WebkitTransform);
2476
+ }
2477
+
2478
+
2479
+ /**
2480
+ * Test for the setting a style name for a CSS property
2481
+ * with a vendor prefix for Mozilla.
2482
+ */
2483
+ function testSetVendorStyleGecko() {
2484
+ var mockElement = {
2485
+ 'style': {
2486
+ 'MozTransform': ''
2487
+ }
2488
+ };
2489
+ var styleValue = 'translate3d(0,0,0)';
2490
+
2491
+ assertUserAgent([UserAgents.GECKO], 'Gecko', 'Gecko');
2492
+ goog.style.setStyle(mockElement, 'transform', styleValue);
2493
+ assertEquals(styleValue, mockElement.style.MozTransform);
2494
+ }
2495
+
2496
+
2497
+ /**
2498
+ * Test for the setting a style name for a CSS property
2499
+ * with a vendor prefix for IE.
2500
+ */
2501
+ function testSetVendorStyleIE() {
2502
+ var mockElement = {
2503
+ 'style': {
2504
+ 'msTransform': ''
2505
+ }
2506
+ };
2507
+ var styleValue = 'translate3d(0,0,0)';
2508
+
2509
+ assertUserAgent([UserAgents.IE], 'MSIE');
2510
+ goog.style.setStyle(mockElement, 'transform', styleValue);
2511
+ assertEquals(styleValue, mockElement.style.msTransform);
2512
+ }
2513
+
2514
+
2515
+ /**
2516
+ * Test for the setting a style name for a CSS property
2517
+ * with a vendor prefix for Opera.
2518
+ */
2519
+ function testSetVendorStyleOpera() {
2520
+ var mockElement = {
2521
+ 'style': {
2522
+ 'OTransform': ''
2523
+ }
2524
+ };
2525
+ var styleValue = 'translate3d(0,0,0)';
2526
+
2527
+ assertUserAgent([UserAgents.OPERA], 'Opera');
2528
+ goog.style.setStyle(mockElement, 'transform', styleValue);
2529
+ assertEquals(styleValue, mockElement.style.OTransform);
2530
+ }
2531
+
2532
+
2533
+ /**
2534
+ * Test for the getting a style name for a CSS property
2535
+ * with a vendor prefix for Webkit.
2536
+ */
2537
+ function testGetVendorStyleWebkit() {
2538
+ var mockElement = {
2539
+ 'style': {
2540
+ 'WebkitTransform': ''
2541
+ }
2542
+ };
2543
+ var styleValue = 'translate3d(0,0,0)';
2544
+
2545
+ assertUserAgent([UserAgents.WEBKIT], 'WebKit');
2546
+ goog.style.setStyle(mockElement, 'transform', styleValue);
2547
+ assertEquals(styleValue, goog.style.getStyle(mockElement, 'transform'));
2548
+ }
2549
+
2550
+
2551
+ /**
2552
+ * Test for the getting a style name for a CSS property
2553
+ * with a vendor prefix for Mozilla.
2554
+ */
2555
+ function testGetVendorStyleGecko() {
2556
+ var mockElement = {
2557
+ 'style': {
2558
+ 'MozTransform': ''
2559
+ }
2560
+ };
2561
+ var styleValue = 'translate3d(0,0,0)';
2562
+
2563
+ assertUserAgent([UserAgents.GECKO], 'Gecko', 'Gecko');
2564
+ goog.style.setStyle(mockElement, 'transform', styleValue);
2565
+ assertEquals(styleValue, goog.style.getStyle(mockElement, 'transform'));
2566
+ }
2567
+
2568
+
2569
+ /**
2570
+ * Test for the getting a style name for a CSS property
2571
+ * with a vendor prefix for IE.
2572
+ */
2573
+ function testGetVendorStyleIE() {
2574
+ var mockElement = {
2575
+ 'style': {
2576
+ 'msTransform': ''
2577
+ }
2578
+ };
2579
+ var styleValue = 'translate3d(0,0,0)';
2580
+
2581
+ assertUserAgent([UserAgents.IE], 'MSIE');
2582
+ goog.style.setStyle(mockElement, 'transform', styleValue);
2583
+ assertEquals(styleValue, goog.style.getStyle(mockElement, 'transform'));
2584
+ }
2585
+
2586
+
2587
+ /**
2588
+ * Test for the getting a style name for a CSS property
2589
+ * with a vendor prefix for Opera.
2590
+ */
2591
+ function testGetVendorStyleOpera() {
2592
+ var mockElement = {
2593
+ 'style': {
2594
+ 'OTransform': ''
2595
+ }
2596
+ };
2597
+ var styleValue = 'translate3d(0,0,0)';
2598
+
2599
+ assertUserAgent([UserAgents.OPERA], 'Opera');
2600
+ goog.style.setStyle(mockElement, 'transform', styleValue);
2601
+ assertEquals(styleValue, goog.style.getStyle(mockElement, 'transform'));
2602
+ }