k4compiler 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,23 @@
|
|
|
1
|
+
// Copyright 2009 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
|
+
// All Rights Reserved
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @fileoverview File #1 of module A.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
goog.provide('goog.module.testdata.modA_1');
|
|
21
|
+
|
|
22
|
+
if (window.modA1Loaded) throw Error('modA_1 loaded twice');
|
|
23
|
+
window.modA1Loaded = true;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Copyright 2009 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
|
+
// All Rights Reserved
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @fileoverview File #2 of module A.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
goog.provide('goog.module.testdata.modA_2');
|
|
21
|
+
|
|
22
|
+
goog.require('goog.module.ModuleManager');
|
|
23
|
+
|
|
24
|
+
if (window.modA2Loaded) throw Error('modA_2 loaded twice');
|
|
25
|
+
window.modA2Loaded = true;
|
|
26
|
+
|
|
27
|
+
goog.module.ModuleManager.getInstance().setLoaded('modA');
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Copyright 2009 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
|
+
// All Rights Reserved
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @fileoverview File #1 of module B.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
goog.provide('goog.module.testdata.modB_1');
|
|
21
|
+
|
|
22
|
+
goog.require('goog.module.ModuleManager');
|
|
23
|
+
|
|
24
|
+
function throwErrorInModuleB() {
|
|
25
|
+
throw Error();
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (window.modB1Loaded) throw Error('modB_1 loaded twice');
|
|
29
|
+
window.modB1Loaded = true;
|
|
30
|
+
|
|
31
|
+
goog.module.ModuleManager.getInstance().setLoaded('modB');
|
|
@@ -0,0 +1,2757 @@
|
|
|
1
|
+
// Copyright 2006 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 Definition of the BrowserChannel class. A BrowserChannel
|
|
17
|
+
* simulates a bidirectional socket over HTTP. It is the basis of the
|
|
18
|
+
* Gmail Chat IM connections to the server.
|
|
19
|
+
*
|
|
20
|
+
* Typical usage will look like
|
|
21
|
+
* var handler = [handler object];
|
|
22
|
+
* var channel = new BrowserChannel(clientVersion);
|
|
23
|
+
* channel.setHandler(handler);
|
|
24
|
+
* channel.connect('channel/test', 'channel/bind');
|
|
25
|
+
*
|
|
26
|
+
* See goog.net.BrowserChannel.Handler for the handler interface.
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
goog.provide('goog.net.BrowserChannel');
|
|
32
|
+
goog.provide('goog.net.BrowserChannel.Error');
|
|
33
|
+
goog.provide('goog.net.BrowserChannel.Event');
|
|
34
|
+
goog.provide('goog.net.BrowserChannel.Handler');
|
|
35
|
+
goog.provide('goog.net.BrowserChannel.LogSaver');
|
|
36
|
+
goog.provide('goog.net.BrowserChannel.QueuedMap');
|
|
37
|
+
goog.provide('goog.net.BrowserChannel.ServerReachability');
|
|
38
|
+
goog.provide('goog.net.BrowserChannel.ServerReachabilityEvent');
|
|
39
|
+
goog.provide('goog.net.BrowserChannel.Stat');
|
|
40
|
+
goog.provide('goog.net.BrowserChannel.StatEvent');
|
|
41
|
+
goog.provide('goog.net.BrowserChannel.State');
|
|
42
|
+
goog.provide('goog.net.BrowserChannel.TimingEvent');
|
|
43
|
+
|
|
44
|
+
goog.require('goog.Uri');
|
|
45
|
+
goog.require('goog.array');
|
|
46
|
+
goog.require('goog.asserts');
|
|
47
|
+
goog.require('goog.debug.TextFormatter');
|
|
48
|
+
goog.require('goog.events.Event');
|
|
49
|
+
goog.require('goog.events.EventTarget');
|
|
50
|
+
goog.require('goog.json');
|
|
51
|
+
goog.require('goog.json.EvalJsonProcessor');
|
|
52
|
+
goog.require('goog.log');
|
|
53
|
+
goog.require('goog.net.BrowserTestChannel');
|
|
54
|
+
goog.require('goog.net.ChannelDebug');
|
|
55
|
+
goog.require('goog.net.ChannelRequest');
|
|
56
|
+
goog.require('goog.net.XhrIo');
|
|
57
|
+
goog.require('goog.net.tmpnetwork');
|
|
58
|
+
goog.require('goog.string');
|
|
59
|
+
goog.require('goog.structs');
|
|
60
|
+
goog.require('goog.structs.CircularBuffer');
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Encapsulates the logic for a single BrowserChannel.
|
|
66
|
+
*
|
|
67
|
+
* @param {string=} opt_clientVersion An application-specific version number
|
|
68
|
+
* that is sent to the server when connected.
|
|
69
|
+
* @param {Array.<string>=} opt_firstTestResults Previously determined results
|
|
70
|
+
* of the first browser channel test.
|
|
71
|
+
* @param {boolean=} opt_secondTestResults Previously determined results
|
|
72
|
+
* of the second browser channel test.
|
|
73
|
+
* @constructor
|
|
74
|
+
*/
|
|
75
|
+
goog.net.BrowserChannel = function(opt_clientVersion, opt_firstTestResults,
|
|
76
|
+
opt_secondTestResults) {
|
|
77
|
+
/**
|
|
78
|
+
* The application specific version that is passed to the server.
|
|
79
|
+
* @type {?string}
|
|
80
|
+
* @private
|
|
81
|
+
*/
|
|
82
|
+
this.clientVersion_ = opt_clientVersion || null;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* The current state of the BrowserChannel. It should be one of the
|
|
86
|
+
* goog.net.BrowserChannel.State constants.
|
|
87
|
+
* @type {!goog.net.BrowserChannel.State}
|
|
88
|
+
* @private
|
|
89
|
+
*/
|
|
90
|
+
this.state_ = goog.net.BrowserChannel.State.INIT;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* An array of queued maps that need to be sent to the server.
|
|
94
|
+
* @type {Array.<goog.net.BrowserChannel.QueuedMap>}
|
|
95
|
+
* @private
|
|
96
|
+
*/
|
|
97
|
+
this.outgoingMaps_ = [];
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* An array of dequeued maps that we have either received a non-successful
|
|
101
|
+
* response for, or no response at all, and which therefore may or may not
|
|
102
|
+
* have been received by the server.
|
|
103
|
+
* @type {Array.<goog.net.BrowserChannel.QueuedMap>}
|
|
104
|
+
* @private
|
|
105
|
+
*/
|
|
106
|
+
this.pendingMaps_ = [];
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* The channel debug used for browserchannel logging
|
|
110
|
+
* @type {!goog.net.ChannelDebug}
|
|
111
|
+
* @private
|
|
112
|
+
*/
|
|
113
|
+
this.channelDebug_ = new goog.net.ChannelDebug();
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Parser for a response payload. Defaults to use
|
|
117
|
+
* {@code goog.json.unsafeParse}. The parser should return an array.
|
|
118
|
+
* @type {!goog.string.Parser}
|
|
119
|
+
* @private
|
|
120
|
+
*/
|
|
121
|
+
this.parser_ = new goog.json.EvalJsonProcessor(null, true);
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* An array of results for the first browser channel test call.
|
|
125
|
+
* @type {Array.<string>}
|
|
126
|
+
* @private
|
|
127
|
+
*/
|
|
128
|
+
this.firstTestResults_ = opt_firstTestResults || null;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* The results of the second browser channel test. True implies the
|
|
132
|
+
* connection is buffered, False means unbuffered, null means that
|
|
133
|
+
* the results are not available.
|
|
134
|
+
* @private
|
|
135
|
+
*/
|
|
136
|
+
this.secondTestResults_ = goog.isDefAndNotNull(opt_secondTestResults) ?
|
|
137
|
+
opt_secondTestResults : null;
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Simple container class for a (mapId, map) pair.
|
|
144
|
+
* @param {number} mapId The id for this map.
|
|
145
|
+
* @param {Object|goog.structs.Map} map The map itself.
|
|
146
|
+
* @param {Object=} opt_context The context associated with the map.
|
|
147
|
+
* @constructor
|
|
148
|
+
*/
|
|
149
|
+
goog.net.BrowserChannel.QueuedMap = function(mapId, map, opt_context) {
|
|
150
|
+
/**
|
|
151
|
+
* The id for this map.
|
|
152
|
+
* @type {number}
|
|
153
|
+
*/
|
|
154
|
+
this.mapId = mapId;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* The map itself.
|
|
158
|
+
* @type {Object|goog.structs.Map}
|
|
159
|
+
*/
|
|
160
|
+
this.map = map;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* The context for the map.
|
|
164
|
+
* @type {Object}
|
|
165
|
+
*/
|
|
166
|
+
this.context = opt_context || null;
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Extra HTTP headers to add to all the requests sent to the server.
|
|
172
|
+
* @type {Object}
|
|
173
|
+
* @private
|
|
174
|
+
*/
|
|
175
|
+
goog.net.BrowserChannel.prototype.extraHeaders_ = null;
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Extra parameters to add to all the requests sent to the server.
|
|
180
|
+
* @type {Object}
|
|
181
|
+
* @private
|
|
182
|
+
*/
|
|
183
|
+
goog.net.BrowserChannel.prototype.extraParams_ = null;
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* The current ChannelRequest object for the forwardchannel.
|
|
188
|
+
* @type {goog.net.ChannelRequest?}
|
|
189
|
+
* @private
|
|
190
|
+
*/
|
|
191
|
+
goog.net.BrowserChannel.prototype.forwardChannelRequest_ = null;
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* The ChannelRequest object for the backchannel.
|
|
196
|
+
* @type {goog.net.ChannelRequest?}
|
|
197
|
+
* @private
|
|
198
|
+
*/
|
|
199
|
+
goog.net.BrowserChannel.prototype.backChannelRequest_ = null;
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* The relative path (in the context of the the page hosting the browser
|
|
204
|
+
* channel) for making requests to the server.
|
|
205
|
+
* @type {?string}
|
|
206
|
+
* @private
|
|
207
|
+
*/
|
|
208
|
+
goog.net.BrowserChannel.prototype.path_ = null;
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* The absolute URI for the forwardchannel request.
|
|
213
|
+
* @type {goog.Uri}
|
|
214
|
+
* @private
|
|
215
|
+
*/
|
|
216
|
+
goog.net.BrowserChannel.prototype.forwardChannelUri_ = null;
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* The absolute URI for the backchannel request.
|
|
221
|
+
* @type {goog.Uri}
|
|
222
|
+
* @private
|
|
223
|
+
*/
|
|
224
|
+
goog.net.BrowserChannel.prototype.backChannelUri_ = null;
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* A subdomain prefix for using a subdomain in IE for the backchannel
|
|
229
|
+
* requests.
|
|
230
|
+
* @type {?string}
|
|
231
|
+
* @private
|
|
232
|
+
*/
|
|
233
|
+
goog.net.BrowserChannel.prototype.hostPrefix_ = null;
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Whether we allow the use of a subdomain in IE for the backchannel requests.
|
|
238
|
+
* @private
|
|
239
|
+
*/
|
|
240
|
+
goog.net.BrowserChannel.prototype.allowHostPrefix_ = true;
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* The next id to use for the RID (request identifier) parameter. This
|
|
245
|
+
* identifier uniquely identifies the forward channel request.
|
|
246
|
+
* @type {number}
|
|
247
|
+
* @private
|
|
248
|
+
*/
|
|
249
|
+
goog.net.BrowserChannel.prototype.nextRid_ = 0;
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* The id to use for the next outgoing map. This identifier uniquely
|
|
254
|
+
* identifies a sent map.
|
|
255
|
+
* @type {number}
|
|
256
|
+
* @private
|
|
257
|
+
*/
|
|
258
|
+
goog.net.BrowserChannel.prototype.nextMapId_ = 0;
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Whether to fail forward-channel requests after one try, or after a few tries.
|
|
263
|
+
* @type {boolean}
|
|
264
|
+
* @private
|
|
265
|
+
*/
|
|
266
|
+
goog.net.BrowserChannel.prototype.failFast_ = false;
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* The handler that receive callbacks for state changes and data.
|
|
271
|
+
* @type {goog.net.BrowserChannel.Handler}
|
|
272
|
+
* @private
|
|
273
|
+
*/
|
|
274
|
+
goog.net.BrowserChannel.prototype.handler_ = null;
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Timer identifier for asynchronously making a forward channel request.
|
|
279
|
+
* @type {?number}
|
|
280
|
+
* @private
|
|
281
|
+
*/
|
|
282
|
+
goog.net.BrowserChannel.prototype.forwardChannelTimerId_ = null;
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Timer identifier for asynchronously making a back channel request.
|
|
287
|
+
* @type {?number}
|
|
288
|
+
* @private
|
|
289
|
+
*/
|
|
290
|
+
goog.net.BrowserChannel.prototype.backChannelTimerId_ = null;
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Timer identifier for the timer that waits for us to retry the backchannel in
|
|
295
|
+
* the case where it is dead and no longer receiving data.
|
|
296
|
+
* @type {?number}
|
|
297
|
+
* @private
|
|
298
|
+
*/
|
|
299
|
+
goog.net.BrowserChannel.prototype.deadBackChannelTimerId_ = null;
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* The BrowserTestChannel object which encapsulates the logic for determining
|
|
304
|
+
* interesting network conditions about the client.
|
|
305
|
+
* @type {goog.net.BrowserTestChannel?}
|
|
306
|
+
* @private
|
|
307
|
+
*/
|
|
308
|
+
goog.net.BrowserChannel.prototype.connectionTest_ = null;
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Whether the client's network conditions can support chunked responses.
|
|
313
|
+
* @type {?boolean}
|
|
314
|
+
* @private
|
|
315
|
+
*/
|
|
316
|
+
goog.net.BrowserChannel.prototype.useChunked_ = null;
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Whether chunked mode is allowed. In certain debugging situations, it's
|
|
321
|
+
* useful to disable this.
|
|
322
|
+
* @private
|
|
323
|
+
*/
|
|
324
|
+
goog.net.BrowserChannel.prototype.allowChunkedMode_ = true;
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* The array identifier of the last array received from the server for the
|
|
329
|
+
* backchannel request.
|
|
330
|
+
* @type {number}
|
|
331
|
+
* @private
|
|
332
|
+
*/
|
|
333
|
+
goog.net.BrowserChannel.prototype.lastArrayId_ = -1;
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* The array identifier of the last array sent by the server that we know about.
|
|
338
|
+
* @type {number}
|
|
339
|
+
* @private
|
|
340
|
+
*/
|
|
341
|
+
goog.net.BrowserChannel.prototype.lastPostResponseArrayId_ = -1;
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* The last status code received.
|
|
346
|
+
* @type {number}
|
|
347
|
+
* @private
|
|
348
|
+
*/
|
|
349
|
+
goog.net.BrowserChannel.prototype.lastStatusCode_ = -1;
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Number of times we have retried the current forward channel request.
|
|
354
|
+
* @type {number}
|
|
355
|
+
* @private
|
|
356
|
+
*/
|
|
357
|
+
goog.net.BrowserChannel.prototype.forwardChannelRetryCount_ = 0;
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Number of times it a row that we have retried the current back channel
|
|
362
|
+
* request and received no data.
|
|
363
|
+
* @type {number}
|
|
364
|
+
* @private
|
|
365
|
+
*/
|
|
366
|
+
goog.net.BrowserChannel.prototype.backChannelRetryCount_ = 0;
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* The attempt id for the current back channel request. Starts at 1 and
|
|
371
|
+
* increments for each reconnect. The server uses this to log if our connection
|
|
372
|
+
* is flaky or not.
|
|
373
|
+
* @type {number}
|
|
374
|
+
* @private
|
|
375
|
+
*/
|
|
376
|
+
goog.net.BrowserChannel.prototype.backChannelAttemptId_;
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* The base part of the time before firing next retry request. Default is 5
|
|
381
|
+
* seconds. Note that a random delay is added (see {@link retryDelaySeedMs_})
|
|
382
|
+
* for all retries, and linear backoff is applied to the sum for subsequent
|
|
383
|
+
* retries.
|
|
384
|
+
* @type {number}
|
|
385
|
+
* @private
|
|
386
|
+
*/
|
|
387
|
+
goog.net.BrowserChannel.prototype.baseRetryDelayMs_ = 5 * 1000;
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* A random time between 0 and this number of MS is added to the
|
|
392
|
+
* {@link baseRetryDelayMs_}. Default is 10 seconds.
|
|
393
|
+
* @type {number}
|
|
394
|
+
* @private
|
|
395
|
+
*/
|
|
396
|
+
goog.net.BrowserChannel.prototype.retryDelaySeedMs_ = 10 * 1000;
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* Maximum number of attempts to connect to the server for forward channel
|
|
401
|
+
* requests. Defaults to 2.
|
|
402
|
+
* @type {number}
|
|
403
|
+
* @private
|
|
404
|
+
*/
|
|
405
|
+
goog.net.BrowserChannel.prototype.forwardChannelMaxRetries_ = 2;
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* The timeout in milliseconds for a forward channel request. Defaults to 20
|
|
410
|
+
* seconds. Note that part of this timeout can be randomized.
|
|
411
|
+
* @type {number}
|
|
412
|
+
* @private
|
|
413
|
+
*/
|
|
414
|
+
goog.net.BrowserChannel.prototype.forwardChannelRequestTimeoutMs_ = 20 * 1000;
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* A throttle time in ms for readystatechange events for the backchannel.
|
|
419
|
+
* Useful for throttling when ready state is INTERACTIVE (partial data).
|
|
420
|
+
*
|
|
421
|
+
* This throttle is useful if the server sends large data chunks down the
|
|
422
|
+
* backchannel. It prevents examining XHR partial data on every
|
|
423
|
+
* readystate change event. This is useful because large chunks can
|
|
424
|
+
* trigger hundreds of readystatechange events, each of which takes ~5ms
|
|
425
|
+
* or so to handle, in turn making the UI unresponsive for a significant period.
|
|
426
|
+
*
|
|
427
|
+
* If set to zero no throttle is used.
|
|
428
|
+
* @type {number}
|
|
429
|
+
* @private
|
|
430
|
+
*/
|
|
431
|
+
goog.net.BrowserChannel.prototype.readyStateChangeThrottleMs_ = 0;
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Whether cross origin requests are supported for the browser channel.
|
|
436
|
+
*
|
|
437
|
+
* See {@link goog.net.XhrIo#setWithCredentials}.
|
|
438
|
+
* @type {boolean}
|
|
439
|
+
* @private
|
|
440
|
+
*/
|
|
441
|
+
goog.net.BrowserChannel.prototype.supportsCrossDomainXhrs_ = false;
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* The latest protocol version that this class supports. We request this version
|
|
446
|
+
* from the server when opening the connection. Should match
|
|
447
|
+
* com.google.net.browserchannel.BrowserChannel.LATEST_CHANNEL_VERSION.
|
|
448
|
+
* @type {number}
|
|
449
|
+
*/
|
|
450
|
+
goog.net.BrowserChannel.LATEST_CHANNEL_VERSION = 8;
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* The channel version that we negotiated with the server for this session.
|
|
455
|
+
* Starts out as the version we request, and then is changed to the negotiated
|
|
456
|
+
* version after the initial open.
|
|
457
|
+
* @type {number}
|
|
458
|
+
* @private
|
|
459
|
+
*/
|
|
460
|
+
goog.net.BrowserChannel.prototype.channelVersion_ =
|
|
461
|
+
goog.net.BrowserChannel.LATEST_CHANNEL_VERSION;
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* Enum type for the browser channel state machine.
|
|
466
|
+
* @enum {number}
|
|
467
|
+
*/
|
|
468
|
+
goog.net.BrowserChannel.State = {
|
|
469
|
+
/** The channel is closed. */
|
|
470
|
+
CLOSED: 0,
|
|
471
|
+
|
|
472
|
+
/** The channel has been initialized but hasn't yet initiated a connection. */
|
|
473
|
+
INIT: 1,
|
|
474
|
+
|
|
475
|
+
/** The channel is in the process of opening a connection to the server. */
|
|
476
|
+
OPENING: 2,
|
|
477
|
+
|
|
478
|
+
/** The channel is open. */
|
|
479
|
+
OPENED: 3
|
|
480
|
+
};
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* The timeout in milliseconds for a forward channel request.
|
|
485
|
+
* @type {number}
|
|
486
|
+
*/
|
|
487
|
+
goog.net.BrowserChannel.FORWARD_CHANNEL_RETRY_TIMEOUT = 20 * 1000;
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* Maximum number of attempts to connect to the server for back channel
|
|
492
|
+
* requests.
|
|
493
|
+
* @type {number}
|
|
494
|
+
*/
|
|
495
|
+
goog.net.BrowserChannel.BACK_CHANNEL_MAX_RETRIES = 3;
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* A number in MS of how long we guess the maxmium amount of time a round trip
|
|
500
|
+
* to the server should take. In the future this could be substituted with a
|
|
501
|
+
* real measurement of the RTT.
|
|
502
|
+
* @type {number}
|
|
503
|
+
*/
|
|
504
|
+
goog.net.BrowserChannel.RTT_ESTIMATE = 3 * 1000;
|
|
505
|
+
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* When retrying for an inactive channel, we will multiply the total delay by
|
|
509
|
+
* this number.
|
|
510
|
+
* @type {number}
|
|
511
|
+
*/
|
|
512
|
+
goog.net.BrowserChannel.INACTIVE_CHANNEL_RETRY_FACTOR = 2;
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* Enum type for identifying a BrowserChannel error.
|
|
517
|
+
* @enum {number}
|
|
518
|
+
*/
|
|
519
|
+
goog.net.BrowserChannel.Error = {
|
|
520
|
+
/** Value that indicates no error has occurred. */
|
|
521
|
+
OK: 0,
|
|
522
|
+
|
|
523
|
+
/** An error due to a request failing. */
|
|
524
|
+
REQUEST_FAILED: 2,
|
|
525
|
+
|
|
526
|
+
/** An error due to the user being logged out. */
|
|
527
|
+
LOGGED_OUT: 4,
|
|
528
|
+
|
|
529
|
+
/** An error due to server response which contains no data. */
|
|
530
|
+
NO_DATA: 5,
|
|
531
|
+
|
|
532
|
+
/** An error due to a server response indicating an unknown session id */
|
|
533
|
+
UNKNOWN_SESSION_ID: 6,
|
|
534
|
+
|
|
535
|
+
/** An error due to a server response requesting to stop the channel. */
|
|
536
|
+
STOP: 7,
|
|
537
|
+
|
|
538
|
+
/** A general network error. */
|
|
539
|
+
NETWORK: 8,
|
|
540
|
+
|
|
541
|
+
/** An error due to the channel being blocked by a network administrator. */
|
|
542
|
+
BLOCKED: 9,
|
|
543
|
+
|
|
544
|
+
/** An error due to bad data being returned from the server. */
|
|
545
|
+
BAD_DATA: 10,
|
|
546
|
+
|
|
547
|
+
/** An error due to a response that doesn't start with the magic cookie. */
|
|
548
|
+
BAD_RESPONSE: 11,
|
|
549
|
+
|
|
550
|
+
/** ActiveX is blocked by the machine's admin settings. */
|
|
551
|
+
ACTIVE_X_BLOCKED: 12
|
|
552
|
+
};
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* Internal enum type for the two browser channel channel types.
|
|
557
|
+
* @enum {number}
|
|
558
|
+
* @private
|
|
559
|
+
*/
|
|
560
|
+
goog.net.BrowserChannel.ChannelType_ = {
|
|
561
|
+
FORWARD_CHANNEL: 1,
|
|
562
|
+
|
|
563
|
+
BACK_CHANNEL: 2
|
|
564
|
+
};
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
/**
|
|
568
|
+
* The maximum number of maps that can be sent in one POST. Should match
|
|
569
|
+
* com.google.net.browserchannel.BrowserChannel.MAX_MAPS_PER_REQUEST.
|
|
570
|
+
* @type {number}
|
|
571
|
+
* @private
|
|
572
|
+
*/
|
|
573
|
+
goog.net.BrowserChannel.MAX_MAPS_PER_REQUEST_ = 1000;
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* Singleton event target for firing stat events
|
|
578
|
+
* @type {goog.events.EventTarget}
|
|
579
|
+
* @private
|
|
580
|
+
*/
|
|
581
|
+
goog.net.BrowserChannel.statEventTarget_ = new goog.events.EventTarget();
|
|
582
|
+
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* Events fired by BrowserChannel and associated objects
|
|
586
|
+
* @type {Object}
|
|
587
|
+
*/
|
|
588
|
+
goog.net.BrowserChannel.Event = {};
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
/**
|
|
592
|
+
* Stat Event that fires when things of interest happen that may be useful for
|
|
593
|
+
* applications to know about for stats or debugging purposes. This event fires
|
|
594
|
+
* on the EventTarget returned by getStatEventTarget.
|
|
595
|
+
*/
|
|
596
|
+
goog.net.BrowserChannel.Event.STAT_EVENT = 'statevent';
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
/**
|
|
601
|
+
* Event class for goog.net.BrowserChannel.Event.STAT_EVENT
|
|
602
|
+
*
|
|
603
|
+
* @param {goog.events.EventTarget} eventTarget The stat event target for
|
|
604
|
+
the browser channel.
|
|
605
|
+
* @param {goog.net.BrowserChannel.Stat} stat The stat.
|
|
606
|
+
* @constructor
|
|
607
|
+
* @extends {goog.events.Event}
|
|
608
|
+
*/
|
|
609
|
+
goog.net.BrowserChannel.StatEvent = function(eventTarget, stat) {
|
|
610
|
+
goog.events.Event.call(this, goog.net.BrowserChannel.Event.STAT_EVENT,
|
|
611
|
+
eventTarget);
|
|
612
|
+
|
|
613
|
+
/**
|
|
614
|
+
* The stat
|
|
615
|
+
* @type {goog.net.BrowserChannel.Stat}
|
|
616
|
+
*/
|
|
617
|
+
this.stat = stat;
|
|
618
|
+
|
|
619
|
+
};
|
|
620
|
+
goog.inherits(goog.net.BrowserChannel.StatEvent, goog.events.Event);
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* An event that fires when POST requests complete successfully, indicating
|
|
625
|
+
* the size of the POST and the round trip time.
|
|
626
|
+
* This event fires on the EventTarget returned by getStatEventTarget.
|
|
627
|
+
*/
|
|
628
|
+
goog.net.BrowserChannel.Event.TIMING_EVENT = 'timingevent';
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
|
|
632
|
+
/**
|
|
633
|
+
* Event class for goog.net.BrowserChannel.Event.TIMING_EVENT
|
|
634
|
+
*
|
|
635
|
+
* @param {goog.events.EventTarget} target The stat event target for
|
|
636
|
+
the browser channel.
|
|
637
|
+
* @param {number} size The number of characters in the POST data.
|
|
638
|
+
* @param {number} rtt The total round trip time from POST to response in MS.
|
|
639
|
+
* @param {number} retries The number of times the POST had to be retried.
|
|
640
|
+
* @constructor
|
|
641
|
+
* @extends {goog.events.Event}
|
|
642
|
+
*/
|
|
643
|
+
goog.net.BrowserChannel.TimingEvent = function(target, size, rtt, retries) {
|
|
644
|
+
goog.events.Event.call(this, goog.net.BrowserChannel.Event.TIMING_EVENT,
|
|
645
|
+
target);
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
* @type {number}
|
|
649
|
+
*/
|
|
650
|
+
this.size = size;
|
|
651
|
+
|
|
652
|
+
/**
|
|
653
|
+
* @type {number}
|
|
654
|
+
*/
|
|
655
|
+
this.rtt = rtt;
|
|
656
|
+
|
|
657
|
+
/**
|
|
658
|
+
* @type {number}
|
|
659
|
+
*/
|
|
660
|
+
this.retries = retries;
|
|
661
|
+
|
|
662
|
+
};
|
|
663
|
+
goog.inherits(goog.net.BrowserChannel.TimingEvent, goog.events.Event);
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
/**
|
|
667
|
+
* The type of event that occurs every time some information about how reachable
|
|
668
|
+
* the server is is discovered.
|
|
669
|
+
*/
|
|
670
|
+
goog.net.BrowserChannel.Event.SERVER_REACHABILITY_EVENT =
|
|
671
|
+
'serverreachability';
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
* Types of events which reveal information about the reachability of the
|
|
676
|
+
* server.
|
|
677
|
+
* @enum {number}
|
|
678
|
+
*/
|
|
679
|
+
goog.net.BrowserChannel.ServerReachability = {
|
|
680
|
+
REQUEST_MADE: 1,
|
|
681
|
+
REQUEST_SUCCEEDED: 2,
|
|
682
|
+
REQUEST_FAILED: 3,
|
|
683
|
+
BACK_CHANNEL_ACTIVITY: 4
|
|
684
|
+
};
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
|
|
688
|
+
/**
|
|
689
|
+
* Event class for goog.net.BrowserChannel.Event.SERVER_REACHABILITY_EVENT.
|
|
690
|
+
*
|
|
691
|
+
* @param {goog.events.EventTarget} target The stat event target for
|
|
692
|
+
the browser channel.
|
|
693
|
+
* @param {goog.net.BrowserChannel.ServerReachability} reachabilityType The
|
|
694
|
+
* reachability event type.
|
|
695
|
+
* @constructor
|
|
696
|
+
* @extends {goog.events.Event}
|
|
697
|
+
*/
|
|
698
|
+
goog.net.BrowserChannel.ServerReachabilityEvent = function(target,
|
|
699
|
+
reachabilityType) {
|
|
700
|
+
goog.events.Event.call(this,
|
|
701
|
+
goog.net.BrowserChannel.Event.SERVER_REACHABILITY_EVENT, target);
|
|
702
|
+
|
|
703
|
+
/**
|
|
704
|
+
* @type {goog.net.BrowserChannel.ServerReachability}
|
|
705
|
+
*/
|
|
706
|
+
this.reachabilityType = reachabilityType;
|
|
707
|
+
};
|
|
708
|
+
goog.inherits(goog.net.BrowserChannel.ServerReachabilityEvent,
|
|
709
|
+
goog.events.Event);
|
|
710
|
+
|
|
711
|
+
|
|
712
|
+
/**
|
|
713
|
+
* Enum that identifies events for statistics that are interesting to track.
|
|
714
|
+
* TODO(user) - Change name not to use Event or use EventTarget
|
|
715
|
+
* @enum {number}
|
|
716
|
+
*/
|
|
717
|
+
goog.net.BrowserChannel.Stat = {
|
|
718
|
+
/** Event indicating a new connection attempt. */
|
|
719
|
+
CONNECT_ATTEMPT: 0,
|
|
720
|
+
|
|
721
|
+
/** Event indicating a connection error due to a general network problem. */
|
|
722
|
+
ERROR_NETWORK: 1,
|
|
723
|
+
|
|
724
|
+
/**
|
|
725
|
+
* Event indicating a connection error that isn't due to a general network
|
|
726
|
+
* problem.
|
|
727
|
+
*/
|
|
728
|
+
ERROR_OTHER: 2,
|
|
729
|
+
|
|
730
|
+
/** Event indicating the start of test stage one. */
|
|
731
|
+
TEST_STAGE_ONE_START: 3,
|
|
732
|
+
|
|
733
|
+
|
|
734
|
+
/** Event indicating the channel is blocked by a network administrator. */
|
|
735
|
+
CHANNEL_BLOCKED: 4,
|
|
736
|
+
|
|
737
|
+
/** Event indicating the start of test stage two. */
|
|
738
|
+
TEST_STAGE_TWO_START: 5,
|
|
739
|
+
|
|
740
|
+
/** Event indicating the first piece of test data was received. */
|
|
741
|
+
TEST_STAGE_TWO_DATA_ONE: 6,
|
|
742
|
+
|
|
743
|
+
/**
|
|
744
|
+
* Event indicating that the second piece of test data was received and it was
|
|
745
|
+
* recieved separately from the first.
|
|
746
|
+
*/
|
|
747
|
+
TEST_STAGE_TWO_DATA_TWO: 7,
|
|
748
|
+
|
|
749
|
+
/** Event indicating both pieces of test data were received simultaneously. */
|
|
750
|
+
TEST_STAGE_TWO_DATA_BOTH: 8,
|
|
751
|
+
|
|
752
|
+
/** Event indicating stage one of the test request failed. */
|
|
753
|
+
TEST_STAGE_ONE_FAILED: 9,
|
|
754
|
+
|
|
755
|
+
/** Event indicating stage two of the test request failed. */
|
|
756
|
+
TEST_STAGE_TWO_FAILED: 10,
|
|
757
|
+
|
|
758
|
+
/**
|
|
759
|
+
* Event indicating that a buffering proxy is likely between the client and
|
|
760
|
+
* the server.
|
|
761
|
+
*/
|
|
762
|
+
PROXY: 11,
|
|
763
|
+
|
|
764
|
+
/**
|
|
765
|
+
* Event indicating that no buffering proxy is likely between the client and
|
|
766
|
+
* the server.
|
|
767
|
+
*/
|
|
768
|
+
NOPROXY: 12,
|
|
769
|
+
|
|
770
|
+
/** Event indicating an unknown SID error. */
|
|
771
|
+
REQUEST_UNKNOWN_SESSION_ID: 13,
|
|
772
|
+
|
|
773
|
+
/** Event indicating a bad status code was received. */
|
|
774
|
+
REQUEST_BAD_STATUS: 14,
|
|
775
|
+
|
|
776
|
+
/** Event indicating incomplete data was received */
|
|
777
|
+
REQUEST_INCOMPLETE_DATA: 15,
|
|
778
|
+
|
|
779
|
+
/** Event indicating bad data was received */
|
|
780
|
+
REQUEST_BAD_DATA: 16,
|
|
781
|
+
|
|
782
|
+
/** Event indicating no data was received when data was expected. */
|
|
783
|
+
REQUEST_NO_DATA: 17,
|
|
784
|
+
|
|
785
|
+
/** Event indicating a request timeout. */
|
|
786
|
+
REQUEST_TIMEOUT: 18,
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* Event indicating that the server never received our hanging GET and so it
|
|
790
|
+
* is being retried.
|
|
791
|
+
*/
|
|
792
|
+
BACKCHANNEL_MISSING: 19,
|
|
793
|
+
|
|
794
|
+
/**
|
|
795
|
+
* Event indicating that we have determined that our hanging GET is not
|
|
796
|
+
* receiving data when it should be. Thus it is dead dead and will be retried.
|
|
797
|
+
*/
|
|
798
|
+
BACKCHANNEL_DEAD: 20,
|
|
799
|
+
|
|
800
|
+
/**
|
|
801
|
+
* The browser declared itself offline during the lifetime of a request, or
|
|
802
|
+
* was offline when a request was initially made.
|
|
803
|
+
*/
|
|
804
|
+
BROWSER_OFFLINE: 21,
|
|
805
|
+
|
|
806
|
+
/** ActiveX is blocked by the machine's admin settings. */
|
|
807
|
+
ACTIVE_X_BLOCKED: 22
|
|
808
|
+
};
|
|
809
|
+
|
|
810
|
+
|
|
811
|
+
/**
|
|
812
|
+
* The normal response for forward channel requests.
|
|
813
|
+
* Used only before version 8 of the protocol.
|
|
814
|
+
* @type {string}
|
|
815
|
+
*/
|
|
816
|
+
goog.net.BrowserChannel.MAGIC_RESPONSE_COOKIE = 'y2f%';
|
|
817
|
+
|
|
818
|
+
|
|
819
|
+
/**
|
|
820
|
+
* A guess at a cutoff at which to no longer assume the backchannel is dead
|
|
821
|
+
* when we are slow to receive data. Number in bytes.
|
|
822
|
+
*
|
|
823
|
+
* Assumption: The worst bandwidth we work on is 50 kilobits/sec
|
|
824
|
+
* 50kbits/sec * (1 byte / 8 bits) * 6 sec dead backchannel timeout
|
|
825
|
+
* @type {number}
|
|
826
|
+
*/
|
|
827
|
+
goog.net.BrowserChannel.OUTSTANDING_DATA_BACKCHANNEL_RETRY_CUTOFF = 37500;
|
|
828
|
+
|
|
829
|
+
|
|
830
|
+
/**
|
|
831
|
+
* Returns the browserchannel logger.
|
|
832
|
+
*
|
|
833
|
+
* @return {goog.net.ChannelDebug} The channel debug object.
|
|
834
|
+
*/
|
|
835
|
+
goog.net.BrowserChannel.prototype.getChannelDebug = function() {
|
|
836
|
+
return this.channelDebug_;
|
|
837
|
+
};
|
|
838
|
+
|
|
839
|
+
|
|
840
|
+
/**
|
|
841
|
+
* Set the browserchannel logger.
|
|
842
|
+
* TODO(user): Add interface for channel loggers or remove this function.
|
|
843
|
+
*
|
|
844
|
+
* @param {goog.net.ChannelDebug} channelDebug The channel debug object.
|
|
845
|
+
*/
|
|
846
|
+
goog.net.BrowserChannel.prototype.setChannelDebug = function(
|
|
847
|
+
channelDebug) {
|
|
848
|
+
if (goog.isDefAndNotNull(channelDebug)) {
|
|
849
|
+
this.channelDebug_ = channelDebug;
|
|
850
|
+
}
|
|
851
|
+
};
|
|
852
|
+
|
|
853
|
+
|
|
854
|
+
/**
|
|
855
|
+
* Allows the application to set an execution hooks for when BrowserChannel
|
|
856
|
+
* starts processing requests. This is useful to track timing or logging
|
|
857
|
+
* special information. The function takes no parameters and return void.
|
|
858
|
+
* @param {Function} startHook The function for the start hook.
|
|
859
|
+
*/
|
|
860
|
+
goog.net.BrowserChannel.setStartThreadExecutionHook = function(startHook) {
|
|
861
|
+
goog.net.BrowserChannel.startExecutionHook_ = startHook;
|
|
862
|
+
};
|
|
863
|
+
|
|
864
|
+
|
|
865
|
+
/**
|
|
866
|
+
* Allows the application to set an execution hooks for when BrowserChannel
|
|
867
|
+
* stops processing requests. This is useful to track timing or logging
|
|
868
|
+
* special information. The function takes no parameters and return void.
|
|
869
|
+
* @param {Function} endHook The function for the end hook.
|
|
870
|
+
*/
|
|
871
|
+
goog.net.BrowserChannel.setEndThreadExecutionHook = function(endHook) {
|
|
872
|
+
goog.net.BrowserChannel.endExecutionHook_ = endHook;
|
|
873
|
+
};
|
|
874
|
+
|
|
875
|
+
|
|
876
|
+
/**
|
|
877
|
+
* Application provided execution hook for the start hook.
|
|
878
|
+
*
|
|
879
|
+
* @type {Function}
|
|
880
|
+
* @private
|
|
881
|
+
*/
|
|
882
|
+
goog.net.BrowserChannel.startExecutionHook_ = function() { };
|
|
883
|
+
|
|
884
|
+
|
|
885
|
+
/**
|
|
886
|
+
* Application provided execution hook for the end hook.
|
|
887
|
+
*
|
|
888
|
+
* @type {Function}
|
|
889
|
+
* @private
|
|
890
|
+
*/
|
|
891
|
+
goog.net.BrowserChannel.endExecutionHook_ = function() { };
|
|
892
|
+
|
|
893
|
+
|
|
894
|
+
/**
|
|
895
|
+
* Instantiates a ChannelRequest with the given parameters. Overidden in tests.
|
|
896
|
+
*
|
|
897
|
+
* @param {goog.net.BrowserChannel|goog.net.BrowserTestChannel} channel
|
|
898
|
+
* The BrowserChannel that owns this request.
|
|
899
|
+
* @param {goog.net.ChannelDebug} channelDebug A ChannelDebug to use for
|
|
900
|
+
* logging.
|
|
901
|
+
* @param {string=} opt_sessionId The session id for the channel.
|
|
902
|
+
* @param {string|number=} opt_requestId The request id for this request.
|
|
903
|
+
* @param {number=} opt_retryId The retry id for this request.
|
|
904
|
+
* @return {goog.net.ChannelRequest} The created channel request.
|
|
905
|
+
*/
|
|
906
|
+
goog.net.BrowserChannel.createChannelRequest = function(channel, channelDebug,
|
|
907
|
+
opt_sessionId, opt_requestId, opt_retryId) {
|
|
908
|
+
return new goog.net.ChannelRequest(
|
|
909
|
+
channel,
|
|
910
|
+
channelDebug,
|
|
911
|
+
opt_sessionId,
|
|
912
|
+
opt_requestId,
|
|
913
|
+
opt_retryId);
|
|
914
|
+
};
|
|
915
|
+
|
|
916
|
+
|
|
917
|
+
/**
|
|
918
|
+
* Starts the channel. This initiates connections to the server.
|
|
919
|
+
*
|
|
920
|
+
* @param {string} testPath The path for the test connection.
|
|
921
|
+
* @param {string} channelPath The path for the channel connection.
|
|
922
|
+
* @param {Object=} opt_extraParams Extra parameter keys and values to add to
|
|
923
|
+
* the requests.
|
|
924
|
+
* @param {string=} opt_oldSessionId Session ID from a previous session.
|
|
925
|
+
* @param {number=} opt_oldArrayId The last array ID from a previous session.
|
|
926
|
+
*/
|
|
927
|
+
goog.net.BrowserChannel.prototype.connect = function(testPath, channelPath,
|
|
928
|
+
opt_extraParams, opt_oldSessionId, opt_oldArrayId) {
|
|
929
|
+
this.channelDebug_.debug('connect()');
|
|
930
|
+
|
|
931
|
+
goog.net.BrowserChannel.notifyStatEvent(
|
|
932
|
+
goog.net.BrowserChannel.Stat.CONNECT_ATTEMPT);
|
|
933
|
+
|
|
934
|
+
this.path_ = channelPath;
|
|
935
|
+
this.extraParams_ = opt_extraParams || {};
|
|
936
|
+
|
|
937
|
+
// Attach parameters about the previous session if reconnecting.
|
|
938
|
+
if (opt_oldSessionId && goog.isDef(opt_oldArrayId)) {
|
|
939
|
+
this.extraParams_['OSID'] = opt_oldSessionId;
|
|
940
|
+
this.extraParams_['OAID'] = opt_oldArrayId;
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
this.connectTest_(testPath);
|
|
944
|
+
};
|
|
945
|
+
|
|
946
|
+
|
|
947
|
+
/**
|
|
948
|
+
* Disconnects and closes the channel.
|
|
949
|
+
*/
|
|
950
|
+
goog.net.BrowserChannel.prototype.disconnect = function() {
|
|
951
|
+
this.channelDebug_.debug('disconnect()');
|
|
952
|
+
|
|
953
|
+
this.cancelRequests_();
|
|
954
|
+
|
|
955
|
+
if (this.state_ == goog.net.BrowserChannel.State.OPENED) {
|
|
956
|
+
var rid = this.nextRid_++;
|
|
957
|
+
var uri = this.forwardChannelUri_.clone();
|
|
958
|
+
uri.setParameterValue('SID', this.sid_);
|
|
959
|
+
uri.setParameterValue('RID', rid);
|
|
960
|
+
uri.setParameterValue('TYPE', 'terminate');
|
|
961
|
+
|
|
962
|
+
// Add the reconnect parameters.
|
|
963
|
+
this.addAdditionalParams_(uri);
|
|
964
|
+
|
|
965
|
+
var request = goog.net.BrowserChannel.createChannelRequest(
|
|
966
|
+
this, this.channelDebug_, this.sid_, rid);
|
|
967
|
+
request.sendUsingImgTag(uri);
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
this.onClose_();
|
|
971
|
+
};
|
|
972
|
+
|
|
973
|
+
|
|
974
|
+
/**
|
|
975
|
+
* Returns the session id of the channel. Only available after the
|
|
976
|
+
* channel has been opened.
|
|
977
|
+
* @return {string} Session ID.
|
|
978
|
+
*/
|
|
979
|
+
goog.net.BrowserChannel.prototype.getSessionId = function() {
|
|
980
|
+
return this.sid_;
|
|
981
|
+
};
|
|
982
|
+
|
|
983
|
+
|
|
984
|
+
/**
|
|
985
|
+
* Starts the test channel to determine network conditions.
|
|
986
|
+
*
|
|
987
|
+
* @param {string} testPath The relative PATH for the test connection.
|
|
988
|
+
* @private
|
|
989
|
+
*/
|
|
990
|
+
goog.net.BrowserChannel.prototype.connectTest_ = function(testPath) {
|
|
991
|
+
this.channelDebug_.debug('connectTest_()');
|
|
992
|
+
if (!this.okToMakeRequest_()) {
|
|
993
|
+
return; // channel is cancelled
|
|
994
|
+
}
|
|
995
|
+
this.connectionTest_ = new goog.net.BrowserTestChannel(
|
|
996
|
+
this, this.channelDebug_);
|
|
997
|
+
this.connectionTest_.setExtraHeaders(this.extraHeaders_);
|
|
998
|
+
this.connectionTest_.setParser(this.parser_);
|
|
999
|
+
this.connectionTest_.connect(testPath);
|
|
1000
|
+
};
|
|
1001
|
+
|
|
1002
|
+
|
|
1003
|
+
/**
|
|
1004
|
+
* Starts the regular channel which is run after the test channel is complete.
|
|
1005
|
+
* @private
|
|
1006
|
+
*/
|
|
1007
|
+
goog.net.BrowserChannel.prototype.connectChannel_ = function() {
|
|
1008
|
+
this.channelDebug_.debug('connectChannel_()');
|
|
1009
|
+
this.ensureInState_(goog.net.BrowserChannel.State.INIT,
|
|
1010
|
+
goog.net.BrowserChannel.State.CLOSED);
|
|
1011
|
+
this.forwardChannelUri_ =
|
|
1012
|
+
this.getForwardChannelUri(/** @type {string} */ (this.path_));
|
|
1013
|
+
this.ensureForwardChannel_();
|
|
1014
|
+
};
|
|
1015
|
+
|
|
1016
|
+
|
|
1017
|
+
/**
|
|
1018
|
+
* Cancels all outstanding requests.
|
|
1019
|
+
* @private
|
|
1020
|
+
*/
|
|
1021
|
+
goog.net.BrowserChannel.prototype.cancelRequests_ = function() {
|
|
1022
|
+
if (this.connectionTest_) {
|
|
1023
|
+
this.connectionTest_.abort();
|
|
1024
|
+
this.connectionTest_ = null;
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
if (this.backChannelRequest_) {
|
|
1028
|
+
this.backChannelRequest_.cancel();
|
|
1029
|
+
this.backChannelRequest_ = null;
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
if (this.backChannelTimerId_) {
|
|
1033
|
+
goog.global.clearTimeout(this.backChannelTimerId_);
|
|
1034
|
+
this.backChannelTimerId_ = null;
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
this.clearDeadBackchannelTimer_();
|
|
1038
|
+
|
|
1039
|
+
if (this.forwardChannelRequest_) {
|
|
1040
|
+
this.forwardChannelRequest_.cancel();
|
|
1041
|
+
this.forwardChannelRequest_ = null;
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
if (this.forwardChannelTimerId_) {
|
|
1045
|
+
goog.global.clearTimeout(this.forwardChannelTimerId_);
|
|
1046
|
+
this.forwardChannelTimerId_ = null;
|
|
1047
|
+
}
|
|
1048
|
+
};
|
|
1049
|
+
|
|
1050
|
+
|
|
1051
|
+
/**
|
|
1052
|
+
* Returns the extra HTTP headers to add to all the requests sent to the server.
|
|
1053
|
+
*
|
|
1054
|
+
* @return {Object} The HTTP headers, or null.
|
|
1055
|
+
*/
|
|
1056
|
+
goog.net.BrowserChannel.prototype.getExtraHeaders = function() {
|
|
1057
|
+
return this.extraHeaders_;
|
|
1058
|
+
};
|
|
1059
|
+
|
|
1060
|
+
|
|
1061
|
+
/**
|
|
1062
|
+
* Sets extra HTTP headers to add to all the requests sent to the server.
|
|
1063
|
+
*
|
|
1064
|
+
* @param {Object} extraHeaders The HTTP headers, or null.
|
|
1065
|
+
*/
|
|
1066
|
+
goog.net.BrowserChannel.prototype.setExtraHeaders = function(extraHeaders) {
|
|
1067
|
+
this.extraHeaders_ = extraHeaders;
|
|
1068
|
+
};
|
|
1069
|
+
|
|
1070
|
+
|
|
1071
|
+
/**
|
|
1072
|
+
* Sets the throttle for handling onreadystatechange events for the request.
|
|
1073
|
+
*
|
|
1074
|
+
* @param {number} throttle The throttle in ms. A value of zero indicates
|
|
1075
|
+
* no throttle.
|
|
1076
|
+
*/
|
|
1077
|
+
goog.net.BrowserChannel.prototype.setReadyStateChangeThrottle = function(
|
|
1078
|
+
throttle) {
|
|
1079
|
+
this.readyStateChangeThrottleMs_ = throttle;
|
|
1080
|
+
};
|
|
1081
|
+
|
|
1082
|
+
|
|
1083
|
+
/**
|
|
1084
|
+
* Sets whether cross origin requests are supported for the browser channel.
|
|
1085
|
+
*
|
|
1086
|
+
* Setting this allows the creation of requests to secondary domains and
|
|
1087
|
+
* sends XHRs with the CORS withCredentials bit set to true.
|
|
1088
|
+
*
|
|
1089
|
+
* In order for cross-origin requests to work, the server will also need to set
|
|
1090
|
+
* CORS response headers as per:
|
|
1091
|
+
* https://developer.mozilla.org/en-US/docs/HTTP_access_control
|
|
1092
|
+
*
|
|
1093
|
+
* See {@link goog.net.XhrIo#setWithCredentials}.
|
|
1094
|
+
* @param {boolean} supportCrossDomain Whether cross domain XHRs are supported.
|
|
1095
|
+
*/
|
|
1096
|
+
goog.net.BrowserChannel.prototype.setSupportsCrossDomainXhrs = function(
|
|
1097
|
+
supportCrossDomain) {
|
|
1098
|
+
this.supportsCrossDomainXhrs_ = supportCrossDomain;
|
|
1099
|
+
};
|
|
1100
|
+
|
|
1101
|
+
|
|
1102
|
+
/**
|
|
1103
|
+
* Returns the handler used for channel callback events.
|
|
1104
|
+
*
|
|
1105
|
+
* @return {goog.net.BrowserChannel.Handler} The handler.
|
|
1106
|
+
*/
|
|
1107
|
+
goog.net.BrowserChannel.prototype.getHandler = function() {
|
|
1108
|
+
return this.handler_;
|
|
1109
|
+
};
|
|
1110
|
+
|
|
1111
|
+
|
|
1112
|
+
/**
|
|
1113
|
+
* Sets the handler used for channel callback events.
|
|
1114
|
+
* @param {goog.net.BrowserChannel.Handler} handler The handler to set.
|
|
1115
|
+
*/
|
|
1116
|
+
goog.net.BrowserChannel.prototype.setHandler = function(handler) {
|
|
1117
|
+
this.handler_ = handler;
|
|
1118
|
+
};
|
|
1119
|
+
|
|
1120
|
+
|
|
1121
|
+
/**
|
|
1122
|
+
* Returns whether the channel allows the use of a subdomain. There may be
|
|
1123
|
+
* cases where this isn't allowed.
|
|
1124
|
+
* @return {boolean} Whether a host prefix is allowed.
|
|
1125
|
+
*/
|
|
1126
|
+
goog.net.BrowserChannel.prototype.getAllowHostPrefix = function() {
|
|
1127
|
+
return this.allowHostPrefix_;
|
|
1128
|
+
};
|
|
1129
|
+
|
|
1130
|
+
|
|
1131
|
+
/**
|
|
1132
|
+
* Sets whether the channel allows the use of a subdomain. There may be cases
|
|
1133
|
+
* where this isn't allowed, for example, logging in with troutboard where
|
|
1134
|
+
* using a subdomain causes Apache to force the user to authenticate twice.
|
|
1135
|
+
* @param {boolean} allowHostPrefix Whether a host prefix is allowed.
|
|
1136
|
+
*/
|
|
1137
|
+
goog.net.BrowserChannel.prototype.setAllowHostPrefix =
|
|
1138
|
+
function(allowHostPrefix) {
|
|
1139
|
+
this.allowHostPrefix_ = allowHostPrefix;
|
|
1140
|
+
};
|
|
1141
|
+
|
|
1142
|
+
|
|
1143
|
+
/**
|
|
1144
|
+
* Returns whether the channel is buffered or not. This state is valid for
|
|
1145
|
+
* querying only after the test connection has completed. This may be
|
|
1146
|
+
* queried in the goog.net.BrowserChannel.okToMakeRequest() callback.
|
|
1147
|
+
* A channel may be buffered if the test connection determines that
|
|
1148
|
+
* a chunked response could not be sent down within a suitable time.
|
|
1149
|
+
* @return {boolean} Whether the channel is buffered.
|
|
1150
|
+
*/
|
|
1151
|
+
goog.net.BrowserChannel.prototype.isBuffered = function() {
|
|
1152
|
+
return !this.useChunked_;
|
|
1153
|
+
};
|
|
1154
|
+
|
|
1155
|
+
|
|
1156
|
+
/**
|
|
1157
|
+
* Returns whether chunked mode is allowed. In certain debugging situations,
|
|
1158
|
+
* it's useful for the application to have a way to disable chunked mode for a
|
|
1159
|
+
* user.
|
|
1160
|
+
|
|
1161
|
+
* @return {boolean} Whether chunked mode is allowed.
|
|
1162
|
+
*/
|
|
1163
|
+
goog.net.BrowserChannel.prototype.getAllowChunkedMode =
|
|
1164
|
+
function() {
|
|
1165
|
+
return this.allowChunkedMode_;
|
|
1166
|
+
};
|
|
1167
|
+
|
|
1168
|
+
|
|
1169
|
+
/**
|
|
1170
|
+
* Sets whether chunked mode is allowed. In certain debugging situations, it's
|
|
1171
|
+
* useful for the application to have a way to disable chunked mode for a user.
|
|
1172
|
+
* @param {boolean} allowChunkedMode Whether chunked mode is allowed.
|
|
1173
|
+
*/
|
|
1174
|
+
goog.net.BrowserChannel.prototype.setAllowChunkedMode =
|
|
1175
|
+
function(allowChunkedMode) {
|
|
1176
|
+
this.allowChunkedMode_ = allowChunkedMode;
|
|
1177
|
+
};
|
|
1178
|
+
|
|
1179
|
+
|
|
1180
|
+
/**
|
|
1181
|
+
* Sends a request to the server. The format of the request is a Map data
|
|
1182
|
+
* structure of key/value pairs. These maps are then encoded in a format
|
|
1183
|
+
* suitable for the wire and then reconstituted as a Map data structure that
|
|
1184
|
+
* the server can process.
|
|
1185
|
+
* @param {Object|goog.structs.Map} map The map to send.
|
|
1186
|
+
* @param {?Object=} opt_context The context associated with the map.
|
|
1187
|
+
*/
|
|
1188
|
+
goog.net.BrowserChannel.prototype.sendMap = function(map, opt_context) {
|
|
1189
|
+
if (this.state_ == goog.net.BrowserChannel.State.CLOSED) {
|
|
1190
|
+
throw Error('Invalid operation: sending map when state is closed');
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
// We can only send 1000 maps per POST, but typically we should never have
|
|
1194
|
+
// that much to send, so warn if we exceed that (we still send all the maps).
|
|
1195
|
+
if (this.outgoingMaps_.length ==
|
|
1196
|
+
goog.net.BrowserChannel.MAX_MAPS_PER_REQUEST_) {
|
|
1197
|
+
// severe() is temporary so that we get these uploaded and can figure out
|
|
1198
|
+
// what's causing them. Afterwards can change to warning().
|
|
1199
|
+
this.channelDebug_.severe(
|
|
1200
|
+
'Already have ' + goog.net.BrowserChannel.MAX_MAPS_PER_REQUEST_ +
|
|
1201
|
+
' queued maps upon queueing ' + goog.json.serialize(map));
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
this.outgoingMaps_.push(
|
|
1205
|
+
new goog.net.BrowserChannel.QueuedMap(this.nextMapId_++, map,
|
|
1206
|
+
opt_context));
|
|
1207
|
+
if (this.state_ == goog.net.BrowserChannel.State.OPENING ||
|
|
1208
|
+
this.state_ == goog.net.BrowserChannel.State.OPENED) {
|
|
1209
|
+
this.ensureForwardChannel_();
|
|
1210
|
+
}
|
|
1211
|
+
};
|
|
1212
|
+
|
|
1213
|
+
|
|
1214
|
+
/**
|
|
1215
|
+
* When set to true, this changes the behavior of the forward channel so it
|
|
1216
|
+
* will not retry requests; it will fail after one network failure, and if
|
|
1217
|
+
* there was already one network failure, the request will fail immediately.
|
|
1218
|
+
* @param {boolean} failFast Whether or not to fail fast.
|
|
1219
|
+
*/
|
|
1220
|
+
goog.net.BrowserChannel.prototype.setFailFast = function(failFast) {
|
|
1221
|
+
this.failFast_ = failFast;
|
|
1222
|
+
this.channelDebug_.info('setFailFast: ' + failFast);
|
|
1223
|
+
if ((this.forwardChannelRequest_ || this.forwardChannelTimerId_) &&
|
|
1224
|
+
this.forwardChannelRetryCount_ > this.getForwardChannelMaxRetries()) {
|
|
1225
|
+
this.channelDebug_.info(
|
|
1226
|
+
'Retry count ' + this.forwardChannelRetryCount_ +
|
|
1227
|
+
' > new maxRetries ' + this.getForwardChannelMaxRetries() +
|
|
1228
|
+
'. Fail immediately!');
|
|
1229
|
+
if (this.forwardChannelRequest_) {
|
|
1230
|
+
this.forwardChannelRequest_.cancel();
|
|
1231
|
+
// Go through the standard onRequestComplete logic to expose the max-retry
|
|
1232
|
+
// failure in the standard way.
|
|
1233
|
+
this.onRequestComplete(this.forwardChannelRequest_);
|
|
1234
|
+
} else { // i.e., this.forwardChannelTimerId_
|
|
1235
|
+
goog.global.clearTimeout(this.forwardChannelTimerId_);
|
|
1236
|
+
this.forwardChannelTimerId_ = null;
|
|
1237
|
+
// The error code from the last failed request is gone, so just use a
|
|
1238
|
+
// generic one.
|
|
1239
|
+
this.signalError_(goog.net.BrowserChannel.Error.REQUEST_FAILED);
|
|
1240
|
+
}
|
|
1241
|
+
}
|
|
1242
|
+
};
|
|
1243
|
+
|
|
1244
|
+
|
|
1245
|
+
/**
|
|
1246
|
+
* @return {number} The max number of forward-channel retries, which will be 0
|
|
1247
|
+
* in fail-fast mode.
|
|
1248
|
+
*/
|
|
1249
|
+
goog.net.BrowserChannel.prototype.getForwardChannelMaxRetries = function() {
|
|
1250
|
+
return this.failFast_ ? 0 : this.forwardChannelMaxRetries_;
|
|
1251
|
+
};
|
|
1252
|
+
|
|
1253
|
+
|
|
1254
|
+
/**
|
|
1255
|
+
* Sets the maximum number of attempts to connect to the server for forward
|
|
1256
|
+
* channel requests.
|
|
1257
|
+
* @param {number} retries The maximum number of attempts.
|
|
1258
|
+
*/
|
|
1259
|
+
goog.net.BrowserChannel.prototype.setForwardChannelMaxRetries =
|
|
1260
|
+
function(retries) {
|
|
1261
|
+
this.forwardChannelMaxRetries_ = retries;
|
|
1262
|
+
};
|
|
1263
|
+
|
|
1264
|
+
|
|
1265
|
+
/**
|
|
1266
|
+
* Sets the timeout for a forward channel request.
|
|
1267
|
+
* @param {number} timeoutMs The timeout in milliseconds.
|
|
1268
|
+
*/
|
|
1269
|
+
goog.net.BrowserChannel.prototype.setForwardChannelRequestTimeout =
|
|
1270
|
+
function(timeoutMs) {
|
|
1271
|
+
this.forwardChannelRequestTimeoutMs_ = timeoutMs;
|
|
1272
|
+
};
|
|
1273
|
+
|
|
1274
|
+
|
|
1275
|
+
/**
|
|
1276
|
+
* @return {number} The max number of back-channel retries, which is a constant.
|
|
1277
|
+
*/
|
|
1278
|
+
goog.net.BrowserChannel.prototype.getBackChannelMaxRetries = function() {
|
|
1279
|
+
// Back-channel retries is a constant.
|
|
1280
|
+
return goog.net.BrowserChannel.BACK_CHANNEL_MAX_RETRIES;
|
|
1281
|
+
};
|
|
1282
|
+
|
|
1283
|
+
|
|
1284
|
+
/**
|
|
1285
|
+
* Returns whether the channel is closed
|
|
1286
|
+
* @return {boolean} true if the channel is closed.
|
|
1287
|
+
*/
|
|
1288
|
+
goog.net.BrowserChannel.prototype.isClosed = function() {
|
|
1289
|
+
return this.state_ == goog.net.BrowserChannel.State.CLOSED;
|
|
1290
|
+
};
|
|
1291
|
+
|
|
1292
|
+
|
|
1293
|
+
/**
|
|
1294
|
+
* Returns the browser channel state.
|
|
1295
|
+
* @return {goog.net.BrowserChannel.State} The current state of the browser
|
|
1296
|
+
* channel.
|
|
1297
|
+
*/
|
|
1298
|
+
goog.net.BrowserChannel.prototype.getState = function() {
|
|
1299
|
+
return this.state_;
|
|
1300
|
+
};
|
|
1301
|
+
|
|
1302
|
+
|
|
1303
|
+
/**
|
|
1304
|
+
* Return the last status code received for a request.
|
|
1305
|
+
* @return {number} The last status code received for a request.
|
|
1306
|
+
*/
|
|
1307
|
+
goog.net.BrowserChannel.prototype.getLastStatusCode = function() {
|
|
1308
|
+
return this.lastStatusCode_;
|
|
1309
|
+
};
|
|
1310
|
+
|
|
1311
|
+
|
|
1312
|
+
/**
|
|
1313
|
+
* @return {number} The last array id received.
|
|
1314
|
+
*/
|
|
1315
|
+
goog.net.BrowserChannel.prototype.getLastArrayId = function() {
|
|
1316
|
+
return this.lastArrayId_;
|
|
1317
|
+
};
|
|
1318
|
+
|
|
1319
|
+
|
|
1320
|
+
/**
|
|
1321
|
+
* Returns whether there are outstanding requests servicing the channel.
|
|
1322
|
+
* @return {boolean} true if there are outstanding requests.
|
|
1323
|
+
*/
|
|
1324
|
+
goog.net.BrowserChannel.prototype.hasOutstandingRequests = function() {
|
|
1325
|
+
return this.outstandingRequests_() != 0;
|
|
1326
|
+
};
|
|
1327
|
+
|
|
1328
|
+
|
|
1329
|
+
/**
|
|
1330
|
+
* Sets a new parser for the response payload. A custom parser may be set to
|
|
1331
|
+
* avoid using eval(), for example. By default, the parser uses
|
|
1332
|
+
* {@code goog.json.unsafeParse}.
|
|
1333
|
+
* @param {!goog.string.Parser} parser Parser.
|
|
1334
|
+
*/
|
|
1335
|
+
goog.net.BrowserChannel.prototype.setParser = function(parser) {
|
|
1336
|
+
this.parser_ = parser;
|
|
1337
|
+
};
|
|
1338
|
+
|
|
1339
|
+
|
|
1340
|
+
/**
|
|
1341
|
+
* Returns the number of outstanding requests.
|
|
1342
|
+
* @return {number} The number of outstanding requests to the server.
|
|
1343
|
+
* @private
|
|
1344
|
+
*/
|
|
1345
|
+
goog.net.BrowserChannel.prototype.outstandingRequests_ = function() {
|
|
1346
|
+
var count = 0;
|
|
1347
|
+
if (this.backChannelRequest_) {
|
|
1348
|
+
count++;
|
|
1349
|
+
}
|
|
1350
|
+
if (this.forwardChannelRequest_) {
|
|
1351
|
+
count++;
|
|
1352
|
+
}
|
|
1353
|
+
return count;
|
|
1354
|
+
};
|
|
1355
|
+
|
|
1356
|
+
|
|
1357
|
+
/**
|
|
1358
|
+
* Ensures that a forward channel request is scheduled.
|
|
1359
|
+
* @private
|
|
1360
|
+
*/
|
|
1361
|
+
goog.net.BrowserChannel.prototype.ensureForwardChannel_ = function() {
|
|
1362
|
+
if (this.forwardChannelRequest_) {
|
|
1363
|
+
// connection in process - no need to start a new request
|
|
1364
|
+
return;
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
if (this.forwardChannelTimerId_) {
|
|
1368
|
+
// no need to start a new request - one is already scheduled
|
|
1369
|
+
return;
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
this.forwardChannelTimerId_ = goog.net.BrowserChannel.setTimeout(
|
|
1373
|
+
goog.bind(this.onStartForwardChannelTimer_, this), 0);
|
|
1374
|
+
this.forwardChannelRetryCount_ = 0;
|
|
1375
|
+
};
|
|
1376
|
+
|
|
1377
|
+
|
|
1378
|
+
/**
|
|
1379
|
+
* Schedules a forward-channel retry for the specified request, unless the max
|
|
1380
|
+
* retries has been reached.
|
|
1381
|
+
* @param {goog.net.ChannelRequest} request The failed request to retry.
|
|
1382
|
+
* @return {boolean} true iff a retry was scheduled.
|
|
1383
|
+
* @private
|
|
1384
|
+
*/
|
|
1385
|
+
goog.net.BrowserChannel.prototype.maybeRetryForwardChannel_ =
|
|
1386
|
+
function(request) {
|
|
1387
|
+
if (this.forwardChannelRequest_ || this.forwardChannelTimerId_) {
|
|
1388
|
+
// Should be impossible to be called in this state.
|
|
1389
|
+
this.channelDebug_.severe('Request already in progress');
|
|
1390
|
+
return false;
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
if (this.state_ == goog.net.BrowserChannel.State.INIT || // no retry open_()
|
|
1394
|
+
(this.forwardChannelRetryCount_ >= this.getForwardChannelMaxRetries())) {
|
|
1395
|
+
return false;
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1398
|
+
this.channelDebug_.debug('Going to retry POST');
|
|
1399
|
+
|
|
1400
|
+
this.forwardChannelTimerId_ = goog.net.BrowserChannel.setTimeout(
|
|
1401
|
+
goog.bind(this.onStartForwardChannelTimer_, this, request),
|
|
1402
|
+
this.getRetryTime_(this.forwardChannelRetryCount_));
|
|
1403
|
+
this.forwardChannelRetryCount_++;
|
|
1404
|
+
return true;
|
|
1405
|
+
};
|
|
1406
|
+
|
|
1407
|
+
|
|
1408
|
+
/**
|
|
1409
|
+
* Timer callback for ensureForwardChannel
|
|
1410
|
+
* @param {goog.net.ChannelRequest=} opt_retryRequest A failed request to retry.
|
|
1411
|
+
* @private
|
|
1412
|
+
*/
|
|
1413
|
+
goog.net.BrowserChannel.prototype.onStartForwardChannelTimer_ = function(
|
|
1414
|
+
opt_retryRequest) {
|
|
1415
|
+
this.forwardChannelTimerId_ = null;
|
|
1416
|
+
this.startForwardChannel_(opt_retryRequest);
|
|
1417
|
+
};
|
|
1418
|
+
|
|
1419
|
+
|
|
1420
|
+
/**
|
|
1421
|
+
* Begins a new forward channel operation to the server.
|
|
1422
|
+
* @param {goog.net.ChannelRequest=} opt_retryRequest A failed request to retry.
|
|
1423
|
+
* @private
|
|
1424
|
+
*/
|
|
1425
|
+
goog.net.BrowserChannel.prototype.startForwardChannel_ = function(
|
|
1426
|
+
opt_retryRequest) {
|
|
1427
|
+
this.channelDebug_.debug('startForwardChannel_');
|
|
1428
|
+
if (!this.okToMakeRequest_()) {
|
|
1429
|
+
return; // channel is cancelled
|
|
1430
|
+
} else if (this.state_ == goog.net.BrowserChannel.State.INIT) {
|
|
1431
|
+
if (opt_retryRequest) {
|
|
1432
|
+
this.channelDebug_.severe('Not supposed to retry the open');
|
|
1433
|
+
return;
|
|
1434
|
+
}
|
|
1435
|
+
this.open_();
|
|
1436
|
+
this.state_ = goog.net.BrowserChannel.State.OPENING;
|
|
1437
|
+
} else if (this.state_ == goog.net.BrowserChannel.State.OPENED) {
|
|
1438
|
+
if (opt_retryRequest) {
|
|
1439
|
+
this.makeForwardChannelRequest_(opt_retryRequest);
|
|
1440
|
+
return;
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
if (this.outgoingMaps_.length == 0) {
|
|
1444
|
+
this.channelDebug_.debug('startForwardChannel_ returned: ' +
|
|
1445
|
+
'nothing to send');
|
|
1446
|
+
// no need to start a new forward channel request
|
|
1447
|
+
return;
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
if (this.forwardChannelRequest_) {
|
|
1451
|
+
// Should be impossible to be called in this state.
|
|
1452
|
+
this.channelDebug_.severe('startForwardChannel_ returned: ' +
|
|
1453
|
+
'connection already in progress');
|
|
1454
|
+
return;
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
this.makeForwardChannelRequest_();
|
|
1458
|
+
this.channelDebug_.debug('startForwardChannel_ finished, sent request');
|
|
1459
|
+
}
|
|
1460
|
+
};
|
|
1461
|
+
|
|
1462
|
+
|
|
1463
|
+
/**
|
|
1464
|
+
* Establishes a new channel session with the the server.
|
|
1465
|
+
* @private
|
|
1466
|
+
*/
|
|
1467
|
+
goog.net.BrowserChannel.prototype.open_ = function() {
|
|
1468
|
+
this.channelDebug_.debug('open_()');
|
|
1469
|
+
this.nextRid_ = Math.floor(Math.random() * 100000);
|
|
1470
|
+
|
|
1471
|
+
var rid = this.nextRid_++;
|
|
1472
|
+
var request = goog.net.BrowserChannel.createChannelRequest(
|
|
1473
|
+
this, this.channelDebug_, '', rid);
|
|
1474
|
+
request.setExtraHeaders(this.extraHeaders_);
|
|
1475
|
+
var requestText = this.dequeueOutgoingMaps_();
|
|
1476
|
+
var uri = this.forwardChannelUri_.clone();
|
|
1477
|
+
uri.setParameterValue('RID', rid);
|
|
1478
|
+
if (this.clientVersion_) {
|
|
1479
|
+
uri.setParameterValue('CVER', this.clientVersion_);
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1482
|
+
// Add the reconnect parameters.
|
|
1483
|
+
this.addAdditionalParams_(uri);
|
|
1484
|
+
|
|
1485
|
+
request.xmlHttpPost(uri, requestText, true);
|
|
1486
|
+
this.forwardChannelRequest_ = request;
|
|
1487
|
+
};
|
|
1488
|
+
|
|
1489
|
+
|
|
1490
|
+
/**
|
|
1491
|
+
* Makes a forward channel request using XMLHTTP.
|
|
1492
|
+
* @param {goog.net.ChannelRequest=} opt_retryRequest A failed request to retry.
|
|
1493
|
+
* @private
|
|
1494
|
+
*/
|
|
1495
|
+
goog.net.BrowserChannel.prototype.makeForwardChannelRequest_ =
|
|
1496
|
+
function(opt_retryRequest) {
|
|
1497
|
+
var rid;
|
|
1498
|
+
var requestText;
|
|
1499
|
+
if (opt_retryRequest) {
|
|
1500
|
+
if (this.channelVersion_ > 6) {
|
|
1501
|
+
// In version 7 and up we can tack on new arrays to a retry.
|
|
1502
|
+
this.requeuePendingMaps_();
|
|
1503
|
+
rid = this.nextRid_ - 1; // Must use last RID
|
|
1504
|
+
requestText = this.dequeueOutgoingMaps_();
|
|
1505
|
+
} else {
|
|
1506
|
+
// TODO(user): Remove this code and the opt_retryRequest passing
|
|
1507
|
+
// once server-side support for ver 7 is ubiquitous.
|
|
1508
|
+
rid = opt_retryRequest.getRequestId();
|
|
1509
|
+
requestText = /** @type {string} */ (opt_retryRequest.getPostData());
|
|
1510
|
+
}
|
|
1511
|
+
} else {
|
|
1512
|
+
rid = this.nextRid_++;
|
|
1513
|
+
requestText = this.dequeueOutgoingMaps_();
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1516
|
+
var uri = this.forwardChannelUri_.clone();
|
|
1517
|
+
uri.setParameterValue('SID', this.sid_);
|
|
1518
|
+
uri.setParameterValue('RID', rid);
|
|
1519
|
+
uri.setParameterValue('AID', this.lastArrayId_);
|
|
1520
|
+
// Add the additional reconnect parameters.
|
|
1521
|
+
this.addAdditionalParams_(uri);
|
|
1522
|
+
|
|
1523
|
+
var request = goog.net.BrowserChannel.createChannelRequest(
|
|
1524
|
+
this,
|
|
1525
|
+
this.channelDebug_,
|
|
1526
|
+
this.sid_,
|
|
1527
|
+
rid,
|
|
1528
|
+
this.forwardChannelRetryCount_ + 1);
|
|
1529
|
+
request.setExtraHeaders(this.extraHeaders_);
|
|
1530
|
+
|
|
1531
|
+
// randomize from 50%-100% of the forward channel timeout to avoid
|
|
1532
|
+
// a big hit if servers happen to die at once.
|
|
1533
|
+
request.setTimeout(
|
|
1534
|
+
Math.round(this.forwardChannelRequestTimeoutMs_ * 0.50) +
|
|
1535
|
+
Math.round(this.forwardChannelRequestTimeoutMs_ * 0.50 * Math.random()));
|
|
1536
|
+
this.forwardChannelRequest_ = request;
|
|
1537
|
+
request.xmlHttpPost(uri, requestText, true);
|
|
1538
|
+
};
|
|
1539
|
+
|
|
1540
|
+
|
|
1541
|
+
/**
|
|
1542
|
+
* Adds the additional parameters from the handler to the given URI.
|
|
1543
|
+
* @param {goog.Uri} uri The URI to add the parameters to.
|
|
1544
|
+
* @private
|
|
1545
|
+
*/
|
|
1546
|
+
goog.net.BrowserChannel.prototype.addAdditionalParams_ = function(uri) {
|
|
1547
|
+
// Add the additional reconnect parameters as needed.
|
|
1548
|
+
if (this.handler_) {
|
|
1549
|
+
var params = this.handler_.getAdditionalParams(this);
|
|
1550
|
+
if (params) {
|
|
1551
|
+
goog.structs.forEach(params, function(value, key, coll) {
|
|
1552
|
+
uri.setParameterValue(key, value);
|
|
1553
|
+
});
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
};
|
|
1557
|
+
|
|
1558
|
+
|
|
1559
|
+
/**
|
|
1560
|
+
* Returns the request text from the outgoing maps and resets it.
|
|
1561
|
+
* @return {string} The encoded request text created from all the currently
|
|
1562
|
+
* queued outgoing maps.
|
|
1563
|
+
* @private
|
|
1564
|
+
*/
|
|
1565
|
+
goog.net.BrowserChannel.prototype.dequeueOutgoingMaps_ = function() {
|
|
1566
|
+
var count = Math.min(this.outgoingMaps_.length,
|
|
1567
|
+
goog.net.BrowserChannel.MAX_MAPS_PER_REQUEST_);
|
|
1568
|
+
var sb = ['count=' + count];
|
|
1569
|
+
var offset;
|
|
1570
|
+
if (this.channelVersion_ > 6 && count > 0) {
|
|
1571
|
+
// To save a bit of bandwidth, specify the base mapId and the rest as
|
|
1572
|
+
// offsets from it.
|
|
1573
|
+
offset = this.outgoingMaps_[0].mapId;
|
|
1574
|
+
sb.push('ofs=' + offset);
|
|
1575
|
+
} else {
|
|
1576
|
+
offset = 0;
|
|
1577
|
+
}
|
|
1578
|
+
for (var i = 0; i < count; i++) {
|
|
1579
|
+
var mapId = this.outgoingMaps_[i].mapId;
|
|
1580
|
+
var map = this.outgoingMaps_[i].map;
|
|
1581
|
+
if (this.channelVersion_ <= 6) {
|
|
1582
|
+
// Map IDs were not used in ver 6 and before, just indexes in the request.
|
|
1583
|
+
mapId = i;
|
|
1584
|
+
} else {
|
|
1585
|
+
mapId -= offset;
|
|
1586
|
+
}
|
|
1587
|
+
try {
|
|
1588
|
+
goog.structs.forEach(map, function(value, key, coll) {
|
|
1589
|
+
sb.push('req' + mapId + '_' + key + '=' + encodeURIComponent(value));
|
|
1590
|
+
});
|
|
1591
|
+
} catch (ex) {
|
|
1592
|
+
// We send a map here because lots of the retry logic relies on map IDs,
|
|
1593
|
+
// so we have to send something.
|
|
1594
|
+
sb.push('req' + mapId + '_' + 'type' + '=' +
|
|
1595
|
+
encodeURIComponent('_badmap'));
|
|
1596
|
+
if (this.handler_) {
|
|
1597
|
+
this.handler_.badMapError(this, map);
|
|
1598
|
+
}
|
|
1599
|
+
}
|
|
1600
|
+
}
|
|
1601
|
+
this.pendingMaps_ = this.pendingMaps_.concat(
|
|
1602
|
+
this.outgoingMaps_.splice(0, count));
|
|
1603
|
+
return sb.join('&');
|
|
1604
|
+
};
|
|
1605
|
+
|
|
1606
|
+
|
|
1607
|
+
/**
|
|
1608
|
+
* Requeues unacknowledged sent arrays for retransmission in the next forward
|
|
1609
|
+
* channel request.
|
|
1610
|
+
* @private
|
|
1611
|
+
*/
|
|
1612
|
+
goog.net.BrowserChannel.prototype.requeuePendingMaps_ = function() {
|
|
1613
|
+
this.outgoingMaps_ = this.pendingMaps_.concat(this.outgoingMaps_);
|
|
1614
|
+
this.pendingMaps_.length = 0;
|
|
1615
|
+
};
|
|
1616
|
+
|
|
1617
|
+
|
|
1618
|
+
/**
|
|
1619
|
+
* Ensures there is a backchannel request for receiving data from the server.
|
|
1620
|
+
* @private
|
|
1621
|
+
*/
|
|
1622
|
+
goog.net.BrowserChannel.prototype.ensureBackChannel_ = function() {
|
|
1623
|
+
if (this.backChannelRequest_) {
|
|
1624
|
+
// already have one
|
|
1625
|
+
return;
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
if (this.backChannelTimerId_) {
|
|
1629
|
+
// no need to start a new request - one is already scheduled
|
|
1630
|
+
return;
|
|
1631
|
+
}
|
|
1632
|
+
|
|
1633
|
+
this.backChannelAttemptId_ = 1;
|
|
1634
|
+
this.backChannelTimerId_ = goog.net.BrowserChannel.setTimeout(
|
|
1635
|
+
goog.bind(this.onStartBackChannelTimer_, this), 0);
|
|
1636
|
+
this.backChannelRetryCount_ = 0;
|
|
1637
|
+
};
|
|
1638
|
+
|
|
1639
|
+
|
|
1640
|
+
/**
|
|
1641
|
+
* Schedules a back-channel retry, unless the max retries has been reached.
|
|
1642
|
+
* @return {boolean} true iff a retry was scheduled.
|
|
1643
|
+
* @private
|
|
1644
|
+
*/
|
|
1645
|
+
goog.net.BrowserChannel.prototype.maybeRetryBackChannel_ = function() {
|
|
1646
|
+
if (this.backChannelRequest_ || this.backChannelTimerId_) {
|
|
1647
|
+
// Should be impossible to be called in this state.
|
|
1648
|
+
this.channelDebug_.severe('Request already in progress');
|
|
1649
|
+
return false;
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1652
|
+
if (this.backChannelRetryCount_ >= this.getBackChannelMaxRetries()) {
|
|
1653
|
+
return false;
|
|
1654
|
+
}
|
|
1655
|
+
|
|
1656
|
+
this.channelDebug_.debug('Going to retry GET');
|
|
1657
|
+
|
|
1658
|
+
this.backChannelAttemptId_++;
|
|
1659
|
+
this.backChannelTimerId_ = goog.net.BrowserChannel.setTimeout(
|
|
1660
|
+
goog.bind(this.onStartBackChannelTimer_, this),
|
|
1661
|
+
this.getRetryTime_(this.backChannelRetryCount_));
|
|
1662
|
+
this.backChannelRetryCount_++;
|
|
1663
|
+
return true;
|
|
1664
|
+
};
|
|
1665
|
+
|
|
1666
|
+
|
|
1667
|
+
/**
|
|
1668
|
+
* Timer callback for ensureBackChannel_.
|
|
1669
|
+
* @private
|
|
1670
|
+
*/
|
|
1671
|
+
goog.net.BrowserChannel.prototype.onStartBackChannelTimer_ = function() {
|
|
1672
|
+
this.backChannelTimerId_ = null;
|
|
1673
|
+
this.startBackChannel_();
|
|
1674
|
+
};
|
|
1675
|
+
|
|
1676
|
+
|
|
1677
|
+
/**
|
|
1678
|
+
* Begins a new back channel operation to the server.
|
|
1679
|
+
* @private
|
|
1680
|
+
*/
|
|
1681
|
+
goog.net.BrowserChannel.prototype.startBackChannel_ = function() {
|
|
1682
|
+
if (!this.okToMakeRequest_()) {
|
|
1683
|
+
// channel is cancelled
|
|
1684
|
+
return;
|
|
1685
|
+
}
|
|
1686
|
+
|
|
1687
|
+
this.channelDebug_.debug('Creating new HttpRequest');
|
|
1688
|
+
this.backChannelRequest_ = goog.net.BrowserChannel.createChannelRequest(
|
|
1689
|
+
this,
|
|
1690
|
+
this.channelDebug_,
|
|
1691
|
+
this.sid_,
|
|
1692
|
+
'rpc',
|
|
1693
|
+
this.backChannelAttemptId_);
|
|
1694
|
+
this.backChannelRequest_.setExtraHeaders(this.extraHeaders_);
|
|
1695
|
+
this.backChannelRequest_.setReadyStateChangeThrottle(
|
|
1696
|
+
this.readyStateChangeThrottleMs_);
|
|
1697
|
+
var uri = this.backChannelUri_.clone();
|
|
1698
|
+
uri.setParameterValue('RID', 'rpc');
|
|
1699
|
+
uri.setParameterValue('SID', this.sid_);
|
|
1700
|
+
uri.setParameterValue('CI', this.useChunked_ ? '0' : '1');
|
|
1701
|
+
uri.setParameterValue('AID', this.lastArrayId_);
|
|
1702
|
+
|
|
1703
|
+
// Add the reconnect parameters.
|
|
1704
|
+
this.addAdditionalParams_(uri);
|
|
1705
|
+
|
|
1706
|
+
if (!goog.net.ChannelRequest.supportsXhrStreaming()) {
|
|
1707
|
+
uri.setParameterValue('TYPE', 'html');
|
|
1708
|
+
this.backChannelRequest_.tridentGet(uri, Boolean(this.hostPrefix_));
|
|
1709
|
+
} else {
|
|
1710
|
+
uri.setParameterValue('TYPE', 'xmlhttp');
|
|
1711
|
+
this.backChannelRequest_.xmlHttpGet(uri, true /* decodeChunks */,
|
|
1712
|
+
this.hostPrefix_, false /* opt_noClose */);
|
|
1713
|
+
}
|
|
1714
|
+
this.channelDebug_.debug('New Request created');
|
|
1715
|
+
};
|
|
1716
|
+
|
|
1717
|
+
|
|
1718
|
+
/**
|
|
1719
|
+
* Gives the handler a chance to return an error code and stop channel
|
|
1720
|
+
* execution. A handler might want to do this to check that the user is still
|
|
1721
|
+
* logged in, for example.
|
|
1722
|
+
* @private
|
|
1723
|
+
* @return {boolean} If it's OK to make a request.
|
|
1724
|
+
*/
|
|
1725
|
+
goog.net.BrowserChannel.prototype.okToMakeRequest_ = function() {
|
|
1726
|
+
if (this.handler_) {
|
|
1727
|
+
var result = this.handler_.okToMakeRequest(this);
|
|
1728
|
+
if (result != goog.net.BrowserChannel.Error.OK) {
|
|
1729
|
+
this.channelDebug_.debug('Handler returned error code from ' +
|
|
1730
|
+
'okToMakeRequest');
|
|
1731
|
+
this.signalError_(result);
|
|
1732
|
+
return false;
|
|
1733
|
+
}
|
|
1734
|
+
}
|
|
1735
|
+
return true;
|
|
1736
|
+
};
|
|
1737
|
+
|
|
1738
|
+
|
|
1739
|
+
/**
|
|
1740
|
+
* Callback from BrowserTestChannel for when the channel is finished.
|
|
1741
|
+
* @param {goog.net.BrowserTestChannel} testChannel The BrowserTestChannel.
|
|
1742
|
+
* @param {boolean} useChunked Whether we can chunk responses.
|
|
1743
|
+
*/
|
|
1744
|
+
goog.net.BrowserChannel.prototype.testConnectionFinished =
|
|
1745
|
+
function(testChannel, useChunked) {
|
|
1746
|
+
this.channelDebug_.debug('Test Connection Finished');
|
|
1747
|
+
|
|
1748
|
+
this.useChunked_ = this.allowChunkedMode_ && useChunked;
|
|
1749
|
+
this.lastStatusCode_ = testChannel.getLastStatusCode();
|
|
1750
|
+
this.connectChannel_();
|
|
1751
|
+
};
|
|
1752
|
+
|
|
1753
|
+
|
|
1754
|
+
/**
|
|
1755
|
+
* Callback from BrowserTestChannel for when the channel has an error.
|
|
1756
|
+
* @param {goog.net.BrowserTestChannel} testChannel The BrowserTestChannel.
|
|
1757
|
+
* @param {goog.net.ChannelRequest.Error} errorCode The error code of the
|
|
1758
|
+
failure.
|
|
1759
|
+
*/
|
|
1760
|
+
goog.net.BrowserChannel.prototype.testConnectionFailure =
|
|
1761
|
+
function(testChannel, errorCode) {
|
|
1762
|
+
this.channelDebug_.debug('Test Connection Failed');
|
|
1763
|
+
this.lastStatusCode_ = testChannel.getLastStatusCode();
|
|
1764
|
+
this.signalError_(goog.net.BrowserChannel.Error.REQUEST_FAILED);
|
|
1765
|
+
};
|
|
1766
|
+
|
|
1767
|
+
|
|
1768
|
+
/**
|
|
1769
|
+
* Callback from BrowserTestChannel for when the channel is blocked.
|
|
1770
|
+
* @param {goog.net.BrowserTestChannel} testChannel The BrowserTestChannel.
|
|
1771
|
+
*/
|
|
1772
|
+
goog.net.BrowserChannel.prototype.testConnectionBlocked =
|
|
1773
|
+
function(testChannel) {
|
|
1774
|
+
this.channelDebug_.debug('Test Connection Blocked');
|
|
1775
|
+
this.lastStatusCode_ = this.connectionTest_.getLastStatusCode();
|
|
1776
|
+
this.signalError_(goog.net.BrowserChannel.Error.BLOCKED);
|
|
1777
|
+
};
|
|
1778
|
+
|
|
1779
|
+
|
|
1780
|
+
/**
|
|
1781
|
+
* Callback from ChannelRequest for when new data is received
|
|
1782
|
+
* @param {goog.net.ChannelRequest} request The request object.
|
|
1783
|
+
* @param {string} responseText The text of the response.
|
|
1784
|
+
*/
|
|
1785
|
+
goog.net.BrowserChannel.prototype.onRequestData =
|
|
1786
|
+
function(request, responseText) {
|
|
1787
|
+
if (this.state_ == goog.net.BrowserChannel.State.CLOSED ||
|
|
1788
|
+
(this.backChannelRequest_ != request &&
|
|
1789
|
+
this.forwardChannelRequest_ != request)) {
|
|
1790
|
+
// either CLOSED or a request we don't know about (perhaps an old request)
|
|
1791
|
+
return;
|
|
1792
|
+
}
|
|
1793
|
+
this.lastStatusCode_ = request.getLastStatusCode();
|
|
1794
|
+
|
|
1795
|
+
if (this.forwardChannelRequest_ == request &&
|
|
1796
|
+
this.state_ == goog.net.BrowserChannel.State.OPENED) {
|
|
1797
|
+
if (this.channelVersion_ > 7) {
|
|
1798
|
+
var response;
|
|
1799
|
+
try {
|
|
1800
|
+
response = this.parser_.parse(responseText);
|
|
1801
|
+
} catch (ex) {
|
|
1802
|
+
response = null;
|
|
1803
|
+
}
|
|
1804
|
+
if (goog.isArray(response) && response.length == 3) {
|
|
1805
|
+
this.handlePostResponse_(/** @type {Array} */ (response));
|
|
1806
|
+
} else {
|
|
1807
|
+
this.channelDebug_.debug('Bad POST response data returned');
|
|
1808
|
+
this.signalError_(goog.net.BrowserChannel.Error.BAD_RESPONSE);
|
|
1809
|
+
}
|
|
1810
|
+
} else if (responseText != goog.net.BrowserChannel.MAGIC_RESPONSE_COOKIE) {
|
|
1811
|
+
this.channelDebug_.debug('Bad data returned - missing/invald ' +
|
|
1812
|
+
'magic cookie');
|
|
1813
|
+
this.signalError_(goog.net.BrowserChannel.Error.BAD_RESPONSE);
|
|
1814
|
+
}
|
|
1815
|
+
} else {
|
|
1816
|
+
if (this.backChannelRequest_ == request) {
|
|
1817
|
+
this.clearDeadBackchannelTimer_();
|
|
1818
|
+
}
|
|
1819
|
+
if (!goog.string.isEmpty(responseText)) {
|
|
1820
|
+
var response = this.parser_.parse(responseText);
|
|
1821
|
+
goog.asserts.assert(goog.isArray(response));
|
|
1822
|
+
this.onInput_(/** @type {!Array} */ (response));
|
|
1823
|
+
}
|
|
1824
|
+
}
|
|
1825
|
+
};
|
|
1826
|
+
|
|
1827
|
+
|
|
1828
|
+
/**
|
|
1829
|
+
* Handles a POST response from the server.
|
|
1830
|
+
* @param {Array} responseValues The key value pairs in the POST response.
|
|
1831
|
+
* @private
|
|
1832
|
+
*/
|
|
1833
|
+
goog.net.BrowserChannel.prototype.handlePostResponse_ = function(
|
|
1834
|
+
responseValues) {
|
|
1835
|
+
// The first response value is set to 0 if server is missing backchannel.
|
|
1836
|
+
if (responseValues[0] == 0) {
|
|
1837
|
+
this.handleBackchannelMissing_();
|
|
1838
|
+
return;
|
|
1839
|
+
}
|
|
1840
|
+
this.lastPostResponseArrayId_ = responseValues[1];
|
|
1841
|
+
var outstandingArrays = this.lastPostResponseArrayId_ - this.lastArrayId_;
|
|
1842
|
+
if (0 < outstandingArrays) {
|
|
1843
|
+
var numOutstandingBackchannelBytes = responseValues[2];
|
|
1844
|
+
this.channelDebug_.debug(numOutstandingBackchannelBytes + ' bytes (in ' +
|
|
1845
|
+
outstandingArrays + ' arrays) are outstanding on the BackChannel');
|
|
1846
|
+
if (!this.shouldRetryBackChannel_(numOutstandingBackchannelBytes)) {
|
|
1847
|
+
return;
|
|
1848
|
+
}
|
|
1849
|
+
if (!this.deadBackChannelTimerId_) {
|
|
1850
|
+
// We expect to receive data within 2 RTTs or we retry the backchannel.
|
|
1851
|
+
this.deadBackChannelTimerId_ = goog.net.BrowserChannel.setTimeout(
|
|
1852
|
+
goog.bind(this.onBackChannelDead_, this),
|
|
1853
|
+
2 * goog.net.BrowserChannel.RTT_ESTIMATE);
|
|
1854
|
+
}
|
|
1855
|
+
}
|
|
1856
|
+
};
|
|
1857
|
+
|
|
1858
|
+
|
|
1859
|
+
/**
|
|
1860
|
+
* Handles a POST response from the server telling us that it has detected that
|
|
1861
|
+
* we have no hanging GET connection.
|
|
1862
|
+
* @private
|
|
1863
|
+
*/
|
|
1864
|
+
goog.net.BrowserChannel.prototype.handleBackchannelMissing_ = function() {
|
|
1865
|
+
// As long as the back channel was started before the POST was sent,
|
|
1866
|
+
// we should retry the backchannel. We give a slight buffer of RTT_ESTIMATE
|
|
1867
|
+
// so as not to excessively retry the backchannel
|
|
1868
|
+
this.channelDebug_.debug('Server claims our backchannel is missing.');
|
|
1869
|
+
if (this.backChannelTimerId_) {
|
|
1870
|
+
this.channelDebug_.debug('But we are currently starting the request.');
|
|
1871
|
+
return;
|
|
1872
|
+
} else if (!this.backChannelRequest_) {
|
|
1873
|
+
this.channelDebug_.warning(
|
|
1874
|
+
'We do not have a BackChannel established');
|
|
1875
|
+
} else if (this.backChannelRequest_.getRequestStartTime() +
|
|
1876
|
+
goog.net.BrowserChannel.RTT_ESTIMATE <
|
|
1877
|
+
this.forwardChannelRequest_.getRequestStartTime()) {
|
|
1878
|
+
this.clearDeadBackchannelTimer_();
|
|
1879
|
+
this.backChannelRequest_.cancel();
|
|
1880
|
+
this.backChannelRequest_ = null;
|
|
1881
|
+
} else {
|
|
1882
|
+
return;
|
|
1883
|
+
}
|
|
1884
|
+
this.maybeRetryBackChannel_();
|
|
1885
|
+
goog.net.BrowserChannel.notifyStatEvent(
|
|
1886
|
+
goog.net.BrowserChannel.Stat.BACKCHANNEL_MISSING);
|
|
1887
|
+
};
|
|
1888
|
+
|
|
1889
|
+
|
|
1890
|
+
/**
|
|
1891
|
+
* Determines whether we should start the process of retrying a possibly
|
|
1892
|
+
* dead backchannel.
|
|
1893
|
+
* @param {number} outstandingBytes The number of bytes for which the server has
|
|
1894
|
+
* not yet received acknowledgement.
|
|
1895
|
+
* @return {boolean} Whether to start the backchannel retry timer.
|
|
1896
|
+
* @private
|
|
1897
|
+
*/
|
|
1898
|
+
goog.net.BrowserChannel.prototype.shouldRetryBackChannel_ = function(
|
|
1899
|
+
outstandingBytes) {
|
|
1900
|
+
// Not too many outstanding bytes, not buffered and not after a retry.
|
|
1901
|
+
return outstandingBytes <
|
|
1902
|
+
goog.net.BrowserChannel.OUTSTANDING_DATA_BACKCHANNEL_RETRY_CUTOFF &&
|
|
1903
|
+
!this.isBuffered() &&
|
|
1904
|
+
this.backChannelRetryCount_ == 0;
|
|
1905
|
+
};
|
|
1906
|
+
|
|
1907
|
+
|
|
1908
|
+
/**
|
|
1909
|
+
* Decides which host prefix should be used, if any. If there is a handler,
|
|
1910
|
+
* allows the handler to validate a host prefix provided by the server, and
|
|
1911
|
+
* optionally override it.
|
|
1912
|
+
* @param {?string} serverHostPrefix The host prefix provided by the server.
|
|
1913
|
+
* @return {?string} The host prefix to actually use, if any. Will return null
|
|
1914
|
+
* if the use of host prefixes was disabled via setAllowHostPrefix().
|
|
1915
|
+
*/
|
|
1916
|
+
goog.net.BrowserChannel.prototype.correctHostPrefix = function(
|
|
1917
|
+
serverHostPrefix) {
|
|
1918
|
+
if (this.allowHostPrefix_) {
|
|
1919
|
+
if (this.handler_) {
|
|
1920
|
+
return this.handler_.correctHostPrefix(serverHostPrefix);
|
|
1921
|
+
}
|
|
1922
|
+
return serverHostPrefix;
|
|
1923
|
+
}
|
|
1924
|
+
return null;
|
|
1925
|
+
};
|
|
1926
|
+
|
|
1927
|
+
|
|
1928
|
+
/**
|
|
1929
|
+
* Handles the timer that indicates that our backchannel is no longer able to
|
|
1930
|
+
* successfully receive data from the server.
|
|
1931
|
+
* @private
|
|
1932
|
+
*/
|
|
1933
|
+
goog.net.BrowserChannel.prototype.onBackChannelDead_ = function() {
|
|
1934
|
+
if (goog.isDefAndNotNull(this.deadBackChannelTimerId_)) {
|
|
1935
|
+
this.deadBackChannelTimerId_ = null;
|
|
1936
|
+
this.backChannelRequest_.cancel();
|
|
1937
|
+
this.backChannelRequest_ = null;
|
|
1938
|
+
this.maybeRetryBackChannel_();
|
|
1939
|
+
goog.net.BrowserChannel.notifyStatEvent(
|
|
1940
|
+
goog.net.BrowserChannel.Stat.BACKCHANNEL_DEAD);
|
|
1941
|
+
}
|
|
1942
|
+
};
|
|
1943
|
+
|
|
1944
|
+
|
|
1945
|
+
/**
|
|
1946
|
+
* Clears the timer that indicates that our backchannel is no longer able to
|
|
1947
|
+
* successfully receive data from the server.
|
|
1948
|
+
* @private
|
|
1949
|
+
*/
|
|
1950
|
+
goog.net.BrowserChannel.prototype.clearDeadBackchannelTimer_ = function() {
|
|
1951
|
+
if (goog.isDefAndNotNull(this.deadBackChannelTimerId_)) {
|
|
1952
|
+
goog.global.clearTimeout(this.deadBackChannelTimerId_);
|
|
1953
|
+
this.deadBackChannelTimerId_ = null;
|
|
1954
|
+
}
|
|
1955
|
+
};
|
|
1956
|
+
|
|
1957
|
+
|
|
1958
|
+
/**
|
|
1959
|
+
* Returns whether or not the given error/status combination is fatal or not.
|
|
1960
|
+
* On fatal errors we immediately close the session rather than retrying the
|
|
1961
|
+
* failed request.
|
|
1962
|
+
* @param {goog.net.ChannelRequest.Error?} error The error code for the failed
|
|
1963
|
+
* request.
|
|
1964
|
+
* @param {number} statusCode The last HTTP status code.
|
|
1965
|
+
* @return {boolean} Whether or not the error is fatal.
|
|
1966
|
+
* @private
|
|
1967
|
+
*/
|
|
1968
|
+
goog.net.BrowserChannel.isFatalError_ =
|
|
1969
|
+
function(error, statusCode) {
|
|
1970
|
+
return error == goog.net.ChannelRequest.Error.UNKNOWN_SESSION_ID ||
|
|
1971
|
+
error == goog.net.ChannelRequest.Error.ACTIVE_X_BLOCKED ||
|
|
1972
|
+
(error == goog.net.ChannelRequest.Error.STATUS &&
|
|
1973
|
+
statusCode > 0);
|
|
1974
|
+
};
|
|
1975
|
+
|
|
1976
|
+
|
|
1977
|
+
/**
|
|
1978
|
+
* Callback from ChannelRequest that indicates a request has completed.
|
|
1979
|
+
* @param {goog.net.ChannelRequest} request The request object.
|
|
1980
|
+
*/
|
|
1981
|
+
goog.net.BrowserChannel.prototype.onRequestComplete =
|
|
1982
|
+
function(request) {
|
|
1983
|
+
this.channelDebug_.debug('Request complete');
|
|
1984
|
+
var type;
|
|
1985
|
+
if (this.backChannelRequest_ == request) {
|
|
1986
|
+
this.clearDeadBackchannelTimer_();
|
|
1987
|
+
this.backChannelRequest_ = null;
|
|
1988
|
+
type = goog.net.BrowserChannel.ChannelType_.BACK_CHANNEL;
|
|
1989
|
+
} else if (this.forwardChannelRequest_ == request) {
|
|
1990
|
+
this.forwardChannelRequest_ = null;
|
|
1991
|
+
type = goog.net.BrowserChannel.ChannelType_.FORWARD_CHANNEL;
|
|
1992
|
+
} else {
|
|
1993
|
+
// return if it was an old request from a previous session
|
|
1994
|
+
return;
|
|
1995
|
+
}
|
|
1996
|
+
|
|
1997
|
+
this.lastStatusCode_ = request.getLastStatusCode();
|
|
1998
|
+
|
|
1999
|
+
if (this.state_ == goog.net.BrowserChannel.State.CLOSED) {
|
|
2000
|
+
return;
|
|
2001
|
+
}
|
|
2002
|
+
|
|
2003
|
+
if (request.getSuccess()) {
|
|
2004
|
+
// Yay!
|
|
2005
|
+
if (type == goog.net.BrowserChannel.ChannelType_.FORWARD_CHANNEL) {
|
|
2006
|
+
var size = request.getPostData() ? request.getPostData().length : 0;
|
|
2007
|
+
goog.net.BrowserChannel.notifyTimingEvent(size,
|
|
2008
|
+
goog.now() - request.getRequestStartTime(),
|
|
2009
|
+
this.forwardChannelRetryCount_);
|
|
2010
|
+
this.ensureForwardChannel_();
|
|
2011
|
+
this.onSuccess_();
|
|
2012
|
+
this.pendingMaps_.length = 0;
|
|
2013
|
+
} else { // i.e., back-channel
|
|
2014
|
+
this.ensureBackChannel_();
|
|
2015
|
+
}
|
|
2016
|
+
return;
|
|
2017
|
+
}
|
|
2018
|
+
// Else unsuccessful. Fall through.
|
|
2019
|
+
|
|
2020
|
+
var lastError = request.getLastError();
|
|
2021
|
+
if (!goog.net.BrowserChannel.isFatalError_(lastError,
|
|
2022
|
+
this.lastStatusCode_)) {
|
|
2023
|
+
// Maybe retry.
|
|
2024
|
+
this.channelDebug_.debug('Maybe retrying, last error: ' +
|
|
2025
|
+
goog.net.ChannelRequest.errorStringFromCode(
|
|
2026
|
+
/** @type {goog.net.ChannelRequest.Error} */ (lastError),
|
|
2027
|
+
this.lastStatusCode_));
|
|
2028
|
+
if (type == goog.net.BrowserChannel.ChannelType_.FORWARD_CHANNEL) {
|
|
2029
|
+
if (this.maybeRetryForwardChannel_(request)) {
|
|
2030
|
+
return;
|
|
2031
|
+
}
|
|
2032
|
+
}
|
|
2033
|
+
if (type == goog.net.BrowserChannel.ChannelType_.BACK_CHANNEL) {
|
|
2034
|
+
if (this.maybeRetryBackChannel_()) {
|
|
2035
|
+
return;
|
|
2036
|
+
}
|
|
2037
|
+
}
|
|
2038
|
+
// Else exceeded max retries. Fall through.
|
|
2039
|
+
this.channelDebug_.debug('Exceeded max number of retries');
|
|
2040
|
+
} else {
|
|
2041
|
+
// Else fatal error. Fall through and mark the pending maps as failed.
|
|
2042
|
+
this.channelDebug_.debug('Not retrying due to error type');
|
|
2043
|
+
}
|
|
2044
|
+
|
|
2045
|
+
|
|
2046
|
+
// Can't save this session. :(
|
|
2047
|
+
this.channelDebug_.debug('Error: HTTP request failed');
|
|
2048
|
+
switch (lastError) {
|
|
2049
|
+
case goog.net.ChannelRequest.Error.NO_DATA:
|
|
2050
|
+
this.signalError_(goog.net.BrowserChannel.Error.NO_DATA);
|
|
2051
|
+
break;
|
|
2052
|
+
case goog.net.ChannelRequest.Error.BAD_DATA:
|
|
2053
|
+
this.signalError_(goog.net.BrowserChannel.Error.BAD_DATA);
|
|
2054
|
+
break;
|
|
2055
|
+
case goog.net.ChannelRequest.Error.UNKNOWN_SESSION_ID:
|
|
2056
|
+
this.signalError_(goog.net.BrowserChannel.Error.UNKNOWN_SESSION_ID);
|
|
2057
|
+
break;
|
|
2058
|
+
case goog.net.ChannelRequest.Error.ACTIVE_X_BLOCKED:
|
|
2059
|
+
this.signalError_(goog.net.BrowserChannel.Error.ACTIVE_X_BLOCKED);
|
|
2060
|
+
break;
|
|
2061
|
+
default:
|
|
2062
|
+
this.signalError_(goog.net.BrowserChannel.Error.REQUEST_FAILED);
|
|
2063
|
+
break;
|
|
2064
|
+
}
|
|
2065
|
+
};
|
|
2066
|
+
|
|
2067
|
+
|
|
2068
|
+
/**
|
|
2069
|
+
* @param {number} retryCount Number of retries so far.
|
|
2070
|
+
* @return {number} Time in ms before firing next retry request.
|
|
2071
|
+
* @private
|
|
2072
|
+
*/
|
|
2073
|
+
goog.net.BrowserChannel.prototype.getRetryTime_ = function(retryCount) {
|
|
2074
|
+
var retryTime = this.baseRetryDelayMs_ +
|
|
2075
|
+
Math.floor(Math.random() * this.retryDelaySeedMs_);
|
|
2076
|
+
if (!this.isActive()) {
|
|
2077
|
+
this.channelDebug_.debug('Inactive channel');
|
|
2078
|
+
retryTime =
|
|
2079
|
+
retryTime * goog.net.BrowserChannel.INACTIVE_CHANNEL_RETRY_FACTOR;
|
|
2080
|
+
}
|
|
2081
|
+
// Backoff for subsequent retries
|
|
2082
|
+
retryTime = retryTime * retryCount;
|
|
2083
|
+
return retryTime;
|
|
2084
|
+
};
|
|
2085
|
+
|
|
2086
|
+
|
|
2087
|
+
/**
|
|
2088
|
+
* @param {number} baseDelayMs The base part of the retry delay, in ms.
|
|
2089
|
+
* @param {number} delaySeedMs A random delay between 0 and this is added to
|
|
2090
|
+
* the base part.
|
|
2091
|
+
*/
|
|
2092
|
+
goog.net.BrowserChannel.prototype.setRetryDelay = function(baseDelayMs,
|
|
2093
|
+
delaySeedMs) {
|
|
2094
|
+
this.baseRetryDelayMs_ = baseDelayMs;
|
|
2095
|
+
this.retryDelaySeedMs_ = delaySeedMs;
|
|
2096
|
+
};
|
|
2097
|
+
|
|
2098
|
+
|
|
2099
|
+
/**
|
|
2100
|
+
* Processes the data returned by the server.
|
|
2101
|
+
* @param {!Array.<!Array>} respArray The response array returned by the server.
|
|
2102
|
+
* @private
|
|
2103
|
+
*/
|
|
2104
|
+
goog.net.BrowserChannel.prototype.onInput_ = function(respArray) {
|
|
2105
|
+
var batch = this.handler_ && this.handler_.channelHandleMultipleArrays ?
|
|
2106
|
+
[] : null;
|
|
2107
|
+
for (var i = 0; i < respArray.length; i++) {
|
|
2108
|
+
var nextArray = respArray[i];
|
|
2109
|
+
this.lastArrayId_ = nextArray[0];
|
|
2110
|
+
nextArray = nextArray[1];
|
|
2111
|
+
if (this.state_ == goog.net.BrowserChannel.State.OPENING) {
|
|
2112
|
+
if (nextArray[0] == 'c') {
|
|
2113
|
+
this.sid_ = nextArray[1];
|
|
2114
|
+
this.hostPrefix_ = this.correctHostPrefix(nextArray[2]);
|
|
2115
|
+
var negotiatedVersion = nextArray[3];
|
|
2116
|
+
if (goog.isDefAndNotNull(negotiatedVersion)) {
|
|
2117
|
+
this.channelVersion_ = negotiatedVersion;
|
|
2118
|
+
} else {
|
|
2119
|
+
// Servers prior to version 7 did not send this, so assume version 6.
|
|
2120
|
+
this.channelVersion_ = 6;
|
|
2121
|
+
}
|
|
2122
|
+
this.state_ = goog.net.BrowserChannel.State.OPENED;
|
|
2123
|
+
if (this.handler_) {
|
|
2124
|
+
this.handler_.channelOpened(this);
|
|
2125
|
+
}
|
|
2126
|
+
this.backChannelUri_ = this.getBackChannelUri(
|
|
2127
|
+
this.hostPrefix_, /** @type {string} */ (this.path_));
|
|
2128
|
+
// Open connection to receive data
|
|
2129
|
+
this.ensureBackChannel_();
|
|
2130
|
+
} else if (nextArray[0] == 'stop') {
|
|
2131
|
+
this.signalError_(goog.net.BrowserChannel.Error.STOP);
|
|
2132
|
+
}
|
|
2133
|
+
} else if (this.state_ == goog.net.BrowserChannel.State.OPENED) {
|
|
2134
|
+
if (nextArray[0] == 'stop') {
|
|
2135
|
+
if (batch && !goog.array.isEmpty(batch)) {
|
|
2136
|
+
this.handler_.channelHandleMultipleArrays(this, batch);
|
|
2137
|
+
batch.length = 0;
|
|
2138
|
+
}
|
|
2139
|
+
this.signalError_(goog.net.BrowserChannel.Error.STOP);
|
|
2140
|
+
} else if (nextArray[0] == 'noop') {
|
|
2141
|
+
// ignore - noop to keep connection happy
|
|
2142
|
+
} else {
|
|
2143
|
+
if (batch) {
|
|
2144
|
+
batch.push(nextArray);
|
|
2145
|
+
} else if (this.handler_) {
|
|
2146
|
+
this.handler_.channelHandleArray(this, nextArray);
|
|
2147
|
+
}
|
|
2148
|
+
}
|
|
2149
|
+
// We have received useful data on the back-channel, so clear its retry
|
|
2150
|
+
// count. We do this because back-channels by design do not complete
|
|
2151
|
+
// quickly, so on a flaky connection we could have many fail to complete
|
|
2152
|
+
// fully but still deliver a lot of data before they fail. We don't want
|
|
2153
|
+
// to count such failures towards the retry limit, because we don't want
|
|
2154
|
+
// to give up on a session if we can still receive data.
|
|
2155
|
+
this.backChannelRetryCount_ = 0;
|
|
2156
|
+
}
|
|
2157
|
+
}
|
|
2158
|
+
if (batch && !goog.array.isEmpty(batch)) {
|
|
2159
|
+
this.handler_.channelHandleMultipleArrays(this, batch);
|
|
2160
|
+
}
|
|
2161
|
+
};
|
|
2162
|
+
|
|
2163
|
+
|
|
2164
|
+
/**
|
|
2165
|
+
* Helper to ensure the BrowserChannel is in the expected state.
|
|
2166
|
+
* @param {...number} var_args The channel must be in one of the indicated
|
|
2167
|
+
* states.
|
|
2168
|
+
* @private
|
|
2169
|
+
*/
|
|
2170
|
+
goog.net.BrowserChannel.prototype.ensureInState_ = function(var_args) {
|
|
2171
|
+
if (!goog.array.contains(arguments, this.state_)) {
|
|
2172
|
+
throw Error('Unexpected channel state: ' + this.state_);
|
|
2173
|
+
}
|
|
2174
|
+
};
|
|
2175
|
+
|
|
2176
|
+
|
|
2177
|
+
/**
|
|
2178
|
+
* Signals an error has occurred.
|
|
2179
|
+
* @param {goog.net.BrowserChannel.Error} error The error code for the failure.
|
|
2180
|
+
* @private
|
|
2181
|
+
*/
|
|
2182
|
+
goog.net.BrowserChannel.prototype.signalError_ = function(error) {
|
|
2183
|
+
this.channelDebug_.info('Error code ' + error);
|
|
2184
|
+
if (error == goog.net.BrowserChannel.Error.REQUEST_FAILED ||
|
|
2185
|
+
error == goog.net.BrowserChannel.Error.BLOCKED) {
|
|
2186
|
+
// Ping google to check if it's a server error or user's network error.
|
|
2187
|
+
var imageUri = null;
|
|
2188
|
+
if (this.handler_) {
|
|
2189
|
+
imageUri = this.handler_.getNetworkTestImageUri(this);
|
|
2190
|
+
}
|
|
2191
|
+
goog.net.tmpnetwork.testGoogleCom(
|
|
2192
|
+
goog.bind(this.testGoogleComCallback_, this), imageUri);
|
|
2193
|
+
} else {
|
|
2194
|
+
goog.net.BrowserChannel.notifyStatEvent(
|
|
2195
|
+
goog.net.BrowserChannel.Stat.ERROR_OTHER);
|
|
2196
|
+
}
|
|
2197
|
+
this.onError_(error);
|
|
2198
|
+
};
|
|
2199
|
+
|
|
2200
|
+
|
|
2201
|
+
/**
|
|
2202
|
+
* Callback for testGoogleCom during error handling.
|
|
2203
|
+
* @param {boolean} networkUp Whether the network is up.
|
|
2204
|
+
* @private
|
|
2205
|
+
*/
|
|
2206
|
+
goog.net.BrowserChannel.prototype.testGoogleComCallback_ = function(networkUp) {
|
|
2207
|
+
if (networkUp) {
|
|
2208
|
+
this.channelDebug_.info('Successfully pinged google.com');
|
|
2209
|
+
goog.net.BrowserChannel.notifyStatEvent(
|
|
2210
|
+
goog.net.BrowserChannel.Stat.ERROR_OTHER);
|
|
2211
|
+
} else {
|
|
2212
|
+
this.channelDebug_.info('Failed to ping google.com');
|
|
2213
|
+
goog.net.BrowserChannel.notifyStatEvent(
|
|
2214
|
+
goog.net.BrowserChannel.Stat.ERROR_NETWORK);
|
|
2215
|
+
// We cann onError_ here instead of signalError_ because the latter just
|
|
2216
|
+
// calls notifyStatEvent, and we don't want to have another stat event.
|
|
2217
|
+
this.onError_(goog.net.BrowserChannel.Error.NETWORK);
|
|
2218
|
+
}
|
|
2219
|
+
};
|
|
2220
|
+
|
|
2221
|
+
|
|
2222
|
+
/**
|
|
2223
|
+
* Called when messages have been successfully sent from the queue.
|
|
2224
|
+
* @private
|
|
2225
|
+
*/
|
|
2226
|
+
goog.net.BrowserChannel.prototype.onSuccess_ = function() {
|
|
2227
|
+
if (this.handler_) {
|
|
2228
|
+
this.handler_.channelSuccess(this, this.pendingMaps_);
|
|
2229
|
+
}
|
|
2230
|
+
};
|
|
2231
|
+
|
|
2232
|
+
|
|
2233
|
+
/**
|
|
2234
|
+
* Called when we've determined the final error for a channel. It closes the
|
|
2235
|
+
* notifiers the handler of the error and closes the channel.
|
|
2236
|
+
* @param {goog.net.BrowserChannel.Error} error The error code for the failure.
|
|
2237
|
+
* @private
|
|
2238
|
+
*/
|
|
2239
|
+
goog.net.BrowserChannel.prototype.onError_ = function(error) {
|
|
2240
|
+
this.channelDebug_.debug('HttpChannel: error - ' + error);
|
|
2241
|
+
this.state_ = goog.net.BrowserChannel.State.CLOSED;
|
|
2242
|
+
if (this.handler_) {
|
|
2243
|
+
this.handler_.channelError(this, error);
|
|
2244
|
+
}
|
|
2245
|
+
this.onClose_();
|
|
2246
|
+
this.cancelRequests_();
|
|
2247
|
+
};
|
|
2248
|
+
|
|
2249
|
+
|
|
2250
|
+
/**
|
|
2251
|
+
* Called when the channel has been closed. It notifiers the handler of the
|
|
2252
|
+
* event, and reports any pending or undelivered maps.
|
|
2253
|
+
* @private
|
|
2254
|
+
*/
|
|
2255
|
+
goog.net.BrowserChannel.prototype.onClose_ = function() {
|
|
2256
|
+
this.state_ = goog.net.BrowserChannel.State.CLOSED;
|
|
2257
|
+
this.lastStatusCode_ = -1;
|
|
2258
|
+
if (this.handler_) {
|
|
2259
|
+
if (this.pendingMaps_.length == 0 && this.outgoingMaps_.length == 0) {
|
|
2260
|
+
this.handler_.channelClosed(this);
|
|
2261
|
+
} else {
|
|
2262
|
+
this.channelDebug_.debug('Number of undelivered maps' +
|
|
2263
|
+
', pending: ' + this.pendingMaps_.length +
|
|
2264
|
+
', outgoing: ' + this.outgoingMaps_.length);
|
|
2265
|
+
|
|
2266
|
+
var copyOfPendingMaps = goog.array.clone(this.pendingMaps_);
|
|
2267
|
+
var copyOfUndeliveredMaps = goog.array.clone(this.outgoingMaps_);
|
|
2268
|
+
this.pendingMaps_.length = 0;
|
|
2269
|
+
this.outgoingMaps_.length = 0;
|
|
2270
|
+
|
|
2271
|
+
this.handler_.channelClosed(this,
|
|
2272
|
+
copyOfPendingMaps,
|
|
2273
|
+
copyOfUndeliveredMaps);
|
|
2274
|
+
}
|
|
2275
|
+
}
|
|
2276
|
+
};
|
|
2277
|
+
|
|
2278
|
+
|
|
2279
|
+
/**
|
|
2280
|
+
* Gets the Uri used for the connection that sends data to the server.
|
|
2281
|
+
* @param {string} path The path on the host.
|
|
2282
|
+
* @return {goog.Uri} The forward channel URI.
|
|
2283
|
+
*/
|
|
2284
|
+
goog.net.BrowserChannel.prototype.getForwardChannelUri =
|
|
2285
|
+
function(path) {
|
|
2286
|
+
var uri = this.createDataUri(null, path);
|
|
2287
|
+
this.channelDebug_.debug('GetForwardChannelUri: ' + uri);
|
|
2288
|
+
return uri;
|
|
2289
|
+
};
|
|
2290
|
+
|
|
2291
|
+
|
|
2292
|
+
/**
|
|
2293
|
+
* Gets the results for the first browser channel test
|
|
2294
|
+
* @return {Array.<string>} The results.
|
|
2295
|
+
*/
|
|
2296
|
+
goog.net.BrowserChannel.prototype.getFirstTestResults =
|
|
2297
|
+
function() {
|
|
2298
|
+
return this.firstTestResults_;
|
|
2299
|
+
};
|
|
2300
|
+
|
|
2301
|
+
|
|
2302
|
+
/**
|
|
2303
|
+
* Gets the results for the second browser channel test
|
|
2304
|
+
* @return {?boolean} The results. True -> buffered connection,
|
|
2305
|
+
* False -> unbuffered, null -> unknown.
|
|
2306
|
+
*/
|
|
2307
|
+
goog.net.BrowserChannel.prototype.getSecondTestResults = function() {
|
|
2308
|
+
return this.secondTestResults_;
|
|
2309
|
+
};
|
|
2310
|
+
|
|
2311
|
+
|
|
2312
|
+
/**
|
|
2313
|
+
* Gets the Uri used for the connection that receives data from the server.
|
|
2314
|
+
* @param {?string} hostPrefix The host prefix.
|
|
2315
|
+
* @param {string} path The path on the host.
|
|
2316
|
+
* @return {goog.Uri} The back channel URI.
|
|
2317
|
+
*/
|
|
2318
|
+
goog.net.BrowserChannel.prototype.getBackChannelUri =
|
|
2319
|
+
function(hostPrefix, path) {
|
|
2320
|
+
var uri = this.createDataUri(this.shouldUseSecondaryDomains() ?
|
|
2321
|
+
hostPrefix : null, path);
|
|
2322
|
+
this.channelDebug_.debug('GetBackChannelUri: ' + uri);
|
|
2323
|
+
return uri;
|
|
2324
|
+
};
|
|
2325
|
+
|
|
2326
|
+
|
|
2327
|
+
/**
|
|
2328
|
+
* Creates a data Uri applying logic for secondary hostprefix, port
|
|
2329
|
+
* overrides, and versioning.
|
|
2330
|
+
* @param {?string} hostPrefix The host prefix.
|
|
2331
|
+
* @param {string} path The path on the host (may be absolute or relative).
|
|
2332
|
+
* @param {number=} opt_overridePort Optional override port.
|
|
2333
|
+
* @return {goog.Uri} The data URI.
|
|
2334
|
+
*/
|
|
2335
|
+
goog.net.BrowserChannel.prototype.createDataUri =
|
|
2336
|
+
function(hostPrefix, path, opt_overridePort) {
|
|
2337
|
+
var uri = goog.Uri.parse(path);
|
|
2338
|
+
var uriAbsolute = (uri.getDomain() != '');
|
|
2339
|
+
if (uriAbsolute) {
|
|
2340
|
+
if (hostPrefix) {
|
|
2341
|
+
uri.setDomain(hostPrefix + '.' + uri.getDomain());
|
|
2342
|
+
}
|
|
2343
|
+
|
|
2344
|
+
uri.setPort(opt_overridePort || uri.getPort());
|
|
2345
|
+
} else {
|
|
2346
|
+
var locationPage = window.location;
|
|
2347
|
+
var hostName;
|
|
2348
|
+
if (hostPrefix) {
|
|
2349
|
+
hostName = hostPrefix + '.' + locationPage.hostname;
|
|
2350
|
+
} else {
|
|
2351
|
+
hostName = locationPage.hostname;
|
|
2352
|
+
}
|
|
2353
|
+
|
|
2354
|
+
var port = opt_overridePort || locationPage.port;
|
|
2355
|
+
|
|
2356
|
+
uri = goog.Uri.create(locationPage.protocol, null, hostName, port, path);
|
|
2357
|
+
}
|
|
2358
|
+
|
|
2359
|
+
if (this.extraParams_) {
|
|
2360
|
+
goog.structs.forEach(this.extraParams_, function(value, key, coll) {
|
|
2361
|
+
uri.setParameterValue(key, value);
|
|
2362
|
+
});
|
|
2363
|
+
}
|
|
2364
|
+
|
|
2365
|
+
// Add the protocol version to the URI.
|
|
2366
|
+
uri.setParameterValue('VER', this.channelVersion_);
|
|
2367
|
+
|
|
2368
|
+
// Add the reconnect parameters.
|
|
2369
|
+
this.addAdditionalParams_(uri);
|
|
2370
|
+
|
|
2371
|
+
return uri;
|
|
2372
|
+
};
|
|
2373
|
+
|
|
2374
|
+
|
|
2375
|
+
/**
|
|
2376
|
+
* Called when BC needs to create an XhrIo object. Override in a subclass if
|
|
2377
|
+
* you need to customize the behavior, for example to enable the creation of
|
|
2378
|
+
* XHR's capable of calling a secondary domain. Will also allow calling
|
|
2379
|
+
* a secondary domain if withCredentials (CORS) is enabled.
|
|
2380
|
+
* @param {?string} hostPrefix The host prefix, if we need an XhrIo object
|
|
2381
|
+
* capable of calling a secondary domain.
|
|
2382
|
+
* @return {!goog.net.XhrIo} A new XhrIo object.
|
|
2383
|
+
*/
|
|
2384
|
+
goog.net.BrowserChannel.prototype.createXhrIo = function(hostPrefix) {
|
|
2385
|
+
if (hostPrefix && !this.supportsCrossDomainXhrs_) {
|
|
2386
|
+
throw Error('Can\'t create secondary domain capable XhrIo object.');
|
|
2387
|
+
}
|
|
2388
|
+
var xhr = new goog.net.XhrIo();
|
|
2389
|
+
xhr.setWithCredentials(this.supportsCrossDomainXhrs_);
|
|
2390
|
+
return xhr;
|
|
2391
|
+
};
|
|
2392
|
+
|
|
2393
|
+
|
|
2394
|
+
/**
|
|
2395
|
+
* Gets whether this channel is currently active. This is used to determine the
|
|
2396
|
+
* length of time to wait before retrying. This call delegates to the handler.
|
|
2397
|
+
* @return {boolean} Whether the channel is currently active.
|
|
2398
|
+
*/
|
|
2399
|
+
goog.net.BrowserChannel.prototype.isActive = function() {
|
|
2400
|
+
return !!this.handler_ && this.handler_.isActive(this);
|
|
2401
|
+
};
|
|
2402
|
+
|
|
2403
|
+
|
|
2404
|
+
/**
|
|
2405
|
+
* Wrapper around SafeTimeout which calls the start and end execution hooks
|
|
2406
|
+
* with a try...finally block.
|
|
2407
|
+
* @param {Function} fn The callback function.
|
|
2408
|
+
* @param {number} ms The time in MS for the timer.
|
|
2409
|
+
* @return {number} The ID of the timer.
|
|
2410
|
+
*/
|
|
2411
|
+
goog.net.BrowserChannel.setTimeout = function(fn, ms) {
|
|
2412
|
+
if (!goog.isFunction(fn)) {
|
|
2413
|
+
throw Error('Fn must not be null and must be a function');
|
|
2414
|
+
}
|
|
2415
|
+
return goog.global.setTimeout(function() {
|
|
2416
|
+
goog.net.BrowserChannel.onStartExecution();
|
|
2417
|
+
try {
|
|
2418
|
+
fn();
|
|
2419
|
+
} finally {
|
|
2420
|
+
goog.net.BrowserChannel.onEndExecution();
|
|
2421
|
+
}
|
|
2422
|
+
}, ms);
|
|
2423
|
+
};
|
|
2424
|
+
|
|
2425
|
+
|
|
2426
|
+
/**
|
|
2427
|
+
* Helper function to call the start hook
|
|
2428
|
+
*/
|
|
2429
|
+
goog.net.BrowserChannel.onStartExecution = function() {
|
|
2430
|
+
goog.net.BrowserChannel.startExecutionHook_();
|
|
2431
|
+
};
|
|
2432
|
+
|
|
2433
|
+
|
|
2434
|
+
/**
|
|
2435
|
+
* Helper function to call the end hook
|
|
2436
|
+
*/
|
|
2437
|
+
goog.net.BrowserChannel.onEndExecution = function() {
|
|
2438
|
+
goog.net.BrowserChannel.endExecutionHook_();
|
|
2439
|
+
};
|
|
2440
|
+
|
|
2441
|
+
|
|
2442
|
+
/**
|
|
2443
|
+
* Returns the singleton event target for stat events.
|
|
2444
|
+
* @return {goog.events.EventTarget} The event target for stat events.
|
|
2445
|
+
*/
|
|
2446
|
+
goog.net.BrowserChannel.getStatEventTarget = function() {
|
|
2447
|
+
return goog.net.BrowserChannel.statEventTarget_;
|
|
2448
|
+
};
|
|
2449
|
+
|
|
2450
|
+
|
|
2451
|
+
/**
|
|
2452
|
+
* Notify the channel that a particular fine grained network event has occurred.
|
|
2453
|
+
* Should be considered package-private.
|
|
2454
|
+
* @param {goog.net.BrowserChannel.ServerReachability} reachabilityType The
|
|
2455
|
+
* reachability event type.
|
|
2456
|
+
*/
|
|
2457
|
+
goog.net.BrowserChannel.prototype.notifyServerReachabilityEvent = function(
|
|
2458
|
+
reachabilityType) {
|
|
2459
|
+
var target = goog.net.BrowserChannel.statEventTarget_;
|
|
2460
|
+
target.dispatchEvent(new goog.net.BrowserChannel.ServerReachabilityEvent(
|
|
2461
|
+
target, reachabilityType));
|
|
2462
|
+
};
|
|
2463
|
+
|
|
2464
|
+
|
|
2465
|
+
/**
|
|
2466
|
+
* Helper function to call the stat event callback.
|
|
2467
|
+
* @param {goog.net.BrowserChannel.Stat} stat The stat.
|
|
2468
|
+
*/
|
|
2469
|
+
goog.net.BrowserChannel.notifyStatEvent = function(stat) {
|
|
2470
|
+
var target = goog.net.BrowserChannel.statEventTarget_;
|
|
2471
|
+
target.dispatchEvent(
|
|
2472
|
+
new goog.net.BrowserChannel.StatEvent(target, stat));
|
|
2473
|
+
};
|
|
2474
|
+
|
|
2475
|
+
|
|
2476
|
+
/**
|
|
2477
|
+
* Helper function to notify listeners about POST request performance.
|
|
2478
|
+
*
|
|
2479
|
+
* @param {number} size Number of characters in the POST data.
|
|
2480
|
+
* @param {number} rtt The amount of time from POST start to response.
|
|
2481
|
+
* @param {number} retries The number of times the POST had to be retried.
|
|
2482
|
+
*/
|
|
2483
|
+
goog.net.BrowserChannel.notifyTimingEvent = function(size, rtt, retries) {
|
|
2484
|
+
var target = goog.net.BrowserChannel.statEventTarget_;
|
|
2485
|
+
target.dispatchEvent(
|
|
2486
|
+
new goog.net.BrowserChannel.TimingEvent(target, size, rtt, retries));
|
|
2487
|
+
};
|
|
2488
|
+
|
|
2489
|
+
|
|
2490
|
+
/**
|
|
2491
|
+
* Determines whether to use a secondary domain when the server gives us
|
|
2492
|
+
* a host prefix. This allows us to work around browser per-domain
|
|
2493
|
+
* connection limits.
|
|
2494
|
+
*
|
|
2495
|
+
* Currently, we use secondary domains when using Trident's ActiveXObject,
|
|
2496
|
+
* because it supports cross-domain requests out of the box. Note that in IE10
|
|
2497
|
+
* we no longer use ActiveX since it's not supported in Metro mode and IE10
|
|
2498
|
+
* supports XHR streaming.
|
|
2499
|
+
*
|
|
2500
|
+
* If you need to use secondary domains on other browsers and IE10,
|
|
2501
|
+
* you have two choices:
|
|
2502
|
+
* 1) If you only care about browsers that support CORS
|
|
2503
|
+
* (https://developer.mozilla.org/en-US/docs/HTTP_access_control), you
|
|
2504
|
+
* can use {@link #setSupportsCrossDomainXhrs} and set the appropriate
|
|
2505
|
+
* CORS response headers on the server.
|
|
2506
|
+
* 2) Or, override this method in a subclass, and make sure that those
|
|
2507
|
+
* browsers use some messaging mechanism that works cross-domain (e.g
|
|
2508
|
+
* iframes and window.postMessage).
|
|
2509
|
+
*
|
|
2510
|
+
* @return {boolean} Whether to use secondary domains.
|
|
2511
|
+
* @see http://code.google.com/p/closure-library/issues/detail?id=339
|
|
2512
|
+
*/
|
|
2513
|
+
goog.net.BrowserChannel.prototype.shouldUseSecondaryDomains = function() {
|
|
2514
|
+
return this.supportsCrossDomainXhrs_ ||
|
|
2515
|
+
!goog.net.ChannelRequest.supportsXhrStreaming();
|
|
2516
|
+
};
|
|
2517
|
+
|
|
2518
|
+
|
|
2519
|
+
/**
|
|
2520
|
+
* A LogSaver that can be used to accumulate all the debug logs for
|
|
2521
|
+
* BrowserChannels so they can be sent to the server when a problem is
|
|
2522
|
+
* detected.
|
|
2523
|
+
*/
|
|
2524
|
+
goog.net.BrowserChannel.LogSaver = {};
|
|
2525
|
+
|
|
2526
|
+
|
|
2527
|
+
/**
|
|
2528
|
+
* Buffer for accumulating the debug log
|
|
2529
|
+
* @type {goog.structs.CircularBuffer}
|
|
2530
|
+
* @private
|
|
2531
|
+
*/
|
|
2532
|
+
goog.net.BrowserChannel.LogSaver.buffer_ =
|
|
2533
|
+
new goog.structs.CircularBuffer(1000);
|
|
2534
|
+
|
|
2535
|
+
|
|
2536
|
+
/**
|
|
2537
|
+
* Whether we're currently accumulating the debug log.
|
|
2538
|
+
* @type {boolean}
|
|
2539
|
+
* @private
|
|
2540
|
+
*/
|
|
2541
|
+
goog.net.BrowserChannel.LogSaver.enabled_ = false;
|
|
2542
|
+
|
|
2543
|
+
|
|
2544
|
+
/**
|
|
2545
|
+
* Formatter for saving logs.
|
|
2546
|
+
* @type {goog.debug.Formatter}
|
|
2547
|
+
* @private
|
|
2548
|
+
*/
|
|
2549
|
+
goog.net.BrowserChannel.LogSaver.formatter_ = new goog.debug.TextFormatter();
|
|
2550
|
+
|
|
2551
|
+
|
|
2552
|
+
/**
|
|
2553
|
+
* Returns whether the LogSaver is enabled.
|
|
2554
|
+
* @return {boolean} Whether saving is enabled or disabled.
|
|
2555
|
+
*/
|
|
2556
|
+
goog.net.BrowserChannel.LogSaver.isEnabled = function() {
|
|
2557
|
+
return goog.net.BrowserChannel.LogSaver.enabled_;
|
|
2558
|
+
};
|
|
2559
|
+
|
|
2560
|
+
|
|
2561
|
+
/**
|
|
2562
|
+
* Enables of disables the LogSaver.
|
|
2563
|
+
* @param {boolean} enable Whether to enable or disable saving.
|
|
2564
|
+
*/
|
|
2565
|
+
goog.net.BrowserChannel.LogSaver.setEnabled = function(enable) {
|
|
2566
|
+
if (enable == goog.net.BrowserChannel.LogSaver.enabled_) {
|
|
2567
|
+
return;
|
|
2568
|
+
}
|
|
2569
|
+
|
|
2570
|
+
var fn = goog.net.BrowserChannel.LogSaver.addLogRecord;
|
|
2571
|
+
var logger = goog.log.getLogger('goog.net');
|
|
2572
|
+
if (enable) {
|
|
2573
|
+
goog.log.addHandler(logger, fn);
|
|
2574
|
+
} else {
|
|
2575
|
+
goog.log.removeHandler(logger, fn);
|
|
2576
|
+
}
|
|
2577
|
+
};
|
|
2578
|
+
|
|
2579
|
+
|
|
2580
|
+
/**
|
|
2581
|
+
* Adds a log record.
|
|
2582
|
+
* @param {goog.log.LogRecord} logRecord the LogRecord.
|
|
2583
|
+
*/
|
|
2584
|
+
goog.net.BrowserChannel.LogSaver.addLogRecord = function(logRecord) {
|
|
2585
|
+
goog.net.BrowserChannel.LogSaver.buffer_.add(
|
|
2586
|
+
goog.net.BrowserChannel.LogSaver.formatter_.formatRecord(logRecord));
|
|
2587
|
+
};
|
|
2588
|
+
|
|
2589
|
+
|
|
2590
|
+
/**
|
|
2591
|
+
* Returns the log as a single string.
|
|
2592
|
+
* @return {string} The log as a single string.
|
|
2593
|
+
*/
|
|
2594
|
+
goog.net.BrowserChannel.LogSaver.getBuffer = function() {
|
|
2595
|
+
return goog.net.BrowserChannel.LogSaver.buffer_.getValues().join('');
|
|
2596
|
+
};
|
|
2597
|
+
|
|
2598
|
+
|
|
2599
|
+
/**
|
|
2600
|
+
* Clears the buffer
|
|
2601
|
+
*/
|
|
2602
|
+
goog.net.BrowserChannel.LogSaver.clearBuffer = function() {
|
|
2603
|
+
goog.net.BrowserChannel.LogSaver.buffer_.clear();
|
|
2604
|
+
};
|
|
2605
|
+
|
|
2606
|
+
|
|
2607
|
+
|
|
2608
|
+
/**
|
|
2609
|
+
* Abstract base class for the browser channel handler
|
|
2610
|
+
* @constructor
|
|
2611
|
+
*/
|
|
2612
|
+
goog.net.BrowserChannel.Handler = function() {
|
|
2613
|
+
};
|
|
2614
|
+
|
|
2615
|
+
|
|
2616
|
+
/**
|
|
2617
|
+
* Callback handler for when a batch of response arrays is received from the
|
|
2618
|
+
* server.
|
|
2619
|
+
* @type {?function(!goog.net.BrowserChannel, !Array.<!Array>)}
|
|
2620
|
+
*/
|
|
2621
|
+
goog.net.BrowserChannel.Handler.prototype.channelHandleMultipleArrays = null;
|
|
2622
|
+
|
|
2623
|
+
|
|
2624
|
+
/**
|
|
2625
|
+
* Whether it's okay to make a request to the server. A handler can return
|
|
2626
|
+
* false if the channel should fail. For example, if the user has logged out,
|
|
2627
|
+
* the handler may want all requests to fail immediately.
|
|
2628
|
+
* @param {goog.net.BrowserChannel} browserChannel The browser channel.
|
|
2629
|
+
* @return {goog.net.BrowserChannel.Error} An error code. The code should
|
|
2630
|
+
* return goog.net.BrowserChannel.Error.OK to indicate it's okay. Any other
|
|
2631
|
+
* error code will cause a failure.
|
|
2632
|
+
*/
|
|
2633
|
+
goog.net.BrowserChannel.Handler.prototype.okToMakeRequest =
|
|
2634
|
+
function(browserChannel) {
|
|
2635
|
+
return goog.net.BrowserChannel.Error.OK;
|
|
2636
|
+
};
|
|
2637
|
+
|
|
2638
|
+
|
|
2639
|
+
/**
|
|
2640
|
+
* Indicates the BrowserChannel has successfully negotiated with the server
|
|
2641
|
+
* and can now send and receive data.
|
|
2642
|
+
* @param {goog.net.BrowserChannel} browserChannel The browser channel.
|
|
2643
|
+
*/
|
|
2644
|
+
goog.net.BrowserChannel.Handler.prototype.channelOpened =
|
|
2645
|
+
function(browserChannel) {
|
|
2646
|
+
};
|
|
2647
|
+
|
|
2648
|
+
|
|
2649
|
+
/**
|
|
2650
|
+
* New input is available for the application to process.
|
|
2651
|
+
*
|
|
2652
|
+
* @param {goog.net.BrowserChannel} browserChannel The browser channel.
|
|
2653
|
+
* @param {Array} array The data array.
|
|
2654
|
+
*/
|
|
2655
|
+
goog.net.BrowserChannel.Handler.prototype.channelHandleArray =
|
|
2656
|
+
function(browserChannel, array) {
|
|
2657
|
+
};
|
|
2658
|
+
|
|
2659
|
+
|
|
2660
|
+
/**
|
|
2661
|
+
* Indicates maps were successfully sent on the BrowserChannel.
|
|
2662
|
+
*
|
|
2663
|
+
* @param {goog.net.BrowserChannel} browserChannel The browser channel.
|
|
2664
|
+
* @param {Array.<goog.net.BrowserChannel.QueuedMap>} deliveredMaps The
|
|
2665
|
+
* array of maps that have been delivered to the server. This is a direct
|
|
2666
|
+
* reference to the internal BrowserChannel array, so a copy should be made
|
|
2667
|
+
* if the caller desires a reference to the data.
|
|
2668
|
+
*/
|
|
2669
|
+
goog.net.BrowserChannel.Handler.prototype.channelSuccess =
|
|
2670
|
+
function(browserChannel, deliveredMaps) {
|
|
2671
|
+
};
|
|
2672
|
+
|
|
2673
|
+
|
|
2674
|
+
/**
|
|
2675
|
+
* Indicates an error occurred on the BrowserChannel.
|
|
2676
|
+
*
|
|
2677
|
+
* @param {goog.net.BrowserChannel} browserChannel The browser channel.
|
|
2678
|
+
* @param {goog.net.BrowserChannel.Error} error The error code.
|
|
2679
|
+
*/
|
|
2680
|
+
goog.net.BrowserChannel.Handler.prototype.channelError =
|
|
2681
|
+
function(browserChannel, error) {
|
|
2682
|
+
};
|
|
2683
|
+
|
|
2684
|
+
|
|
2685
|
+
/**
|
|
2686
|
+
* Indicates the BrowserChannel is closed. Also notifies about which maps,
|
|
2687
|
+
* if any, that may not have been delivered to the server.
|
|
2688
|
+
* @param {goog.net.BrowserChannel} browserChannel The browser channel.
|
|
2689
|
+
* @param {Array.<goog.net.BrowserChannel.QueuedMap>=} opt_pendingMaps The
|
|
2690
|
+
* array of pending maps, which may or may not have been delivered to the
|
|
2691
|
+
* server.
|
|
2692
|
+
* @param {Array.<goog.net.BrowserChannel.QueuedMap>=} opt_undeliveredMaps
|
|
2693
|
+
* The array of undelivered maps, which have definitely not been delivered
|
|
2694
|
+
* to the server.
|
|
2695
|
+
*/
|
|
2696
|
+
goog.net.BrowserChannel.Handler.prototype.channelClosed =
|
|
2697
|
+
function(browserChannel, opt_pendingMaps, opt_undeliveredMaps) {
|
|
2698
|
+
};
|
|
2699
|
+
|
|
2700
|
+
|
|
2701
|
+
/**
|
|
2702
|
+
* Gets any parameters that should be added at the time another connection is
|
|
2703
|
+
* made to the server.
|
|
2704
|
+
* @param {goog.net.BrowserChannel} browserChannel The browser channel.
|
|
2705
|
+
* @return {Object} Extra parameter keys and values to add to the
|
|
2706
|
+
* requests.
|
|
2707
|
+
*/
|
|
2708
|
+
goog.net.BrowserChannel.Handler.prototype.getAdditionalParams =
|
|
2709
|
+
function(browserChannel) {
|
|
2710
|
+
return {};
|
|
2711
|
+
};
|
|
2712
|
+
|
|
2713
|
+
|
|
2714
|
+
/**
|
|
2715
|
+
* Gets the URI of an image that can be used to test network connectivity.
|
|
2716
|
+
* @param {goog.net.BrowserChannel} browserChannel The browser channel.
|
|
2717
|
+
* @return {goog.Uri?} A custom URI to load for the network test.
|
|
2718
|
+
*/
|
|
2719
|
+
goog.net.BrowserChannel.Handler.prototype.getNetworkTestImageUri =
|
|
2720
|
+
function(browserChannel) {
|
|
2721
|
+
return null;
|
|
2722
|
+
};
|
|
2723
|
+
|
|
2724
|
+
|
|
2725
|
+
/**
|
|
2726
|
+
* Gets whether this channel is currently active. This is used to determine the
|
|
2727
|
+
* length of time to wait before retrying.
|
|
2728
|
+
* @param {goog.net.BrowserChannel} browserChannel The browser channel.
|
|
2729
|
+
* @return {boolean} Whether the channel is currently active.
|
|
2730
|
+
*/
|
|
2731
|
+
goog.net.BrowserChannel.Handler.prototype.isActive = function(browserChannel) {
|
|
2732
|
+
return true;
|
|
2733
|
+
};
|
|
2734
|
+
|
|
2735
|
+
|
|
2736
|
+
/**
|
|
2737
|
+
* Called by the channel if enumeration of the map throws an exception.
|
|
2738
|
+
* @param {goog.net.BrowserChannel} browserChannel The browser channel.
|
|
2739
|
+
* @param {Object} map The map that can't be enumerated.
|
|
2740
|
+
*/
|
|
2741
|
+
goog.net.BrowserChannel.Handler.prototype.badMapError =
|
|
2742
|
+
function(browserChannel, map) {
|
|
2743
|
+
return;
|
|
2744
|
+
};
|
|
2745
|
+
|
|
2746
|
+
|
|
2747
|
+
/**
|
|
2748
|
+
* Allows the handler to override a host prefix provided by the server. Will
|
|
2749
|
+
* be called whenever the channel has received such a prefix and is considering
|
|
2750
|
+
* its use.
|
|
2751
|
+
* @param {?string} serverHostPrefix The host prefix provided by the server.
|
|
2752
|
+
* @return {?string} The host prefix the client should use.
|
|
2753
|
+
*/
|
|
2754
|
+
goog.net.BrowserChannel.Handler.prototype.correctHostPrefix =
|
|
2755
|
+
function(serverHostPrefix) {
|
|
2756
|
+
return serverHostPrefix;
|
|
2757
|
+
};
|