k4compiler 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +20 -0
- data/.gitmodules +3 -0
- data/.rspec +2 -0
- data/Gemfile +4 -0
- data/Guardfile +8 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +1 -0
- data/k4compiler.gemspec +50 -0
- data/lib/k4compiler.rb +26 -0
- data/lib/k4compiler/compiler.rb +41 -0
- data/lib/k4compiler/compiler/base.rb +24 -0
- data/lib/k4compiler/compiler/closure.rb +96 -0
- data/lib/k4compiler/compiler/markdown.rb +78 -0
- data/lib/k4compiler/compiler/scss.rb +31 -0
- data/lib/k4compiler/config.rb +59 -0
- data/lib/k4compiler/version.rb +3 -0
- data/spec/k4compiler/compiler/base_spec.rb +40 -0
- data/spec/k4compiler/compiler/closure/compiled-src/hello-with-closure-compiled-script.js +18317 -0
- data/spec/k4compiler/compiler/closure/src/hello-compiled-script.js +15 -0
- data/spec/k4compiler/compiler/closure/src/hello-with-closure.js +15 -0
- data/spec/k4compiler/compiler/closure/src/hello.js +15 -0
- data/spec/k4compiler/compiler/closure_spec.rb +159 -0
- data/spec/k4compiler/compiler/markdown_spec.rb +153 -0
- data/spec/k4compiler/compiler/scss/_body.scss +5 -0
- data/spec/k4compiler/compiler/scss/sample.scss +9 -0
- data/spec/k4compiler/compiler/scss_spec.rb +70 -0
- data/spec/k4compiler/compiler_spec.rb +75 -0
- data/spec/k4compiler/config_spec.rb +116 -0
- data/spec/k4compiler_spec.rb +17 -0
- data/spec/spec_helper.rb +8 -0
- data/third_party/.gitkeep +1 -0
- data/third_party/closure-compiler-20130603/COPYING +202 -0
- data/third_party/closure-compiler-20130603/README +292 -0
- data/third_party/closure-compiler-20130603/compiler.jar +0 -0
- data/third_party/closure-library/.gitignore +12 -0
- data/third_party/closure-library/AUTHORS +17 -0
- data/third_party/closure-library/CONTRIBUTING +5 -0
- data/third_party/closure-library/LICENSE +176 -0
- data/third_party/closure-library/README +6 -0
- data/third_party/closure-library/all_tests.html +113 -0
- data/third_party/closure-library/alltests.js +16 -0
- data/third_party/closure-library/closure/bin/build/closurebuilder.py +262 -0
- data/third_party/closure-library/closure/bin/build/depstree.py +189 -0
- data/third_party/closure-library/closure/bin/build/depstree_test.py +127 -0
- data/third_party/closure-library/closure/bin/build/depswriter.py +202 -0
- data/third_party/closure-library/closure/bin/build/jscompiler.py +135 -0
- data/third_party/closure-library/closure/bin/build/jscompiler_test.py +120 -0
- data/third_party/closure-library/closure/bin/build/source.py +121 -0
- data/third_party/closure-library/closure/bin/build/source_test.py +134 -0
- data/third_party/closure-library/closure/bin/build/treescan.py +78 -0
- data/third_party/closure-library/closure/bin/calcdeps.py +590 -0
- data/third_party/closure-library/closure/bin/labs/code/generate_jsdoc.py +171 -0
- data/third_party/closure-library/closure/bin/labs/code/generate_jsdoc_test.py +167 -0
- data/third_party/closure-library/closure/bin/labs/code/run_py_tests.sh +28 -0
- data/third_party/closure-library/closure/bin/scopify.py +211 -0
- data/third_party/closure-library/closure/css/inlay/g-base.css +82 -0
- data/third_party/closure-library/closure/css/inlay/g-fixed.css +173 -0
- data/third_party/closure-library/closure/css/inlay/g-ratio.css +253 -0
- data/third_party/closure-library/closure/goog/a11y/aria/announcer.js +108 -0
- data/third_party/closure-library/closure/goog/a11y/aria/announcer_test.html +97 -0
- data/third_party/closure-library/closure/goog/a11y/aria/aria.js +362 -0
- data/third_party/closure-library/closure/goog/a11y/aria/aria_test.html +263 -0
- data/third_party/closure-library/closure/goog/a11y/aria/attributes.js +389 -0
- data/third_party/closure-library/closure/goog/a11y/aria/datatables.js +68 -0
- data/third_party/closure-library/closure/goog/a11y/aria/roles.js +216 -0
- data/third_party/closure-library/closure/goog/array/array.js +1507 -0
- data/third_party/closure-library/closure/goog/array/array_test.html +1674 -0
- data/third_party/closure-library/closure/goog/asserts/asserts.js +293 -0
- data/third_party/closure-library/closure/goog/asserts/asserts_test.html +178 -0
- data/third_party/closure-library/closure/goog/async/animationdelay.js +270 -0
- data/third_party/closure-library/closure/goog/async/animationdelay_test.html +93 -0
- data/third_party/closure-library/closure/goog/async/conditionaldelay.js +235 -0
- data/third_party/closure-library/closure/goog/async/conditionaldelay_test.html +227 -0
- data/third_party/closure-library/closure/goog/async/delay.js +177 -0
- data/third_party/closure-library/closure/goog/async/delay_test.html +148 -0
- data/third_party/closure-library/closure/goog/async/nexttick.js +174 -0
- data/third_party/closure-library/closure/goog/async/nexttick_test.html +137 -0
- data/third_party/closure-library/closure/goog/async/throttle.js +189 -0
- data/third_party/closure-library/closure/goog/async/throttle_test.html +102 -0
- data/third_party/closure-library/closure/goog/base.js +1593 -0
- data/third_party/closure-library/closure/goog/base_test.html +1206 -0
- data/third_party/closure-library/closure/goog/bootstrap/nodejs.js +91 -0
- data/third_party/closure-library/closure/goog/bootstrap/webworkers.js +37 -0
- data/third_party/closure-library/closure/goog/color/alpha.js +467 -0
- data/third_party/closure-library/closure/goog/color/alpha_test.html +301 -0
- data/third_party/closure-library/closure/goog/color/color.js +773 -0
- data/third_party/closure-library/closure/goog/color/color_test.html +661 -0
- data/third_party/closure-library/closure/goog/color/names.js +176 -0
- data/third_party/closure-library/closure/goog/crypt/aes.js +1027 -0
- data/third_party/closure-library/closure/goog/crypt/aes_test.html +593 -0
- data/third_party/closure-library/closure/goog/crypt/arc4.js +162 -0
- data/third_party/closure-library/closure/goog/crypt/arc4_test.html +63 -0
- data/third_party/closure-library/closure/goog/crypt/base64.js +272 -0
- data/third_party/closure-library/closure/goog/crypt/base64_test.html +117 -0
- data/third_party/closure-library/closure/goog/crypt/basen.js +242 -0
- data/third_party/closure-library/closure/goog/crypt/basen_test.html +167 -0
- data/third_party/closure-library/closure/goog/crypt/blobhasher.js +284 -0
- data/third_party/closure-library/closure/goog/crypt/blobhasher_test.html +385 -0
- data/third_party/closure-library/closure/goog/crypt/blockcipher.js +52 -0
- data/third_party/closure-library/closure/goog/crypt/cbc.js +150 -0
- data/third_party/closure-library/closure/goog/crypt/cbc_test.html +18 -0
- data/third_party/closure-library/closure/goog/crypt/cbc_test.js +100 -0
- data/third_party/closure-library/closure/goog/crypt/crypt.js +155 -0
- data/third_party/closure-library/closure/goog/crypt/crypt_perf.html +85 -0
- data/third_party/closure-library/closure/goog/crypt/crypt_test.html +98 -0
- data/third_party/closure-library/closure/goog/crypt/hash.js +62 -0
- data/third_party/closure-library/closure/goog/crypt/hash32.js +184 -0
- data/third_party/closure-library/closure/goog/crypt/hash32_test.html +287 -0
- data/third_party/closure-library/closure/goog/crypt/hashtester.js +243 -0
- data/third_party/closure-library/closure/goog/crypt/hmac.js +162 -0
- data/third_party/closure-library/closure/goog/crypt/hmac_test.html +113 -0
- data/third_party/closure-library/closure/goog/crypt/md5.js +429 -0
- data/third_party/closure-library/closure/goog/crypt/md5_perf.html +39 -0
- data/third_party/closure-library/closure/goog/crypt/md5_test.html +152 -0
- data/third_party/closure-library/closure/goog/crypt/pbkdf2.js +127 -0
- data/third_party/closure-library/closure/goog/crypt/pbkdf2_test.html +68 -0
- data/third_party/closure-library/closure/goog/crypt/sha1.js +275 -0
- data/third_party/closure-library/closure/goog/crypt/sha1_perf.html +40 -0
- data/third_party/closure-library/closure/goog/crypt/sha1_test.html +79 -0
- data/third_party/closure-library/closure/goog/crypt/sha2.js +275 -0
- data/third_party/closure-library/closure/goog/crypt/sha224.js +53 -0
- data/third_party/closure-library/closure/goog/crypt/sha224_perf.html +40 -0
- data/third_party/closure-library/closure/goog/crypt/sha224_test.html +57 -0
- data/third_party/closure-library/closure/goog/crypt/sha256.js +53 -0
- data/third_party/closure-library/closure/goog/crypt/sha256_perf.html +40 -0
- data/third_party/closure-library/closure/goog/crypt/sha256_test.html +66 -0
- data/third_party/closure-library/closure/goog/css/autocomplete.css +43 -0
- data/third_party/closure-library/closure/goog/css/bubble.css +84 -0
- data/third_party/closure-library/closure/goog/css/button.css +38 -0
- data/third_party/closure-library/closure/goog/css/charpicker.css +206 -0
- data/third_party/closure-library/closure/goog/css/checkbox.css +38 -0
- data/third_party/closure-library/closure/goog/css/colormenubutton.css +25 -0
- data/third_party/closure-library/closure/goog/css/colorpalette.css +54 -0
- data/third_party/closure-library/closure/goog/css/colorpicker-simplegrid.css +49 -0
- data/third_party/closure-library/closure/goog/css/combobox.css +54 -0
- data/third_party/closure-library/closure/goog/css/common.css +41 -0
- data/third_party/closure-library/closure/goog/css/css3button.css +77 -0
- data/third_party/closure-library/closure/goog/css/css3menubutton.css +23 -0
- data/third_party/closure-library/closure/goog/css/custombutton.css +164 -0
- data/third_party/closure-library/closure/goog/css/datepicker.css +148 -0
- data/third_party/closure-library/closure/goog/css/dialog.css +72 -0
- data/third_party/closure-library/closure/goog/css/dimensionpicker.css +47 -0
- data/third_party/closure-library/closure/goog/css/dragdropdetector.css +48 -0
- data/third_party/closure-library/closure/goog/css/editor/bubble.css +73 -0
- data/third_party/closure-library/closure/goog/css/editor/dialog.css +66 -0
- data/third_party/closure-library/closure/goog/css/editor/equationeditor.css +113 -0
- data/third_party/closure-library/closure/goog/css/editor/linkdialog.css +36 -0
- data/third_party/closure-library/closure/goog/css/editortoolbar.css +225 -0
- data/third_party/closure-library/closure/goog/css/filteredmenu.css +30 -0
- data/third_party/closure-library/closure/goog/css/filterobservingmenuitem.css +25 -0
- data/third_party/closure-library/closure/goog/css/flatbutton.css +64 -0
- data/third_party/closure-library/closure/goog/css/flatmenubutton.css +63 -0
- data/third_party/closure-library/closure/goog/css/hovercard.css +51 -0
- data/third_party/closure-library/closure/goog/css/hsvapalette.css +231 -0
- data/third_party/closure-library/closure/goog/css/hsvpalette.css +179 -0
- data/third_party/closure-library/closure/goog/css/imagelessbutton.css +160 -0
- data/third_party/closure-library/closure/goog/css/imagelessmenubutton.css +23 -0
- data/third_party/closure-library/closure/goog/css/inputdatepicker.css +12 -0
- data/third_party/closure-library/closure/goog/css/linkbutton.css +26 -0
- data/third_party/closure-library/closure/goog/css/menu.css +27 -0
- data/third_party/closure-library/closure/goog/css/menubar.css +57 -0
- data/third_party/closure-library/closure/goog/css/menubutton.css +169 -0
- data/third_party/closure-library/closure/goog/css/menuitem.css +148 -0
- data/third_party/closure-library/closure/goog/css/menuseparator.css +19 -0
- data/third_party/closure-library/closure/goog/css/multitestrunner.css +121 -0
- data/third_party/closure-library/closure/goog/css/offline.css +147 -0
- data/third_party/closure-library/closure/goog/css/palette.css +36 -0
- data/third_party/closure-library/closure/goog/css/popupdatepicker.css +17 -0
- data/third_party/closure-library/closure/goog/css/roundedpanel.css +29 -0
- data/third_party/closure-library/closure/goog/css/roundedtab.css +158 -0
- data/third_party/closure-library/closure/goog/css/submenu.css +38 -0
- data/third_party/closure-library/closure/goog/css/tab.css +105 -0
- data/third_party/closure-library/closure/goog/css/tabbar.css +52 -0
- data/third_party/closure-library/closure/goog/css/tablesorter.css +14 -0
- data/third_party/closure-library/closure/goog/css/toolbar.css +400 -0
- data/third_party/closure-library/closure/goog/css/tooltip.css +14 -0
- data/third_party/closure-library/closure/goog/css/tree.css +146 -0
- data/third_party/closure-library/closure/goog/css/tristatemenuitem.css +43 -0
- data/third_party/closure-library/closure/goog/cssom/cssom.js +449 -0
- data/third_party/closure-library/closure/goog/cssom/cssom_test.html +343 -0
- data/third_party/closure-library/closure/goog/cssom/cssom_test_import_1.css +11 -0
- data/third_party/closure-library/closure/goog/cssom/cssom_test_import_2.css +10 -0
- data/third_party/closure-library/closure/goog/cssom/cssom_test_link_1.css +10 -0
- data/third_party/closure-library/closure/goog/cssom/iframe/style.js +1023 -0
- data/third_party/closure-library/closure/goog/cssom/iframe/style_test.html +391 -0
- data/third_party/closure-library/closure/goog/cssom/iframe/style_test_import.css +10 -0
- data/third_party/closure-library/closure/goog/datasource/datamanager.js +559 -0
- data/third_party/closure-library/closure/goog/datasource/datasource.js +656 -0
- data/third_party/closure-library/closure/goog/datasource/datasource_test.html +265 -0
- data/third_party/closure-library/closure/goog/datasource/expr.js +544 -0
- data/third_party/closure-library/closure/goog/datasource/expr_test.html +97 -0
- data/third_party/closure-library/closure/goog/datasource/fastdatanode.js +811 -0
- data/third_party/closure-library/closure/goog/datasource/fastdatanode_test.html +254 -0
- data/third_party/closure-library/closure/goog/datasource/jsdatasource.js +460 -0
- data/third_party/closure-library/closure/goog/datasource/jsondatasource.js +148 -0
- data/third_party/closure-library/closure/goog/datasource/jsxmlhttpdatasource.js +195 -0
- data/third_party/closure-library/closure/goog/datasource/jsxmlhttpdatasource_test.html +94 -0
- data/third_party/closure-library/closure/goog/datasource/xmldatasource.js +415 -0
- data/third_party/closure-library/closure/goog/date/date.js +1718 -0
- data/third_party/closure-library/closure/goog/date/date_test.html +1392 -0
- data/third_party/closure-library/closure/goog/date/datelike.js +27 -0
- data/third_party/closure-library/closure/goog/date/daterange.js +413 -0
- data/third_party/closure-library/closure/goog/date/daterange_test.html +253 -0
- data/third_party/closure-library/closure/goog/date/relative.js +465 -0
- data/third_party/closure-library/closure/goog/date/relative_test.html +267 -0
- data/third_party/closure-library/closure/goog/date/utcdatetime.js +179 -0
- data/third_party/closure-library/closure/goog/date/utcdatetime_test.html +124 -0
- data/third_party/closure-library/closure/goog/db/cursor.js +214 -0
- data/third_party/closure-library/closure/goog/db/db.js +182 -0
- data/third_party/closure-library/closure/goog/db/db_test.html +1657 -0
- data/third_party/closure-library/closure/goog/db/error.js +359 -0
- data/third_party/closure-library/closure/goog/db/index.js +245 -0
- data/third_party/closure-library/closure/goog/db/indexeddb.js +337 -0
- data/third_party/closure-library/closure/goog/db/keyrange.js +117 -0
- data/third_party/closure-library/closure/goog/db/objectstore.js +399 -0
- data/third_party/closure-library/closure/goog/db/old_db_test.html +1244 -0
- data/third_party/closure-library/closure/goog/db/transaction.js +218 -0
- data/third_party/closure-library/closure/goog/debug/console.js +207 -0
- data/third_party/closure-library/closure/goog/debug/console_test.html +195 -0
- data/third_party/closure-library/closure/goog/debug/debug.js +501 -0
- data/third_party/closure-library/closure/goog/debug/debug_test.html +68 -0
- data/third_party/closure-library/closure/goog/debug/debugwindow.js +615 -0
- data/third_party/closure-library/closure/goog/debug/debugwindow_test.html +29 -0
- data/third_party/closure-library/closure/goog/debug/devcss/devcss.js +444 -0
- data/third_party/closure-library/closure/goog/debug/devcss/devcss_test.html +365 -0
- data/third_party/closure-library/closure/goog/debug/devcss/devcssrunner.js +26 -0
- data/third_party/closure-library/closure/goog/debug/divconsole.js +141 -0
- data/third_party/closure-library/closure/goog/debug/enhanceerror_test.html +138 -0
- data/third_party/closure-library/closure/goog/debug/entrypointregistry.js +158 -0
- data/third_party/closure-library/closure/goog/debug/entrypointregistry_test.html +87 -0
- data/third_party/closure-library/closure/goog/debug/error.js +51 -0
- data/third_party/closure-library/closure/goog/debug/error_test.html +101 -0
- data/third_party/closure-library/closure/goog/debug/errorhandler.js +363 -0
- data/third_party/closure-library/closure/goog/debug/errorhandler_async_test.html +112 -0
- data/third_party/closure-library/closure/goog/debug/errorhandler_test.html +292 -0
- data/third_party/closure-library/closure/goog/debug/errorhandlerweakdep.js +38 -0
- data/third_party/closure-library/closure/goog/debug/errorreporter.js +376 -0
- data/third_party/closure-library/closure/goog/debug/errorreporter_test.html +351 -0
- data/third_party/closure-library/closure/goog/debug/fancywindow.js +362 -0
- data/third_party/closure-library/closure/goog/debug/formatter.js +316 -0
- data/third_party/closure-library/closure/goog/debug/fpsdisplay.js +162 -0
- data/third_party/closure-library/closure/goog/debug/fpsdisplay_test.html +53 -0
- data/third_party/closure-library/closure/goog/debug/gcdiagnostics.js +143 -0
- data/third_party/closure-library/closure/goog/debug/logbuffer.js +147 -0
- data/third_party/closure-library/closure/goog/debug/logbuffer_test.html +105 -0
- data/third_party/closure-library/closure/goog/debug/logger.js +853 -0
- data/third_party/closure-library/closure/goog/debug/logger_test.html +208 -0
- data/third_party/closure-library/closure/goog/debug/logrecord.js +271 -0
- data/third_party/closure-library/closure/goog/debug/logrecordserializer.js +121 -0
- data/third_party/closure-library/closure/goog/debug/logrecordserializer_test.html +96 -0
- data/third_party/closure-library/closure/goog/debug/reflect.js +178 -0
- data/third_party/closure-library/closure/goog/debug/reflect_test.html +101 -0
- data/third_party/closure-library/closure/goog/debug/relativetimeprovider.js +83 -0
- data/third_party/closure-library/closure/goog/debug/tracer.js +724 -0
- data/third_party/closure-library/closure/goog/debug/tracer_test.html +57 -0
- data/third_party/closure-library/closure/goog/demos/advancedtooltip.html +78 -0
- data/third_party/closure-library/closure/goog/demos/animationqueue.html +149 -0
- data/third_party/closure-library/closure/goog/demos/autocomplete-basic.html +56 -0
- data/third_party/closure-library/closure/goog/demos/autocompleteremote.html +40 -0
- data/third_party/closure-library/closure/goog/demos/autocompleteremotedata.js +18 -0
- data/third_party/closure-library/closure/goog/demos/autocompleterichremote.html +137 -0
- data/third_party/closure-library/closure/goog/demos/autocompleterichremotedata.js +33 -0
- data/third_party/closure-library/closure/goog/demos/bidiinput.html +72 -0
- data/third_party/closure-library/closure/goog/demos/blobhasher.html +61 -0
- data/third_party/closure-library/closure/goog/demos/bubble.html +250 -0
- data/third_party/closure-library/closure/goog/demos/button.html +395 -0
- data/third_party/closure-library/closure/goog/demos/charcounter.html +57 -0
- data/third_party/closure-library/closure/goog/demos/charpicker.html +66 -0
- data/third_party/closure-library/closure/goog/demos/checkbox.html +122 -0
- data/third_party/closure-library/closure/goog/demos/color-contrast.html +60 -0
- data/third_party/closure-library/closure/goog/demos/colormenubutton.html +221 -0
- data/third_party/closure-library/closure/goog/demos/colorpicker.html +43 -0
- data/third_party/closure-library/closure/goog/demos/combobox.html +160 -0
- data/third_party/closure-library/closure/goog/demos/container.html +670 -0
- data/third_party/closure-library/closure/goog/demos/control.html +477 -0
- data/third_party/closure-library/closure/goog/demos/css/demo.css +75 -0
- data/third_party/closure-library/closure/goog/demos/css/emojipicker.css +36 -0
- data/third_party/closure-library/closure/goog/demos/css/emojisprite.css +92 -0
- data/third_party/closure-library/closure/goog/demos/css3button.html +166 -0
- data/third_party/closure-library/closure/goog/demos/css3menubutton.html +285 -0
- data/third_party/closure-library/closure/goog/demos/cssspriteanimation.html +80 -0
- data/third_party/closure-library/closure/goog/demos/datepicker.html +183 -0
- data/third_party/closure-library/closure/goog/demos/debug.html +118 -0
- data/third_party/closure-library/closure/goog/demos/depsgraph.html +220 -0
- data/third_party/closure-library/closure/goog/demos/dialog.html +156 -0
- data/third_party/closure-library/closure/goog/demos/dimensionpicker.html +108 -0
- data/third_party/closure-library/closure/goog/demos/dimensionpicker_rtl.html +123 -0
- data/third_party/closure-library/closure/goog/demos/dom_selection.html +88 -0
- data/third_party/closure-library/closure/goog/demos/drag.html +191 -0
- data/third_party/closure-library/closure/goog/demos/dragdrop.html +263 -0
- data/third_party/closure-library/closure/goog/demos/dragdropdetector.html +46 -0
- data/third_party/closure-library/closure/goog/demos/dragdropdetector_target.html +17 -0
- data/third_party/closure-library/closure/goog/demos/dragger.html +83 -0
- data/third_party/closure-library/closure/goog/demos/draglistgroup.html +273 -0
- data/third_party/closure-library/closure/goog/demos/dragscrollsupport.html +133 -0
- data/third_party/closure-library/closure/goog/demos/drilldownrow.html +78 -0
- data/third_party/closure-library/closure/goog/demos/editor/deps.js +21 -0
- data/third_party/closure-library/closure/goog/demos/editor/editor.html +139 -0
- data/third_party/closure-library/closure/goog/demos/editor/equationeditor.html +36 -0
- data/third_party/closure-library/closure/goog/demos/editor/equationeditor.js +40 -0
- data/third_party/closure-library/closure/goog/demos/editor/field_basic.html +74 -0
- data/third_party/closure-library/closure/goog/demos/editor/helloworld.html +91 -0
- data/third_party/closure-library/closure/goog/demos/editor/helloworld.js +81 -0
- data/third_party/closure-library/closure/goog/demos/editor/helloworld_test.html +75 -0
- data/third_party/closure-library/closure/goog/demos/editor/helloworlddialog.js +171 -0
- data/third_party/closure-library/closure/goog/demos/editor/helloworlddialog_test.html +100 -0
- data/third_party/closure-library/closure/goog/demos/editor/helloworlddialogplugin.js +116 -0
- data/third_party/closure-library/closure/goog/demos/editor/helloworlddialogplugin_test.html +198 -0
- data/third_party/closure-library/closure/goog/demos/editor/seamlessfield.html +106 -0
- data/third_party/closure-library/closure/goog/demos/editor/tableeditor.html +93 -0
- data/third_party/closure-library/closure/goog/demos/effects.html +162 -0
- data/third_party/closure-library/closure/goog/demos/emoji/200.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/201.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/202.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/203.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/204.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/205.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/206.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2BC.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2BD.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2BE.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2BF.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2C0.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2C1.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2C2.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2C3.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2C4.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2C5.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2C6.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2C7.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2C8.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2C9.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2CA.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2CB.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2CC.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2CD.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2CE.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2CF.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2D0.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2D1.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2D2.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2D3.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2D4.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2D5.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2D6.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2D7.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2D8.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2D9.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2DA.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2DB.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2DC.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2DD.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2DE.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2DF.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2E0.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2E1.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2E2.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2E3.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2E4.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2E5.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2E6.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2E7.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2E8.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2E9.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2EA.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2EB.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2EC.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2ED.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2EE.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2EF.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2F0.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2F1.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2F2.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2F3.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2F4.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2F5.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2F6.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2F7.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2F8.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2F9.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2FA.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2FB.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2FC.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2FD.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2FE.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/2FF.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/none.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/sprite.png +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/sprite2.png +0 -0
- data/third_party/closure-library/closure/goog/demos/emoji/unknown.gif +0 -0
- data/third_party/closure-library/closure/goog/demos/event-propagation.html +192 -0
- data/third_party/closure-library/closure/goog/demos/events.html +99 -0
- data/third_party/closure-library/closure/goog/demos/eventtarget.html +70 -0
- data/third_party/closure-library/closure/goog/demos/filedrophandler.html +65 -0
- data/third_party/closure-library/closure/goog/demos/filteredmenu.html +118 -0
- data/third_party/closure-library/closure/goog/demos/focushandler.html +58 -0
- data/third_party/closure-library/closure/goog/demos/fpsdisplay.html +50 -0
- data/third_party/closure-library/closure/goog/demos/fx/css3/transition.html +222 -0
- data/third_party/closure-library/closure/goog/demos/gauge.html +158 -0
- data/third_party/closure-library/closure/goog/demos/graphics/advancedcoordinates.html +141 -0
- data/third_party/closure-library/closure/goog/demos/graphics/advancedcoordinates2.html +130 -0
- data/third_party/closure-library/closure/goog/demos/graphics/basicelements.html +264 -0
- data/third_party/closure-library/closure/goog/demos/graphics/events.html +114 -0
- data/third_party/closure-library/closure/goog/demos/graphics/modifyelements.html +195 -0
- data/third_party/closure-library/closure/goog/demos/graphics/subpixel.html +80 -0
- data/third_party/closure-library/closure/goog/demos/graphics/tiger.html +105 -0
- data/third_party/closure-library/closure/goog/demos/graphics/tigerdata.js +2841 -0
- data/third_party/closure-library/closure/goog/demos/history1.html +132 -0
- data/third_party/closure-library/closure/goog/demos/history2.html +119 -0
- data/third_party/closure-library/closure/goog/demos/history3.html +116 -0
- data/third_party/closure-library/closure/goog/demos/history3js.html +48 -0
- data/third_party/closure-library/closure/goog/demos/history_blank.html +26 -0
- data/third_party/closure-library/closure/goog/demos/hovercard.html +177 -0
- data/third_party/closure-library/closure/goog/demos/hsvapalette.html +55 -0
- data/third_party/closure-library/closure/goog/demos/hsvpalette.html +56 -0
- data/third_party/closure-library/closure/goog/demos/html5history.html +87 -0
- data/third_party/closure-library/closure/goog/demos/imagelessbutton.html +221 -0
- data/third_party/closure-library/closure/goog/demos/imagelessmenubutton.html +285 -0
- data/third_party/closure-library/closure/goog/demos/index.html +20 -0
- data/third_party/closure-library/closure/goog/demos/index_nav.html +255 -0
- data/third_party/closure-library/closure/goog/demos/index_splash.html +27 -0
- data/third_party/closure-library/closure/goog/demos/inline_block_quirks.html +125 -0
- data/third_party/closure-library/closure/goog/demos/inline_block_standards.html +126 -0
- data/third_party/closure-library/closure/goog/demos/inputdatepicker.html +60 -0
- data/third_party/closure-library/closure/goog/demos/inputhandler.html +88 -0
- data/third_party/closure-library/closure/goog/demos/jsonprettyprinter.html +80 -0
- data/third_party/closure-library/closure/goog/demos/keyboardshortcuts.html +112 -0
- data/third_party/closure-library/closure/goog/demos/keyhandler.html +118 -0
- data/third_party/closure-library/closure/goog/demos/labelinput.html +42 -0
- data/third_party/closure-library/closure/goog/demos/menu.html +220 -0
- data/third_party/closure-library/closure/goog/demos/menubar.html +211 -0
- data/third_party/closure-library/closure/goog/demos/menubutton.html +380 -0
- data/third_party/closure-library/closure/goog/demos/menubutton_frame.html +27 -0
- data/third_party/closure-library/closure/goog/demos/menuitem.html +164 -0
- data/third_party/closure-library/closure/goog/demos/mousewheelhandler.html +109 -0
- data/third_party/closure-library/closure/goog/demos/offline.html +268 -0
- data/third_party/closure-library/closure/goog/demos/onlinehandler.html +79 -0
- data/third_party/closure-library/closure/goog/demos/palette.html +302 -0
- data/third_party/closure-library/closure/goog/demos/pastehandler.html +54 -0
- data/third_party/closure-library/closure/goog/demos/pixeldensitymonitor.html +51 -0
- data/third_party/closure-library/closure/goog/demos/plaintextspellchecker.html +106 -0
- data/third_party/closure-library/closure/goog/demos/popup.html +206 -0
- data/third_party/closure-library/closure/goog/demos/popupcolorpicker.html +49 -0
- data/third_party/closure-library/closure/goog/demos/popupdatepicker.html +53 -0
- data/third_party/closure-library/closure/goog/demos/popupemojipicker.html +407 -0
- data/third_party/closure-library/closure/goog/demos/popupmenu.html +116 -0
- data/third_party/closure-library/closure/goog/demos/progressbar.html +97 -0
- data/third_party/closure-library/closure/goog/demos/prompt.html +92 -0
- data/third_party/closure-library/closure/goog/demos/quadtree.html +107 -0
- data/third_party/closure-library/closure/goog/demos/ratings.html +121 -0
- data/third_party/closure-library/closure/goog/demos/richtextspellchecker.html +92 -0
- data/third_party/closure-library/closure/goog/demos/roundedpanel.html +139 -0
- data/third_party/closure-library/closure/goog/demos/samplecomponent.html +75 -0
- data/third_party/closure-library/closure/goog/demos/samplecomponent.js +197 -0
- data/third_party/closure-library/closure/goog/demos/scrollfloater.html +113 -0
- data/third_party/closure-library/closure/goog/demos/select.html +324 -0
- data/third_party/closure-library/closure/goog/demos/selectionmenubutton.html +186 -0
- data/third_party/closure-library/closure/goog/demos/serverchart.html +122 -0
- data/third_party/closure-library/closure/goog/demos/slider.html +128 -0
- data/third_party/closure-library/closure/goog/demos/splitbehavior.html +163 -0
- data/third_party/closure-library/closure/goog/demos/splitpane.html +243 -0
- data/third_party/closure-library/closure/goog/demos/stopevent.html +171 -0
- data/third_party/closure-library/closure/goog/demos/submenus.html +130 -0
- data/third_party/closure-library/closure/goog/demos/submenus2.html +150 -0
- data/third_party/closure-library/closure/goog/demos/tabbar.html +289 -0
- data/third_party/closure-library/closure/goog/demos/tablesorter.html +116 -0
- data/third_party/closure-library/closure/goog/demos/tabpane.html +302 -0
- data/third_party/closure-library/closure/goog/demos/textarea.html +128 -0
- data/third_party/closure-library/closure/goog/demos/timers.html +291 -0
- data/third_party/closure-library/closure/goog/demos/toolbar.html +703 -0
- data/third_party/closure-library/closure/goog/demos/tooltip.html +91 -0
- data/third_party/closure-library/closure/goog/demos/tracer.html +92 -0
- data/third_party/closure-library/closure/goog/demos/tree/demo.html +126 -0
- data/third_party/closure-library/closure/goog/demos/tree/testdata.js +260 -0
- data/third_party/closure-library/closure/goog/demos/tweakui.html +121 -0
- data/third_party/closure-library/closure/goog/demos/twothumbslider.html +121 -0
- data/third_party/closure-library/closure/goog/demos/useragent.html +214 -0
- data/third_party/closure-library/closure/goog/demos/viewportsizemonitor.html +71 -0
- data/third_party/closure-library/closure/goog/demos/xpc/blank.html +7 -0
- data/third_party/closure-library/closure/goog/demos/xpc/index.html +89 -0
- data/third_party/closure-library/closure/goog/demos/xpc/inner.html +58 -0
- data/third_party/closure-library/closure/goog/demos/xpc/minimal/blank.html +7 -0
- data/third_party/closure-library/closure/goog/demos/xpc/minimal/index.html +105 -0
- data/third_party/closure-library/closure/goog/demos/xpc/minimal/inner.html +75 -0
- data/third_party/closure-library/closure/goog/demos/xpc/minimal/relay.html +7 -0
- data/third_party/closure-library/closure/goog/demos/xpc/relay.html +16 -0
- data/third_party/closure-library/closure/goog/demos/xpc/xpcdemo.js +307 -0
- data/third_party/closure-library/closure/goog/demos/zippy.html +149 -0
- data/third_party/closure-library/closure/goog/deps.js +911 -0
- data/third_party/closure-library/closure/goog/disposable/disposable.js +294 -0
- data/third_party/closure-library/closure/goog/disposable/disposable_test.html +307 -0
- data/third_party/closure-library/closure/goog/disposable/idisposable.js +45 -0
- data/third_party/closure-library/closure/goog/dom/a11y.js +169 -0
- data/third_party/closure-library/closure/goog/dom/abstractmultirange.js +77 -0
- data/third_party/closure-library/closure/goog/dom/abstractrange.js +528 -0
- data/third_party/closure-library/closure/goog/dom/abstractrange_test.html +73 -0
- data/third_party/closure-library/closure/goog/dom/annotate.js +355 -0
- data/third_party/closure-library/closure/goog/dom/annotate_test.html +215 -0
- data/third_party/closure-library/closure/goog/dom/browserfeature.js +67 -0
- data/third_party/closure-library/closure/goog/dom/browserrange/abstractrange.js +352 -0
- data/third_party/closure-library/closure/goog/dom/browserrange/browserrange.js +150 -0
- data/third_party/closure-library/closure/goog/dom/browserrange/browserrange_test.html +638 -0
- data/third_party/closure-library/closure/goog/dom/browserrange/geckorange.js +86 -0
- data/third_party/closure-library/closure/goog/dom/browserrange/ierange.js +952 -0
- data/third_party/closure-library/closure/goog/dom/browserrange/operarange.js +83 -0
- data/third_party/closure-library/closure/goog/dom/browserrange/w3crange.js +365 -0
- data/third_party/closure-library/closure/goog/dom/browserrange/webkitrange.js +112 -0
- data/third_party/closure-library/closure/goog/dom/bufferedviewportsizemonitor.js +202 -0
- data/third_party/closure-library/closure/goog/dom/bufferedviewportsizemonitor_test.html +17 -0
- data/third_party/closure-library/closure/goog/dom/bufferedviewportsizemonitor_test.js +130 -0
- data/third_party/closure-library/closure/goog/dom/classes.js +227 -0
- data/third_party/closure-library/closure/goog/dom/classes_quirks_test.html +63 -0
- data/third_party/closure-library/closure/goog/dom/classes_test.html +64 -0
- data/third_party/closure-library/closure/goog/dom/classes_test.js +231 -0
- data/third_party/closure-library/closure/goog/dom/classlist.js +271 -0
- data/third_party/closure-library/closure/goog/dom/classlist_test.html +26 -0
- data/third_party/closure-library/closure/goog/dom/classlist_test.js +244 -0
- data/third_party/closure-library/closure/goog/dom/controlrange.js +505 -0
- data/third_party/closure-library/closure/goog/dom/controlrange_test.html +246 -0
- data/third_party/closure-library/closure/goog/dom/dataset.js +135 -0
- data/third_party/closure-library/closure/goog/dom/dataset_test.html +117 -0
- data/third_party/closure-library/closure/goog/dom/dom.js +2700 -0
- data/third_party/closure-library/closure/goog/dom/dom_quirks_test.html +113 -0
- data/third_party/closure-library/closure/goog/dom/dom_test.html +113 -0
- data/third_party/closure-library/closure/goog/dom/dom_test.js +1421 -0
- data/third_party/closure-library/closure/goog/dom/fontsizemonitor.js +159 -0
- data/third_party/closure-library/closure/goog/dom/fontsizemonitor_test.html +284 -0
- data/third_party/closure-library/closure/goog/dom/forms.js +414 -0
- data/third_party/closure-library/closure/goog/dom/forms_test.html +501 -0
- data/third_party/closure-library/closure/goog/dom/fullscreen.js +124 -0
- data/third_party/closure-library/closure/goog/dom/iframe.js +163 -0
- data/third_party/closure-library/closure/goog/dom/iframe_test.html +88 -0
- data/third_party/closure-library/closure/goog/dom/iter.js +127 -0
- data/third_party/closure-library/closure/goog/dom/iter_test.html +97 -0
- data/third_party/closure-library/closure/goog/dom/multirange.js +519 -0
- data/third_party/closure-library/closure/goog/dom/multirange_test.html +67 -0
- data/third_party/closure-library/closure/goog/dom/nodeiterator.js +86 -0
- data/third_party/closure-library/closure/goog/dom/nodeiterator_test.html +49 -0
- data/third_party/closure-library/closure/goog/dom/nodeoffset.js +112 -0
- data/third_party/closure-library/closure/goog/dom/nodeoffset_test.html +88 -0
- data/third_party/closure-library/closure/goog/dom/pattern/abstractpattern.js +60 -0
- data/third_party/closure-library/closure/goog/dom/pattern/allchildren.js +75 -0
- data/third_party/closure-library/closure/goog/dom/pattern/callback/callback.js +82 -0
- data/third_party/closure-library/closure/goog/dom/pattern/callback/counter.js +72 -0
- data/third_party/closure-library/closure/goog/dom/pattern/callback/test.js +77 -0
- data/third_party/closure-library/closure/goog/dom/pattern/childmatches.js +154 -0
- data/third_party/closure-library/closure/goog/dom/pattern/endtag.js +53 -0
- data/third_party/closure-library/closure/goog/dom/pattern/fulltag.js +93 -0
- data/third_party/closure-library/closure/goog/dom/pattern/matcher.js +150 -0
- data/third_party/closure-library/closure/goog/dom/pattern/matcher_test.html +204 -0
- data/third_party/closure-library/closure/goog/dom/pattern/nodetype.js +58 -0
- data/third_party/closure-library/closure/goog/dom/pattern/pattern.js +93 -0
- data/third_party/closure-library/closure/goog/dom/pattern/pattern_test.html +614 -0
- data/third_party/closure-library/closure/goog/dom/pattern/repeat.js +190 -0
- data/third_party/closure-library/closure/goog/dom/pattern/sequence.js +141 -0
- data/third_party/closure-library/closure/goog/dom/pattern/starttag.js +53 -0
- data/third_party/closure-library/closure/goog/dom/pattern/tag.js +150 -0
- data/third_party/closure-library/closure/goog/dom/pattern/text.js +70 -0
- data/third_party/closure-library/closure/goog/dom/range.js +226 -0
- data/third_party/closure-library/closure/goog/dom/range_test.html +735 -0
- data/third_party/closure-library/closure/goog/dom/rangeendpoint.js +32 -0
- data/third_party/closure-library/closure/goog/dom/savedcaretrange.js +215 -0
- data/third_party/closure-library/closure/goog/dom/savedcaretrange_test.html +257 -0
- data/third_party/closure-library/closure/goog/dom/savedrange.js +74 -0
- data/third_party/closure-library/closure/goog/dom/savedrange_test.html +61 -0
- data/third_party/closure-library/closure/goog/dom/selection.js +470 -0
- data/third_party/closure-library/closure/goog/dom/selection_test.html +329 -0
- data/third_party/closure-library/closure/goog/dom/tagiterator.js +367 -0
- data/third_party/closure-library/closure/goog/dom/tagiterator_test.html +589 -0
- data/third_party/closure-library/closure/goog/dom/tagname.js +159 -0
- data/third_party/closure-library/closure/goog/dom/tagname_test.html +37 -0
- data/third_party/closure-library/closure/goog/dom/textrange.js +630 -0
- data/third_party/closure-library/closure/goog/dom/textrange_test.html +342 -0
- data/third_party/closure-library/closure/goog/dom/textrangeiterator.js +244 -0
- data/third_party/closure-library/closure/goog/dom/textrangeiterator_test.html +142 -0
- data/third_party/closure-library/closure/goog/dom/vendor.js +62 -0
- data/third_party/closure-library/closure/goog/dom/vendor_test.html +202 -0
- data/third_party/closure-library/closure/goog/dom/viewportsizemonitor.js +180 -0
- data/third_party/closure-library/closure/goog/dom/viewportsizemonitor_test.html +138 -0
- data/third_party/closure-library/closure/goog/dom/xml.js +204 -0
- data/third_party/closure-library/closure/goog/dom/xml_test.html +103 -0
- data/third_party/closure-library/closure/goog/editor/browserfeature.js +273 -0
- data/third_party/closure-library/closure/goog/editor/browserfeature_test.html +124 -0
- data/third_party/closure-library/closure/goog/editor/clicktoeditwrapper.js +435 -0
- data/third_party/closure-library/closure/goog/editor/clicktoeditwrapper_test.html +137 -0
- data/third_party/closure-library/closure/goog/editor/command.js +76 -0
- data/third_party/closure-library/closure/goog/editor/contenteditablefield.js +110 -0
- data/third_party/closure-library/closure/goog/editor/contenteditablefield_test.html +62 -0
- data/third_party/closure-library/closure/goog/editor/defines.js +34 -0
- data/third_party/closure-library/closure/goog/editor/field.js +2725 -0
- data/third_party/closure-library/closure/goog/editor/field_test.html +32 -0
- data/third_party/closure-library/closure/goog/editor/field_test.js +1278 -0
- data/third_party/closure-library/closure/goog/editor/focus.js +32 -0
- data/third_party/closure-library/closure/goog/editor/focus_test.html +66 -0
- data/third_party/closure-library/closure/goog/editor/icontent.js +296 -0
- data/third_party/closure-library/closure/goog/editor/icontent_test.html +232 -0
- data/third_party/closure-library/closure/goog/editor/link.js +359 -0
- data/third_party/closure-library/closure/goog/editor/link_test.html +252 -0
- data/third_party/closure-library/closure/goog/editor/node.js +483 -0
- data/third_party/closure-library/closure/goog/editor/node_test.html +631 -0
- data/third_party/closure-library/closure/goog/editor/plugin.js +463 -0
- data/third_party/closure-library/closure/goog/editor/plugin_test.html +187 -0
- data/third_party/closure-library/closure/goog/editor/plugins/abstractbubbleplugin.js +630 -0
- data/third_party/closure-library/closure/goog/editor/plugins/abstractbubbleplugin_test.html +313 -0
- data/third_party/closure-library/closure/goog/editor/plugins/abstractdialogplugin.js +334 -0
- data/third_party/closure-library/closure/goog/editor/plugins/abstractdialogplugin_test.html +404 -0
- data/third_party/closure-library/closure/goog/editor/plugins/abstracttabhandler.js +78 -0
- data/third_party/closure-library/closure/goog/editor/plugins/abstracttabhandler_test.html +91 -0
- data/third_party/closure-library/closure/goog/editor/plugins/basictextformatter.js +1750 -0
- data/third_party/closure-library/closure/goog/editor/plugins/basictextformatter_test.html +1171 -0
- data/third_party/closure-library/closure/goog/editor/plugins/blockquote.js +479 -0
- data/third_party/closure-library/closure/goog/editor/plugins/blockquote_test.html +212 -0
- data/third_party/closure-library/closure/goog/editor/plugins/emoticons.js +88 -0
- data/third_party/closure-library/closure/goog/editor/plugins/emoticons_test.html +92 -0
- data/third_party/closure-library/closure/goog/editor/plugins/enterhandler.js +767 -0
- data/third_party/closure-library/closure/goog/editor/plugins/enterhandler_test.html +754 -0
- data/third_party/closure-library/closure/goog/editor/plugins/equationeditorbubble.js +153 -0
- data/third_party/closure-library/closure/goog/editor/plugins/equationeditorplugin.js +215 -0
- data/third_party/closure-library/closure/goog/editor/plugins/equationeditorplugin_test.html +120 -0
- data/third_party/closure-library/closure/goog/editor/plugins/firststrong.js +326 -0
- data/third_party/closure-library/closure/goog/editor/plugins/firststrong_test.html +411 -0
- data/third_party/closure-library/closure/goog/editor/plugins/headerformatter.js +95 -0
- data/third_party/closure-library/closure/goog/editor/plugins/headerformatter_test.html +100 -0
- data/third_party/closure-library/closure/goog/editor/plugins/linkbubble.js +562 -0
- data/third_party/closure-library/closure/goog/editor/plugins/linkbubble_test.html +375 -0
- data/third_party/closure-library/closure/goog/editor/plugins/linkdialogplugin.js +437 -0
- data/third_party/closure-library/closure/goog/editor/plugins/linkdialogplugin_test.html +740 -0
- data/third_party/closure-library/closure/goog/editor/plugins/linkshortcutplugin.js +63 -0
- data/third_party/closure-library/closure/goog/editor/plugins/linkshortcutplugin_test.html +70 -0
- data/third_party/closure-library/closure/goog/editor/plugins/listtabhandler.js +66 -0
- data/third_party/closure-library/closure/goog/editor/plugins/listtabhandler_test.html +177 -0
- data/third_party/closure-library/closure/goog/editor/plugins/loremipsum.js +188 -0
- data/third_party/closure-library/closure/goog/editor/plugins/loremipsum_test.html +169 -0
- data/third_party/closure-library/closure/goog/editor/plugins/removeformatting.js +779 -0
- data/third_party/closure-library/closure/goog/editor/plugins/removeformatting_test.html +961 -0
- data/third_party/closure-library/closure/goog/editor/plugins/spacestabhandler.js +93 -0
- data/third_party/closure-library/closure/goog/editor/plugins/spacestabhandler_test.html +186 -0
- data/third_party/closure-library/closure/goog/editor/plugins/tableeditor.js +472 -0
- data/third_party/closure-library/closure/goog/editor/plugins/tableeditor_test.html +299 -0
- data/third_party/closure-library/closure/goog/editor/plugins/tagonenterhandler.js +742 -0
- data/third_party/closure-library/closure/goog/editor/plugins/tagonenterhandler_test.html +549 -0
- data/third_party/closure-library/closure/goog/editor/plugins/undoredo.js +1015 -0
- data/third_party/closure-library/closure/goog/editor/plugins/undoredo_test.html +525 -0
- data/third_party/closure-library/closure/goog/editor/plugins/undoredomanager.js +337 -0
- data/third_party/closure-library/closure/goog/editor/plugins/undoredomanager_test.html +394 -0
- data/third_party/closure-library/closure/goog/editor/plugins/undoredostate.js +86 -0
- data/third_party/closure-library/closure/goog/editor/plugins/undoredostate_test.html +44 -0
- data/third_party/closure-library/closure/goog/editor/range.js +632 -0
- data/third_party/closure-library/closure/goog/editor/range_test.html +1004 -0
- data/third_party/closure-library/closure/goog/editor/seamlessfield.js +738 -0
- data/third_party/closure-library/closure/goog/editor/seamlessfield_quirks_test.html +28 -0
- data/third_party/closure-library/closure/goog/editor/seamlessfield_test.html +32 -0
- data/third_party/closure-library/closure/goog/editor/seamlessfield_test.js +472 -0
- data/third_party/closure-library/closure/goog/editor/style.js +222 -0
- data/third_party/closure-library/closure/goog/editor/style_test.html +177 -0
- data/third_party/closure-library/closure/goog/editor/table.js +567 -0
- data/third_party/closure-library/closure/goog/editor/table_test.html +529 -0
- data/third_party/closure-library/closure/goog/events/actioneventwrapper.js +136 -0
- data/third_party/closure-library/closure/goog/events/actioneventwrapper_test.html +211 -0
- data/third_party/closure-library/closure/goog/events/actionhandler.js +181 -0
- data/third_party/closure-library/closure/goog/events/actionhandler_test.html +82 -0
- data/third_party/closure-library/closure/goog/events/browserevent.js +411 -0
- data/third_party/closure-library/closure/goog/events/browserevent_test.html +161 -0
- data/third_party/closure-library/closure/goog/events/browserfeature.js +85 -0
- data/third_party/closure-library/closure/goog/events/event.js +154 -0
- data/third_party/closure-library/closure/goog/events/event_test.html +66 -0
- data/third_party/closure-library/closure/goog/events/eventhandler.js +291 -0
- data/third_party/closure-library/closure/goog/events/eventhandler_test.html +254 -0
- data/third_party/closure-library/closure/goog/events/events.js +1095 -0
- data/third_party/closure-library/closure/goog/events/events_test.html +659 -0
- data/third_party/closure-library/closure/goog/events/eventtarget.js +401 -0
- data/third_party/closure-library/closure/goog/events/eventtarget_test.html +70 -0
- data/third_party/closure-library/closure/goog/events/eventtarget_via_googevents_test.html +85 -0
- data/third_party/closure-library/closure/goog/events/eventtarget_via_w3cinterface_test.html +49 -0
- data/third_party/closure-library/closure/goog/events/eventtargettester.js +1028 -0
- data/third_party/closure-library/closure/goog/events/eventtype.js +165 -0
- data/third_party/closure-library/closure/goog/events/eventwrapper.js +66 -0
- data/third_party/closure-library/closure/goog/events/filedrophandler.js +221 -0
- data/third_party/closure-library/closure/goog/events/filedrophandler_test.html +258 -0
- data/third_party/closure-library/closure/goog/events/focushandler.js +106 -0
- data/third_party/closure-library/closure/goog/events/imehandler.js +363 -0
- data/third_party/closure-library/closure/goog/events/imehandler_test.html +269 -0
- data/third_party/closure-library/closure/goog/events/inputhandler.js +213 -0
- data/third_party/closure-library/closure/goog/events/keycodes.js +377 -0
- data/third_party/closure-library/closure/goog/events/keycodes_test.html +125 -0
- data/third_party/closure-library/closure/goog/events/keyhandler.js +556 -0
- data/third_party/closure-library/closure/goog/events/keyhandler_test.html +727 -0
- data/third_party/closure-library/closure/goog/events/keynames.js +132 -0
- data/third_party/closure-library/closure/goog/events/listenable.js +323 -0
- data/third_party/closure-library/closure/goog/events/listenable_test.html +31 -0
- data/third_party/closure-library/closure/goog/events/listener.js +131 -0
- data/third_party/closure-library/closure/goog/events/listenermap.js +299 -0
- data/third_party/closure-library/closure/goog/events/listenermap_test.html +19 -0
- data/third_party/closure-library/closure/goog/events/listenermap_test.js +116 -0
- data/third_party/closure-library/closure/goog/events/mousewheelhandler.js +295 -0
- data/third_party/closure-library/closure/goog/events/mousewheelhandler_test.html +385 -0
- data/third_party/closure-library/closure/goog/events/onlinehandler.js +162 -0
- data/third_party/closure-library/closure/goog/events/onlinelistener_test.html +160 -0
- data/third_party/closure-library/closure/goog/events/pastehandler.js +515 -0
- data/third_party/closure-library/closure/goog/events/pastehandler_test.html +414 -0
- data/third_party/closure-library/closure/goog/format/emailaddress.js +332 -0
- data/third_party/closure-library/closure/goog/format/emailaddress_test.html +192 -0
- data/third_party/closure-library/closure/goog/format/format.js +491 -0
- data/third_party/closure-library/closure/goog/format/format_test.html +302 -0
- data/third_party/closure-library/closure/goog/format/htmlprettyprinter.js +407 -0
- data/third_party/closure-library/closure/goog/format/htmlprettyprinter_test.html +205 -0
- data/third_party/closure-library/closure/goog/format/jsonprettyprinter.js +413 -0
- data/third_party/closure-library/closure/goog/format/jsonprettyprinter_test.html +111 -0
- data/third_party/closure-library/closure/goog/fs/entry.js +272 -0
- data/third_party/closure-library/closure/goog/fs/entryimpl.js +399 -0
- data/third_party/closure-library/closure/goog/fs/error.js +102 -0
- data/third_party/closure-library/closure/goog/fs/filereader.js +288 -0
- data/third_party/closure-library/closure/goog/fs/filesaver.js +176 -0
- data/third_party/closure-library/closure/goog/fs/filesystem.js +41 -0
- data/third_party/closure-library/closure/goog/fs/filesystemimpl.js +64 -0
- data/third_party/closure-library/closure/goog/fs/filewriter.js +110 -0
- data/third_party/closure-library/closure/goog/fs/fs.js +253 -0
- data/third_party/closure-library/closure/goog/fs/fs_test.html +754 -0
- data/third_party/closure-library/closure/goog/fs/progressevent.js +68 -0
- data/third_party/closure-library/closure/goog/functions/functions.js +255 -0
- data/third_party/closure-library/closure/goog/functions/functions_test.html +223 -0
- data/third_party/closure-library/closure/goog/fx/abstractdragdrop.js +1517 -0
- data/third_party/closure-library/closure/goog/fx/abstractdragdrop_test.html +663 -0
- data/third_party/closure-library/closure/goog/fx/anim/anim.js +210 -0
- data/third_party/closure-library/closure/goog/fx/anim/anim_test.html +225 -0
- data/third_party/closure-library/closure/goog/fx/animation.js +530 -0
- data/third_party/closure-library/closure/goog/fx/animation_test.html +117 -0
- data/third_party/closure-library/closure/goog/fx/animationqueue.js +307 -0
- data/third_party/closure-library/closure/goog/fx/animationqueue_test.html +316 -0
- data/third_party/closure-library/closure/goog/fx/css3/fx.js +62 -0
- data/third_party/closure-library/closure/goog/fx/css3/transition.js +196 -0
- data/third_party/closure-library/closure/goog/fx/css3/transition_test.html +224 -0
- data/third_party/closure-library/closure/goog/fx/cssspriteanimation.js +113 -0
- data/third_party/closure-library/closure/goog/fx/cssspriteanimation_test.html +126 -0
- data/third_party/closure-library/closure/goog/fx/dom.js +653 -0
- data/third_party/closure-library/closure/goog/fx/dragdrop.js +50 -0
- data/third_party/closure-library/closure/goog/fx/dragdropgroup.js +109 -0
- data/third_party/closure-library/closure/goog/fx/dragdropgroup_test.html +234 -0
- data/third_party/closure-library/closure/goog/fx/dragger.js +795 -0
- data/third_party/closure-library/closure/goog/fx/dragger_test.html +449 -0
- data/third_party/closure-library/closure/goog/fx/draglistgroup.js +1301 -0
- data/third_party/closure-library/closure/goog/fx/draglistgroup_test.html +403 -0
- data/third_party/closure-library/closure/goog/fx/dragscrollsupport.js +299 -0
- data/third_party/closure-library/closure/goog/fx/dragscrollsupport_test.html +354 -0
- data/third_party/closure-library/closure/goog/fx/easing.js +50 -0
- data/third_party/closure-library/closure/goog/fx/fx.js +32 -0
- data/third_party/closure-library/closure/goog/fx/fx_test.html +100 -0
- data/third_party/closure-library/closure/goog/fx/transition.js +75 -0
- data/third_party/closure-library/closure/goog/fx/transitionbase.js +237 -0
- data/third_party/closure-library/closure/goog/gears/basestore.js +521 -0
- data/third_party/closure-library/closure/goog/gears/basestore_test.html +247 -0
- data/third_party/closure-library/closure/goog/gears/database.js +934 -0
- data/third_party/closure-library/closure/goog/gears/database_test.html +699 -0
- data/third_party/closure-library/closure/goog/gears/gears.js +228 -0
- data/third_party/closure-library/closure/goog/gears/gears_test.html +78 -0
- data/third_party/closure-library/closure/goog/gears/httprequest.js +80 -0
- data/third_party/closure-library/closure/goog/gears/loggerclient.js +130 -0
- data/third_party/closure-library/closure/goog/gears/loggerclient_test.html +172 -0
- data/third_party/closure-library/closure/goog/gears/loggerserver.js +157 -0
- data/third_party/closure-library/closure/goog/gears/loggerserver_test.html +119 -0
- data/third_party/closure-library/closure/goog/gears/logstore.js +478 -0
- data/third_party/closure-library/closure/goog/gears/logstore_test.html +600 -0
- data/third_party/closure-library/closure/goog/gears/managedresourcestore.js +555 -0
- data/third_party/closure-library/closure/goog/gears/managedresourcestore_test.html +453 -0
- data/third_party/closure-library/closure/goog/gears/multipartformdata.js +204 -0
- data/third_party/closure-library/closure/goog/gears/multipartformdata_test.html +221 -0
- data/third_party/closure-library/closure/goog/gears/statustype.js +37 -0
- data/third_party/closure-library/closure/goog/gears/urlcapture.js +370 -0
- data/third_party/closure-library/closure/goog/gears/urlcapture_test.html +392 -0
- data/third_party/closure-library/closure/goog/gears/worker.js +200 -0
- data/third_party/closure-library/closure/goog/gears/workerchannel.js +205 -0
- data/third_party/closure-library/closure/goog/gears/workerchannel_test.html +207 -0
- data/third_party/closure-library/closure/goog/gears/workerpool.js +240 -0
- data/third_party/closure-library/closure/goog/gears/workerpool_test.html +204 -0
- data/third_party/closure-library/closure/goog/graphics/abstractgraphics.js +441 -0
- data/third_party/closure-library/closure/goog/graphics/affinetransform.js +587 -0
- data/third_party/closure-library/closure/goog/graphics/affinetransform_test.html +360 -0
- data/third_party/closure-library/closure/goog/graphics/canvaselement.js +792 -0
- data/third_party/closure-library/closure/goog/graphics/canvasgraphics.js +665 -0
- data/third_party/closure-library/closure/goog/graphics/element.js +151 -0
- data/third_party/closure-library/closure/goog/graphics/ellipseelement.js +64 -0
- data/third_party/closure-library/closure/goog/graphics/ext/coordinates.js +159 -0
- data/third_party/closure-library/closure/goog/graphics/ext/coordinates_test.html +74 -0
- data/third_party/closure-library/closure/goog/graphics/ext/element.js +968 -0
- data/third_party/closure-library/closure/goog/graphics/ext/element_test.html +144 -0
- data/third_party/closure-library/closure/goog/graphics/ext/ellipse.js +59 -0
- data/third_party/closure-library/closure/goog/graphics/ext/ext.js +29 -0
- data/third_party/closure-library/closure/goog/graphics/ext/graphics.js +215 -0
- data/third_party/closure-library/closure/goog/graphics/ext/group.js +215 -0
- data/third_party/closure-library/closure/goog/graphics/ext/image.js +63 -0
- data/third_party/closure-library/closure/goog/graphics/ext/path.js +142 -0
- data/third_party/closure-library/closure/goog/graphics/ext/path_test.html +46 -0
- data/third_party/closure-library/closure/goog/graphics/ext/rectangle.js +54 -0
- data/third_party/closure-library/closure/goog/graphics/ext/shape.js +146 -0
- data/third_party/closure-library/closure/goog/graphics/ext/strokeandfillelement.js +70 -0
- data/third_party/closure-library/closure/goog/graphics/fill.js +46 -0
- data/third_party/closure-library/closure/goog/graphics/font.js +63 -0
- data/third_party/closure-library/closure/goog/graphics/graphics.js +135 -0
- data/third_party/closure-library/closure/goog/graphics/groupelement.js +59 -0
- data/third_party/closure-library/closure/goog/graphics/imageelement.js +70 -0
- data/third_party/closure-library/closure/goog/graphics/lineargradient.js +174 -0
- data/third_party/closure-library/closure/goog/graphics/path.js +512 -0
- data/third_party/closure-library/closure/goog/graphics/path_test.html +359 -0
- data/third_party/closure-library/closure/goog/graphics/pathelement.js +55 -0
- data/third_party/closure-library/closure/goog/graphics/paths.js +86 -0
- data/third_party/closure-library/closure/goog/graphics/paths_test.html +98 -0
- data/third_party/closure-library/closure/goog/graphics/rectelement.js +64 -0
- data/third_party/closure-library/closure/goog/graphics/solidfill.js +74 -0
- data/third_party/closure-library/closure/goog/graphics/solidfill_test.html +53 -0
- data/third_party/closure-library/closure/goog/graphics/stroke.js +67 -0
- data/third_party/closure-library/closure/goog/graphics/strokeandfillelement.js +115 -0
- data/third_party/closure-library/closure/goog/graphics/svgelement.js +279 -0
- data/third_party/closure-library/closure/goog/graphics/svggraphics.js +857 -0
- data/third_party/closure-library/closure/goog/graphics/svggraphics_test.html +83 -0
- data/third_party/closure-library/closure/goog/graphics/textelement.js +56 -0
- data/third_party/closure-library/closure/goog/graphics/vmlelement.js +433 -0
- data/third_party/closure-library/closure/goog/graphics/vmlgraphics.js +893 -0
- data/third_party/closure-library/closure/goog/history/event.js +54 -0
- data/third_party/closure-library/closure/goog/history/eventtype.js +30 -0
- data/third_party/closure-library/closure/goog/history/history.js +998 -0
- data/third_party/closure-library/closure/goog/history/history_test.html +19 -0
- data/third_party/closure-library/closure/goog/history/history_test.js +54 -0
- data/third_party/closure-library/closure/goog/history/html5history.js +303 -0
- data/third_party/closure-library/closure/goog/history/html5history_test.html +163 -0
- data/third_party/closure-library/closure/goog/i18n/bidi.js +806 -0
- data/third_party/closure-library/closure/goog/i18n/bidi_test.html +425 -0
- data/third_party/closure-library/closure/goog/i18n/bidiformatter.js +490 -0
- data/third_party/closure-library/closure/goog/i18n/bidiformatter_test.html +343 -0
- data/third_party/closure-library/closure/goog/i18n/charlistdecompressor.js +157 -0
- data/third_party/closure-library/closure/goog/i18n/charlistdecompressor_test.html +65 -0
- data/third_party/closure-library/closure/goog/i18n/charpickerdata.js +3185 -0
- data/third_party/closure-library/closure/goog/i18n/collation.js +58 -0
- data/third_party/closure-library/closure/goog/i18n/collation_test.html +63 -0
- data/third_party/closure-library/closure/goog/i18n/compactnumberformatsymbols.js +7973 -0
- data/third_party/closure-library/closure/goog/i18n/compactnumberformatsymbols_ext.js +27549 -0
- data/third_party/closure-library/closure/goog/i18n/currency.js +424 -0
- data/third_party/closure-library/closure/goog/i18n/currency_test.html +204 -0
- data/third_party/closure-library/closure/goog/i18n/currencycodemap.js +210 -0
- data/third_party/closure-library/closure/goog/i18n/datetimeformat.js +673 -0
- data/third_party/closure-library/closure/goog/i18n/datetimeformat_test.html +532 -0
- data/third_party/closure-library/closure/goog/i18n/datetimeparse.js +1129 -0
- data/third_party/closure-library/closure/goog/i18n/datetimeparse_test.html +766 -0
- data/third_party/closure-library/closure/goog/i18n/datetimepatterns.js +1854 -0
- data/third_party/closure-library/closure/goog/i18n/datetimepatternsext.js +10947 -0
- data/third_party/closure-library/closure/goog/i18n/datetimesymbols.js +3713 -0
- data/third_party/closure-library/closure/goog/i18n/datetimesymbolsext.js +21152 -0
- data/third_party/closure-library/closure/goog/i18n/graphemebreak.js +214 -0
- data/third_party/closure-library/closure/goog/i18n/graphemebreak_test.html +80 -0
- data/third_party/closure-library/closure/goog/i18n/messageformat.js +771 -0
- data/third_party/closure-library/closure/goog/i18n/messageformat_test.html +471 -0
- data/third_party/closure-library/closure/goog/i18n/mime.js +111 -0
- data/third_party/closure-library/closure/goog/i18n/mime_test.html +51 -0
- data/third_party/closure-library/closure/goog/i18n/numberformat.js +1228 -0
- data/third_party/closure-library/closure/goog/i18n/numberformat_test.html +985 -0
- data/third_party/closure-library/closure/goog/i18n/numberformatsymbols.js +3416 -0
- data/third_party/closure-library/closure/goog/i18n/numberformatsymbolsext.js +11887 -0
- data/third_party/closure-library/closure/goog/i18n/ordinalrules.js +589 -0
- data/third_party/closure-library/closure/goog/i18n/pluralrules.js +859 -0
- data/third_party/closure-library/closure/goog/i18n/timezone.js +340 -0
- data/third_party/closure-library/closure/goog/i18n/timezone_test.html +163 -0
- data/third_party/closure-library/closure/goog/i18n/uchar.js +1368 -0
- data/third_party/closure-library/closure/goog/i18n/uchar/localnamefetcher.js +73 -0
- data/third_party/closure-library/closure/goog/i18n/uchar/localnamefetcher_test.html +62 -0
- data/third_party/closure-library/closure/goog/i18n/uchar/namefetcher.js +70 -0
- data/third_party/closure-library/closure/goog/i18n/uchar/remotenamefetcher.js +281 -0
- data/third_party/closure-library/closure/goog/i18n/uchar/remotenamefetcher_test.html +111 -0
- data/third_party/closure-library/closure/goog/i18n/uchar_test.html +133 -0
- data/third_party/closure-library/closure/goog/images/blank.gif +0 -0
- data/third_party/closure-library/closure/goog/images/bubble_close.jpg +0 -0
- data/third_party/closure-library/closure/goog/images/bubble_left.gif +0 -0
- data/third_party/closure-library/closure/goog/images/bubble_right.gif +0 -0
- data/third_party/closure-library/closure/goog/images/button-bg.gif +0 -0
- data/third_party/closure-library/closure/goog/images/check-outline.gif +0 -0
- data/third_party/closure-library/closure/goog/images/check-sprite.gif +0 -0
- data/third_party/closure-library/closure/goog/images/check.gif +0 -0
- data/third_party/closure-library/closure/goog/images/close_box.gif +0 -0
- data/third_party/closure-library/closure/goog/images/color-swatch-tick.gif +0 -0
- data/third_party/closure-library/closure/goog/images/dialog_close_box.gif +0 -0
- data/third_party/closure-library/closure/goog/images/dimension-highlighted.png +0 -0
- data/third_party/closure-library/closure/goog/images/dimension-unhighlighted.png +0 -0
- data/third_party/closure-library/closure/goog/images/dropdn.gif +0 -0
- data/third_party/closure-library/closure/goog/images/dropdn_disabled.gif +0 -0
- data/third_party/closure-library/closure/goog/images/dropdown.gif +0 -0
- data/third_party/closure-library/closure/goog/images/gears_bluedot.gif +0 -0
- data/third_party/closure-library/closure/goog/images/gears_offline.gif +0 -0
- data/third_party/closure-library/closure/goog/images/gears_online.gif +0 -0
- data/third_party/closure-library/closure/goog/images/gears_paused.gif +0 -0
- data/third_party/closure-library/closure/goog/images/gears_syncing.gif +0 -0
- data/third_party/closure-library/closure/goog/images/hsv-sprite-sm.gif +0 -0
- data/third_party/closure-library/closure/goog/images/hsv-sprite-sm.png +0 -0
- data/third_party/closure-library/closure/goog/images/hsv-sprite.gif +0 -0
- data/third_party/closure-library/closure/goog/images/hsv-sprite.png +0 -0
- data/third_party/closure-library/closure/goog/images/hsva-sprite-sm.gif +0 -0
- data/third_party/closure-library/closure/goog/images/hsva-sprite-sm.png +0 -0
- data/third_party/closure-library/closure/goog/images/hsva-sprite.gif +0 -0
- data/third_party/closure-library/closure/goog/images/hsva-sprite.png +0 -0
- data/third_party/closure-library/closure/goog/images/left_anchor_bubble_bot.gif +0 -0
- data/third_party/closure-library/closure/goog/images/left_anchor_bubble_top.gif +0 -0
- data/third_party/closure-library/closure/goog/images/menu-arrows.gif +0 -0
- data/third_party/closure-library/closure/goog/images/minus.png +0 -0
- data/third_party/closure-library/closure/goog/images/no_anchor_bubble_bot.gif +0 -0
- data/third_party/closure-library/closure/goog/images/no_anchor_bubble_top.gif +0 -0
- data/third_party/closure-library/closure/goog/images/offlineicons.png +0 -0
- data/third_party/closure-library/closure/goog/images/plus.png +0 -0
- data/third_party/closure-library/closure/goog/images/ratingstars.gif +0 -0
- data/third_party/closure-library/closure/goog/images/right_anchor_bubble_bot.gif +0 -0
- data/third_party/closure-library/closure/goog/images/right_anchor_bubble_top.gif +0 -0
- data/third_party/closure-library/closure/goog/images/toolbar-bg.png +0 -0
- data/third_party/closure-library/closure/goog/images/toolbar-separator.gif +0 -0
- data/third_party/closure-library/closure/goog/images/toolbar_icons.gif +0 -0
- data/third_party/closure-library/closure/goog/images/tree/I.png +0 -0
- data/third_party/closure-library/closure/goog/images/tree/cleardot.gif +0 -0
- data/third_party/closure-library/closure/goog/images/tree/tree.gif +0 -0
- data/third_party/closure-library/closure/goog/images/tree/tree.png +0 -0
- data/third_party/closure-library/closure/goog/images/ui_controls.jpg +0 -0
- data/third_party/closure-library/closure/goog/iter/iter.js +702 -0
- data/third_party/closure-library/closure/goog/iter/iter_test.html +479 -0
- data/third_party/closure-library/closure/goog/json/evaljsonprocessor.js +66 -0
- data/third_party/closure-library/closure/goog/json/json.js +349 -0
- data/third_party/closure-library/closure/goog/json/json_perf.html +116 -0
- data/third_party/closure-library/closure/goog/json/json_test.html +569 -0
- data/third_party/closure-library/closure/goog/json/nativejsonprocessor.js +73 -0
- data/third_party/closure-library/closure/goog/json/processor.js +33 -0
- data/third_party/closure-library/closure/goog/json/processor_test.html +89 -0
- data/third_party/closure-library/closure/goog/labs/classdef/classdef.js +162 -0
- data/third_party/closure-library/closure/goog/labs/classdef/classdef_test.html +103 -0
- data/third_party/closure-library/closure/goog/labs/events/touch.js +82 -0
- data/third_party/closure-library/closure/goog/labs/events/touch_test.html +19 -0
- data/third_party/closure-library/closure/goog/labs/events/touch_test.js +96 -0
- data/third_party/closure-library/closure/goog/labs/format/csv.js +391 -0
- data/third_party/closure-library/closure/goog/labs/format/csv_test.html +20 -0
- data/third_party/closure-library/closure/goog/labs/format/csv_test.js +169 -0
- data/third_party/closure-library/closure/goog/labs/mock/mock.js +733 -0
- data/third_party/closure-library/closure/goog/labs/mock/mock_test.html +416 -0
- data/third_party/closure-library/closure/goog/labs/net/image.js +93 -0
- data/third_party/closure-library/closure/goog/labs/net/image_test.html +21 -0
- data/third_party/closure-library/closure/goog/labs/net/image_test.js +128 -0
- data/third_party/closure-library/closure/goog/labs/net/testdata/cleardot.gif +0 -0
- data/third_party/closure-library/closure/goog/labs/net/testdata/xhr_test_json.data +2 -0
- data/third_party/closure-library/closure/goog/labs/net/testdata/xhr_test_text.data +1 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel.js +188 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel/basetestchannel.js +639 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel/channel.js +195 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel/requeststats.js +391 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel/webchannelbase.js +2171 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel/webchannelbase_test.html +22 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel/webchannelbase_test.js +1400 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel/webchannelbasetransport.js +274 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel/webchannelbasetransport_test.html +228 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel/webchanneldebug.js +298 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel/webchannelrequest.js +1291 -0
- data/third_party/closure-library/closure/goog/labs/net/webchannel/webchannelrequest_test.html +287 -0
- data/third_party/closure-library/closure/goog/labs/net/webchanneltransport.js +74 -0
- data/third_party/closure-library/closure/goog/labs/net/webchanneltransportfactory.js +35 -0
- data/third_party/closure-library/closure/goog/labs/net/xhr.js +449 -0
- data/third_party/closure-library/closure/goog/labs/net/xhr_test.html +455 -0
- data/third_party/closure-library/closure/goog/labs/object/object.js +46 -0
- data/third_party/closure-library/closure/goog/labs/object/object_test.html +56 -0
- data/third_party/closure-library/closure/goog/labs/observe/notice.js +63 -0
- data/third_party/closure-library/closure/goog/labs/observe/observable.js +77 -0
- data/third_party/closure-library/closure/goog/labs/observe/observableset.js +180 -0
- data/third_party/closure-library/closure/goog/labs/observe/observableset_test.html +207 -0
- data/third_party/closure-library/closure/goog/labs/observe/observationset.js +156 -0
- data/third_party/closure-library/closure/goog/labs/observe/observationset_test.html +252 -0
- data/third_party/closure-library/closure/goog/labs/observe/observer.js +100 -0
- data/third_party/closure-library/closure/goog/labs/observe/observer_test.html +65 -0
- data/third_party/closure-library/closure/goog/labs/observe/simpleobservable.js +129 -0
- data/third_party/closure-library/closure/goog/labs/observe/simpleobservable_test.html +196 -0
- data/third_party/closure-library/closure/goog/labs/structs/map.js +339 -0
- data/third_party/closure-library/closure/goog/labs/structs/map_perf.js +201 -0
- data/third_party/closure-library/closure/goog/labs/structs/map_test.html +434 -0
- data/third_party/closure-library/closure/goog/labs/structs/multimap.js +279 -0
- data/third_party/closure-library/closure/goog/labs/structs/multimap_test.html +332 -0
- data/third_party/closure-library/closure/goog/labs/style/pixeldensitymonitor.js +178 -0
- data/third_party/closure-library/closure/goog/labs/style/pixeldensitymonitor_test.html +17 -0
- data/third_party/closure-library/closure/goog/labs/style/pixeldensitymonitor_test.js +146 -0
- data/third_party/closure-library/closure/goog/labs/testing/assertthat.js +59 -0
- data/third_party/closure-library/closure/goog/labs/testing/assertthat_test.html +73 -0
- data/third_party/closure-library/closure/goog/labs/testing/decoratormatcher.js +94 -0
- data/third_party/closure-library/closure/goog/labs/testing/decoratormatcher_test.html +43 -0
- data/third_party/closure-library/closure/goog/labs/testing/dictionarymatcher.js +266 -0
- data/third_party/closure-library/closure/goog/labs/testing/dictionarymatcher_test.html +70 -0
- data/third_party/closure-library/closure/goog/labs/testing/logicmatcher.js +206 -0
- data/third_party/closure-library/closure/goog/labs/testing/logicmatcher_test.html +59 -0
- data/third_party/closure-library/closure/goog/labs/testing/matcher.js +51 -0
- data/third_party/closure-library/closure/goog/labs/testing/numbermatcher.js +334 -0
- data/third_party/closure-library/closure/goog/labs/testing/numbermatcher_test.html +79 -0
- data/third_party/closure-library/closure/goog/labs/testing/objectmatcher.js +306 -0
- data/third_party/closure-library/closure/goog/labs/testing/objectmatcher_test.html +102 -0
- data/third_party/closure-library/closure/goog/labs/testing/stringmatcher.js +402 -0
- data/third_party/closure-library/closure/goog/labs/testing/stringmatcher_test.html +101 -0
- data/third_party/closure-library/closure/goog/labs/useragent/browser.js +189 -0
- data/third_party/closure-library/closure/goog/labs/useragent/browser_test.html +21 -0
- data/third_party/closure-library/closure/goog/labs/useragent/browser_test.js +193 -0
- data/third_party/closure-library/closure/goog/labs/useragent/device.js +64 -0
- data/third_party/closure-library/closure/goog/labs/useragent/device_test.html +21 -0
- data/third_party/closure-library/closure/goog/labs/useragent/device_test.js +88 -0
- data/third_party/closure-library/closure/goog/labs/useragent/engine.js +144 -0
- data/third_party/closure-library/closure/goog/labs/useragent/engine_test.html +21 -0
- data/third_party/closure-library/closure/goog/labs/useragent/engine_test.js +164 -0
- data/third_party/closure-library/closure/goog/labs/useragent/platform.js +193 -0
- data/third_party/closure-library/closure/goog/labs/useragent/platform_test.html +21 -0
- data/third_party/closure-library/closure/goog/labs/useragent/platform_test.js +256 -0
- data/third_party/closure-library/closure/goog/labs/useragent/test_agents.js +272 -0
- data/third_party/closure-library/closure/goog/labs/useragent/util.js +89 -0
- data/third_party/closure-library/closure/goog/labs/useragent/util_test.html +22 -0
- data/third_party/closure-library/closure/goog/labs/useragent/util_test.js +60 -0
- data/third_party/closure-library/closure/goog/locale/countries.js +291 -0
- data/third_party/closure-library/closure/goog/locale/countrylanguagenames_test.html +237 -0
- data/third_party/closure-library/closure/goog/locale/defaultlocalenameconstants.js +907 -0
- data/third_party/closure-library/closure/goog/locale/genericfontnames.js +73 -0
- data/third_party/closure-library/closure/goog/locale/genericfontnames_test.html +97 -0
- data/third_party/closure-library/closure/goog/locale/genericfontnamesdata.js +327 -0
- data/third_party/closure-library/closure/goog/locale/locale.js +403 -0
- data/third_party/closure-library/closure/goog/locale/nativenameconstants.js +1354 -0
- data/third_party/closure-library/closure/goog/locale/scriptToLanguages.js +482 -0
- data/third_party/closure-library/closure/goog/locale/timezonedetection.js +117 -0
- data/third_party/closure-library/closure/goog/locale/timezonedetection_test.html +130 -0
- data/third_party/closure-library/closure/goog/locale/timezonefingerprint.js +248 -0
- data/third_party/closure-library/closure/goog/locale/timezonelist.js +131 -0
- data/third_party/closure-library/closure/goog/locale/timezonelist_test.html +165 -0
- data/third_party/closure-library/closure/goog/log/log.js +183 -0
- data/third_party/closure-library/closure/goog/log/log_test.js +169 -0
- data/third_party/closure-library/closure/goog/math/bezier.js +311 -0
- data/third_party/closure-library/closure/goog/math/bezier_test.html +112 -0
- data/third_party/closure-library/closure/goog/math/box.js +369 -0
- data/third_party/closure-library/closure/goog/math/box_test.html +298 -0
- data/third_party/closure-library/closure/goog/math/coordinate.js +233 -0
- data/third_party/closure-library/closure/goog/math/coordinate3.js +169 -0
- data/third_party/closure-library/closure/goog/math/coordinate3_test.html +204 -0
- data/third_party/closure-library/closure/goog/math/coordinate_test.html +159 -0
- data/third_party/closure-library/closure/goog/math/exponentialbackoff.js +103 -0
- data/third_party/closure-library/closure/goog/math/exponentialbackoff_test.html +67 -0
- data/third_party/closure-library/closure/goog/math/integer.js +737 -0
- data/third_party/closure-library/closure/goog/math/integer_test.html +1653 -0
- data/third_party/closure-library/closure/goog/math/interpolator/interpolator1.js +64 -0
- data/third_party/closure-library/closure/goog/math/interpolator/linear1.js +82 -0
- data/third_party/closure-library/closure/goog/math/interpolator/linear1_test.html +87 -0
- data/third_party/closure-library/closure/goog/math/interpolator/pchip1.js +81 -0
- data/third_party/closure-library/closure/goog/math/interpolator/pchip1_test.html +74 -0
- data/third_party/closure-library/closure/goog/math/interpolator/spline1.js +202 -0
- data/third_party/closure-library/closure/goog/math/interpolator/spline1_test.html +103 -0
- data/third_party/closure-library/closure/goog/math/line.js +177 -0
- data/third_party/closure-library/closure/goog/math/line_test.html +62 -0
- data/third_party/closure-library/closure/goog/math/long.js +802 -0
- data/third_party/closure-library/closure/goog/math/long_test.html +1571 -0
- data/third_party/closure-library/closure/goog/math/math.js +387 -0
- data/third_party/closure-library/closure/goog/math/math_test.html +292 -0
- data/third_party/closure-library/closure/goog/math/matrix.js +675 -0
- data/third_party/closure-library/closure/goog/math/matrix_test.html +434 -0
- data/third_party/closure-library/closure/goog/math/range.js +144 -0
- data/third_party/closure-library/closure/goog/math/range_test.html +103 -0
- data/third_party/closure-library/closure/goog/math/rangeset.js +394 -0
- data/third_party/closure-library/closure/goog/math/rangeset_test.html +664 -0
- data/third_party/closure-library/closure/goog/math/rect.js +463 -0
- data/third_party/closure-library/closure/goog/math/rect_test.html +444 -0
- data/third_party/closure-library/closure/goog/math/size.js +206 -0
- data/third_party/closure-library/closure/goog/math/size_test.html +180 -0
- data/third_party/closure-library/closure/goog/math/tdma.js +73 -0
- data/third_party/closure-library/closure/goog/math/tdma_test.html +33 -0
- data/third_party/closure-library/closure/goog/math/vec2.js +283 -0
- data/third_party/closure-library/closure/goog/math/vec2_test.html +225 -0
- data/third_party/closure-library/closure/goog/math/vec3.js +308 -0
- data/third_party/closure-library/closure/goog/math/vec3_test.html +221 -0
- data/third_party/closure-library/closure/goog/memoize/memoize.js +102 -0
- data/third_party/closure-library/closure/goog/memoize/memoize_test.html +157 -0
- data/third_party/closure-library/closure/goog/messaging/abstractchannel.js +210 -0
- data/third_party/closure-library/closure/goog/messaging/abstractchannel_test.html +89 -0
- data/third_party/closure-library/closure/goog/messaging/bufferedchannel.js +287 -0
- data/third_party/closure-library/closure/goog/messaging/bufferedchannel_test.html +283 -0
- data/third_party/closure-library/closure/goog/messaging/deferredchannel.js +98 -0
- data/third_party/closure-library/closure/goog/messaging/deferredchannel_test.html +113 -0
- data/third_party/closure-library/closure/goog/messaging/loggerclient.js +131 -0
- data/third_party/closure-library/closure/goog/messaging/loggerclient_test.html +102 -0
- data/third_party/closure-library/closure/goog/messaging/loggerserver.js +98 -0
- data/third_party/closure-library/closure/goog/messaging/loggerserver_test.html +101 -0
- data/third_party/closure-library/closure/goog/messaging/messagechannel.js +116 -0
- data/third_party/closure-library/closure/goog/messaging/messaging.js +34 -0
- data/third_party/closure-library/closure/goog/messaging/messaging_test.html +42 -0
- data/third_party/closure-library/closure/goog/messaging/multichannel.js +302 -0
- data/third_party/closure-library/closure/goog/messaging/multichannel_test.html +122 -0
- data/third_party/closure-library/closure/goog/messaging/portcaller.js +151 -0
- data/third_party/closure-library/closure/goog/messaging/portcaller_test.html +65 -0
- data/third_party/closure-library/closure/goog/messaging/portchannel.js +401 -0
- data/third_party/closure-library/closure/goog/messaging/portchannel_test.html +392 -0
- data/third_party/closure-library/closure/goog/messaging/portnetwork.js +78 -0
- data/third_party/closure-library/closure/goog/messaging/portnetwork_test.html +74 -0
- data/third_party/closure-library/closure/goog/messaging/portoperator.js +197 -0
- data/third_party/closure-library/closure/goog/messaging/portoperator_test.html +112 -0
- data/third_party/closure-library/closure/goog/messaging/respondingchannel.js +236 -0
- data/third_party/closure-library/closure/goog/messaging/respondingchannel_test.html +161 -0
- data/third_party/closure-library/closure/goog/messaging/testdata/portchannel_inner.html +28 -0
- data/third_party/closure-library/closure/goog/messaging/testdata/portchannel_worker.js +37 -0
- data/third_party/closure-library/closure/goog/messaging/testdata/portchannel_wrong_origin_inner.html +29 -0
- data/third_party/closure-library/closure/goog/messaging/testdata/portnetwork_inner.html +34 -0
- data/third_party/closure-library/closure/goog/messaging/testdata/portnetwork_worker1.js +32 -0
- data/third_party/closure-library/closure/goog/messaging/testdata/portnetwork_worker2.js +32 -0
- data/third_party/closure-library/closure/goog/module/abstractmoduleloader.js +56 -0
- data/third_party/closure-library/closure/goog/module/basemodule.js +45 -0
- data/third_party/closure-library/closure/goog/module/loader.js +269 -0
- data/third_party/closure-library/closure/goog/module/module.js +166 -0
- data/third_party/closure-library/closure/goog/module/moduleinfo.js +335 -0
- data/third_party/closure-library/closure/goog/module/moduleinfo_test.html +108 -0
- data/third_party/closure-library/closure/goog/module/moduleloadcallback.js +84 -0
- data/third_party/closure-library/closure/goog/module/moduleloadcallback_test.html +57 -0
- data/third_party/closure-library/closure/goog/module/moduleloader.js +462 -0
- data/third_party/closure-library/closure/goog/module/moduleloader_test.html +30 -0
- data/third_party/closure-library/closure/goog/module/moduleloader_test.js +438 -0
- data/third_party/closure-library/closure/goog/module/modulemanager.js +1370 -0
- data/third_party/closure-library/closure/goog/module/modulemanager_test.html +2143 -0
- data/third_party/closure-library/closure/goog/module/testdata/modA_1.js +23 -0
- data/third_party/closure-library/closure/goog/module/testdata/modA_2.js +27 -0
- data/third_party/closure-library/closure/goog/module/testdata/modB_1.js +31 -0
- data/third_party/closure-library/closure/goog/net/browserchannel.js +2757 -0
- data/third_party/closure-library/closure/goog/net/browserchannel_test.html +1328 -0
- data/third_party/closure-library/closure/goog/net/browsertestchannel.js +618 -0
- data/third_party/closure-library/closure/goog/net/bulkloader.js +181 -0
- data/third_party/closure-library/closure/goog/net/bulkloader_test.html +233 -0
- data/third_party/closure-library/closure/goog/net/bulkloaderhelper.js +127 -0
- data/third_party/closure-library/closure/goog/net/channeldebug.js +300 -0
- data/third_party/closure-library/closure/goog/net/channelrequest.js +1312 -0
- data/third_party/closure-library/closure/goog/net/channelrequest_test.html +280 -0
- data/third_party/closure-library/closure/goog/net/cookies.js +370 -0
- data/third_party/closure-library/closure/goog/net/cookies_test.html +266 -0
- data/third_party/closure-library/closure/goog/net/crossdomainrpc.js +849 -0
- data/third_party/closure-library/closure/goog/net/crossdomainrpc_test.css +7 -0
- data/third_party/closure-library/closure/goog/net/crossdomainrpc_test.gif +0 -0
- data/third_party/closure-library/closure/goog/net/crossdomainrpc_test.html +120 -0
- data/third_party/closure-library/closure/goog/net/crossdomainrpc_test_response.html +59 -0
- data/third_party/closure-library/closure/goog/net/errorcode.js +130 -0
- data/third_party/closure-library/closure/goog/net/eventtype.js +37 -0
- data/third_party/closure-library/closure/goog/net/filedownloader.js +743 -0
- data/third_party/closure-library/closure/goog/net/filedownloader_test.html +372 -0
- data/third_party/closure-library/closure/goog/net/httpstatus.js +111 -0
- data/third_party/closure-library/closure/goog/net/iframe_xhr_test.html +147 -0
- data/third_party/closure-library/closure/goog/net/iframe_xhr_test_response.html +17 -0
- data/third_party/closure-library/closure/goog/net/iframeio.js +1355 -0
- data/third_party/closure-library/closure/goog/net/iframeio_different_base_test.data +2 -0
- data/third_party/closure-library/closure/goog/net/iframeio_different_base_test.html +44 -0
- data/third_party/closure-library/closure/goog/net/iframeio_test.html +402 -0
- data/third_party/closure-library/closure/goog/net/iframeloadmonitor.js +200 -0
- data/third_party/closure-library/closure/goog/net/iframeloadmonitor_test.html +113 -0
- data/third_party/closure-library/closure/goog/net/iframeloadmonitor_test_frame.html +12 -0
- data/third_party/closure-library/closure/goog/net/iframeloadmonitor_test_frame2.html +12 -0
- data/third_party/closure-library/closure/goog/net/iframeloadmonitor_test_frame3.html +12 -0
- data/third_party/closure-library/closure/goog/net/imageloader.js +292 -0
- data/third_party/closure-library/closure/goog/net/imageloader_test.html +302 -0
- data/third_party/closure-library/closure/goog/net/imageloader_testimg1.gif +0 -0
- data/third_party/closure-library/closure/goog/net/imageloader_testimg2.gif +0 -0
- data/third_party/closure-library/closure/goog/net/imageloader_testimg3.gif +0 -0
- data/third_party/closure-library/closure/goog/net/ipaddress.js +511 -0
- data/third_party/closure-library/closure/goog/net/ipaddress_test.html +227 -0
- data/third_party/closure-library/closure/goog/net/jsloader.js +366 -0
- data/third_party/closure-library/closure/goog/net/jsloader_test.html +142 -0
- data/third_party/closure-library/closure/goog/net/jsonp.js +338 -0
- data/third_party/closure-library/closure/goog/net/jsonp_test.html +327 -0
- data/third_party/closure-library/closure/goog/net/mockiframeio.js +319 -0
- data/third_party/closure-library/closure/goog/net/multiiframeloadmonitor.js +117 -0
- data/third_party/closure-library/closure/goog/net/multiiframeloadmonitor_test.html +172 -0
- data/third_party/closure-library/closure/goog/net/networkstatusmonitor.js +47 -0
- data/third_party/closure-library/closure/goog/net/networktester.js +383 -0
- data/third_party/closure-library/closure/goog/net/networktester_test.html +227 -0
- data/third_party/closure-library/closure/goog/net/testdata/jsloader_test1.js +23 -0
- data/third_party/closure-library/closure/goog/net/testdata/jsloader_test2.js +23 -0
- data/third_party/closure-library/closure/goog/net/testdata/jsloader_test3.js +23 -0
- data/third_party/closure-library/closure/goog/net/testdata/jsloader_test4.js +23 -0
- data/third_party/closure-library/closure/goog/net/tmpnetwork.js +164 -0
- data/third_party/closure-library/closure/goog/net/websocket.js +505 -0
- data/third_party/closure-library/closure/goog/net/websocket_test.html +367 -0
- data/third_party/closure-library/closure/goog/net/wrapperxmlhttpfactory.js +68 -0
- data/third_party/closure-library/closure/goog/net/xhrio.js +1191 -0
- data/third_party/closure-library/closure/goog/net/xhrio_test.html +732 -0
- data/third_party/closure-library/closure/goog/net/xhriopool.js +80 -0
- data/third_party/closure-library/closure/goog/net/xhrmanager.js +787 -0
- data/third_party/closure-library/closure/goog/net/xhrmanager_test.html +123 -0
- data/third_party/closure-library/closure/goog/net/xmlhttp.js +228 -0
- data/third_party/closure-library/closure/goog/net/xmlhttpfactory.js +64 -0
- data/third_party/closure-library/closure/goog/net/xpc/crosspagechannel.js +805 -0
- data/third_party/closure-library/closure/goog/net/xpc/crosspagechannel_test.html +1024 -0
- data/third_party/closure-library/closure/goog/net/xpc/crosspagechannelrole.js +30 -0
- data/third_party/closure-library/closure/goog/net/xpc/frameelementmethodtransport.js +254 -0
- data/third_party/closure-library/closure/goog/net/xpc/iframepollingtransport.js +921 -0
- data/third_party/closure-library/closure/goog/net/xpc/iframepollingtransport_test.html +295 -0
- data/third_party/closure-library/closure/goog/net/xpc/iframerelaytransport.js +394 -0
- data/third_party/closure-library/closure/goog/net/xpc/nativemessagingtransport.js +649 -0
- data/third_party/closure-library/closure/goog/net/xpc/nativemessagingtransport_test.html +304 -0
- data/third_party/closure-library/closure/goog/net/xpc/nixtransport.js +479 -0
- data/third_party/closure-library/closure/goog/net/xpc/relay.js +72 -0
- data/third_party/closure-library/closure/goog/net/xpc/testdata/access_checker.html +29 -0
- data/third_party/closure-library/closure/goog/net/xpc/testdata/inner_peer.html +96 -0
- data/third_party/closure-library/closure/goog/net/xpc/transport.js +105 -0
- data/third_party/closure-library/closure/goog/net/xpc/xpc.js +293 -0
- data/third_party/closure-library/closure/goog/object/object.js +635 -0
- data/third_party/closure-library/closure/goog/object/object_test.html +466 -0
- data/third_party/closure-library/closure/goog/positioning/absoluteposition.js +74 -0
- data/third_party/closure-library/closure/goog/positioning/abstractposition.js +48 -0
- data/third_party/closure-library/closure/goog/positioning/anchoredposition.js +92 -0
- data/third_party/closure-library/closure/goog/positioning/anchoredposition_test.html +77 -0
- data/third_party/closure-library/closure/goog/positioning/anchoredviewportposition.js +191 -0
- data/third_party/closure-library/closure/goog/positioning/anchoredviewportposition_test.html +174 -0
- data/third_party/closure-library/closure/goog/positioning/anchoredviewportposition_test_iframe.html +35 -0
- data/third_party/closure-library/closure/goog/positioning/clientposition.js +88 -0
- data/third_party/closure-library/closure/goog/positioning/clientposition_test.html +22 -0
- data/third_party/closure-library/closure/goog/positioning/clientposition_test.js +122 -0
- data/third_party/closure-library/closure/goog/positioning/menuanchoredposition.js +71 -0
- data/third_party/closure-library/closure/goog/positioning/menuanchoredposition_test.html +119 -0
- data/third_party/closure-library/closure/goog/positioning/positioning.js +557 -0
- data/third_party/closure-library/closure/goog/positioning/positioning_test.html +199 -0
- data/third_party/closure-library/closure/goog/positioning/positioning_test.js +1168 -0
- data/third_party/closure-library/closure/goog/positioning/positioning_test_iframe1.html +16 -0
- data/third_party/closure-library/closure/goog/positioning/positioning_test_iframe2.html +13 -0
- data/third_party/closure-library/closure/goog/positioning/positioning_test_quirk.html +9 -0
- data/third_party/closure-library/closure/goog/positioning/positioning_test_standard.html +13 -0
- data/third_party/closure-library/closure/goog/positioning/viewportclientposition.js +121 -0
- data/third_party/closure-library/closure/goog/positioning/viewportclientposition_test.html +189 -0
- data/third_party/closure-library/closure/goog/positioning/viewportposition.js +64 -0
- data/third_party/closure-library/closure/goog/proto/proto.js +44 -0
- data/third_party/closure-library/closure/goog/proto/serializer.js +69 -0
- data/third_party/closure-library/closure/goog/proto/serializer_test.html +43 -0
- data/third_party/closure-library/closure/goog/proto2/descriptor.js +200 -0
- data/third_party/closure-library/closure/goog/proto2/descriptor_test.html +60 -0
- data/third_party/closure-library/closure/goog/proto2/fielddescriptor.js +291 -0
- data/third_party/closure-library/closure/goog/proto2/fielddescriptor_test.html +132 -0
- data/third_party/closure-library/closure/goog/proto2/lazydeserializer.js +70 -0
- data/third_party/closure-library/closure/goog/proto2/message.js +840 -0
- data/third_party/closure-library/closure/goog/proto2/message_test.html +467 -0
- data/third_party/closure-library/closure/goog/proto2/objectserializer.js +159 -0
- data/third_party/closure-library/closure/goog/proto2/objectserializer_test.html +489 -0
- data/third_party/closure-library/closure/goog/proto2/package_test.pb.js +166 -0
- data/third_party/closure-library/closure/goog/proto2/pbliteserializer.js +193 -0
- data/third_party/closure-library/closure/goog/proto2/pbliteserializer_test.html +504 -0
- data/third_party/closure-library/closure/goog/proto2/proto_test.html +693 -0
- data/third_party/closure-library/closure/goog/proto2/serializer.js +174 -0
- data/third_party/closure-library/closure/goog/proto2/test.pb.js +2876 -0
- data/third_party/closure-library/closure/goog/proto2/textformatserializer.js +995 -0
- data/third_party/closure-library/closure/goog/proto2/textformatserializer_test.html +21 -0
- data/third_party/closure-library/closure/goog/proto2/textformatserializer_test.js +629 -0
- data/third_party/closure-library/closure/goog/proto2/util.js +54 -0
- data/third_party/closure-library/closure/goog/pubsub/pubsub.js +326 -0
- data/third_party/closure-library/closure/goog/pubsub/pubsub_perf.html +298 -0
- data/third_party/closure-library/closure/goog/pubsub/pubsub_test.html +635 -0
- data/third_party/closure-library/closure/goog/reflect/reflect.js +77 -0
- data/third_party/closure-library/closure/goog/result/chain_test.html +236 -0
- data/third_party/closure-library/closure/goog/result/combine_test.html +229 -0
- data/third_party/closure-library/closure/goog/result/deferredadaptor.js +57 -0
- data/third_party/closure-library/closure/goog/result/deferredadaptor_test.html +86 -0
- data/third_party/closure-library/closure/goog/result/dependentresult.js +44 -0
- data/third_party/closure-library/closure/goog/result/result_interface.js +109 -0
- data/third_party/closure-library/closure/goog/result/resultutil.js +550 -0
- data/third_party/closure-library/closure/goog/result/resultutil_test.html +46 -0
- data/third_party/closure-library/closure/goog/result/simpleresult.js +217 -0
- data/third_party/closure-library/closure/goog/result/simpleresult_test.html +271 -0
- data/third_party/closure-library/closure/goog/result/transform_test.html +153 -0
- data/third_party/closure-library/closure/goog/result/wait_test.html +211 -0
- data/third_party/closure-library/closure/goog/soy/data.js +132 -0
- data/third_party/closure-library/closure/goog/soy/renderer.js +266 -0
- data/third_party/closure-library/closure/goog/soy/renderer_test.html +172 -0
- data/third_party/closure-library/closure/goog/soy/soy.js +205 -0
- data/third_party/closure-library/closure/goog/soy/soy_test.html +230 -0
- data/third_party/closure-library/closure/goog/soy/soy_test.js +175 -0
- data/third_party/closure-library/closure/goog/spell/spellcheck.js +475 -0
- data/third_party/closure-library/closure/goog/spell/spellcheck_test.html +112 -0
- data/third_party/closure-library/closure/goog/stats/basicstat.js +271 -0
- data/third_party/closure-library/closure/goog/stats/basicstat_test.html +167 -0
- data/third_party/closure-library/closure/goog/storage/collectablestorage.js +100 -0
- data/third_party/closure-library/closure/goog/storage/collectablestorage_test.html +76 -0
- data/third_party/closure-library/closure/goog/storage/encryptedstorage.js +201 -0
- data/third_party/closure-library/closure/goog/storage/encryptedstorage_test.html +160 -0
- data/third_party/closure-library/closure/goog/storage/errorcode.js +30 -0
- data/third_party/closure-library/closure/goog/storage/expiringstorage.js +142 -0
- data/third_party/closure-library/closure/goog/storage/expiringstorage_test.html +90 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/errorcode.js +31 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/errorhandlingmechanism.js +128 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/errorhandlingmechanism_test.html +83 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/html5localstorage.js +45 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/html5localstorage_test.html +60 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/html5sessionstorage.js +46 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/html5sessionstorage_test.html +61 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/html5webstorage.js +176 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/html5webstorage_test.html +122 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/ieuserdata.js +283 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/ieuserdata_test.html +78 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/iterablemechanism.js +86 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/iterablemechanismtester.js +117 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/mechanism.js +56 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/mechanismfactory.js +113 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/mechanismfactory_test.html +58 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/mechanismseparationtester.js +91 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/mechanismsharingtester.js +87 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/mechanismtester.js +200 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/prefixedmechanism.js +97 -0
- data/third_party/closure-library/closure/goog/storage/mechanism/prefixedmechanism_test.html +66 -0
- data/third_party/closure-library/closure/goog/storage/richstorage.js +149 -0
- data/third_party/closure-library/closure/goog/storage/richstorage_test.html +87 -0
- data/third_party/closure-library/closure/goog/storage/storage.js +111 -0
- data/third_party/closure-library/closure/goog/storage/storage_test.html +64 -0
- data/third_party/closure-library/closure/goog/storage/storage_test.js +60 -0
- data/third_party/closure-library/closure/goog/string/linkify.js +236 -0
- data/third_party/closure-library/closure/goog/string/linkify_test.html +441 -0
- data/third_party/closure-library/closure/goog/string/newlines.js +153 -0
- data/third_party/closure-library/closure/goog/string/newlines_test.html +19 -0
- data/third_party/closure-library/closure/goog/string/newlines_test.js +87 -0
- data/third_party/closure-library/closure/goog/string/parser.js +38 -0
- data/third_party/closure-library/closure/goog/string/path.js +169 -0
- data/third_party/closure-library/closure/goog/string/path_test.html +111 -0
- data/third_party/closure-library/closure/goog/string/string.js +1378 -0
- data/third_party/closure-library/closure/goog/string/string_test.html +19 -0
- data/third_party/closure-library/closure/goog/string/string_test.js +1173 -0
- data/third_party/closure-library/closure/goog/string/stringbuffer.js +103 -0
- data/third_party/closure-library/closure/goog/string/stringbuffer_test.html +101 -0
- data/third_party/closure-library/closure/goog/string/stringformat.js +251 -0
- data/third_party/closure-library/closure/goog/string/stringformat_test.html +223 -0
- data/third_party/closure-library/closure/goog/string/stringifier.js +38 -0
- data/third_party/closure-library/closure/goog/structs/avltree.js +835 -0
- data/third_party/closure-library/closure/goog/structs/avltree_test.html +303 -0
- data/third_party/closure-library/closure/goog/structs/circularbuffer.js +223 -0
- data/third_party/closure-library/closure/goog/structs/circularbuffer_test.html +105 -0
- data/third_party/closure-library/closure/goog/structs/collection.js +55 -0
- data/third_party/closure-library/closure/goog/structs/collection_test.html +57 -0
- data/third_party/closure-library/closure/goog/structs/heap.js +333 -0
- data/third_party/closure-library/closure/goog/structs/heap_test.html +220 -0
- data/third_party/closure-library/closure/goog/structs/inversionmap.js +159 -0
- data/third_party/closure-library/closure/goog/structs/inversionmap_test.html +157 -0
- data/third_party/closure-library/closure/goog/structs/linkedmap.js +473 -0
- data/third_party/closure-library/closure/goog/structs/linkedmap_test.html +300 -0
- data/third_party/closure-library/closure/goog/structs/map.js +449 -0
- data/third_party/closure-library/closure/goog/structs/map_test.html +430 -0
- data/third_party/closure-library/closure/goog/structs/node.js +74 -0
- data/third_party/closure-library/closure/goog/structs/pool.js +381 -0
- data/third_party/closure-library/closure/goog/structs/pool_test.html +291 -0
- data/third_party/closure-library/closure/goog/structs/prioritypool.js +184 -0
- data/third_party/closure-library/closure/goog/structs/prioritypool_test.html +588 -0
- data/third_party/closure-library/closure/goog/structs/priorityqueue.js +64 -0
- data/third_party/closure-library/closure/goog/structs/priorityqueue_test.html +179 -0
- data/third_party/closure-library/closure/goog/structs/quadtree.js +571 -0
- data/third_party/closure-library/closure/goog/structs/quadtree_test.html +179 -0
- data/third_party/closure-library/closure/goog/structs/queue.js +157 -0
- data/third_party/closure-library/closure/goog/structs/queue_test.html +140 -0
- data/third_party/closure-library/closure/goog/structs/set.js +274 -0
- data/third_party/closure-library/closure/goog/structs/set_perf.html +271 -0
- data/third_party/closure-library/closure/goog/structs/set_test.html +581 -0
- data/third_party/closure-library/closure/goog/structs/simplepool.js +205 -0
- data/third_party/closure-library/closure/goog/structs/stringset.js +403 -0
- data/third_party/closure-library/closure/goog/structs/stringset_test.html +265 -0
- data/third_party/closure-library/closure/goog/structs/structs.js +351 -0
- data/third_party/closure-library/closure/goog/structs/structs_test.html +1050 -0
- data/third_party/closure-library/closure/goog/structs/treenode.js +428 -0
- data/third_party/closure-library/closure/goog/structs/treenode_test.html +370 -0
- data/third_party/closure-library/closure/goog/structs/trie.js +368 -0
- data/third_party/closure-library/closure/goog/structs/trie_test.html +378 -0
- data/third_party/closure-library/closure/goog/style/bidi.js +182 -0
- data/third_party/closure-library/closure/goog/style/bidi_test.html +211 -0
- data/third_party/closure-library/closure/goog/style/cursor.js +115 -0
- data/third_party/closure-library/closure/goog/style/cursor_test.html +132 -0
- data/third_party/closure-library/closure/goog/style/style.js +2087 -0
- data/third_party/closure-library/closure/goog/style/style_quirks_test.html +530 -0
- data/third_party/closure-library/closure/goog/style/style_test.html +518 -0
- data/third_party/closure-library/closure/goog/style/style_test.js +2602 -0
- data/third_party/closure-library/closure/goog/style/style_test_iframe_quirk.html +27 -0
- data/third_party/closure-library/closure/goog/style/style_test_iframe_standard.html +30 -0
- data/third_party/closure-library/closure/goog/style/style_test_quirk.html +9 -0
- data/third_party/closure-library/closure/goog/style/style_test_standard.html +11 -0
- data/third_party/closure-library/closure/goog/style/style_webkit_scrollbars_test.html +79 -0
- data/third_party/closure-library/closure/goog/style/stylescrollbartester.js +78 -0
- data/third_party/closure-library/closure/goog/style/transition.js +138 -0
- data/third_party/closure-library/closure/goog/style/transition_test.html +124 -0
- data/third_party/closure-library/closure/goog/testing/asserts.js +1243 -0
- data/third_party/closure-library/closure/goog/testing/asserts_test.html +1150 -0
- data/third_party/closure-library/closure/goog/testing/async/mockcontrol.js +174 -0
- data/third_party/closure-library/closure/goog/testing/async/mockcontrol_test.html +223 -0
- data/third_party/closure-library/closure/goog/testing/asynctestcase.js +824 -0
- data/third_party/closure-library/closure/goog/testing/asynctestcase_async_test.html +102 -0
- data/third_party/closure-library/closure/goog/testing/asynctestcase_noasync_test.html +98 -0
- data/third_party/closure-library/closure/goog/testing/asynctestcase_test.html +58 -0
- data/third_party/closure-library/closure/goog/testing/benchmark.js +88 -0
- data/third_party/closure-library/closure/goog/testing/continuationtestcase.js +689 -0
- data/third_party/closure-library/closure/goog/testing/continuationtestcase_test.html +352 -0
- data/third_party/closure-library/closure/goog/testing/deferredtestcase.js +155 -0
- data/third_party/closure-library/closure/goog/testing/deferredtestcase_test.html +140 -0
- data/third_party/closure-library/closure/goog/testing/dom.js +608 -0
- data/third_party/closure-library/closure/goog/testing/dom_test.html +438 -0
- data/third_party/closure-library/closure/goog/testing/editor/dom.js +293 -0
- data/third_party/closure-library/closure/goog/testing/editor/dom_test.html +295 -0
- data/third_party/closure-library/closure/goog/testing/editor/fieldmock.js +99 -0
- data/third_party/closure-library/closure/goog/testing/editor/testhelper.js +176 -0
- data/third_party/closure-library/closure/goog/testing/editor/testhelper_test.html +177 -0
- data/third_party/closure-library/closure/goog/testing/events/eventobserver.js +86 -0
- data/third_party/closure-library/closure/goog/testing/events/eventobserver_test.html +70 -0
- data/third_party/closure-library/closure/goog/testing/events/events.js +713 -0
- data/third_party/closure-library/closure/goog/testing/events/events_test.html +614 -0
- data/third_party/closure-library/closure/goog/testing/events/matchers.js +41 -0
- data/third_party/closure-library/closure/goog/testing/events/matchers_test.html +40 -0
- data/third_party/closure-library/closure/goog/testing/events/onlinehandler.js +64 -0
- data/third_party/closure-library/closure/goog/testing/events/onlinehandler_test.html +89 -0
- data/third_party/closure-library/closure/goog/testing/expectedfailures.js +236 -0
- data/third_party/closure-library/closure/goog/testing/expectedfailures_test.html +122 -0
- data/third_party/closure-library/closure/goog/testing/fs/blob.js +116 -0
- data/third_party/closure-library/closure/goog/testing/fs/blob_test.html +65 -0
- data/third_party/closure-library/closure/goog/testing/fs/directoryentry_test.html +313 -0
- data/third_party/closure-library/closure/goog/testing/fs/entry.js +621 -0
- data/third_party/closure-library/closure/goog/testing/fs/entry_test.html +227 -0
- data/third_party/closure-library/closure/goog/testing/fs/file.js +52 -0
- data/third_party/closure-library/closure/goog/testing/fs/fileentry_test.html +93 -0
- data/third_party/closure-library/closure/goog/testing/fs/filereader.js +272 -0
- data/third_party/closure-library/closure/goog/testing/fs/filereader_test.html +236 -0
- data/third_party/closure-library/closure/goog/testing/fs/filesystem.js +63 -0
- data/third_party/closure-library/closure/goog/testing/fs/filewriter.js +261 -0
- data/third_party/closure-library/closure/goog/testing/fs/filewriter_test.html +325 -0
- data/third_party/closure-library/closure/goog/testing/fs/fs.js +147 -0
- data/third_party/closure-library/closure/goog/testing/fs/fs_test.html +53 -0
- data/third_party/closure-library/closure/goog/testing/fs/integration_test.html +223 -0
- data/third_party/closure-library/closure/goog/testing/fs/progressevent.js +81 -0
- data/third_party/closure-library/closure/goog/testing/functionmock.js +177 -0
- data/third_party/closure-library/closure/goog/testing/functionmock_test.html +511 -0
- data/third_party/closure-library/closure/goog/testing/graphics.js +64 -0
- data/third_party/closure-library/closure/goog/testing/i18n/asserts.js +77 -0
- data/third_party/closure-library/closure/goog/testing/i18n/asserts_test.html +19 -0
- data/third_party/closure-library/closure/goog/testing/i18n/asserts_test.js +67 -0
- data/third_party/closure-library/closure/goog/testing/jsunit.js +156 -0
- data/third_party/closure-library/closure/goog/testing/loosemock.js +240 -0
- data/third_party/closure-library/closure/goog/testing/loosemock_test.html +343 -0
- data/third_party/closure-library/closure/goog/testing/messaging/mockmessagechannel.js +79 -0
- data/third_party/closure-library/closure/goog/testing/messaging/mockmessageevent.js +100 -0
- data/third_party/closure-library/closure/goog/testing/messaging/mockmessageport.js +85 -0
- data/third_party/closure-library/closure/goog/testing/messaging/mockportnetwork.js +65 -0
- data/third_party/closure-library/closure/goog/testing/mock.js +619 -0
- data/third_party/closure-library/closure/goog/testing/mock_test.html +264 -0
- data/third_party/closure-library/closure/goog/testing/mockclassfactory.js +578 -0
- data/third_party/closure-library/closure/goog/testing/mockclassfactory_test.html +241 -0
- data/third_party/closure-library/closure/goog/testing/mockclock.js +520 -0
- data/third_party/closure-library/closure/goog/testing/mockclock_test.html +504 -0
- data/third_party/closure-library/closure/goog/testing/mockcontrol.js +219 -0
- data/third_party/closure-library/closure/goog/testing/mockcontrol_test.html +127 -0
- data/third_party/closure-library/closure/goog/testing/mockinterface.js +45 -0
- data/third_party/closure-library/closure/goog/testing/mockmatchers.js +395 -0
- data/third_party/closure-library/closure/goog/testing/mockmatchers_test.html +388 -0
- data/third_party/closure-library/closure/goog/testing/mockrandom.js +126 -0
- data/third_party/closure-library/closure/goog/testing/mockrandom_test.html +56 -0
- data/third_party/closure-library/closure/goog/testing/mockrange.js +66 -0
- data/third_party/closure-library/closure/goog/testing/mockrange_test.html +41 -0
- data/third_party/closure-library/closure/goog/testing/mockstorage.js +107 -0
- data/third_party/closure-library/closure/goog/testing/mockstorage_test.html +78 -0
- data/third_party/closure-library/closure/goog/testing/mockuseragent.js +141 -0
- data/third_party/closure-library/closure/goog/testing/mockuseragent_test.html +59 -0
- data/third_party/closure-library/closure/goog/testing/multitestrunner.js +1439 -0
- data/third_party/closure-library/closure/goog/testing/net/xhrio.js +709 -0
- data/third_party/closure-library/closure/goog/testing/net/xhrio_test.html +384 -0
- data/third_party/closure-library/closure/goog/testing/net/xhriopool.js +64 -0
- data/third_party/closure-library/closure/goog/testing/objectpropertystring.js +67 -0
- data/third_party/closure-library/closure/goog/testing/performancetable.css +46 -0
- data/third_party/closure-library/closure/goog/testing/performancetable.js +190 -0
- data/third_party/closure-library/closure/goog/testing/performancetimer.js +405 -0
- data/third_party/closure-library/closure/goog/testing/performancetimer_test.html +201 -0
- data/third_party/closure-library/closure/goog/testing/propertyreplacer.js +243 -0
- data/third_party/closure-library/closure/goog/testing/propertyreplacer_test.html +368 -0
- data/third_party/closure-library/closure/goog/testing/proto2/proto2.js +127 -0
- data/third_party/closure-library/closure/goog/testing/proto2/proto2_test.html +117 -0
- data/third_party/closure-library/closure/goog/testing/pseudorandom.js +179 -0
- data/third_party/closure-library/closure/goog/testing/pseudorandom_test.html +98 -0
- data/third_party/closure-library/closure/goog/testing/recordfunction.js +201 -0
- data/third_party/closure-library/closure/goog/testing/recordfunction_test.html +159 -0
- data/third_party/closure-library/closure/goog/testing/shardingtestcase.js +122 -0
- data/third_party/closure-library/closure/goog/testing/shardingtestcase_test.html +34 -0
- data/third_party/closure-library/closure/goog/testing/singleton.js +46 -0
- data/third_party/closure-library/closure/goog/testing/singleton_test.html +39 -0
- data/third_party/closure-library/closure/goog/testing/stacktrace.js +555 -0
- data/third_party/closure-library/closure/goog/testing/stacktrace_test.html +327 -0
- data/third_party/closure-library/closure/goog/testing/storage/fakemechanism.js +66 -0
- data/third_party/closure-library/closure/goog/testing/strictmock.js +128 -0
- data/third_party/closure-library/closure/goog/testing/strictmock_test.html +412 -0
- data/third_party/closure-library/closure/goog/testing/style/layoutasserts.js +310 -0
- data/third_party/closure-library/closure/goog/testing/style/layoutasserts_test.html +269 -0
- data/third_party/closure-library/closure/goog/testing/style/style.js +101 -0
- data/third_party/closure-library/closure/goog/testing/style/style_test.html +162 -0
- data/third_party/closure-library/closure/goog/testing/testcase.js +1233 -0
- data/third_party/closure-library/closure/goog/testing/testqueue.js +66 -0
- data/third_party/closure-library/closure/goog/testing/testrunner.js +399 -0
- data/third_party/closure-library/closure/goog/testing/ui/rendererasserts.js +56 -0
- data/third_party/closure-library/closure/goog/testing/ui/rendererasserts_test.html +52 -0
- data/third_party/closure-library/closure/goog/testing/ui/rendererharness.js +176 -0
- data/third_party/closure-library/closure/goog/testing/ui/style.js +137 -0
- data/third_party/closure-library/closure/goog/testing/ui/style_reference.html +27 -0
- data/third_party/closure-library/closure/goog/testing/ui/style_test.html +130 -0
- data/third_party/closure-library/closure/goog/timer/timer.js +291 -0
- data/third_party/closure-library/closure/goog/timer/timer_test.html +118 -0
- data/third_party/closure-library/closure/goog/tweak/entries.js +997 -0
- data/third_party/closure-library/closure/goog/tweak/entries_test.html +94 -0
- data/third_party/closure-library/closure/goog/tweak/registry.js +310 -0
- data/third_party/closure-library/closure/goog/tweak/registry_test.html +145 -0
- data/third_party/closure-library/closure/goog/tweak/testhelpers.js +119 -0
- data/third_party/closure-library/closure/goog/tweak/tweak.js +301 -0
- data/third_party/closure-library/closure/goog/tweak/tweakui.js +817 -0
- data/third_party/closure-library/closure/goog/tweak/tweakui_test.html +280 -0
- data/third_party/closure-library/closure/goog/ui/abstractspellchecker.js +1138 -0
- data/third_party/closure-library/closure/goog/ui/ac/ac.js +50 -0
- data/third_party/closure-library/closure/goog/ui/ac/ac_test.html +204 -0
- data/third_party/closure-library/closure/goog/ui/ac/arraymatcher.js +162 -0
- data/third_party/closure-library/closure/goog/ui/ac/arraymatcher_test.html +130 -0
- data/third_party/closure-library/closure/goog/ui/ac/autocomplete.js +919 -0
- data/third_party/closure-library/closure/goog/ui/ac/autocomplete_test.html +1613 -0
- data/third_party/closure-library/closure/goog/ui/ac/inputhandler.js +1308 -0
- data/third_party/closure-library/closure/goog/ui/ac/inputhandler_test.html +685 -0
- data/third_party/closure-library/closure/goog/ui/ac/remote.js +114 -0
- data/third_party/closure-library/closure/goog/ui/ac/remotearraymatcher.js +271 -0
- data/third_party/closure-library/closure/goog/ui/ac/remotearraymatcher_test.html +73 -0
- data/third_party/closure-library/closure/goog/ui/ac/renderer.js +1023 -0
- data/third_party/closure-library/closure/goog/ui/ac/renderer_test.html +606 -0
- data/third_party/closure-library/closure/goog/ui/ac/renderoptions.js +80 -0
- data/third_party/closure-library/closure/goog/ui/ac/richinputhandler.js +58 -0
- data/third_party/closure-library/closure/goog/ui/ac/richremote.js +107 -0
- data/third_party/closure-library/closure/goog/ui/ac/richremotearraymatcher.js +125 -0
- data/third_party/closure-library/closure/goog/ui/activitymonitor.js +347 -0
- data/third_party/closure-library/closure/goog/ui/activitymonitor_test.html +150 -0
- data/third_party/closure-library/closure/goog/ui/advancedtooltip.js +366 -0
- data/third_party/closure-library/closure/goog/ui/advancedtooltip_test.html +296 -0
- data/third_party/closure-library/closure/goog/ui/animatedzippy.js +199 -0
- data/third_party/closure-library/closure/goog/ui/animatedzippy_test.html +139 -0
- data/third_party/closure-library/closure/goog/ui/attachablemenu.js +473 -0
- data/third_party/closure-library/closure/goog/ui/bidiinput.js +178 -0
- data/third_party/closure-library/closure/goog/ui/bidiinput_test.html +131 -0
- data/third_party/closure-library/closure/goog/ui/bubble.js +472 -0
- data/third_party/closure-library/closure/goog/ui/button.js +213 -0
- data/third_party/closure-library/closure/goog/ui/button_perf.html +176 -0
- data/third_party/closure-library/closure/goog/ui/button_test.html +257 -0
- data/third_party/closure-library/closure/goog/ui/buttonrenderer.js +214 -0
- data/third_party/closure-library/closure/goog/ui/buttonrenderer_test.html +223 -0
- data/third_party/closure-library/closure/goog/ui/buttonside.js +41 -0
- data/third_party/closure-library/closure/goog/ui/charcounter.js +199 -0
- data/third_party/closure-library/closure/goog/ui/charpicker.js +880 -0
- data/third_party/closure-library/closure/goog/ui/charpicker_test.html +88 -0
- data/third_party/closure-library/closure/goog/ui/checkbox.js +269 -0
- data/third_party/closure-library/closure/goog/ui/checkbox_test.html +370 -0
- data/third_party/closure-library/closure/goog/ui/checkboxmenuitem.js +53 -0
- data/third_party/closure-library/closure/goog/ui/checkboxrenderer.js +171 -0
- data/third_party/closure-library/closure/goog/ui/colorbutton.js +58 -0
- data/third_party/closure-library/closure/goog/ui/colorbutton_test.html +70 -0
- data/third_party/closure-library/closure/goog/ui/colorbuttonrenderer.js +72 -0
- data/third_party/closure-library/closure/goog/ui/colormenubutton.js +215 -0
- data/third_party/closure-library/closure/goog/ui/colormenubuttonrenderer.js +144 -0
- data/third_party/closure-library/closure/goog/ui/colormenubuttonrenderer_test.html +88 -0
- data/third_party/closure-library/closure/goog/ui/colorpalette.js +177 -0
- data/third_party/closure-library/closure/goog/ui/colorpalette_test.html +174 -0
- data/third_party/closure-library/closure/goog/ui/colorpicker.js +344 -0
- data/third_party/closure-library/closure/goog/ui/colorsplitbehavior.js +60 -0
- data/third_party/closure-library/closure/goog/ui/combobox.js +961 -0
- data/third_party/closure-library/closure/goog/ui/combobox_test.html +292 -0
- data/third_party/closure-library/closure/goog/ui/component.js +1300 -0
- data/third_party/closure-library/closure/goog/ui/component_test.html +889 -0
- data/third_party/closure-library/closure/goog/ui/container.js +1322 -0
- data/third_party/closure-library/closure/goog/ui/container_perf.html +55 -0
- data/third_party/closure-library/closure/goog/ui/container_test.html +458 -0
- data/third_party/closure-library/closure/goog/ui/containerrenderer.js +371 -0
- data/third_party/closure-library/closure/goog/ui/containerrenderer_test.html +228 -0
- data/third_party/closure-library/closure/goog/ui/containerscroller.js +222 -0
- data/third_party/closure-library/closure/goog/ui/containerscroller_test.html +214 -0
- data/third_party/closure-library/closure/goog/ui/control.js +1387 -0
- data/third_party/closure-library/closure/goog/ui/control_perf.html +166 -0
- data/third_party/closure-library/closure/goog/ui/control_test.html +2142 -0
- data/third_party/closure-library/closure/goog/ui/controlcontent.js +28 -0
- data/third_party/closure-library/closure/goog/ui/controlrenderer.js +855 -0
- data/third_party/closure-library/closure/goog/ui/controlrenderer_test.html +1100 -0
- data/third_party/closure-library/closure/goog/ui/cookieeditor.js +183 -0
- data/third_party/closure-library/closure/goog/ui/cookieeditor_test.html +107 -0
- data/third_party/closure-library/closure/goog/ui/css3buttonrenderer.js +152 -0
- data/third_party/closure-library/closure/goog/ui/css3menubuttonrenderer.js +147 -0
- data/third_party/closure-library/closure/goog/ui/cssnames.js +29 -0
- data/third_party/closure-library/closure/goog/ui/custombutton.js +58 -0
- data/third_party/closure-library/closure/goog/ui/custombuttonrenderer.js +267 -0
- data/third_party/closure-library/closure/goog/ui/customcolorpalette.js +139 -0
- data/third_party/closure-library/closure/goog/ui/customcolorpalette_test.html +60 -0
- data/third_party/closure-library/closure/goog/ui/datepicker.js +1369 -0
- data/third_party/closure-library/closure/goog/ui/datepicker_test.html +252 -0
- data/third_party/closure-library/closure/goog/ui/datepickerrenderer.js +55 -0
- data/third_party/closure-library/closure/goog/ui/decorate.js +38 -0
- data/third_party/closure-library/closure/goog/ui/decorate_test.html +114 -0
- data/third_party/closure-library/closure/goog/ui/defaultdatepickerrenderer.js +202 -0
- data/third_party/closure-library/closure/goog/ui/dialog.js +1556 -0
- data/third_party/closure-library/closure/goog/ui/dialog_test.html +776 -0
- data/third_party/closure-library/closure/goog/ui/dimensionpicker.js +305 -0
- data/third_party/closure-library/closure/goog/ui/dimensionpicker_test.html +171 -0
- data/third_party/closure-library/closure/goog/ui/dimensionpickerrenderer.js +416 -0
- data/third_party/closure-library/closure/goog/ui/dimensionpickerrenderer_test.html +49 -0
- data/third_party/closure-library/closure/goog/ui/dragdropdetector.js +642 -0
- data/third_party/closure-library/closure/goog/ui/drilldownrow.js +486 -0
- data/third_party/closure-library/closure/goog/ui/drilldownrow_test.html +92 -0
- data/third_party/closure-library/closure/goog/ui/editor/abstractdialog.js +440 -0
- data/third_party/closure-library/closure/goog/ui/editor/abstractdialog_test.html +473 -0
- data/third_party/closure-library/closure/goog/ui/editor/bubble.js +525 -0
- data/third_party/closure-library/closure/goog/ui/editor/bubble_test.html +264 -0
- data/third_party/closure-library/closure/goog/ui/editor/defaulttoolbar.js +1065 -0
- data/third_party/closure-library/closure/goog/ui/editor/equationeditordialog.js +123 -0
- data/third_party/closure-library/closure/goog/ui/editor/equationeditorokevent.js +49 -0
- data/third_party/closure-library/closure/goog/ui/editor/linkdialog.js +1064 -0
- data/third_party/closure-library/closure/goog/ui/editor/linkdialog_test.html +653 -0
- data/third_party/closure-library/closure/goog/ui/editor/messages.js +123 -0
- data/third_party/closure-library/closure/goog/ui/editor/tabpane.js +198 -0
- data/third_party/closure-library/closure/goog/ui/editor/toolbarcontroller.js +295 -0
- data/third_party/closure-library/closure/goog/ui/editor/toolbarfactory.js +440 -0
- data/third_party/closure-library/closure/goog/ui/editor/toolbarfactory_test.html +73 -0
- data/third_party/closure-library/closure/goog/ui/emoji/emoji.js +72 -0
- data/third_party/closure-library/closure/goog/ui/emoji/emojipalette.js +288 -0
- data/third_party/closure-library/closure/goog/ui/emoji/emojipaletterenderer.js +208 -0
- data/third_party/closure-library/closure/goog/ui/emoji/emojipicker.js +804 -0
- data/third_party/closure-library/closure/goog/ui/emoji/emojipicker_test.html +913 -0
- data/third_party/closure-library/closure/goog/ui/emoji/fast_nonprogressive_emojipicker_test.html +256 -0
- data/third_party/closure-library/closure/goog/ui/emoji/fast_progressive_emojipicker_test.html +256 -0
- data/third_party/closure-library/closure/goog/ui/emoji/popupemojipicker.js +410 -0
- data/third_party/closure-library/closure/goog/ui/emoji/popupemojipicker_test.html +80 -0
- data/third_party/closure-library/closure/goog/ui/emoji/progressiveemojipaletterenderer.js +98 -0
- data/third_party/closure-library/closure/goog/ui/emoji/spriteinfo.js +212 -0
- data/third_party/closure-library/closure/goog/ui/emoji/spriteinfo_test.html +51 -0
- data/third_party/closure-library/closure/goog/ui/equation/arrowpalette.js +47 -0
- data/third_party/closure-library/closure/goog/ui/equation/changeevent.js +37 -0
- data/third_party/closure-library/closure/goog/ui/equation/comparisonpalette.js +56 -0
- data/third_party/closure-library/closure/goog/ui/equation/editorpane.js +93 -0
- data/third_party/closure-library/closure/goog/ui/equation/equationeditor.js +220 -0
- data/third_party/closure-library/closure/goog/ui/equation/equationeditordialog.js +137 -0
- data/third_party/closure-library/closure/goog/ui/equation/greekpalette.js +75 -0
- data/third_party/closure-library/closure/goog/ui/equation/imagerenderer.js +190 -0
- data/third_party/closure-library/closure/goog/ui/equation/mathpalette.js +55 -0
- data/third_party/closure-library/closure/goog/ui/equation/menupalette.js +86 -0
- data/third_party/closure-library/closure/goog/ui/equation/palette.js +288 -0
- data/third_party/closure-library/closure/goog/ui/equation/palettemanager.js +203 -0
- data/third_party/closure-library/closure/goog/ui/equation/symbolpalette.js +74 -0
- data/third_party/closure-library/closure/goog/ui/equation/texeditor.js +141 -0
- data/third_party/closure-library/closure/goog/ui/equation/texpane.js +444 -0
- data/third_party/closure-library/closure/goog/ui/filteredmenu.js +575 -0
- data/third_party/closure-library/closure/goog/ui/filteredmenu_test.html +321 -0
- data/third_party/closure-library/closure/goog/ui/filterobservingmenuitem.js +97 -0
- data/third_party/closure-library/closure/goog/ui/filterobservingmenuitemrenderer.js +62 -0
- data/third_party/closure-library/closure/goog/ui/flatbuttonrenderer.js +146 -0
- data/third_party/closure-library/closure/goog/ui/flatmenubuttonrenderer.js +238 -0
- data/third_party/closure-library/closure/goog/ui/formpost.js +109 -0
- data/third_party/closure-library/closure/goog/ui/formpost_test.html +105 -0
- data/third_party/closure-library/closure/goog/ui/gauge.js +1011 -0
- data/third_party/closure-library/closure/goog/ui/gaugetheme.js +169 -0
- data/third_party/closure-library/closure/goog/ui/hovercard.js +456 -0
- data/third_party/closure-library/closure/goog/ui/hovercard_test.html +360 -0
- data/third_party/closure-library/closure/goog/ui/hsvapalette.js +298 -0
- data/third_party/closure-library/closure/goog/ui/hsvapalette_test.html +152 -0
- data/third_party/closure-library/closure/goog/ui/hsvpalette.js +505 -0
- data/third_party/closure-library/closure/goog/ui/hsvpalette_test.html +219 -0
- data/third_party/closure-library/closure/goog/ui/idgenerator.js +57 -0
- data/third_party/closure-library/closure/goog/ui/idletimer.js +299 -0
- data/third_party/closure-library/closure/goog/ui/idletimer_test.html +100 -0
- data/third_party/closure-library/closure/goog/ui/iframemask.js +257 -0
- data/third_party/closure-library/closure/goog/ui/iframemask_test.html +230 -0
- data/third_party/closure-library/closure/goog/ui/imagelessbuttonrenderer.js +204 -0
- data/third_party/closure-library/closure/goog/ui/imagelessmenubuttonrenderer.js +207 -0
- data/third_party/closure-library/closure/goog/ui/inputdatepicker.js +305 -0
- data/third_party/closure-library/closure/goog/ui/inputdatepicker_test.html +111 -0
- data/third_party/closure-library/closure/goog/ui/itemevent.js +50 -0
- data/third_party/closure-library/closure/goog/ui/keyboardshortcuthandler.js +1017 -0
- data/third_party/closure-library/closure/goog/ui/keyboardshortcuthandler_test.html +702 -0
- data/third_party/closure-library/closure/goog/ui/labelinput.js +592 -0
- data/third_party/closure-library/closure/goog/ui/labelinput_test.html +252 -0
- data/third_party/closure-library/closure/goog/ui/linkbuttonrenderer.js +67 -0
- data/third_party/closure-library/closure/goog/ui/media/flashobject.js +631 -0
- data/third_party/closure-library/closure/goog/ui/media/flashobject_test.html +236 -0
- data/third_party/closure-library/closure/goog/ui/media/flickr.js +308 -0
- data/third_party/closure-library/closure/goog/ui/media/flickr_test.html +114 -0
- data/third_party/closure-library/closure/goog/ui/media/googlevideo.js +281 -0
- data/third_party/closure-library/closure/goog/ui/media/googlevideo_test.html +105 -0
- data/third_party/closure-library/closure/goog/ui/media/media.js +285 -0
- data/third_party/closure-library/closure/goog/ui/media/media_test.html +118 -0
- data/third_party/closure-library/closure/goog/ui/media/mediamodel.js +960 -0
- data/third_party/closure-library/closure/goog/ui/media/mediamodel_test.html +108 -0
- data/third_party/closure-library/closure/goog/ui/media/mp3.js +228 -0
- data/third_party/closure-library/closure/goog/ui/media/mp3_test.html +78 -0
- data/third_party/closure-library/closure/goog/ui/media/photo.js +142 -0
- data/third_party/closure-library/closure/goog/ui/media/photo_test.html +62 -0
- data/third_party/closure-library/closure/goog/ui/media/picasa.js +321 -0
- data/third_party/closure-library/closure/goog/ui/media/picasa_test.html +121 -0
- data/third_party/closure-library/closure/goog/ui/media/vimeo.js +276 -0
- data/third_party/closure-library/closure/goog/ui/media/vimeo_test.html +102 -0
- data/third_party/closure-library/closure/goog/ui/media/youtube.js +357 -0
- data/third_party/closure-library/closure/goog/ui/media/youtube_test.html +243 -0
- data/third_party/closure-library/closure/goog/ui/menu.js +476 -0
- data/third_party/closure-library/closure/goog/ui/menu_test.html +167 -0
- data/third_party/closure-library/closure/goog/ui/menubar.js +44 -0
- data/third_party/closure-library/closure/goog/ui/menubardecorator.js +35 -0
- data/third_party/closure-library/closure/goog/ui/menubarrenderer.js +74 -0
- data/third_party/closure-library/closure/goog/ui/menubase.js +190 -0
- data/third_party/closure-library/closure/goog/ui/menubutton.js +903 -0
- data/third_party/closure-library/closure/goog/ui/menubutton_test.html +637 -0
- data/third_party/closure-library/closure/goog/ui/menubutton_test_frame.html +41 -0
- data/third_party/closure-library/closure/goog/ui/menubuttonrenderer.js +266 -0
- data/third_party/closure-library/closure/goog/ui/menubuttonrenderer_test.html +179 -0
- data/third_party/closure-library/closure/goog/ui/menuheader.js +62 -0
- data/third_party/closure-library/closure/goog/ui/menuheaderrenderer.js +54 -0
- data/third_party/closure-library/closure/goog/ui/menuitem.js +233 -0
- data/third_party/closure-library/closure/goog/ui/menuitem_test.html +559 -0
- data/third_party/closure-library/closure/goog/ui/menuitemrenderer.js +358 -0
- data/third_party/closure-library/closure/goog/ui/menuitemrenderer_test.html +201 -0
- data/third_party/closure-library/closure/goog/ui/menurenderer.js +123 -0
- data/third_party/closure-library/closure/goog/ui/menuseparator.js +51 -0
- data/third_party/closure-library/closure/goog/ui/menuseparatorrenderer.js +113 -0
- data/third_party/closure-library/closure/goog/ui/menuseparatorrenderer_test.html +61 -0
- data/third_party/closure-library/closure/goog/ui/mockactivitymonitor.js +71 -0
- data/third_party/closure-library/closure/goog/ui/mockactivitymonitor_test.html +19 -0
- data/third_party/closure-library/closure/goog/ui/mockactivitymonitor_test.js +94 -0
- data/third_party/closure-library/closure/goog/ui/modalpopup.js +698 -0
- data/third_party/closure-library/closure/goog/ui/modalpopup_test.html +419 -0
- data/third_party/closure-library/closure/goog/ui/nativebuttonrenderer.js +207 -0
- data/third_party/closure-library/closure/goog/ui/nativebuttonrenderer_test.html +214 -0
- data/third_party/closure-library/closure/goog/ui/offlineinstalldialog.js +1089 -0
- data/third_party/closure-library/closure/goog/ui/offlinestatuscard.js +580 -0
- data/third_party/closure-library/closure/goog/ui/offlinestatuscomponent.js +540 -0
- data/third_party/closure-library/closure/goog/ui/option.js +68 -0
- data/third_party/closure-library/closure/goog/ui/palette.js +598 -0
- data/third_party/closure-library/closure/goog/ui/palette_test.html +135 -0
- data/third_party/closure-library/closure/goog/ui/paletterenderer.js +372 -0
- data/third_party/closure-library/closure/goog/ui/paletterenderer_test.html +83 -0
- data/third_party/closure-library/closure/goog/ui/plaintextspellchecker.js +672 -0
- data/third_party/closure-library/closure/goog/ui/plaintextspellchecker_test.html +239 -0
- data/third_party/closure-library/closure/goog/ui/popup.js +344 -0
- data/third_party/closure-library/closure/goog/ui/popup_test.html +137 -0
- data/third_party/closure-library/closure/goog/ui/popupbase.js +822 -0
- data/third_party/closure-library/closure/goog/ui/popupbase_test.html +484 -0
- data/third_party/closure-library/closure/goog/ui/popupcolorpicker.js +441 -0
- data/third_party/closure-library/closure/goog/ui/popupcolorpicker_test.html +71 -0
- data/third_party/closure-library/closure/goog/ui/popupdatepicker.js +273 -0
- data/third_party/closure-library/closure/goog/ui/popupmenu.js +557 -0
- data/third_party/closure-library/closure/goog/ui/popupmenu_test.html +308 -0
- data/third_party/closure-library/closure/goog/ui/progressbar.js +401 -0
- data/third_party/closure-library/closure/goog/ui/prompt.js +405 -0
- data/third_party/closure-library/closure/goog/ui/prompt_test.html +144 -0
- data/third_party/closure-library/closure/goog/ui/rangemodel.js +302 -0
- data/third_party/closure-library/closure/goog/ui/rangemodel_test.html +270 -0
- data/third_party/closure-library/closure/goog/ui/ratings.js +451 -0
- data/third_party/closure-library/closure/goog/ui/registry.js +167 -0
- data/third_party/closure-library/closure/goog/ui/registry_test.html +237 -0
- data/third_party/closure-library/closure/goog/ui/richtextspellchecker.js +626 -0
- data/third_party/closure-library/closure/goog/ui/richtextspellchecker_test.html +247 -0
- data/third_party/closure-library/closure/goog/ui/roundedpanel.js +625 -0
- data/third_party/closure-library/closure/goog/ui/roundedpanel_test.html +57 -0
- data/third_party/closure-library/closure/goog/ui/roundedtabrenderer.js +197 -0
- data/third_party/closure-library/closure/goog/ui/scrollfloater.js +585 -0
- data/third_party/closure-library/closure/goog/ui/scrollfloater_test.html +144 -0
- data/third_party/closure-library/closure/goog/ui/select.js +434 -0
- data/third_party/closure-library/closure/goog/ui/select_test.html +235 -0
- data/third_party/closure-library/closure/goog/ui/selectionmenubutton.js +299 -0
- data/third_party/closure-library/closure/goog/ui/selectionmenubutton_test.html +237 -0
- data/third_party/closure-library/closure/goog/ui/selectionmodel.js +300 -0
- data/third_party/closure-library/closure/goog/ui/selectionmodel_test.html +225 -0
- data/third_party/closure-library/closure/goog/ui/separator.js +80 -0
- data/third_party/closure-library/closure/goog/ui/serverchart.js +1837 -0
- data/third_party/closure-library/closure/goog/ui/serverchart_test.html +638 -0
- data/third_party/closure-library/closure/goog/ui/slider.js +126 -0
- data/third_party/closure-library/closure/goog/ui/sliderbase.js +1592 -0
- data/third_party/closure-library/closure/goog/ui/sliderbase_test.html +897 -0
- data/third_party/closure-library/closure/goog/ui/splitbehavior.js +340 -0
- data/third_party/closure-library/closure/goog/ui/splitbehavior_test.html +161 -0
- data/third_party/closure-library/closure/goog/ui/splitpane.js +898 -0
- data/third_party/closure-library/closure/goog/ui/splitpane_test.html +229 -0
- data/third_party/closure-library/closure/goog/ui/style/app/buttonrenderer.js +201 -0
- data/third_party/closure-library/closure/goog/ui/style/app/buttonrenderer_test.html +155 -0
- data/third_party/closure-library/closure/goog/ui/style/app/menubuttonrenderer.js +233 -0
- data/third_party/closure-library/closure/goog/ui/style/app/menubuttonrenderer_test.html +167 -0
- data/third_party/closure-library/closure/goog/ui/style/app/primaryactionbuttonrenderer.js +88 -0
- data/third_party/closure-library/closure/goog/ui/style/app/primaryactionbuttonrenderer_test.html +76 -0
- data/third_party/closure-library/closure/goog/ui/submenu.js +667 -0
- data/third_party/closure-library/closure/goog/ui/submenu_test.html +563 -0
- data/third_party/closure-library/closure/goog/ui/submenurenderer.js +233 -0
- data/third_party/closure-library/closure/goog/ui/tab.js +102 -0
- data/third_party/closure-library/closure/goog/ui/tab_test.html +62 -0
- data/third_party/closure-library/closure/goog/ui/tabbar.js +394 -0
- data/third_party/closure-library/closure/goog/ui/tabbar_test.html +612 -0
- data/third_party/closure-library/closure/goog/ui/tabbarrenderer.js +175 -0
- data/third_party/closure-library/closure/goog/ui/tabbarrenderer_test.html +138 -0
- data/third_party/closure-library/closure/goog/ui/tablesorter.js +325 -0
- data/third_party/closure-library/closure/goog/ui/tablesorter_test.html +197 -0
- data/third_party/closure-library/closure/goog/ui/tabpane.js +675 -0
- data/third_party/closure-library/closure/goog/ui/tabpane_test.html +107 -0
- data/third_party/closure-library/closure/goog/ui/tabrenderer.js +153 -0
- data/third_party/closure-library/closure/goog/ui/tabrenderer_test.html +135 -0
- data/third_party/closure-library/closure/goog/ui/textarea.js +577 -0
- data/third_party/closure-library/closure/goog/ui/textarea_test.html +314 -0
- data/third_party/closure-library/closure/goog/ui/textarearenderer.js +169 -0
- data/third_party/closure-library/closure/goog/ui/togglebutton.js +58 -0
- data/third_party/closure-library/closure/goog/ui/toolbar.js +46 -0
- data/third_party/closure-library/closure/goog/ui/toolbarbutton.js +55 -0
- data/third_party/closure-library/closure/goog/ui/toolbarbuttonrenderer.js +57 -0
- data/third_party/closure-library/closure/goog/ui/toolbarcolormenubutton.js +58 -0
- data/third_party/closure-library/closure/goog/ui/toolbarcolormenubuttonrenderer.js +98 -0
- data/third_party/closure-library/closure/goog/ui/toolbarcolormenubuttonrenderer_test.html +66 -0
- data/third_party/closure-library/closure/goog/ui/toolbarmenubutton.js +57 -0
- data/third_party/closure-library/closure/goog/ui/toolbarmenubuttonrenderer.js +57 -0
- data/third_party/closure-library/closure/goog/ui/toolbarrenderer.js +99 -0
- data/third_party/closure-library/closure/goog/ui/toolbarselect.js +56 -0
- data/third_party/closure-library/closure/goog/ui/toolbarseparator.js +53 -0
- data/third_party/closure-library/closure/goog/ui/toolbarseparatorrenderer.js +91 -0
- data/third_party/closure-library/closure/goog/ui/toolbartogglebutton.js +54 -0
- data/third_party/closure-library/closure/goog/ui/tooltip.js +999 -0
- data/third_party/closure-library/closure/goog/ui/tooltip_test.html +380 -0
- data/third_party/closure-library/closure/goog/ui/tree/basenode.js +1458 -0
- data/third_party/closure-library/closure/goog/ui/tree/basenode_test.html +232 -0
- data/third_party/closure-library/closure/goog/ui/tree/treecontrol.js +663 -0
- data/third_party/closure-library/closure/goog/ui/tree/treecontrol_test.html +113 -0
- data/third_party/closure-library/closure/goog/ui/tree/treenode.js +107 -0
- data/third_party/closure-library/closure/goog/ui/tree/typeahead.js +332 -0
- data/third_party/closure-library/closure/goog/ui/tree/typeahead_test.html +133 -0
- data/third_party/closure-library/closure/goog/ui/tristatemenuitem.js +184 -0
- data/third_party/closure-library/closure/goog/ui/tristatemenuitemrenderer.js +84 -0
- data/third_party/closure-library/closure/goog/ui/twothumbslider.js +157 -0
- data/third_party/closure-library/closure/goog/ui/twothumbslider_test.html +39 -0
- data/third_party/closure-library/closure/goog/ui/zippy.js +445 -0
- data/third_party/closure-library/closure/goog/ui/zippy_test.html +315 -0
- data/third_party/closure-library/closure/goog/uri/uri.js +1502 -0
- data/third_party/closure-library/closure/goog/uri/uri_test.html +21 -0
- data/third_party/closure-library/closure/goog/uri/uri_test.js +1048 -0
- data/third_party/closure-library/closure/goog/uri/utils.js +1053 -0
- data/third_party/closure-library/closure/goog/uri/utils_test.html +562 -0
- data/third_party/closure-library/closure/goog/useragent/adobereader.js +90 -0
- data/third_party/closure-library/closure/goog/useragent/adobereader_test.html +34 -0
- data/third_party/closure-library/closure/goog/useragent/flash.js +153 -0
- data/third_party/closure-library/closure/goog/useragent/flash_test.html +34 -0
- data/third_party/closure-library/closure/goog/useragent/iphoto.js +87 -0
- data/third_party/closure-library/closure/goog/useragent/jscript.js +95 -0
- data/third_party/closure-library/closure/goog/useragent/jscript_test.html +65 -0
- data/third_party/closure-library/closure/goog/useragent/picasa.js +112 -0
- data/third_party/closure-library/closure/goog/useragent/platform.js +82 -0
- data/third_party/closure-library/closure/goog/useragent/platform_test.html +182 -0
- data/third_party/closure-library/closure/goog/useragent/product.js +253 -0
- data/third_party/closure-library/closure/goog/useragent/product_isversion.js +140 -0
- data/third_party/closure-library/closure/goog/useragent/product_test.html +380 -0
- data/third_party/closure-library/closure/goog/useragent/useragent.js +599 -0
- data/third_party/closure-library/closure/goog/useragent/useragent_quirks_test.html +27 -0
- data/third_party/closure-library/closure/goog/useragent/useragent_test.html +300 -0
- data/third_party/closure-library/closure/goog/vec/float32array.js +110 -0
- data/third_party/closure-library/closure/goog/vec/float32array_test.html +69 -0
- data/third_party/closure-library/closure/goog/vec/float64array.js +117 -0
- data/third_party/closure-library/closure/goog/vec/float64array_test.html +69 -0
- data/third_party/closure-library/closure/goog/vec/mat3.js +1211 -0
- data/third_party/closure-library/closure/goog/vec/mat3_test.html +465 -0
- data/third_party/closure-library/closure/goog/vec/mat3d.js +1039 -0
- data/third_party/closure-library/closure/goog/vec/mat3d_test.html +432 -0
- data/third_party/closure-library/closure/goog/vec/mat3f.js +1039 -0
- data/third_party/closure-library/closure/goog/vec/mat3f_test.html +432 -0
- data/third_party/closure-library/closure/goog/vec/mat4.js +1822 -0
- data/third_party/closure-library/closure/goog/vec/mat4_test.html +781 -0
- data/third_party/closure-library/closure/goog/vec/mat4d.js +1769 -0
- data/third_party/closure-library/closure/goog/vec/mat4d_test.html +738 -0
- data/third_party/closure-library/closure/goog/vec/mat4f.js +1769 -0
- data/third_party/closure-library/closure/goog/vec/mat4f_test.html +738 -0
- data/third_party/closure-library/closure/goog/vec/matrix3.js +720 -0
- data/third_party/closure-library/closure/goog/vec/matrix3_test.html +301 -0
- data/third_party/closure-library/closure/goog/vec/matrix4.js +1405 -0
- data/third_party/closure-library/closure/goog/vec/matrix4_test.html +626 -0
- data/third_party/closure-library/closure/goog/vec/quaternion.js +458 -0
- data/third_party/closure-library/closure/goog/vec/quaternion_test.html +195 -0
- data/third_party/closure-library/closure/goog/vec/ray.js +94 -0
- data/third_party/closure-library/closure/goog/vec/ray_test.html +66 -0
- data/third_party/closure-library/closure/goog/vec/vec.js +73 -0
- data/third_party/closure-library/closure/goog/vec/vec2.js +376 -0
- data/third_party/closure-library/closure/goog/vec/vec2_test.html +216 -0
- data/third_party/closure-library/closure/goog/vec/vec2d.js +325 -0
- data/third_party/closure-library/closure/goog/vec/vec2d_test.html +208 -0
- data/third_party/closure-library/closure/goog/vec/vec2f.js +325 -0
- data/third_party/closure-library/closure/goog/vec/vec2f_test.html +208 -0
- data/third_party/closure-library/closure/goog/vec/vec3.js +474 -0
- data/third_party/closure-library/closure/goog/vec/vec3_test.html +258 -0
- data/third_party/closure-library/closure/goog/vec/vec3d.js +358 -0
- data/third_party/closure-library/closure/goog/vec/vec3d_test.html +232 -0
- data/third_party/closure-library/closure/goog/vec/vec3f.js +358 -0
- data/third_party/closure-library/closure/goog/vec/vec3f_test.html +232 -0
- data/third_party/closure-library/closure/goog/vec/vec4.js +406 -0
- data/third_party/closure-library/closure/goog/vec/vec4_test.html +192 -0
- data/third_party/closure-library/closure/goog/vec/vec4d.js +293 -0
- data/third_party/closure-library/closure/goog/vec/vec4d_test.html +168 -0
- data/third_party/closure-library/closure/goog/vec/vec4f.js +293 -0
- data/third_party/closure-library/closure/goog/vec/vec4f_test.html +168 -0
- data/third_party/closure-library/closure/goog/vec/vec_array_perf.html +443 -0
- data/third_party/closure-library/closure/goog/vec/vec_perf.html +101 -0
- data/third_party/closure-library/closure/goog/webgl/webgl.js +2194 -0
- data/third_party/closure-library/closure/goog/window/window.js +225 -0
- data/third_party/closure-library/closure/goog/window/window_test.html +239 -0
- data/third_party/closure-library/closure/known_issues/testdata/closure_library_warnings.txt +47 -0
- data/third_party/closure-library/third_party/closure/goog/base.js +2 -0
- data/third_party/closure-library/third_party/closure/goog/caja/string/html/htmlparser.js +611 -0
- data/third_party/closure-library/third_party/closure/goog/caja/string/html/htmlsanitizer.js +605 -0
- data/third_party/closure-library/third_party/closure/goog/deps.js +20 -0
- data/third_party/closure-library/third_party/closure/goog/dojo/dom/query.js +1543 -0
- data/third_party/closure-library/third_party/closure/goog/dojo/dom/query_compiled_test.html +65 -0
- data/third_party/closure-library/third_party/closure/goog/dojo/dom/query_test.html +64 -0
- data/third_party/closure-library/third_party/closure/goog/dojo/dom/query_test.js +158 -0
- data/third_party/closure-library/third_party/closure/goog/jpeg_encoder/jpeg_encoder_basic.js +751 -0
- data/third_party/closure-library/third_party/closure/goog/loremipsum/text/loremipsum.js +712 -0
- data/third_party/closure-library/third_party/closure/goog/loremipsum/text/loremipsum_test.html +60 -0
- data/third_party/closure-library/third_party/closure/goog/mochikit/async/deferred.js +764 -0
- data/third_party/closure-library/third_party/closure/goog/mochikit/async/deferred_async_test.html +144 -0
- data/third_party/closure-library/third_party/closure/goog/mochikit/async/deferred_test.html +877 -0
- data/third_party/closure-library/third_party/closure/goog/mochikit/async/deferredlist.js +205 -0
- data/third_party/closure-library/third_party/closure/goog/mochikit/async/deferredlist_test.html +504 -0
- data/third_party/closure-library/third_party/closure/goog/osapi/osapi.js +95 -0
- metadata +2054 -0
@@ -0,0 +1,214 @@
|
|
1
|
+
// Copyright 2012 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 Wrapper for a IndexedDB cursor.
|
17
|
+
*
|
18
|
+
*/
|
19
|
+
|
20
|
+
|
21
|
+
goog.provide('goog.db.Cursor');
|
22
|
+
|
23
|
+
goog.require('goog.async.Deferred');
|
24
|
+
goog.require('goog.db.Error');
|
25
|
+
goog.require('goog.debug');
|
26
|
+
goog.require('goog.events.EventTarget');
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
/**
|
31
|
+
* Creates a new IDBCursor wrapper object. Should not be created directly,
|
32
|
+
* access cursor through object store.
|
33
|
+
* @see goog.db.ObjectStore#openCursor
|
34
|
+
*
|
35
|
+
* @constructor
|
36
|
+
* @extends {goog.events.EventTarget}
|
37
|
+
*/
|
38
|
+
goog.db.Cursor = function() {
|
39
|
+
goog.base(this);
|
40
|
+
};
|
41
|
+
goog.inherits(goog.db.Cursor, goog.events.EventTarget);
|
42
|
+
|
43
|
+
|
44
|
+
/**
|
45
|
+
* Underlying IndexedDB cursor object.
|
46
|
+
*
|
47
|
+
* @type {IDBCursor}
|
48
|
+
* @private
|
49
|
+
*/
|
50
|
+
goog.db.Cursor.prototype.cursor_ = null;
|
51
|
+
|
52
|
+
|
53
|
+
/**
|
54
|
+
* Advances the cursor to the next position along its direction. When new data
|
55
|
+
* is available, the NEW_DATA event will be fired. If the cursor has reached the
|
56
|
+
* end of the range it will fire the COMPLETE event. If opt_key is specified it
|
57
|
+
* will advance to the key it matches in its direction.
|
58
|
+
*
|
59
|
+
* This wraps the native #continue method on the underlying object.
|
60
|
+
*
|
61
|
+
* @param {IDBKeyType=} opt_key The optional key to advance to.
|
62
|
+
*/
|
63
|
+
goog.db.Cursor.prototype.next = function(opt_key) {
|
64
|
+
if (opt_key) {
|
65
|
+
this.cursor_['continue'](opt_key);
|
66
|
+
} else {
|
67
|
+
this.cursor_['continue']();
|
68
|
+
}
|
69
|
+
};
|
70
|
+
|
71
|
+
|
72
|
+
/**
|
73
|
+
* Updates the value at the current position of the cursor in the object store.
|
74
|
+
* If the cursor points to a value that has just been deleted, a new value is
|
75
|
+
* created.
|
76
|
+
*
|
77
|
+
* @param {*} value The value to be stored.
|
78
|
+
* @return {!goog.async.Deferred} The resulting deferred request.
|
79
|
+
*/
|
80
|
+
goog.db.Cursor.prototype.update = function(value) {
|
81
|
+
var msg = 'updating via cursor with value ';
|
82
|
+
var d = new goog.async.Deferred();
|
83
|
+
var request;
|
84
|
+
|
85
|
+
try {
|
86
|
+
request = this.cursor_.update(value);
|
87
|
+
} catch (err) {
|
88
|
+
msg += goog.debug.deepExpose(value);
|
89
|
+
d.errback(goog.db.Error.fromException(err, msg));
|
90
|
+
return d;
|
91
|
+
}
|
92
|
+
request.onsuccess = function(ev) {
|
93
|
+
d.callback();
|
94
|
+
};
|
95
|
+
request.onerror = function(ev) {
|
96
|
+
msg += goog.debug.deepExpose(value);
|
97
|
+
d.errback(goog.db.Error.fromRequest(ev.target, msg));
|
98
|
+
};
|
99
|
+
return d;
|
100
|
+
};
|
101
|
+
|
102
|
+
|
103
|
+
/**
|
104
|
+
* Deletes the value at the cursor's position, without changing the cursor's
|
105
|
+
* position. Once the value is deleted, the cursor's value is set to null.
|
106
|
+
*
|
107
|
+
* @return {!goog.async.Deferred} The resulting deferred request.
|
108
|
+
*/
|
109
|
+
goog.db.Cursor.prototype.remove = function() {
|
110
|
+
var msg = 'deleting via cursor';
|
111
|
+
var d = new goog.async.Deferred();
|
112
|
+
var request;
|
113
|
+
|
114
|
+
try {
|
115
|
+
request = this.cursor_['delete']();
|
116
|
+
} catch (err) {
|
117
|
+
d.errback(goog.db.Error.fromException(err, msg));
|
118
|
+
return d;
|
119
|
+
}
|
120
|
+
request.onsuccess = function(ev) {
|
121
|
+
d.callback();
|
122
|
+
};
|
123
|
+
request.onerror = function(ev) {
|
124
|
+
d.errback(goog.db.Error.fromRequest(ev.target, msg));
|
125
|
+
};
|
126
|
+
return d;
|
127
|
+
};
|
128
|
+
|
129
|
+
|
130
|
+
/**
|
131
|
+
* @return {*} The value for the value at the cursor's position. Undefined
|
132
|
+
* if no current value, or null if value has just been deleted.
|
133
|
+
*/
|
134
|
+
goog.db.Cursor.prototype.getValue = function() {
|
135
|
+
return this.cursor_['value'];
|
136
|
+
};
|
137
|
+
|
138
|
+
|
139
|
+
/**
|
140
|
+
* @return {IDBKeyType} The key for the value at the cursor's position. If
|
141
|
+
* the cursor is outside its range, this is undefined.
|
142
|
+
*/
|
143
|
+
goog.db.Cursor.prototype.getKey = function() {
|
144
|
+
return this.cursor_.key;
|
145
|
+
};
|
146
|
+
|
147
|
+
|
148
|
+
/**
|
149
|
+
* Opens a value cursor from IDBObjectStore or IDBIndex over the specified key
|
150
|
+
* range. Returns a cursor object which is able to iterate over the given range.
|
151
|
+
* @param {!(IDBObjectStore|IDBIndex)} source Data source to open cursor.
|
152
|
+
* @param {!goog.db.KeyRange=} opt_range The key range. If undefined iterates
|
153
|
+
* over the whole data source.
|
154
|
+
* @param {!goog.db.Cursor.Direction=} opt_direction The direction. If undefined
|
155
|
+
* moves in a forward direction with duplicates.
|
156
|
+
* @return {!goog.db.Cursor} The cursor.
|
157
|
+
* @throws {goog.db.Error} If there was a problem opening the cursor.
|
158
|
+
*/
|
159
|
+
goog.db.Cursor.openCursor = function(source, opt_range, opt_direction) {
|
160
|
+
var cursor = new goog.db.Cursor();
|
161
|
+
var request;
|
162
|
+
|
163
|
+
try {
|
164
|
+
var range = opt_range ? opt_range.range() : null;
|
165
|
+
if (opt_direction) {
|
166
|
+
request = source.openCursor(range, opt_direction);
|
167
|
+
} else {
|
168
|
+
request = source.openCursor(range);
|
169
|
+
}
|
170
|
+
} catch (ex) {
|
171
|
+
cursor.dispose();
|
172
|
+
throw goog.db.Error.fromException(ex, source.name);
|
173
|
+
}
|
174
|
+
request.onsuccess = function(e) {
|
175
|
+
cursor.cursor_ = e.target.result || null;
|
176
|
+
if (cursor.cursor_) {
|
177
|
+
cursor.dispatchEvent(goog.db.Cursor.EventType.NEW_DATA);
|
178
|
+
} else {
|
179
|
+
cursor.dispatchEvent(goog.db.Cursor.EventType.COMPLETE);
|
180
|
+
}
|
181
|
+
};
|
182
|
+
request.onerror = function(e) {
|
183
|
+
cursor.dispatchEvent(goog.db.Cursor.EventType.ERROR);
|
184
|
+
};
|
185
|
+
return cursor;
|
186
|
+
};
|
187
|
+
|
188
|
+
|
189
|
+
/**
|
190
|
+
* Possible cursor directions.
|
191
|
+
* @see http://www.w3.org/TR/IndexedDB/#idl-def-IDBCursor
|
192
|
+
*
|
193
|
+
* @enum {string}
|
194
|
+
*/
|
195
|
+
goog.db.Cursor.Direction = {
|
196
|
+
NEXT: 'next',
|
197
|
+
NEXT_NO_DUPLICATE: 'nextunique',
|
198
|
+
PREV: 'prev',
|
199
|
+
PREV_NO_DUPLICATE: 'prevunique'
|
200
|
+
};
|
201
|
+
|
202
|
+
|
203
|
+
/**
|
204
|
+
* Event types that the cursor can dispatch. COMPLETE events are dispatched when
|
205
|
+
* a cursor is depleted of values, a NEW_DATA event if there is new data
|
206
|
+
* available, and ERROR if an error occurred.
|
207
|
+
*
|
208
|
+
* @enum {string}
|
209
|
+
*/
|
210
|
+
goog.db.Cursor.EventType = {
|
211
|
+
COMPLETE: 'c',
|
212
|
+
ERROR: 'e',
|
213
|
+
NEW_DATA: 'n'
|
214
|
+
};
|
@@ -0,0 +1,182 @@
|
|
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 Wrappers for the HTML5 IndexedDB. The wrappers export nearly
|
17
|
+
* the same interface as the standard API, but return goog.async.Deferred
|
18
|
+
* objects instead of request objects and use Closure events. The wrapper works
|
19
|
+
* and has been tested on Chrome version 22+. It may work on older Chrome
|
20
|
+
* versions, but they aren't explicitly supported.
|
21
|
+
*
|
22
|
+
* Example usage:
|
23
|
+
*
|
24
|
+
* <code>
|
25
|
+
* goog.db.openDatabase('mydb', 1, function(ev, db, tx) {
|
26
|
+
* db.createObjectStore('mystore');
|
27
|
+
* }).addCallback(function(db) {
|
28
|
+
* var putTx = db.createTransaction(
|
29
|
+
* [],
|
30
|
+
* goog.db.Transaction.TransactionMode.READ_WRITE);
|
31
|
+
* var store = putTx.objectStore('mystore');
|
32
|
+
* store.put('value', 'key');
|
33
|
+
* goog.listen(putTx, goog.db.Transaction.EventTypes.COMPLETE, function() {
|
34
|
+
* var getTx = db.createTransaction([]);
|
35
|
+
* var request = getTx.objectStore('mystore').get('key');
|
36
|
+
* request.addCallback(function(result) {
|
37
|
+
* ...
|
38
|
+
* });
|
39
|
+
* });
|
40
|
+
* </code>
|
41
|
+
*
|
42
|
+
*/
|
43
|
+
|
44
|
+
|
45
|
+
goog.provide('goog.db');
|
46
|
+
|
47
|
+
goog.require('goog.async.Deferred');
|
48
|
+
goog.require('goog.db.Error');
|
49
|
+
goog.require('goog.db.IndexedDb');
|
50
|
+
goog.require('goog.db.Transaction');
|
51
|
+
|
52
|
+
|
53
|
+
/**
|
54
|
+
* The IndexedDB factory object.
|
55
|
+
*
|
56
|
+
* @type {IDBFactory}
|
57
|
+
* @private
|
58
|
+
*/
|
59
|
+
goog.db.indexedDb_ = goog.global.indexedDB || goog.global.mozIndexedDB ||
|
60
|
+
goog.global.webkitIndexedDB || goog.global.moz_indexedDB;
|
61
|
+
|
62
|
+
|
63
|
+
/**
|
64
|
+
* A callback that's called if a blocked event is received. When a database is
|
65
|
+
* supposed to be deleted or upgraded (i.e. versionchange), and there are open
|
66
|
+
* connections to this database, a block event will be fired to prevent the
|
67
|
+
* operations from going through until all such open connections are closed.
|
68
|
+
* This callback can be used to notify users that they should close other tabs
|
69
|
+
* that have open connections, or to close the connections manually. Databases
|
70
|
+
* can also listen for the {@link goog.db.IndexedDb.EventType.VERSION_CHANGE}
|
71
|
+
* event to automatically close themselves when they're blocking such
|
72
|
+
* operations.
|
73
|
+
*
|
74
|
+
* This is passed a VersionChangeEvent that has the version of the database
|
75
|
+
* before it was deleted, and "null" as the new version.
|
76
|
+
*
|
77
|
+
* @typedef {function(!goog.db.IndexedDb.VersionChangeEvent)}
|
78
|
+
*/
|
79
|
+
goog.db.BlockedCallback;
|
80
|
+
|
81
|
+
|
82
|
+
/**
|
83
|
+
* A callback that's called when opening a database whose internal version is
|
84
|
+
* lower than the version passed to {@link goog.db.openDatabase}.
|
85
|
+
*
|
86
|
+
* This callback is passed three arguments: a VersionChangeEvent with both the
|
87
|
+
* old version and the new version of the database; the database that's being
|
88
|
+
* opened, for which you can create and delete object stores; and the version
|
89
|
+
* change transaction, with which you can abort the version change.
|
90
|
+
*
|
91
|
+
* Note that the transaction is not active, which means that it can't be used to
|
92
|
+
* make changes to the database. However, since there is a transaction running,
|
93
|
+
* you can't create another one via {@link goog.db.IndexedDb.createTransaction}.
|
94
|
+
* This means that it's not possible to manipulate the database other than
|
95
|
+
* creating or removing object stores in this callback.
|
96
|
+
*
|
97
|
+
* @typedef {function(!goog.db.IndexedDb.VersionChangeEvent,
|
98
|
+
* !goog.db.IndexedDb,
|
99
|
+
* !goog.db.Transaction)}
|
100
|
+
*/
|
101
|
+
goog.db.UpgradeNeededCallback;
|
102
|
+
|
103
|
+
|
104
|
+
/**
|
105
|
+
* Opens a database connection and wraps it.
|
106
|
+
*
|
107
|
+
* @param {string} name The name of the database to open.
|
108
|
+
* @param {number=} opt_version The expected version of the database. If this is
|
109
|
+
* larger than the actual version, opt_onUpgradeNeeded will be called
|
110
|
+
* (possibly after opt_onBlocked; see {@link goog.db.BlockedCallback}). If
|
111
|
+
* this is passed, opt_onUpgradeNeeded must be passed as well.
|
112
|
+
* @param {goog.db.UpgradeNeededCallback=} opt_onUpgradeNeeded Called if
|
113
|
+
* opt_version is greater than the old version of the database. If
|
114
|
+
* opt_version is passed, this must be passed as well.
|
115
|
+
* @param {goog.db.BlockedCallback=} opt_onBlocked Called if there are active
|
116
|
+
* connections to the database.
|
117
|
+
* @return {!goog.async.Deferred} The deferred database object.
|
118
|
+
*/
|
119
|
+
goog.db.openDatabase = function(name, opt_version, opt_onUpgradeNeeded,
|
120
|
+
opt_onBlocked) {
|
121
|
+
goog.asserts.assert(
|
122
|
+
goog.isDef(opt_version) == goog.isDef(opt_onUpgradeNeeded),
|
123
|
+
'opt_version must be passed to goog.db.openDatabase if and only if ' +
|
124
|
+
'opt_onUpgradeNeeded is also passed');
|
125
|
+
|
126
|
+
var d = new goog.async.Deferred();
|
127
|
+
var openRequest = opt_version ?
|
128
|
+
goog.db.indexedDb_.open(name, opt_version) :
|
129
|
+
goog.db.indexedDb_.open(name);
|
130
|
+
openRequest.onsuccess = function(ev) {
|
131
|
+
var db = new goog.db.IndexedDb(ev.target.result);
|
132
|
+
d.callback(db);
|
133
|
+
};
|
134
|
+
openRequest.onerror = function(ev) {
|
135
|
+
var msg = 'opening database ' + name;
|
136
|
+
d.errback(goog.db.Error.fromRequest(ev.target, msg));
|
137
|
+
};
|
138
|
+
openRequest.onupgradeneeded = function(ev) {
|
139
|
+
if (!opt_onUpgradeNeeded) return;
|
140
|
+
var db = new goog.db.IndexedDb(ev.target.result);
|
141
|
+
opt_onUpgradeNeeded(
|
142
|
+
new goog.db.IndexedDb.VersionChangeEvent(ev.oldVersion, ev.newVersion),
|
143
|
+
db,
|
144
|
+
new goog.db.Transaction(ev.target.transaction, db));
|
145
|
+
};
|
146
|
+
openRequest.onblocked = function(ev) {
|
147
|
+
if (opt_onBlocked) {
|
148
|
+
opt_onBlocked(new goog.db.IndexedDb.VersionChangeEvent(
|
149
|
+
ev.oldVersion, ev.newVersion));
|
150
|
+
}
|
151
|
+
};
|
152
|
+
return d;
|
153
|
+
};
|
154
|
+
|
155
|
+
|
156
|
+
/**
|
157
|
+
* Deletes a database once all open connections have been closed.
|
158
|
+
*
|
159
|
+
* @param {string} name The name of the database to delete.
|
160
|
+
* @param {goog.db.BlockedCallback=} opt_onBlocked Called if there are active
|
161
|
+
* connections to the database.
|
162
|
+
* @return {goog.async.Deferred} A deferred object that will fire once the
|
163
|
+
* database is deleted.
|
164
|
+
*/
|
165
|
+
goog.db.deleteDatabase = function(name, opt_onBlocked) {
|
166
|
+
var d = new goog.async.Deferred();
|
167
|
+
var deleteRequest = goog.db.indexedDb_.deleteDatabase(name);
|
168
|
+
deleteRequest.onsuccess = function(ev) {
|
169
|
+
d.callback();
|
170
|
+
};
|
171
|
+
deleteRequest.onerror = function(ev) {
|
172
|
+
var msg = 'deleting database ' + name;
|
173
|
+
d.errback(goog.db.Error.fromRequest(ev.target, msg));
|
174
|
+
};
|
175
|
+
deleteRequest.onblocked = function(ev) {
|
176
|
+
if (opt_onBlocked) {
|
177
|
+
opt_onBlocked(new goog.db.IndexedDb.VersionChangeEvent(
|
178
|
+
ev.oldVersion, ev.newVersion));
|
179
|
+
}
|
180
|
+
};
|
181
|
+
return d;
|
182
|
+
};
|
@@ -0,0 +1,1657 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<!--
|
4
|
+
Copyright 2012 The Closure Library Authors. All Rights Reserved.
|
5
|
+
|
6
|
+
Use of this source code is governed by the Apache License, Version 2.0.
|
7
|
+
See the COPYING file for details.
|
8
|
+
-->
|
9
|
+
<!--
|
10
|
+
-->
|
11
|
+
<head>
|
12
|
+
<title>Closure Integration Tests - goog.db</title>
|
13
|
+
<script src="../base.js"></script>
|
14
|
+
<script>
|
15
|
+
goog.require('goog.array');
|
16
|
+
goog.require('goog.async.Deferred');
|
17
|
+
goog.require('goog.async.DeferredList');
|
18
|
+
goog.require('goog.db');
|
19
|
+
goog.require('goog.db.IndexedDb');
|
20
|
+
goog.require('goog.db.KeyRange');
|
21
|
+
goog.require('goog.db.ObjectStore');
|
22
|
+
goog.require('goog.db.Transaction');
|
23
|
+
goog.require('goog.db.Transaction.TransactionMode');
|
24
|
+
goog.require('goog.events');
|
25
|
+
goog.require('goog.events.EventTarget');
|
26
|
+
goog.require('goog.object');
|
27
|
+
goog.require('goog.testing.AsyncTestCase');
|
28
|
+
goog.require('goog.testing.PropertyReplacer');
|
29
|
+
goog.require('goog.testing.asserts');
|
30
|
+
goog.require('goog.testing.jsunit');
|
31
|
+
goog.require('goog.userAgent.product');
|
32
|
+
goog.require('goog.userAgent.product.isVersion');
|
33
|
+
</script>
|
34
|
+
</head>
|
35
|
+
<body>
|
36
|
+
<script>
|
37
|
+
var idbSupported = goog.userAgent.product.CHROME &&
|
38
|
+
goog.userAgent.product.isVersion("22");
|
39
|
+
var asyncTestCase = goog.testing.AsyncTestCase.createAndInstall();
|
40
|
+
asyncTestCase.stepTimeout = 5000;
|
41
|
+
var dbName;
|
42
|
+
var dbBaseName = 'testDb';
|
43
|
+
var globalDb = null;
|
44
|
+
var propertyReplacer;
|
45
|
+
|
46
|
+
// On Chrome 24+, the database reports its default version as 1 as opposed to
|
47
|
+
// the empty string (as per the new spec).
|
48
|
+
var baseVersion = goog.userAgent.product.isVersion("24") ? 1 : '';
|
49
|
+
|
50
|
+
var dbVersion = 1;
|
51
|
+
|
52
|
+
function unblockDatabase(db) {
|
53
|
+
// If a test goes wrong, the database connection may not be closed reliably.
|
54
|
+
// This listens for a version change event (e.g. from deleting it in
|
55
|
+
// preparation for the next test) and closes the existing connection when one
|
56
|
+
// is received.
|
57
|
+
goog.events.listen(db, goog.db.IndexedDb.EventType.VERSION_CHANGE,
|
58
|
+
function(ev) {
|
59
|
+
db.close();
|
60
|
+
});
|
61
|
+
}
|
62
|
+
|
63
|
+
function openDatabase() {
|
64
|
+
return goog.db.openDatabase(dbName).addCallback(unblockDatabase);
|
65
|
+
}
|
66
|
+
|
67
|
+
function incrementVersion(db, onUpgradeNeeded) {
|
68
|
+
if (db.isOpen()) {
|
69
|
+
db.close();
|
70
|
+
}
|
71
|
+
|
72
|
+
var onBlocked = function(ev) {
|
73
|
+
fail('Upgrade to version ' + dbVersion + ' is blocked.');
|
74
|
+
};
|
75
|
+
|
76
|
+
return goog.db.openDatabase(dbName, ++dbVersion, onUpgradeNeeded, onBlocked).
|
77
|
+
addCallback(unblockDatabase).addCallback(function(db) {
|
78
|
+
assertEquals(dbVersion, db.getVersion());
|
79
|
+
});
|
80
|
+
}
|
81
|
+
|
82
|
+
function addStore(db) {
|
83
|
+
return incrementVersion(db, function(ev, db, tx) {
|
84
|
+
db.createObjectStore('store');
|
85
|
+
});
|
86
|
+
}
|
87
|
+
|
88
|
+
function addStoreWithIndex(db) {
|
89
|
+
return incrementVersion(db, function(ev, db, tx) {
|
90
|
+
var store = db.createObjectStore('store', {keyPath: 'key'});
|
91
|
+
store.createIndex('index', 'value');
|
92
|
+
});
|
93
|
+
}
|
94
|
+
|
95
|
+
function populateStore(values, keys, db) {
|
96
|
+
var putTx = db.createTransaction(
|
97
|
+
['store'],
|
98
|
+
goog.db.Transaction.TransactionMode.READ_WRITE);
|
99
|
+
|
100
|
+
var store = putTx.objectStore('store');
|
101
|
+
for (var i = 0; i < values.length; ++i) {
|
102
|
+
store.put(values[i], keys[i]);
|
103
|
+
}
|
104
|
+
return putTx.wait();
|
105
|
+
}
|
106
|
+
|
107
|
+
function populateStoreWithObjects(values, keys, db) {
|
108
|
+
var putTx = db.createTransaction(
|
109
|
+
['store'],
|
110
|
+
goog.db.Transaction.TransactionMode.READ_WRITE);
|
111
|
+
var store = putTx.objectStore('store');
|
112
|
+
goog.array.forEach(values, function(value, index) {
|
113
|
+
store.put({'key': keys[index], 'value': value});
|
114
|
+
});
|
115
|
+
return putTx.wait();
|
116
|
+
}
|
117
|
+
|
118
|
+
function assertStoreValues(values, db) {
|
119
|
+
var assertStoreTx = db.createTransaction(['store']);
|
120
|
+
assertStoreTx.objectStore('store').getAll().addCallback(function(results) {
|
121
|
+
assertSameElements(values, results);
|
122
|
+
closeAndContinue(db);
|
123
|
+
});
|
124
|
+
}
|
125
|
+
|
126
|
+
function assertStoreObjectValues(values, db) {
|
127
|
+
var assertStoreTx = db.createTransaction(['store']);
|
128
|
+
assertStoreTx.objectStore('store').getAll().addCallback(function(results) {
|
129
|
+
var retrievedValues = goog.array.map(results, function(result) {
|
130
|
+
return result['value'];
|
131
|
+
});
|
132
|
+
assertSameElements(values, retrievedValues);
|
133
|
+
closeAndContinue(db);
|
134
|
+
});
|
135
|
+
}
|
136
|
+
|
137
|
+
function assertStoreValuesAndCursorsDisposed(values, cursors, db) {
|
138
|
+
var assertStoreTx = db.createTransaction(['store']);
|
139
|
+
assertStoreTx.objectStore('store').getAll().addCallback(function(results) {
|
140
|
+
assertSameElements(values, results);
|
141
|
+
assertTrue(cursors.length > 0);
|
142
|
+
goog.array.forEach(cursors, function(elem, index, array) {
|
143
|
+
console.log(elem);
|
144
|
+
assertTrue('array[' + index + '] (' + elem + ') is not disposed',
|
145
|
+
goog.Disposable.isDisposed(elem));
|
146
|
+
});
|
147
|
+
closeAndContinue(db);
|
148
|
+
});
|
149
|
+
}
|
150
|
+
|
151
|
+
function assertStoreDoesntExist(db) {
|
152
|
+
try {
|
153
|
+
db.createTransaction(['store']);
|
154
|
+
fail('Create transaction with a non-existent store should have failed.');
|
155
|
+
} catch (e) {
|
156
|
+
// expected
|
157
|
+
assertEquals(e.getName(), goog.db.Error.ErrorName.NOT_FOUND_ERR);
|
158
|
+
closeAndContinue(db);
|
159
|
+
}
|
160
|
+
}
|
161
|
+
|
162
|
+
function failOnError(err) {
|
163
|
+
fail(err.message);
|
164
|
+
}
|
165
|
+
|
166
|
+
function failOnErrorEvent(ev) {
|
167
|
+
fail(ev.target.message);
|
168
|
+
}
|
169
|
+
|
170
|
+
function closeAndContinue(db) {
|
171
|
+
db.close();
|
172
|
+
asyncTestCase.continueTesting();
|
173
|
+
}
|
174
|
+
|
175
|
+
function setUpPage() {
|
176
|
+
propertyReplacer = new goog.testing.PropertyReplacer();
|
177
|
+
}
|
178
|
+
|
179
|
+
function setUp() {
|
180
|
+
if (!idbSupported) {
|
181
|
+
return;
|
182
|
+
}
|
183
|
+
|
184
|
+
// Always use a clean database by generating a new database name.
|
185
|
+
dbName = dbBaseName + Date.now().toString();
|
186
|
+
globalDb = openDatabase();
|
187
|
+
}
|
188
|
+
|
189
|
+
function tearDown() {
|
190
|
+
propertyReplacer.reset();
|
191
|
+
}
|
192
|
+
|
193
|
+
function testDatabaseOpened() {
|
194
|
+
if (!idbSupported) {
|
195
|
+
return;
|
196
|
+
}
|
197
|
+
|
198
|
+
asyncTestCase.waitForAsync('check database is open');
|
199
|
+
assertNotNull(globalDb);
|
200
|
+
globalDb.branch().addCallback(function(db) {
|
201
|
+
assertTrue(db.isOpen());
|
202
|
+
closeAndContinue(db);
|
203
|
+
}).addErrback(failOnError);
|
204
|
+
}
|
205
|
+
|
206
|
+
function testOpenWithNewVersion() {
|
207
|
+
if (!idbSupported) {
|
208
|
+
return;
|
209
|
+
}
|
210
|
+
|
211
|
+
var upgradeNeeded = false;
|
212
|
+
asyncTestCase.waitForAsync('open with new version');
|
213
|
+
globalDb.branch().addCallback(function(db) {
|
214
|
+
assertEquals(baseVersion, db.getVersion());
|
215
|
+
db.close();
|
216
|
+
return incrementVersion(db, function(ev, db, tx) {
|
217
|
+
upgradeNeeded = true;
|
218
|
+
});
|
219
|
+
}).addCallback(function(db) {
|
220
|
+
assertTrue(upgradeNeeded);
|
221
|
+
closeAndContinue(db);
|
222
|
+
}).addErrback(failOnError);
|
223
|
+
}
|
224
|
+
|
225
|
+
function testManipulateObjectStores() {
|
226
|
+
if (!idbSupported) {
|
227
|
+
return;
|
228
|
+
}
|
229
|
+
|
230
|
+
asyncTestCase.waitForAsync('manipulate object stores');
|
231
|
+
globalDb.branch().addCallback(function(db) {
|
232
|
+
assertEquals(baseVersion, db.getVersion());
|
233
|
+
db.close();
|
234
|
+
return incrementVersion(db, function(ev, db, tx) {
|
235
|
+
db.createObjectStore('basicStore');
|
236
|
+
db.createObjectStore('keyPathStore', {keyPath: 'keyGoesHere'});
|
237
|
+
db.createObjectStore('autoIncrementStore', {autoIncrement: true});
|
238
|
+
});
|
239
|
+
}).addCallback(function(db) {
|
240
|
+
var storeNames = db.getObjectStoreNames();
|
241
|
+
assertEquals(3, storeNames.length);
|
242
|
+
assertTrue(storeNames.contains('basicStore'));
|
243
|
+
assertTrue(storeNames.contains('keyPathStore'));
|
244
|
+
assertTrue(storeNames.contains('autoIncrementStore'));
|
245
|
+
return incrementVersion(db, function(ev, db, tx) {
|
246
|
+
db.deleteObjectStore('basicStore');
|
247
|
+
});
|
248
|
+
}).addCallback(function(db) {
|
249
|
+
var storeNames = db.getObjectStoreNames();
|
250
|
+
assertEquals(2, storeNames.length);
|
251
|
+
assertFalse(storeNames.contains('basicStore'));
|
252
|
+
assertTrue(storeNames.contains('keyPathStore'));
|
253
|
+
assertTrue(storeNames.contains('autoIncrementStore'));
|
254
|
+
closeAndContinue(db);
|
255
|
+
}).addErrback(failOnError);
|
256
|
+
}
|
257
|
+
|
258
|
+
function testBadObjectStoreManipulation() {
|
259
|
+
if (!idbSupported) {
|
260
|
+
return;
|
261
|
+
}
|
262
|
+
|
263
|
+
asyncTestCase.waitForAsync('bad object store manipulation');
|
264
|
+
var expectedCode = goog.db.Error.ErrorName.INVALID_STATE_ERR;
|
265
|
+
globalDb.branch().addCallback(function(db) {
|
266
|
+
try {
|
267
|
+
db.createObjectStore('diediedie');
|
268
|
+
fail('Create object store outside transaction should have failed.');
|
269
|
+
} catch (err) {
|
270
|
+
// expected
|
271
|
+
assertEquals(expectedCode, err.getName());
|
272
|
+
}
|
273
|
+
}).addCallback(addStore).addCallback(function(db) {
|
274
|
+
try {
|
275
|
+
db.deleteObjectStore('store');
|
276
|
+
fail('Delete object store outside transaction should have failed.');
|
277
|
+
} catch (err) {
|
278
|
+
// expected
|
279
|
+
assertEquals(expectedCode, err.getName());
|
280
|
+
}
|
281
|
+
}).addCallback(function(db) {
|
282
|
+
return incrementVersion(db, function(ev, db, tx) {
|
283
|
+
try {
|
284
|
+
db.deleteObjectStore('diediedie');
|
285
|
+
fail('Delete non-existent store should have failed.');
|
286
|
+
} catch (err) {
|
287
|
+
// expected
|
288
|
+
assertEquals(goog.db.Error.ErrorName.NOT_FOUND_ERR, err.getName());
|
289
|
+
}
|
290
|
+
});
|
291
|
+
}).addCallback(closeAndContinue).addErrback(failOnError);
|
292
|
+
}
|
293
|
+
|
294
|
+
function testGetNonExistentObjectStore() {
|
295
|
+
if (!idbSupported) {
|
296
|
+
return;
|
297
|
+
}
|
298
|
+
|
299
|
+
asyncTestCase.waitForAsync('get non-existent object store');
|
300
|
+
globalDb.branch().addCallback(addStore).addCallback(function(db) {
|
301
|
+
var tx = db.createTransaction(['store']);
|
302
|
+
try {
|
303
|
+
tx.objectStore('diediedie');
|
304
|
+
fail('getting non-existent object store should have failed');
|
305
|
+
} catch (err) {
|
306
|
+
assertEquals(goog.db.Error.ErrorName.NOT_FOUND_ERR, err.getName());
|
307
|
+
}
|
308
|
+
closeAndContinue(db);
|
309
|
+
}).addErrback(failOnError);
|
310
|
+
}
|
311
|
+
|
312
|
+
function testCreateTransaction() {
|
313
|
+
if (!idbSupported) {
|
314
|
+
return;
|
315
|
+
}
|
316
|
+
|
317
|
+
asyncTestCase.waitForAsync('create transactions');
|
318
|
+
globalDb.branch().addCallback(addStore).addCallback(function(db) {
|
319
|
+
var tx = db.createTransaction(['store']);
|
320
|
+
assertEquals(
|
321
|
+
'mode not READ_ONLY',
|
322
|
+
goog.db.Transaction.TransactionMode.READ_ONLY,
|
323
|
+
tx.getMode());
|
324
|
+
tx = db.createTransaction(
|
325
|
+
['store'],
|
326
|
+
goog.db.Transaction.TransactionMode.READ_WRITE);
|
327
|
+
assertEquals(
|
328
|
+
'mode not READ_WRITE',
|
329
|
+
goog.db.Transaction.TransactionMode.READ_WRITE,
|
330
|
+
tx.getMode());
|
331
|
+
closeAndContinue(db);
|
332
|
+
}).addErrback(failOnError);
|
333
|
+
}
|
334
|
+
|
335
|
+
function testPutRecord() {
|
336
|
+
if (!idbSupported) {
|
337
|
+
return;
|
338
|
+
}
|
339
|
+
|
340
|
+
asyncTestCase.waitForAsync('putting record');
|
341
|
+
globalDb.branch().addCallback(addStore).addCallback(function(db) {
|
342
|
+
var rw = goog.db.Transaction.TransactionMode.READ_WRITE;
|
343
|
+
var COMPLETE = goog.db.Transaction.EventTypes.COMPLETE;
|
344
|
+
var ERROR = goog.db.Transaction.EventTypes.ERROR;
|
345
|
+
|
346
|
+
function checkForOverwrittenValue() {
|
347
|
+
var checkOverwriteTx = db.createTransaction(['store']);
|
348
|
+
checkOverwriteTx.objectStore('store').get('putKey').addCallback(
|
349
|
+
function(result) {
|
350
|
+
// this is guaranteed to run before the COMPLETE event fires on
|
351
|
+
// the transaction
|
352
|
+
assertEquals('overwritten', result.key);
|
353
|
+
assertEquals('value2', result.value);
|
354
|
+
});
|
355
|
+
|
356
|
+
goog.events.listen(checkOverwriteTx, ERROR, failOnErrorEvent);
|
357
|
+
goog.events.listen(checkOverwriteTx, COMPLETE, function() {
|
358
|
+
closeAndContinue(db);
|
359
|
+
});
|
360
|
+
}
|
361
|
+
|
362
|
+
function overwriteValue() {
|
363
|
+
var overwriteTx = db.createTransaction(['store'], rw);
|
364
|
+
overwriteTx.objectStore('store').put(
|
365
|
+
{key: 'overwritten', value: 'value2'},
|
366
|
+
'putKey');
|
367
|
+
|
368
|
+
goog.events.listen(overwriteTx, ERROR, failOnErrorEvent);
|
369
|
+
goog.events.listen(overwriteTx, COMPLETE, checkForOverwrittenValue);
|
370
|
+
}
|
371
|
+
|
372
|
+
function checkForInitialValue() {
|
373
|
+
var checkResultsTx = db.createTransaction(['store']);
|
374
|
+
checkResultsTx.objectStore('store').get('putKey').addCallback(
|
375
|
+
function(result) {
|
376
|
+
assertEquals('initial', result.key);
|
377
|
+
assertEquals('value1', result.value);
|
378
|
+
});
|
379
|
+
goog.events.listen(checkResultsTx, ERROR, failOnErrorEvent);
|
380
|
+
goog.events.listen(checkResultsTx, COMPLETE, overwriteValue);
|
381
|
+
}
|
382
|
+
|
383
|
+
var initialPutTx = db.createTransaction(['store'], rw);
|
384
|
+
initialPutTx.objectStore('store').put(
|
385
|
+
{key: 'initial', value: 'value1'},
|
386
|
+
'putKey');
|
387
|
+
|
388
|
+
goog.events.listen(initialPutTx, ERROR, failOnErrorEvent);
|
389
|
+
goog.events.listen(initialPutTx, COMPLETE, checkForInitialValue);
|
390
|
+
|
391
|
+
}).addErrback(failOnError);
|
392
|
+
}
|
393
|
+
|
394
|
+
function testAddRecord() {
|
395
|
+
if (!idbSupported) {
|
396
|
+
return;
|
397
|
+
}
|
398
|
+
|
399
|
+
asyncTestCase.waitForAsync('adding record');
|
400
|
+
globalDb.branch().addCallback(addStore).addCallback(function(db) {
|
401
|
+
var rw = goog.db.Transaction.TransactionMode.READ_WRITE;
|
402
|
+
var COMPLETE = goog.db.Transaction.EventTypes.COMPLETE;
|
403
|
+
var ERROR = goog.db.Transaction.EventTypes.ERROR;
|
404
|
+
|
405
|
+
var initialAddTx = db.createTransaction(['store'], rw);
|
406
|
+
initialAddTx.objectStore('store').add(
|
407
|
+
{key: 'hi', value: 'something'},
|
408
|
+
'stuff');
|
409
|
+
|
410
|
+
goog.events.listen(initialAddTx, ERROR, failOnErrorEvent);
|
411
|
+
goog.events.listen(initialAddTx, COMPLETE, function() {
|
412
|
+
var successfulAddTx = db.createTransaction(['store']);
|
413
|
+
successfulAddTx.objectStore('store').get('stuff').addCallback(
|
414
|
+
function(result) {
|
415
|
+
assertEquals('hi', result.key);
|
416
|
+
assertEquals('something', result.value);
|
417
|
+
});
|
418
|
+
|
419
|
+
goog.events.listen(successfulAddTx, ERROR, failOnErrorEvent);
|
420
|
+
goog.events.listen(successfulAddTx, COMPLETE, function() {
|
421
|
+
var addOverwriteTx = db.createTransaction(['store'], rw);
|
422
|
+
addOverwriteTx.objectStore('store').add(
|
423
|
+
{key: 'bye', value: 'nothing'},
|
424
|
+
'stuff').addErrback(
|
425
|
+
function(err) {
|
426
|
+
// expected
|
427
|
+
assertEquals(
|
428
|
+
goog.db.Error.ErrorName.CONSTRAINT_ERR,
|
429
|
+
err.getName());
|
430
|
+
});
|
431
|
+
|
432
|
+
goog.events.listen(addOverwriteTx, COMPLETE, function() {
|
433
|
+
fail('adding existing record should not have succeeded');
|
434
|
+
});
|
435
|
+
goog.events.listen(addOverwriteTx, ERROR, function(ev) {
|
436
|
+
// expected
|
437
|
+
assertEquals(
|
438
|
+
goog.db.Error.ErrorName.CONSTRAINT_ERR,
|
439
|
+
ev.target.getName());
|
440
|
+
closeAndContinue(db);
|
441
|
+
});
|
442
|
+
});
|
443
|
+
});
|
444
|
+
}).addErrback(failOnError);
|
445
|
+
}
|
446
|
+
|
447
|
+
function testPutRecordKeyPathStore() {
|
448
|
+
if (!idbSupported) {
|
449
|
+
return;
|
450
|
+
}
|
451
|
+
|
452
|
+
asyncTestCase.waitForAsync('adding record, key path store');
|
453
|
+
globalDb.branch().addCallback(function(db) {
|
454
|
+
return incrementVersion(db, function(ev, db, tx) {
|
455
|
+
db.createObjectStore('keyStore', {keyPath: 'key'});
|
456
|
+
});
|
457
|
+
}).addCallback(function(db) {
|
458
|
+
var COMPLETE = goog.db.Transaction.EventTypes.COMPLETE;
|
459
|
+
var ERROR = goog.db.Transaction.EventTypes.ERROR;
|
460
|
+
|
461
|
+
var putTx = db.createTransaction(
|
462
|
+
['keyStore'],
|
463
|
+
goog.db.Transaction.TransactionMode.READ_WRITE);
|
464
|
+
putTx.objectStore('keyStore').put({key: 'hi', value: 'something'});
|
465
|
+
|
466
|
+
goog.events.listen(putTx, ERROR, failOnErrorEvent);
|
467
|
+
goog.events.listen(putTx, COMPLETE, function() {
|
468
|
+
var checkResultsTx = db.createTransaction(['keyStore']);
|
469
|
+
checkResultsTx.objectStore('keyStore').get('hi').addCallback(
|
470
|
+
function(result) {
|
471
|
+
assertNotUndefined(result);
|
472
|
+
assertEquals('hi', result.key);
|
473
|
+
assertEquals('something', result.value);
|
474
|
+
});
|
475
|
+
|
476
|
+
goog.events.listen(checkResultsTx, ERROR, failOnErrorEvent);
|
477
|
+
goog.events.listen(checkResultsTx, COMPLETE, function() {
|
478
|
+
closeAndContinue(db);
|
479
|
+
});
|
480
|
+
});
|
481
|
+
}).addErrback(failOnError);
|
482
|
+
}
|
483
|
+
|
484
|
+
function testPutBadRecordKeyPathStore() {
|
485
|
+
if (!idbSupported) {
|
486
|
+
return;
|
487
|
+
}
|
488
|
+
|
489
|
+
asyncTestCase.waitForAsync('adding bad record, key path store');
|
490
|
+
globalDb.branch().addCallback(function(db) {
|
491
|
+
return incrementVersion(db, function(ev, db, tx) {
|
492
|
+
db.createObjectStore('keyStore', {keyPath: 'key'});
|
493
|
+
});
|
494
|
+
}).addCallback(function(db) {
|
495
|
+
var badTx = db.createTransaction(
|
496
|
+
['keyStore'],
|
497
|
+
goog.db.Transaction.TransactionMode.READ_WRITE);
|
498
|
+
badTx.objectStore('keyStore').put(
|
499
|
+
{key: 'diedie', value: 'anything'},
|
500
|
+
'badKey').addCallback(function() {
|
501
|
+
fail('inserting with explicit key should have failed');
|
502
|
+
}).addErrback(function(err) {
|
503
|
+
// expected
|
504
|
+
assertEquals(goog.db.Error.ErrorName.DATA_ERR, err.getName());
|
505
|
+
closeAndContinue(db);
|
506
|
+
});
|
507
|
+
}).addErrback(failOnError);
|
508
|
+
}
|
509
|
+
|
510
|
+
function testPutRecordAutoIncrementStore() {
|
511
|
+
if (!idbSupported) {
|
512
|
+
return;
|
513
|
+
}
|
514
|
+
|
515
|
+
asyncTestCase.waitForAsync('adding record, auto increment store');
|
516
|
+
globalDb.branch().addCallback(function(db) {
|
517
|
+
return incrementVersion(db, function(ev, db, tx) {
|
518
|
+
db.createObjectStore('aiStore', {autoIncrement: true});
|
519
|
+
});
|
520
|
+
}).addCallback(function(db) {
|
521
|
+
var tx = db.createTransaction(
|
522
|
+
['aiStore'],
|
523
|
+
goog.db.Transaction.TransactionMode.READ_WRITE);
|
524
|
+
tx.objectStore('aiStore').put('1');
|
525
|
+
tx.objectStore('aiStore').put('2');
|
526
|
+
tx.objectStore('aiStore').put('3');
|
527
|
+
goog.events.listen(
|
528
|
+
tx,
|
529
|
+
goog.db.Transaction.EventTypes.ERROR,
|
530
|
+
failOnErrorEvent);
|
531
|
+
|
532
|
+
goog.events.listen(tx, goog.db.Transaction.EventTypes.COMPLETE, function() {
|
533
|
+
var tx = db.createTransaction(['aiStore']);
|
534
|
+
tx.objectStore('aiStore').getAll().addCallback(function(results) {
|
535
|
+
assertEquals(3, results.length);
|
536
|
+
// only checking to see if the results are included because the keys
|
537
|
+
// are not specified
|
538
|
+
assertNotEquals(-1, results.indexOf('1'));
|
539
|
+
assertNotEquals(-1, results.indexOf('2'));
|
540
|
+
assertNotEquals(-1, results.indexOf('3'));
|
541
|
+
closeAndContinue(db);
|
542
|
+
});
|
543
|
+
});
|
544
|
+
}).addErrback(failOnError);
|
545
|
+
}
|
546
|
+
|
547
|
+
function testPutRecordKeyPathAndAutoIncrementStore() {
|
548
|
+
if (!idbSupported) {
|
549
|
+
return;
|
550
|
+
}
|
551
|
+
|
552
|
+
asyncTestCase.waitForAsync('adding record, key path + auto increment store');
|
553
|
+
globalDb.branch().addCallback(function(db) {
|
554
|
+
return incrementVersion(db, function(ev, db, tx) {
|
555
|
+
db.createObjectStore('hybridStore', {
|
556
|
+
keyPath: 'key',
|
557
|
+
autoIncrement: true
|
558
|
+
});
|
559
|
+
});
|
560
|
+
}).addCallback(function(db) {
|
561
|
+
var tx = db.createTransaction(
|
562
|
+
['hybridStore'],
|
563
|
+
goog.db.Transaction.TransactionMode.READ_WRITE);
|
564
|
+
tx.objectStore('hybridStore').put({value: 'whatever'});
|
565
|
+
goog.events.listen(
|
566
|
+
tx,
|
567
|
+
goog.db.Transaction.EventTypes.ERROR,
|
568
|
+
failOnErrorEvent);
|
569
|
+
|
570
|
+
goog.events.listen(tx, goog.db.Transaction.EventTypes.COMPLETE, function() {
|
571
|
+
var tx = db.createTransaction(['hybridStore']);
|
572
|
+
tx.objectStore('hybridStore').getAll().addCallback(function(results) {
|
573
|
+
assertEquals(1, results.length);
|
574
|
+
assertEquals('whatever', results[0].value);
|
575
|
+
assertNotUndefined(results[0].key);
|
576
|
+
closeAndContinue(db);
|
577
|
+
});
|
578
|
+
});
|
579
|
+
}).addErrback(failOnError);
|
580
|
+
}
|
581
|
+
|
582
|
+
function testPutIllegalRecords() {
|
583
|
+
if (!idbSupported) {
|
584
|
+
return;
|
585
|
+
}
|
586
|
+
|
587
|
+
asyncTestCase.waitForAsync('adding illegal records');
|
588
|
+
globalDb.branch().addCallback(addStore).addCallback(function(db) {
|
589
|
+
var tx = db.createTransaction(
|
590
|
+
['store'],
|
591
|
+
goog.db.Transaction.TransactionMode.READ_WRITE);
|
592
|
+
|
593
|
+
tx.objectStore('store').put('death', null).addCallback(function() {
|
594
|
+
fail('putting with null key should have failed');
|
595
|
+
}).addErrback(function(err) {
|
596
|
+
assertEquals(goog.db.Error.ErrorName.DATA_ERR, err.getName());
|
597
|
+
});
|
598
|
+
|
599
|
+
tx.objectStore('store').put('death', NaN).addCallback(function() {
|
600
|
+
fail('putting with NaN key should have failed');
|
601
|
+
}).addErrback(function(err) {
|
602
|
+
assertEquals(goog.db.Error.ErrorName.DATA_ERR, err.getName());
|
603
|
+
});
|
604
|
+
|
605
|
+
tx.objectStore('store').put('death', undefined).addCallback(function() {
|
606
|
+
fail('putting with undefined key should have failed');
|
607
|
+
}).addErrback(function(err) {
|
608
|
+
assertEquals(goog.db.Error.ErrorName.DATA_ERR, err.getName());
|
609
|
+
});
|
610
|
+
|
611
|
+
closeAndContinue(db);
|
612
|
+
}).addErrback(failOnError);
|
613
|
+
}
|
614
|
+
|
615
|
+
function testPutIllegalRecordsWithIndex() {
|
616
|
+
if (!idbSupported) {
|
617
|
+
return;
|
618
|
+
}
|
619
|
+
|
620
|
+
asyncTestCase.waitForAsync('adding illegal records');
|
621
|
+
globalDb.branch().addCallback(addStoreWithIndex).addCallback(function(db) {
|
622
|
+
var tx = db.createTransaction(
|
623
|
+
['store'],
|
624
|
+
goog.db.Transaction.TransactionMode.READ_WRITE);
|
625
|
+
|
626
|
+
tx.objectStore('store').put({key: 'diediedie', value: null}).
|
627
|
+
addErrback(function(err) {
|
628
|
+
assertEquals(goog.db.Error.ErrorCode.DATA_ERR, err.code);
|
629
|
+
});
|
630
|
+
|
631
|
+
tx.objectStore('store').put({key: 'dietodeath', value: NaN}).
|
632
|
+
addErrback(function(err) {
|
633
|
+
assertEquals(goog.db.Error.ErrorCode.DATA_ERR, err.code);
|
634
|
+
});
|
635
|
+
|
636
|
+
tx.objectStore('store').put({key: 'dietodeath', value: undefined}).
|
637
|
+
addErrback(function(err) {
|
638
|
+
assertEquals(goog.db.Error.ErrorCode.DATA_ERR, err.code);
|
639
|
+
});
|
640
|
+
|
641
|
+
closeAndContinue(db);
|
642
|
+
}).addErrback(failOnError);
|
643
|
+
}
|
644
|
+
|
645
|
+
function testDeleteRecord() {
|
646
|
+
if (!idbSupported) {
|
647
|
+
return;
|
648
|
+
}
|
649
|
+
|
650
|
+
asyncTestCase.waitForAsync('deleting record');
|
651
|
+
globalDb.branch().addCallback(addStore).addCallback(function(db) {
|
652
|
+
var rw = goog.db.Transaction.TransactionMode.READ_WRITE;
|
653
|
+
var COMPLETE = goog.db.Transaction.EventTypes.COMPLETE;
|
654
|
+
var ERROR = goog.db.Transaction.EventTypes.ERROR;
|
655
|
+
var putTx = db.createTransaction(['store'], rw);
|
656
|
+
putTx.objectStore('store').put({key: 'hi', value: 'something'}, 'stuff');
|
657
|
+
|
658
|
+
goog.events.listen(putTx, ERROR, failOnErrorEvent);
|
659
|
+
goog.events.listen(putTx, COMPLETE, function() {
|
660
|
+
var deleteTx = db.createTransaction(['store'], rw);
|
661
|
+
deleteTx.objectStore('store').remove('stuff');
|
662
|
+
|
663
|
+
goog.events.listen(deleteTx, ERROR, failOnErrorEvent);
|
664
|
+
goog.events.listen(deleteTx, COMPLETE, function() {
|
665
|
+
var checkResultsTx = db.createTransaction(['store']);
|
666
|
+
checkResultsTx.objectStore('store').get('stuff').addCallback(
|
667
|
+
function(result) {
|
668
|
+
assertUndefined(result);
|
669
|
+
});
|
670
|
+
|
671
|
+
goog.events.listen(checkResultsTx, ERROR, failOnErrorEvent);
|
672
|
+
goog.events.listen(checkResultsTx, COMPLETE, function() {
|
673
|
+
closeAndContinue(db);
|
674
|
+
});
|
675
|
+
});
|
676
|
+
});
|
677
|
+
}).addErrback(failOnError);
|
678
|
+
}
|
679
|
+
|
680
|
+
function testGetAll() {
|
681
|
+
if (!idbSupported) {
|
682
|
+
return;
|
683
|
+
}
|
684
|
+
|
685
|
+
var values = ['1', '2', '3'];
|
686
|
+
var keys = ['a', 'b', 'c'];
|
687
|
+
|
688
|
+
var addData = goog.partial(populateStore, values, keys);
|
689
|
+
var checkStore = goog.partial(assertStoreValues, values);
|
690
|
+
|
691
|
+
asyncTestCase.waitForAsync('getting all');
|
692
|
+
globalDb.branch().addCallbacks(addStore, failOnError).
|
693
|
+
addCallback(addData).
|
694
|
+
addCallback(checkStore);
|
695
|
+
}
|
696
|
+
|
697
|
+
function testGetAllFreesCursor() {
|
698
|
+
if (!idbSupported) {
|
699
|
+
return;
|
700
|
+
}
|
701
|
+
var values = ['1', '2', '3'];
|
702
|
+
var keys = ['a', 'b', 'c'];
|
703
|
+
|
704
|
+
var addData = goog.partial(populateStore, values, keys);
|
705
|
+
var origCursor = goog.db.Cursor;
|
706
|
+
var cursors = [];
|
707
|
+
/** @constructor */
|
708
|
+
var testCursor = function() {
|
709
|
+
origCursor.call(this);
|
710
|
+
cursors.push(this);
|
711
|
+
};
|
712
|
+
goog.object.extend(testCursor, origCursor);
|
713
|
+
goog.inherits(testCursor, origCursor);
|
714
|
+
propertyReplacer.replace(goog.db, 'Cursor', testCursor);
|
715
|
+
var checkStoreAndCursorDisposed =
|
716
|
+
goog.partial(assertStoreValuesAndCursorsDisposed, values, cursors);
|
717
|
+
|
718
|
+
asyncTestCase.waitForAsync('getting all');
|
719
|
+
globalDb.branch().addCallbacks(addStore, failOnError).
|
720
|
+
addCallback(addData).
|
721
|
+
addCallback(checkStoreAndCursorDisposed);
|
722
|
+
}
|
723
|
+
|
724
|
+
function testObjectStoreCursorGet() {
|
725
|
+
if (!idbSupported) {
|
726
|
+
return;
|
727
|
+
}
|
728
|
+
|
729
|
+
var values = ['1', '2', '3', '4'];
|
730
|
+
var keys = ['a', 'b', 'c', 'd'];
|
731
|
+
|
732
|
+
var addData = goog.partial(populateStore, values, keys);
|
733
|
+
|
734
|
+
// Open the cursor over range ['b', 'c'], move in backwards direction.
|
735
|
+
var openCursorAndCheck = function(db) {
|
736
|
+
var cursorTx = db.createTransaction(['store']);
|
737
|
+
var store = cursorTx.objectStore('store');
|
738
|
+
var values = [];
|
739
|
+
var keys = [];
|
740
|
+
|
741
|
+
var whenTxComplete = new goog.async.Deferred();
|
742
|
+
goog.events.listen(
|
743
|
+
cursorTx, goog.db.Transaction.EventTypes.ERROR, failOnError);
|
744
|
+
goog.events.listen(
|
745
|
+
cursorTx, goog.db.Transaction.EventTypes.COMPLETE, function() {
|
746
|
+
whenTxComplete.callback();
|
747
|
+
});
|
748
|
+
|
749
|
+
var whenCursorComplete = new goog.async.Deferred();
|
750
|
+
var cursor = store.openCursor(
|
751
|
+
goog.db.KeyRange.bound('b', 'c'),
|
752
|
+
goog.db.Cursor.Direction.PREV);
|
753
|
+
|
754
|
+
var key = goog.events.listen(
|
755
|
+
cursor, goog.db.Cursor.EventType.NEW_DATA, function() {
|
756
|
+
values.push(cursor.getValue());
|
757
|
+
keys.push(cursor.getKey());
|
758
|
+
cursor.next();
|
759
|
+
});
|
760
|
+
|
761
|
+
goog.events.listenOnce(cursor, [
|
762
|
+
goog.db.Cursor.EventType.COMPLETE,
|
763
|
+
goog.db.Cursor.EventType.ERROR
|
764
|
+
], function(evt) {
|
765
|
+
goog.events.unlistenByKey(key);
|
766
|
+
if (evt.type == goog.db.Cursor.EventType.COMPLETE) {
|
767
|
+
whenCursorComplete.callback(db);
|
768
|
+
} else {
|
769
|
+
whenCursorComplete.errback();
|
770
|
+
}
|
771
|
+
});
|
772
|
+
|
773
|
+
var whenAllComplete = goog.async.DeferredList.gatherResults([
|
774
|
+
whenCursorComplete,
|
775
|
+
whenTxComplete
|
776
|
+
]);
|
777
|
+
whenAllComplete.addCallback(function(results) {
|
778
|
+
var db = results[0];
|
779
|
+
assertArrayEquals(['3', '2'], values);
|
780
|
+
assertArrayEquals(['c', 'b'], keys);
|
781
|
+
closeAndContinue(db);
|
782
|
+
});
|
783
|
+
};
|
784
|
+
|
785
|
+
asyncTestCase.waitForAsync('getting range');
|
786
|
+
globalDb.branch().addCallbacks(addStore, failOnError).
|
787
|
+
addCallback(addData).
|
788
|
+
addCallback(openCursorAndCheck);
|
789
|
+
}
|
790
|
+
|
791
|
+
function testObjectStoreCursorReplace() {
|
792
|
+
if (!idbSupported) {
|
793
|
+
return;
|
794
|
+
}
|
795
|
+
|
796
|
+
var values = ['1', '2', '3', '4'];
|
797
|
+
var keys = ['a', 'b', 'c', 'd'];
|
798
|
+
|
799
|
+
var addData = goog.partial(populateStore, values, keys);
|
800
|
+
|
801
|
+
// Store should contain ['1', '2', '5', '4'] after replacement.
|
802
|
+
var checkStore = goog.partial(assertStoreValues, ['1', '2', '5', '4']);
|
803
|
+
|
804
|
+
// Use a bounded cursor for ('b', 'c'] to update value '3' -> '5'.
|
805
|
+
var openCursorAndReplace = function(db) {
|
806
|
+
var d = new goog.async.Deferred();
|
807
|
+
var cursorTx = db.createTransaction(
|
808
|
+
['store'],
|
809
|
+
goog.db.Transaction.TransactionMode.READ_WRITE);
|
810
|
+
|
811
|
+
var whenTxComplete = new goog.async.Deferred();
|
812
|
+
goog.events.listen(
|
813
|
+
cursorTx, goog.db.Transaction.EventTypes.ERROR, failOnError);
|
814
|
+
goog.events.listen(
|
815
|
+
cursorTx, goog.db.Transaction.EventTypes.COMPLETE, function() {
|
816
|
+
whenTxComplete.callback();
|
817
|
+
});
|
818
|
+
|
819
|
+
var store = cursorTx.objectStore('store');
|
820
|
+
var whenCursorComplete = new goog.async.Deferred();
|
821
|
+
var cursor = store.openCursor(goog.db.KeyRange.bound('b', 'c', true));
|
822
|
+
|
823
|
+
var key = goog.events.listen(
|
824
|
+
cursor, goog.db.Cursor.EventType.NEW_DATA, function() {
|
825
|
+
assertEquals('3', cursor.getValue());
|
826
|
+
cursor.update('5').addCallback(function() {
|
827
|
+
cursor.next();
|
828
|
+
}).addErrback(failOnError);
|
829
|
+
});
|
830
|
+
|
831
|
+
goog.events.listenOnce(cursor, [
|
832
|
+
goog.db.Cursor.EventType.COMPLETE,
|
833
|
+
goog.db.Cursor.EventType.ERROR
|
834
|
+
], function(evt) {
|
835
|
+
goog.events.unlistenByKey(key);
|
836
|
+
if (evt.type == goog.db.Cursor.EventType.COMPLETE) {
|
837
|
+
whenCursorComplete.callback(db);
|
838
|
+
} else {
|
839
|
+
whenCursorComplete.errback();
|
840
|
+
}
|
841
|
+
});
|
842
|
+
|
843
|
+
goog.async.DeferredList.gatherResults([
|
844
|
+
whenCursorComplete,
|
845
|
+
whenTxComplete
|
846
|
+
]).addCallbacks(function(results) {
|
847
|
+
d.callback(results[0]);
|
848
|
+
}, failOnError);
|
849
|
+
|
850
|
+
return d;
|
851
|
+
};
|
852
|
+
|
853
|
+
// Setup and execute test case.
|
854
|
+
asyncTestCase.waitForAsync('replacing value by cursor');
|
855
|
+
globalDb.branch().addCallbacks(addStore, failOnError).
|
856
|
+
addCallback(addData).
|
857
|
+
addCallback(openCursorAndReplace).
|
858
|
+
addCallback(checkStore);
|
859
|
+
}
|
860
|
+
|
861
|
+
function testObjectStoreCursorRemove() {
|
862
|
+
if (!idbSupported) {
|
863
|
+
return;
|
864
|
+
}
|
865
|
+
|
866
|
+
var values = ['1', '2', '3', '4'];
|
867
|
+
var keys = ['a', 'b', 'c', 'd'];
|
868
|
+
|
869
|
+
var addData = goog.partial(populateStore, values, keys);
|
870
|
+
|
871
|
+
// Store should contain ['1', '2'] after removing elements.
|
872
|
+
var checkStore = goog.partial(assertStoreValues, ['1', '2']);
|
873
|
+
|
874
|
+
// Use a bounded cursor for ('b', ...) to remove '3', '4'.
|
875
|
+
var openCursorAndRemove = function(db) {
|
876
|
+
var d = new goog.async.Deferred();
|
877
|
+
var cursorTx = db.createTransaction(
|
878
|
+
['store'],
|
879
|
+
goog.db.Transaction.TransactionMode.READ_WRITE);
|
880
|
+
|
881
|
+
var whenTxComplete = new goog.async.Deferred();
|
882
|
+
goog.events.listen(
|
883
|
+
cursorTx, goog.db.Transaction.EventTypes.ERROR, failOnError);
|
884
|
+
goog.events.listen(
|
885
|
+
cursorTx, goog.db.Transaction.EventTypes.COMPLETE, function() {
|
886
|
+
whenTxComplete.callback();
|
887
|
+
});
|
888
|
+
|
889
|
+
|
890
|
+
var store = cursorTx.objectStore('store');
|
891
|
+
var whenCursorComplete = new goog.async.Deferred();
|
892
|
+
var cursor = store.openCursor(goog.db.KeyRange.lowerBound('b', true));
|
893
|
+
|
894
|
+
var key = goog.events.listen(
|
895
|
+
cursor, goog.db.Cursor.EventType.NEW_DATA, function() {
|
896
|
+
cursor.remove('5').addCallback(function() {
|
897
|
+
cursor.next();
|
898
|
+
}).addErrback(failOnError);
|
899
|
+
});
|
900
|
+
|
901
|
+
goog.events.listenOnce(cursor, [
|
902
|
+
goog.db.Cursor.EventType.COMPLETE,
|
903
|
+
goog.db.Cursor.EventType.ERROR
|
904
|
+
], function(evt) {
|
905
|
+
goog.events.unlistenByKey(key);
|
906
|
+
if (evt.type == goog.db.Cursor.EventType.COMPLETE) {
|
907
|
+
whenCursorComplete.callback(db);
|
908
|
+
} else {
|
909
|
+
whenCursorComplete.errback();
|
910
|
+
}
|
911
|
+
});
|
912
|
+
|
913
|
+
goog.async.DeferredList.gatherResults([
|
914
|
+
whenCursorComplete,
|
915
|
+
whenTxComplete
|
916
|
+
]).addCallbacks(function(results) {
|
917
|
+
d.callback(results[0]);
|
918
|
+
}, failOnError);
|
919
|
+
|
920
|
+
return d;
|
921
|
+
};
|
922
|
+
|
923
|
+
// Setup and execute test case.
|
924
|
+
asyncTestCase.waitForAsync('removing value by cursor');
|
925
|
+
globalDb.branch().addCallbacks(addStore, failOnError).
|
926
|
+
addCallback(addData).
|
927
|
+
addCallback(openCursorAndRemove).
|
928
|
+
addCallback(checkStore);
|
929
|
+
}
|
930
|
+
|
931
|
+
function testClear() {
|
932
|
+
if (!idbSupported) {
|
933
|
+
return;
|
934
|
+
}
|
935
|
+
|
936
|
+
asyncTestCase.waitForAsync('clearing');
|
937
|
+
globalDb.branch().addCallback(addStore).addCallback(function(db) {
|
938
|
+
var rw = goog.db.Transaction.TransactionMode.READ_WRITE;
|
939
|
+
var COMPLETE = goog.db.Transaction.EventTypes.COMPLETE;
|
940
|
+
var ERROR = goog.db.Transaction.EventTypes.ERROR;
|
941
|
+
|
942
|
+
var putTx = db.createTransaction(['store'], rw);
|
943
|
+
putTx.objectStore('store').put('1', 'a');
|
944
|
+
putTx.objectStore('store').put('2', 'b');
|
945
|
+
putTx.objectStore('store').put('3', 'c');
|
946
|
+
|
947
|
+
goog.events.listen(putTx, ERROR, failOnErrorEvent);
|
948
|
+
goog.events.listen(putTx, COMPLETE, function() {
|
949
|
+
var clearTx = db.createTransaction(['store'], rw);
|
950
|
+
clearTx.objectStore('store').clear();
|
951
|
+
|
952
|
+
goog.events.listen(clearTx, ERROR, failOnErrorEvent);
|
953
|
+
goog.events.listen(clearTx, COMPLETE, function() {
|
954
|
+
var checkResultsTx = db.createTransaction(['store']);
|
955
|
+
checkResultsTx.objectStore('store').getAll().addCallback(
|
956
|
+
function(results) {
|
957
|
+
assertEquals(0, results.length);
|
958
|
+
}).addErrback(failOnError);
|
959
|
+
|
960
|
+
goog.events.listen(checkResultsTx, ERROR, failOnErrorEvent);
|
961
|
+
goog.events.listen(checkResultsTx, COMPLETE, function() {
|
962
|
+
closeAndContinue(db);
|
963
|
+
});
|
964
|
+
});
|
965
|
+
});
|
966
|
+
}).addErrback(failOnError);
|
967
|
+
}
|
968
|
+
|
969
|
+
function testAbortTransaction() {
|
970
|
+
if (!idbSupported) {
|
971
|
+
return;
|
972
|
+
}
|
973
|
+
|
974
|
+
asyncTestCase.waitForAsync('abort transaction');
|
975
|
+
globalDb.branch().addCallback(addStore).addCallback(function(db) {
|
976
|
+
var abortTx = db.createTransaction(
|
977
|
+
['store'],
|
978
|
+
goog.db.Transaction.TransactionMode.READ_WRITE);
|
979
|
+
abortTx.objectStore('store').put('data', 'stuff').addCallback(function() {
|
980
|
+
abortTx.abort();
|
981
|
+
});
|
982
|
+
goog.events.listen(
|
983
|
+
abortTx,
|
984
|
+
goog.db.Transaction.EventTypes.ERROR,
|
985
|
+
failOnErrorEvent);
|
986
|
+
|
987
|
+
goog.events.listen(
|
988
|
+
abortTx,
|
989
|
+
goog.db.Transaction.EventTypes.COMPLETE,
|
990
|
+
function () {
|
991
|
+
fail('transaction shouldn\'t have completed after being aborted');
|
992
|
+
});
|
993
|
+
|
994
|
+
goog.events.listen(
|
995
|
+
abortTx,
|
996
|
+
goog.db.Transaction.EventTypes.ABORT,
|
997
|
+
function() {
|
998
|
+
var checkResultsTx = db.createTransaction(['store']);
|
999
|
+
checkResultsTx.objectStore('store').get('stuff').addCallback(
|
1000
|
+
function(result) {
|
1001
|
+
assertUndefined(result);
|
1002
|
+
});
|
1003
|
+
goog.events.listen(
|
1004
|
+
checkResultsTx,
|
1005
|
+
goog.db.Transaction.EventTypes.COMPLETE,
|
1006
|
+
function() {
|
1007
|
+
closeAndContinue(db);
|
1008
|
+
});
|
1009
|
+
});
|
1010
|
+
}).addErrback(failOnError);
|
1011
|
+
}
|
1012
|
+
|
1013
|
+
function testInactiveTransaction() {
|
1014
|
+
if (!idbSupported) {
|
1015
|
+
return;
|
1016
|
+
}
|
1017
|
+
|
1018
|
+
asyncTestCase.waitForAsync('inactive transaction');
|
1019
|
+
globalDb.branch().addCallback(addStoreWithIndex).addCallback(function(db) {
|
1020
|
+
var tx = db.createTransaction(
|
1021
|
+
['store'],
|
1022
|
+
goog.db.Transaction.TransactionMode.READ_WRITE);
|
1023
|
+
var store = tx.objectStore('store');
|
1024
|
+
var index = store.getIndex('index');
|
1025
|
+
store.put({key: 'something', value: 'anything'});
|
1026
|
+
goog.events.listen(tx, goog.db.Transaction.EventTypes.COMPLETE, function() {
|
1027
|
+
var expectedCode = goog.db.Error.ErrorName.TRANSACTION_INACTIVE_ERR;
|
1028
|
+
store.put({
|
1029
|
+
key: 'another',
|
1030
|
+
value: 'thing'
|
1031
|
+
}).addCallback(function() {
|
1032
|
+
fail('putting with inactive transaction should have failed');
|
1033
|
+
}).addErrback(function(err) {
|
1034
|
+
assertEquals(expectedCode, err.getName());
|
1035
|
+
});
|
1036
|
+
store.add({
|
1037
|
+
key: 'another',
|
1038
|
+
value: 'thing'
|
1039
|
+
}).addCallback(function() {
|
1040
|
+
fail('adding with inactive transaction should have failed');
|
1041
|
+
}).addErrback(function(err) {
|
1042
|
+
assertEquals(expectedCode, err.getName());
|
1043
|
+
});
|
1044
|
+
store.remove('something').addCallback(function() {
|
1045
|
+
fail('deleting with inactive transaction should have failed');
|
1046
|
+
}).addErrback(function(err) {
|
1047
|
+
assertEquals(expectedCode, err.getName());
|
1048
|
+
});
|
1049
|
+
store.get('something').addCallback(function() {
|
1050
|
+
fail('getting with inactive transaction should have failed');
|
1051
|
+
}).addErrback(function(err) {
|
1052
|
+
assertEquals(expectedCode, err.getName());
|
1053
|
+
});
|
1054
|
+
store.getAll().addCallback(function() {
|
1055
|
+
fail('getting all with inactive transaction should have failed');
|
1056
|
+
}).addErrback(function(err) {
|
1057
|
+
assertEquals(expectedCode, err.getName());
|
1058
|
+
});
|
1059
|
+
store.clear().addCallback(function() {
|
1060
|
+
fail('clearing all with inactive transaction should have failed');
|
1061
|
+
}).addErrback(function(err) {
|
1062
|
+
assertEquals(expectedCode, err.getName());
|
1063
|
+
});
|
1064
|
+
|
1065
|
+
index.get('anything').
|
1066
|
+
addCallback(function() {
|
1067
|
+
fail('getting from index with inactive transaction should have '
|
1068
|
+
+ 'failed');
|
1069
|
+
}).addErrback(function(err) {
|
1070
|
+
assertEquals(expectedCode, err.getName());
|
1071
|
+
});
|
1072
|
+
index.getKey('anything').
|
1073
|
+
addCallback(function() {
|
1074
|
+
fail('getting key from index with inactive transaction '
|
1075
|
+
+ 'should have failed');
|
1076
|
+
}).addErrback(function(err) {
|
1077
|
+
assertEquals(expectedCode, err.getName());
|
1078
|
+
});
|
1079
|
+
index.getAll('anything').
|
1080
|
+
addCallback(function() {
|
1081
|
+
fail('getting all from index with inactive transaction '
|
1082
|
+
+ 'should have failed');
|
1083
|
+
}).addErrback(function(err) {
|
1084
|
+
assertEquals(expectedCode, err.getName());
|
1085
|
+
});
|
1086
|
+
index.getAllKeys('anything').
|
1087
|
+
addCallback(function() {
|
1088
|
+
fail('getting all keys from index with inactive transaction '
|
1089
|
+
+ 'should have failed');
|
1090
|
+
}).addErrback(function(err) {
|
1091
|
+
assertEquals(expectedCode, err.getName());
|
1092
|
+
});
|
1093
|
+
closeAndContinue(db);
|
1094
|
+
});
|
1095
|
+
}).addErrback(failOnError);
|
1096
|
+
}
|
1097
|
+
|
1098
|
+
function testWrongTransactionMode() {
|
1099
|
+
if (!idbSupported) {
|
1100
|
+
return;
|
1101
|
+
}
|
1102
|
+
|
1103
|
+
asyncTestCase.waitForAsync('wrong transaction mode');
|
1104
|
+
globalDb.branch().addCallback(addStore).addCallback(function(db) {
|
1105
|
+
var tx = db.createTransaction(['store']);
|
1106
|
+
assertEquals(goog.db.Transaction.TransactionMode.READ_ONLY, tx.getMode());
|
1107
|
+
tx.objectStore('store').put('KABOOM!', 'anything').addCallback(function() {
|
1108
|
+
fail('putting should have failed');
|
1109
|
+
}).addErrback(function(err) {
|
1110
|
+
assertEquals(goog.db.Error.ErrorName.READ_ONLY_ERR, err.getName());
|
1111
|
+
});
|
1112
|
+
tx.objectStore('store').add('EXPLODE!', 'die').addCallback(function() {
|
1113
|
+
fail('adding should have failed');
|
1114
|
+
}).addErrback(function(err) {
|
1115
|
+
assertEquals(goog.db.Error.ErrorName.READ_ONLY_ERR, err.getName());
|
1116
|
+
});
|
1117
|
+
tx.objectStore('store').remove('no key', 'nothing').addCallback(function() {
|
1118
|
+
fail('deleting should have failed');
|
1119
|
+
}).addErrback(function(err) {
|
1120
|
+
assertEquals(goog.db.Error.ErrorName.READ_ONLY_ERR, err.getName());
|
1121
|
+
});
|
1122
|
+
closeAndContinue(db);
|
1123
|
+
}).addErrback(failOnError);
|
1124
|
+
}
|
1125
|
+
|
1126
|
+
function testManipulateIndexes() {
|
1127
|
+
if (!idbSupported) {
|
1128
|
+
return;
|
1129
|
+
}
|
1130
|
+
|
1131
|
+
asyncTestCase.waitForAsync('index manipulation');
|
1132
|
+
globalDb.branch().addCallback(function(db) {
|
1133
|
+
return incrementVersion(db, function(ev, db, tx) {
|
1134
|
+
var store = db.createObjectStore('store');
|
1135
|
+
store.createIndex('index', 'attr1');
|
1136
|
+
store.createIndex('uniqueIndex', 'attr2', {unique: true});
|
1137
|
+
store.createIndex('multirowIndex', 'attr3', {multirow: true});
|
1138
|
+
});
|
1139
|
+
}).addCallback(function(db) {
|
1140
|
+
var tx = db.createTransaction(['store']);
|
1141
|
+
var store = tx.objectStore('store');
|
1142
|
+
var index = store.getIndex('index');
|
1143
|
+
var uniqueIndex = store.getIndex('uniqueIndex');
|
1144
|
+
var multirowIndex = store.getIndex('multirowIndex');
|
1145
|
+
try {
|
1146
|
+
var dies = store.getIndex('diediedie');
|
1147
|
+
fail('getting non-existent index should have failed');
|
1148
|
+
} catch (err) {
|
1149
|
+
assertEquals(goog.db.Error.ErrorName.NOT_FOUND_ERR, err.getName());
|
1150
|
+
}
|
1151
|
+
|
1152
|
+
return tx.wait();
|
1153
|
+
}).addCallback(function(db) {
|
1154
|
+
return incrementVersion(db, function(ev, db, tx) {
|
1155
|
+
var store = tx.objectStore('store');
|
1156
|
+
store.deleteIndex('index');
|
1157
|
+
try {
|
1158
|
+
store.deleteIndex('diediedie');
|
1159
|
+
fail('deleting non-existent index should have failed');
|
1160
|
+
} catch (err) {
|
1161
|
+
assertEquals(goog.db.Error.ErrorName.NOT_FOUND_ERR, err.getName());
|
1162
|
+
}
|
1163
|
+
});
|
1164
|
+
}).addCallback(function(db) {
|
1165
|
+
var tx = db.createTransaction(['store']);
|
1166
|
+
var store = tx.objectStore('store');
|
1167
|
+
try {
|
1168
|
+
var index = store.getIndex('index');
|
1169
|
+
fail('getting deleted index should have failed');
|
1170
|
+
} catch (err) {
|
1171
|
+
assertEquals(goog.db.Error.ErrorName.NOT_FOUND_ERR, err.getName());
|
1172
|
+
}
|
1173
|
+
var uniqueIndex = store.getIndex('uniqueIndex');
|
1174
|
+
var multirowIndex = store.getIndex('multirowIndex');
|
1175
|
+
}).addCallback(closeAndContinue).addErrback(failOnError);
|
1176
|
+
}
|
1177
|
+
|
1178
|
+
function testAddRecordWithIndex() {
|
1179
|
+
if (!idbSupported) {
|
1180
|
+
return;
|
1181
|
+
}
|
1182
|
+
|
1183
|
+
asyncTestCase.waitForAsync('add record with index');
|
1184
|
+
globalDb.branch().addCallback(addStoreWithIndex).addCallback(function(db) {
|
1185
|
+
var COMPLETE = goog.db.Transaction.EventTypes.COMPLETE;
|
1186
|
+
var addTx = db.createTransaction(
|
1187
|
+
['store'],
|
1188
|
+
goog.db.Transaction.TransactionMode.READ_WRITE);
|
1189
|
+
var store = addTx.objectStore('store');
|
1190
|
+
assertFalse(store.getIndex('index').isUnique());
|
1191
|
+
assertEquals('value', store.getIndex('index').getKeyPath());
|
1192
|
+
store.add({key: 'someKey', value: 'lookUpThis'});
|
1193
|
+
|
1194
|
+
goog.events.listen(addTx, COMPLETE, function() {
|
1195
|
+
var checkResultsTx = db.createTransaction(['store']);
|
1196
|
+
var index = checkResultsTx.objectStore('store').getIndex('index');
|
1197
|
+
index.get('lookUpThis').addCallback(function(result) {
|
1198
|
+
assertNotUndefined(result);
|
1199
|
+
assertEquals('someKey', result.key);
|
1200
|
+
assertEquals('lookUpThis', result.value);
|
1201
|
+
});
|
1202
|
+
index.getKey('lookUpThis').addCallback(function(result) {
|
1203
|
+
assertNotUndefined(result);
|
1204
|
+
assertEquals('someKey', result);
|
1205
|
+
});
|
1206
|
+
goog.events.listen(
|
1207
|
+
checkResultsTx,
|
1208
|
+
goog.db.Transaction.EventTypes.ERROR,
|
1209
|
+
failOnErrorEvent);
|
1210
|
+
goog.events.listen(checkResultsTx, COMPLETE, function() {
|
1211
|
+
closeAndContinue(db);
|
1212
|
+
});
|
1213
|
+
});
|
1214
|
+
}).addErrback(failOnError);
|
1215
|
+
}
|
1216
|
+
|
1217
|
+
function testGetMultipleRecordsFromIndex() {
|
1218
|
+
if (!idbSupported) {
|
1219
|
+
return;
|
1220
|
+
}
|
1221
|
+
|
1222
|
+
asyncTestCase.waitForAsync('get multiple records from index');
|
1223
|
+
globalDb.branch().addCallback(addStoreWithIndex).addCallback(function(db) {
|
1224
|
+
var COMPLETE = goog.db.Transaction.EventTypes.COMPLETE;
|
1225
|
+
var addTx = db.createTransaction(
|
1226
|
+
['store'],
|
1227
|
+
goog.db.Transaction.TransactionMode.READ_WRITE);
|
1228
|
+
addTx.objectStore('store').add({key: '1', value: 'a'});
|
1229
|
+
addTx.objectStore('store').add({key: '2', value: 'a'});
|
1230
|
+
addTx.objectStore('store').add({key: '3', value: 'b'});
|
1231
|
+
// The following line breaks Chrome 14, but not Chrome 15:
|
1232
|
+
// addTx.objectStore('store').add({key: '4'});
|
1233
|
+
goog.events.listen(
|
1234
|
+
addTx,
|
1235
|
+
goog.db.Transaction.EventTypes.ERROR,
|
1236
|
+
failOnErrorEvent);
|
1237
|
+
|
1238
|
+
goog.events.listen(addTx, COMPLETE, function() {
|
1239
|
+
var checkResultsTx = db.createTransaction(['store']);
|
1240
|
+
var index = checkResultsTx.objectStore('store').getIndex('index');
|
1241
|
+
index.getAll().addCallback(function(results) {
|
1242
|
+
assertNotUndefined(results);
|
1243
|
+
assertEquals(3, results.length);
|
1244
|
+
});
|
1245
|
+
index.getAll('a').addCallback(function(results) {
|
1246
|
+
assertNotUndefined(results);
|
1247
|
+
assertEquals(2, results.length);
|
1248
|
+
});
|
1249
|
+
index.getAllKeys().addCallback(function(results) {
|
1250
|
+
assertNotUndefined(results);
|
1251
|
+
assertEquals(3, results.length);
|
1252
|
+
});
|
1253
|
+
index.getAllKeys('b').addCallback(function(results) {
|
1254
|
+
assertNotUndefined(results);
|
1255
|
+
assertEquals(1, results.length);
|
1256
|
+
});
|
1257
|
+
|
1258
|
+
goog.events.listen(
|
1259
|
+
checkResultsTx,
|
1260
|
+
goog.db.Transaction.EventTypes.ERROR,
|
1261
|
+
failOnErrorEvent);
|
1262
|
+
goog.events.listen(checkResultsTx, COMPLETE, function() {
|
1263
|
+
closeAndContinue(db);
|
1264
|
+
});
|
1265
|
+
});
|
1266
|
+
}).addErrback(failOnError);
|
1267
|
+
}
|
1268
|
+
|
1269
|
+
function testUniqueIndex() {
|
1270
|
+
if (!idbSupported) {
|
1271
|
+
return;
|
1272
|
+
}
|
1273
|
+
|
1274
|
+
asyncTestCase.waitForAsync('adding to unique index');
|
1275
|
+
globalDb.branch().addCallback(function(db) {
|
1276
|
+
return incrementVersion(db, function(ev, db, tx) {
|
1277
|
+
var store = db.createObjectStore('store', {keyPath: 'key'});
|
1278
|
+
store.createIndex('index', 'value', {unique: true});
|
1279
|
+
});
|
1280
|
+
}).addCallback(function(db) {
|
1281
|
+
var tx = db.createTransaction(
|
1282
|
+
['store'],
|
1283
|
+
goog.db.Transaction.TransactionMode.READ_WRITE);
|
1284
|
+
assertTrue(tx.objectStore('store').getIndex('index').isUnique());
|
1285
|
+
tx.objectStore('store').add({key: '1', value: 'a'});
|
1286
|
+
tx.objectStore('store').add({key: '2', value: 'a'});
|
1287
|
+
goog.events.listen(tx, goog.db.Transaction.EventTypes.ERROR, function(ev) {
|
1288
|
+
// expected
|
1289
|
+
assertTrue(
|
1290
|
+
"Expected DATA_ERR, CONSTRAINT_ERR, was ",
|
1291
|
+
// Chrome 21, 23+.
|
1292
|
+
goog.db.Error.ErrorName.CONSTRAINT_ERR == ev.target.getName() ||
|
1293
|
+
// Chrome 22.
|
1294
|
+
goog.db.Error.ErrorName.DATE_ERR == ev.target.getName());
|
1295
|
+
closeAndContinue(db);
|
1296
|
+
});
|
1297
|
+
}).addErrback(failOnError);
|
1298
|
+
}
|
1299
|
+
|
1300
|
+
function testDeleteDatabase() {
|
1301
|
+
if (!idbSupported) {
|
1302
|
+
return;
|
1303
|
+
}
|
1304
|
+
|
1305
|
+
asyncTestCase.waitForAsync('deleting database');
|
1306
|
+
globalDb.branch().addCallback(addStore).addCallback(function(db) {
|
1307
|
+
db.close();
|
1308
|
+
return goog.db.deleteDatabase(dbName, function() {
|
1309
|
+
fail("didn't expect deleteDatabase to be blocked");
|
1310
|
+
});
|
1311
|
+
}).addCallback(openDatabase).
|
1312
|
+
addCallback(assertStoreDoesntExist).
|
1313
|
+
addErrback(failOnError);
|
1314
|
+
}
|
1315
|
+
|
1316
|
+
function testDeleteDatabaseIsBlocked() {
|
1317
|
+
if (!idbSupported) {
|
1318
|
+
return;
|
1319
|
+
}
|
1320
|
+
|
1321
|
+
var wasBlocked = false;
|
1322
|
+
asyncTestCase.waitForAsync('deleting database (blocked)');
|
1323
|
+
globalDb.branch().addCallback(addStore).addCallback(function(db) {
|
1324
|
+
db.close();
|
1325
|
+
// Get a fresh connection, without any events registered on globalDb.
|
1326
|
+
return goog.db.openDatabase(dbName);
|
1327
|
+
}).addCallback(function(db) {
|
1328
|
+
return goog.db.deleteDatabase(dbName, function(ev) {
|
1329
|
+
wasBlocked = true;
|
1330
|
+
db.close();
|
1331
|
+
});
|
1332
|
+
}).addCallback(function() {
|
1333
|
+
assertTrue(wasBlocked);
|
1334
|
+
return openDatabase();
|
1335
|
+
}).addCallback(assertStoreDoesntExist).addErrback(failOnError);
|
1336
|
+
}
|
1337
|
+
|
1338
|
+
function testBlockedDeleteDatabaseWithVersionChangeEvent() {
|
1339
|
+
if (!idbSupported) {
|
1340
|
+
return;
|
1341
|
+
}
|
1342
|
+
|
1343
|
+
var gotVersionChange = false;
|
1344
|
+
asyncTestCase.waitForAsync('deleting database (blocked)');
|
1345
|
+
globalDb.branch().addCallback(addStore).addCallback(function(db) {
|
1346
|
+
db.close();
|
1347
|
+
// Get a fresh connection, without any events registered on globalDb.
|
1348
|
+
return goog.db.openDatabase(dbName);
|
1349
|
+
}).addCallback(function(db) {
|
1350
|
+
goog.events.listen(db, goog.db.IndexedDb.EventType.VERSION_CHANGE,
|
1351
|
+
function(ev) {
|
1352
|
+
gotVersionChange = true;
|
1353
|
+
db.close();
|
1354
|
+
});
|
1355
|
+
return goog.db.deleteDatabase(dbName);
|
1356
|
+
}).addCallback(function() {
|
1357
|
+
assertTrue(gotVersionChange);
|
1358
|
+
return openDatabase();
|
1359
|
+
}).addCallback(assertStoreDoesntExist);
|
1360
|
+
}
|
1361
|
+
|
1362
|
+
function testDeleteNonExistentDatabase() {
|
1363
|
+
if (!idbSupported) {
|
1364
|
+
return;
|
1365
|
+
}
|
1366
|
+
|
1367
|
+
// Deleting non-existent db is a no-op. Shall not throw anything.
|
1368
|
+
asyncTestCase.waitForAsync('check delete non-existent db');
|
1369
|
+
globalDb.branch().addCallback(function(db) {
|
1370
|
+
db.close();
|
1371
|
+
return goog.db.deleteDatabase('non-existent-db');
|
1372
|
+
}).addCallbacks(function() {
|
1373
|
+
asyncTestCase.continueTesting();
|
1374
|
+
}, failOnError);
|
1375
|
+
}
|
1376
|
+
|
1377
|
+
function testObjectStoreCountAll() {
|
1378
|
+
if (!idbSupported) {
|
1379
|
+
return;
|
1380
|
+
}
|
1381
|
+
|
1382
|
+
var values = ['1', '2', '3', '4'];
|
1383
|
+
var keys = ['a', 'b', 'c', 'd'];
|
1384
|
+
|
1385
|
+
var addData = goog.partial(populateStore, values, keys);
|
1386
|
+
var checkCountAll = function(db) {
|
1387
|
+
var tx = db.createTransaction(['store']);
|
1388
|
+
var store = tx.objectStore('store');
|
1389
|
+
return store.count().addCallbacks(function(count) {
|
1390
|
+
assertEquals(values.length, count);
|
1391
|
+
tx.dispose();
|
1392
|
+
closeAndContinue(db);
|
1393
|
+
}, function(e) {
|
1394
|
+
tx.dispose();
|
1395
|
+
db.close();
|
1396
|
+
failOnError(e);
|
1397
|
+
});
|
1398
|
+
};
|
1399
|
+
|
1400
|
+
asyncTestCase.waitForAsync('testObjectStoreCountAll');
|
1401
|
+
globalDb.branch().addCallbacks(addStore, failOnError).
|
1402
|
+
addCallback(addData).
|
1403
|
+
addCallback(checkCountAll);
|
1404
|
+
}
|
1405
|
+
|
1406
|
+
function testObjectStoreCountSome() {
|
1407
|
+
if (!idbSupported) {
|
1408
|
+
return;
|
1409
|
+
}
|
1410
|
+
|
1411
|
+
var values = ['1', '2', '3', '4'];
|
1412
|
+
var keys = ['a', 'b', 'c', 'd'];
|
1413
|
+
|
1414
|
+
var addData = goog.partial(populateStore, values, keys);
|
1415
|
+
var checkCountSome = function(db) {
|
1416
|
+
var tx = db.createTransaction(['store']);
|
1417
|
+
var store = tx.objectStore('store');
|
1418
|
+
return store.count(goog.db.KeyRange.bound('b', 'c')).addCallbacks(
|
1419
|
+
function(count) {
|
1420
|
+
assertEquals(2, count);
|
1421
|
+
tx.dispose();
|
1422
|
+
closeAndContinue(db);
|
1423
|
+
}, function(e) {
|
1424
|
+
tx.dispose();
|
1425
|
+
db.close();
|
1426
|
+
failOnError(e);
|
1427
|
+
});
|
1428
|
+
};
|
1429
|
+
|
1430
|
+
asyncTestCase.waitForAsync('testObjectStoreCountSome');
|
1431
|
+
globalDb.branch().addCallbacks(addStore, failOnError).
|
1432
|
+
addCallback(addData).
|
1433
|
+
addCallback(checkCountSome);
|
1434
|
+
}
|
1435
|
+
|
1436
|
+
function testIndexCursorGet() {
|
1437
|
+
if (!idbSupported) {
|
1438
|
+
return;
|
1439
|
+
}
|
1440
|
+
|
1441
|
+
var values = ['1', '2', '3', '4'];
|
1442
|
+
var keys = ['a', 'b', 'c', 'd'];
|
1443
|
+
|
1444
|
+
var addData = goog.partial(populateStoreWithObjects, values, keys);
|
1445
|
+
|
1446
|
+
// Open the cursor over range ['b', 'c'], move in backwards direction.
|
1447
|
+
var openCursorAndCheck = function(db) {
|
1448
|
+
var cursorTx = db.createTransaction(['store']);
|
1449
|
+
var store = cursorTx.objectStore('store');
|
1450
|
+
var index = store.getIndex('index');
|
1451
|
+
var values = [];
|
1452
|
+
var keys = [];
|
1453
|
+
|
1454
|
+
var txDeferred = new goog.async.Deferred();
|
1455
|
+
goog.events.listen(
|
1456
|
+
cursorTx, goog.db.Transaction.EventTypes.ERROR, failOnError);
|
1457
|
+
goog.events.listen(
|
1458
|
+
cursorTx, goog.db.Transaction.EventTypes.COMPLETE,
|
1459
|
+
function() {
|
1460
|
+
txDeferred.callback();
|
1461
|
+
});
|
1462
|
+
|
1463
|
+
var cursorDeferred = new goog.async.Deferred();
|
1464
|
+
var cursor = index.openCursor(
|
1465
|
+
goog.db.KeyRange.bound('2', '3'),
|
1466
|
+
goog.db.Cursor.Direction.PREV);
|
1467
|
+
|
1468
|
+
var key = goog.events.listen(
|
1469
|
+
cursor, goog.db.Cursor.EventType.NEW_DATA,
|
1470
|
+
function() {
|
1471
|
+
values.push(cursor.getValue()['value']);
|
1472
|
+
keys.push(cursor.getValue()['key']);
|
1473
|
+
cursor.next();
|
1474
|
+
});
|
1475
|
+
|
1476
|
+
goog.events.listenOnce(
|
1477
|
+
cursor,
|
1478
|
+
[goog.db.Cursor.EventType.COMPLETE, goog.db.Cursor.EventType.ERROR],
|
1479
|
+
function(evt) {
|
1480
|
+
goog.events.unlistenByKey(key);
|
1481
|
+
if (evt.type == goog.db.Cursor.EventType.COMPLETE) {
|
1482
|
+
cursorDeferred.callback(db);
|
1483
|
+
} else {
|
1484
|
+
cursorDeferred.errback();
|
1485
|
+
}
|
1486
|
+
});
|
1487
|
+
|
1488
|
+
goog.async.DeferredList.gatherResults(
|
1489
|
+
[cursorDeferred, txDeferred]).addCallback(
|
1490
|
+
function(results) {
|
1491
|
+
goog.events.unlistenByKey(key);
|
1492
|
+
var db = results[0];
|
1493
|
+
assertArrayEquals(['3', '2'], values);
|
1494
|
+
assertArrayEquals(['c', 'b'], keys);
|
1495
|
+
closeAndContinue(db);
|
1496
|
+
});
|
1497
|
+
};
|
1498
|
+
|
1499
|
+
asyncTestCase.waitForAsync('testIndexCursorGet');
|
1500
|
+
globalDb.branch().addCallbacks(addStoreWithIndex, failOnError).
|
1501
|
+
addCallback(addData).
|
1502
|
+
addCallback(openCursorAndCheck);
|
1503
|
+
}
|
1504
|
+
|
1505
|
+
function testIndexCursorReplace() {
|
1506
|
+
if (!idbSupported) {
|
1507
|
+
return;
|
1508
|
+
}
|
1509
|
+
|
1510
|
+
var values = ['1', '2', '3', '4'];
|
1511
|
+
var keys = ['a', 'b', 'c', 'd'];
|
1512
|
+
|
1513
|
+
var addData = goog.partial(populateStoreWithObjects, values, keys);
|
1514
|
+
|
1515
|
+
// Store should contain ['1', '2', '5', '4'] after replacement.
|
1516
|
+
var checkStore = goog.partial(assertStoreObjectValues, ['1', '2', '5', '4']);
|
1517
|
+
|
1518
|
+
// Use a bounded cursor for ['3', '4') to update value '3' -> '5'.
|
1519
|
+
var openCursorAndReplace = function(db) {
|
1520
|
+
var d = new goog.async.Deferred();
|
1521
|
+
var cursorTx = db.createTransaction(
|
1522
|
+
['store'],
|
1523
|
+
goog.db.Transaction.TransactionMode.READ_WRITE);
|
1524
|
+
|
1525
|
+
var txDeferred = new goog.async.Deferred();
|
1526
|
+
goog.events.listen(
|
1527
|
+
cursorTx, goog.db.Transaction.EventTypes.ERROR, failOnError);
|
1528
|
+
goog.events.listen(
|
1529
|
+
cursorTx, goog.db.Transaction.EventTypes.COMPLETE,
|
1530
|
+
function() {
|
1531
|
+
txDeferred.callback();
|
1532
|
+
});
|
1533
|
+
|
1534
|
+
var store = cursorTx.objectStore('store');
|
1535
|
+
var index = store.getIndex('index');
|
1536
|
+
var cursorDeferred = new goog.async.Deferred();
|
1537
|
+
var cursor = index.openCursor(
|
1538
|
+
goog.db.KeyRange.bound('3', '4', false, true));
|
1539
|
+
|
1540
|
+
var key = goog.events.listen(
|
1541
|
+
cursor, goog.db.Cursor.EventType.NEW_DATA,
|
1542
|
+
function() {
|
1543
|
+
assertEquals('3', cursor.getValue()['value']);
|
1544
|
+
cursor.update(
|
1545
|
+
{
|
1546
|
+
'key': cursor.getValue()['key'],
|
1547
|
+
'value': '5'
|
1548
|
+
}).addCallback(function() {
|
1549
|
+
cursor.next();
|
1550
|
+
}).addErrback(failOnError);
|
1551
|
+
});
|
1552
|
+
|
1553
|
+
goog.events.listenOnce(
|
1554
|
+
cursor,
|
1555
|
+
[goog.db.Cursor.EventType.COMPLETE, goog.db.Cursor.EventType.ERROR],
|
1556
|
+
function(evt) {
|
1557
|
+
goog.events.unlistenByKey(key);
|
1558
|
+
if (evt.type == goog.db.Cursor.EventType.COMPLETE) {
|
1559
|
+
cursorDeferred.callback(db);
|
1560
|
+
} else {
|
1561
|
+
cursorDeferred.errback();
|
1562
|
+
}
|
1563
|
+
});
|
1564
|
+
|
1565
|
+
goog.async.DeferredList.gatherResults(
|
1566
|
+
[cursorDeferred, txDeferred]).addCallbacks(
|
1567
|
+
function(results) {
|
1568
|
+
goog.events.unlistenByKey(key);
|
1569
|
+
d.callback(results[0]);
|
1570
|
+
}, failOnError);
|
1571
|
+
|
1572
|
+
return d;
|
1573
|
+
};
|
1574
|
+
|
1575
|
+
// Setup and execute test case.
|
1576
|
+
asyncTestCase.waitForAsync('replacing value by cursor');
|
1577
|
+
globalDb.branch().addCallbacks(addStoreWithIndex, failOnError).
|
1578
|
+
addCallback(addData).
|
1579
|
+
addCallback(openCursorAndReplace).
|
1580
|
+
addCallback(checkStore);
|
1581
|
+
}
|
1582
|
+
|
1583
|
+
function testIndexCursorRemove() {
|
1584
|
+
if (!idbSupported) {
|
1585
|
+
return;
|
1586
|
+
}
|
1587
|
+
|
1588
|
+
var values = ['1', '2', '3', '4'];
|
1589
|
+
var keys = ['a', 'b', 'c', 'd'];
|
1590
|
+
|
1591
|
+
var addData = goog.partial(populateStoreWithObjects, values, keys);
|
1592
|
+
|
1593
|
+
// Store should contain ['1', '2'] after removing elements.
|
1594
|
+
var checkStore = goog.partial(assertStoreObjectValues, ['1', '2']);
|
1595
|
+
|
1596
|
+
// Use a bounded cursor for ('2', ...) to remove '3', '4'.
|
1597
|
+
var openCursorAndRemove = function(db) {
|
1598
|
+
var d = new goog.async.Deferred();
|
1599
|
+
var cursorTx = db.createTransaction(
|
1600
|
+
['store'],
|
1601
|
+
goog.db.Transaction.TransactionMode.READ_WRITE);
|
1602
|
+
|
1603
|
+
var txDeferred = new goog.async.Deferred();
|
1604
|
+
goog.events.listen(
|
1605
|
+
cursorTx, goog.db.Transaction.EventTypes.ERROR, failOnError);
|
1606
|
+
goog.events.listen(
|
1607
|
+
cursorTx, goog.db.Transaction.EventTypes.COMPLETE,
|
1608
|
+
function() {
|
1609
|
+
txDeferred.callback();
|
1610
|
+
});
|
1611
|
+
|
1612
|
+
|
1613
|
+
var store = cursorTx.objectStore('store');
|
1614
|
+
var index = store.getIndex('index');
|
1615
|
+
var cursorDeferred = new goog.async.Deferred();
|
1616
|
+
var cursor = index.openCursor(goog.db.KeyRange.lowerBound('2', true));
|
1617
|
+
|
1618
|
+
var key = goog.events.listen(
|
1619
|
+
cursor, goog.db.Cursor.EventType.NEW_DATA,
|
1620
|
+
function() {
|
1621
|
+
cursor.remove('5').addCallback(function() {
|
1622
|
+
cursor.next();
|
1623
|
+
}).addErrback(failOnError);
|
1624
|
+
});
|
1625
|
+
|
1626
|
+
goog.events.listenOnce(
|
1627
|
+
cursor,
|
1628
|
+
[goog.db.Cursor.EventType.COMPLETE, goog.db.Cursor.EventType.ERROR],
|
1629
|
+
function(evt) {
|
1630
|
+
goog.events.unlistenByKey(key);
|
1631
|
+
if (evt.type == goog.db.Cursor.EventType.COMPLETE) {
|
1632
|
+
cursorDeferred.callback(db);
|
1633
|
+
} else {
|
1634
|
+
cursorDeferred.errback();
|
1635
|
+
}
|
1636
|
+
});
|
1637
|
+
|
1638
|
+
goog.async.DeferredList.gatherResults(
|
1639
|
+
[cursorDeferred, txDeferred]).addCallbacks(
|
1640
|
+
function(results) {
|
1641
|
+
goog.events.unlistenByKey(key);
|
1642
|
+
d.callback(results[0]);
|
1643
|
+
}, failOnError);
|
1644
|
+
|
1645
|
+
return d;
|
1646
|
+
};
|
1647
|
+
|
1648
|
+
// Setup and execute test case.
|
1649
|
+
asyncTestCase.waitForAsync('removing value by cursor');
|
1650
|
+
globalDb.branch().addCallbacks(addStoreWithIndex, failOnError).
|
1651
|
+
addCallback(addData).
|
1652
|
+
addCallback(openCursorAndRemove).
|
1653
|
+
addCallback(checkStore);
|
1654
|
+
}
|
1655
|
+
</script>
|
1656
|
+
</body>
|
1657
|
+
</html>
|