javascriptmvc 3.0.0.pre15
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +21 -0
- data/README.markdown +15 -0
- data/Rakefile +17 -0
- data/VERSION +1 -0
- data/bin/jmvc-build +4 -0
- data/bin/jmvc-gen +4 -0
- data/bin/jmvc-get +4 -0
- data/bin/jmvc-init +4 -0
- data/bin/jmvc-update +4 -0
- data/lib/javascriptmvc.rb +97 -0
- data/lib/javascriptmvc/documentjs/README +0 -0
- data/lib/javascriptmvc/documentjs/add.js +76 -0
- data/lib/javascriptmvc/documentjs/application.js +285 -0
- data/lib/javascriptmvc/documentjs/attribute.js +61 -0
- data/lib/javascriptmvc/documentjs/baseclass.js +537 -0
- data/lib/javascriptmvc/documentjs/class.js +141 -0
- data/lib/javascriptmvc/documentjs/constructor.js +145 -0
- data/lib/javascriptmvc/documentjs/directives.js +394 -0
- data/lib/javascriptmvc/documentjs/distance.js +49 -0
- data/lib/javascriptmvc/documentjs/document +21 -0
- data/lib/javascriptmvc/documentjs/documentjs.js +76 -0
- data/lib/javascriptmvc/documentjs/file.js +55 -0
- data/lib/javascriptmvc/documentjs/function.js +112 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/close.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/download.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/fav-off.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/fav-on.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/favicon.ico +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/logo.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/pre.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_222222_256x240.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_2e83ff_256x240.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_454545_256x240.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_888888_256x240.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/video.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/production.js +552 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/style.css +354 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/summary.ejs +134 -0
- data/lib/javascriptmvc/documentjs/json.js +172 -0
- data/lib/javascriptmvc/documentjs/page.js +107 -0
- data/lib/javascriptmvc/documentjs/pair.js +302 -0
- data/lib/javascriptmvc/documentjs/prototype.js +13 -0
- data/lib/javascriptmvc/documentjs/scripts/build.js +6 -0
- data/lib/javascriptmvc/documentjs/static.js +25 -0
- data/lib/javascriptmvc/documentjs/test/docs/Something.json +1 -0
- data/lib/javascriptmvc/documentjs/test/docs/searchData.json +1 -0
- data/lib/javascriptmvc/documentjs/test/something.js +8 -0
- data/lib/javascriptmvc/documentjs/test/test.html +6 -0
- data/lib/javascriptmvc/documentjs/test_doc.html +1 -0
- data/lib/javascriptmvc/documentjs/update +5 -0
- data/lib/javascriptmvc/funcunit/README +17 -0
- data/lib/javascriptmvc/funcunit/autosuggest/auto_suggest.js +495 -0
- data/lib/javascriptmvc/funcunit/autosuggest/autosuggest.css +24 -0
- data/lib/javascriptmvc/funcunit/autosuggest/autosuggest.html +26 -0
- data/lib/javascriptmvc/funcunit/autosuggest/autosuggest.js +17 -0
- data/lib/javascriptmvc/funcunit/autosuggest/autosuggest_test.js +14 -0
- data/lib/javascriptmvc/funcunit/autosuggest/funcunit.html +15 -0
- data/lib/javascriptmvc/funcunit/build.js +54 -0
- data/lib/javascriptmvc/funcunit/drivers/selenium.js +129 -0
- data/lib/javascriptmvc/funcunit/drivers/standard.js +169 -0
- data/lib/javascriptmvc/funcunit/envjs +13 -0
- data/lib/javascriptmvc/funcunit/envjs.bat +28 -0
- data/lib/javascriptmvc/funcunit/funcunit.html +20 -0
- data/lib/javascriptmvc/funcunit/funcunit.js +1509 -0
- data/lib/javascriptmvc/funcunit/java/selenium-java-client-driver.jar +0 -0
- data/lib/javascriptmvc/funcunit/java/selenium-server.jar +0 -0
- data/lib/javascriptmvc/funcunit/qunit.html +22 -0
- data/lib/javascriptmvc/funcunit/qunit/qunit.css +119 -0
- data/lib/javascriptmvc/funcunit/qunit/qunit.js +1124 -0
- data/lib/javascriptmvc/funcunit/qunit/rhino/rhino.js +24 -0
- data/lib/javascriptmvc/funcunit/qunit/test/qunit.html +18 -0
- data/lib/javascriptmvc/funcunit/qunit/test/test.js +7 -0
- data/lib/javascriptmvc/funcunit/resources/funcunit.js +31 -0
- data/lib/javascriptmvc/funcunit/resources/jquery.js +6378 -0
- data/lib/javascriptmvc/funcunit/resources/json.js +201 -0
- data/lib/javascriptmvc/funcunit/resources/selenium_start.js +43 -0
- data/lib/javascriptmvc/funcunit/scripts/run.js +36 -0
- data/lib/javascriptmvc/funcunit/scripts/test.js +55 -0
- data/lib/javascriptmvc/funcunit/settings.js +10 -0
- data/lib/javascriptmvc/funcunit/synthetic/browsers.js +151 -0
- data/lib/javascriptmvc/funcunit/synthetic/demo.html +150 -0
- data/lib/javascriptmvc/funcunit/synthetic/demo/record.js +254 -0
- data/lib/javascriptmvc/funcunit/synthetic/drag/drag.html +41 -0
- data/lib/javascriptmvc/funcunit/synthetic/drag/drag.js +268 -0
- data/lib/javascriptmvc/funcunit/synthetic/drag/qunit.html +20 -0
- data/lib/javascriptmvc/funcunit/synthetic/drag/test/qunit/drag_test.js +195 -0
- data/lib/javascriptmvc/funcunit/synthetic/drag/test/qunit/qunit.js +7 -0
- data/lib/javascriptmvc/funcunit/synthetic/key.js +832 -0
- data/lib/javascriptmvc/funcunit/synthetic/mouse.js +291 -0
- data/lib/javascriptmvc/funcunit/synthetic/qunit.html +22 -0
- data/lib/javascriptmvc/funcunit/synthetic/recorder.html +303 -0
- data/lib/javascriptmvc/funcunit/synthetic/synthetic.html +85 -0
- data/lib/javascriptmvc/funcunit/synthetic/synthetic.js +796 -0
- data/lib/javascriptmvc/funcunit/synthetic/test/qunit/key_test.js +391 -0
- data/lib/javascriptmvc/funcunit/synthetic/test/qunit/mouse_test.js +233 -0
- data/lib/javascriptmvc/funcunit/synthetic/test/qunit/qunit.js +6 -0
- data/lib/javascriptmvc/funcunit/synthetic/test/qunit/synthetic_test.js +91 -0
- data/lib/javascriptmvc/funcunit/synthetic/test/submit.html +29 -0
- data/lib/javascriptmvc/funcunit/synthetic/test/submitted.html +3 -0
- data/lib/javascriptmvc/funcunit/template.html +18 -0
- data/lib/javascriptmvc/funcunit/test/drag.html +63 -0
- data/lib/javascriptmvc/funcunit/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/funcunit/test/funcunit/funcunit_test.js +87 -0
- data/lib/javascriptmvc/funcunit/test/funcunit/open_test.js +28 -0
- data/lib/javascriptmvc/funcunit/test/funcunit/protodrag_test.js +13 -0
- data/lib/javascriptmvc/funcunit/test/funcunit/syn_test.js +41 -0
- data/lib/javascriptmvc/funcunit/test/jquery.event.drag.js +801 -0
- data/lib/javascriptmvc/funcunit/test/jquery.event.drop.js +439 -0
- data/lib/javascriptmvc/funcunit/test/jquery.js +6360 -0
- data/lib/javascriptmvc/funcunit/test/myapp.html +103 -0
- data/lib/javascriptmvc/funcunit/test/myotherapp.html +15 -0
- data/lib/javascriptmvc/funcunit/test/protodrag/dragdrop.js +974 -0
- data/lib/javascriptmvc/funcunit/test/protodrag/effects.js +1123 -0
- data/lib/javascriptmvc/funcunit/test/protodrag/funcunit_test.js +20 -0
- data/lib/javascriptmvc/funcunit/test/protodrag/myapp.html +63 -0
- data/lib/javascriptmvc/funcunit/test/protodrag/prototype.js +4874 -0
- data/lib/javascriptmvc/funcunit/test/protodrag/scriptaculous.js +68 -0
- data/lib/javascriptmvc/funcunit/update +5 -0
- data/lib/javascriptmvc/jquery/README +24 -0
- data/lib/javascriptmvc/jquery/build.js +73 -0
- data/lib/javascriptmvc/jquery/class/class.html +109 -0
- data/lib/javascriptmvc/jquery/class/class.js +627 -0
- data/lib/javascriptmvc/jquery/class/qunit.html +15 -0
- data/lib/javascriptmvc/jquery/class/test/qunit/class_test.js +146 -0
- data/lib/javascriptmvc/jquery/class/test/qunit/qunit.js +5 -0
- data/lib/javascriptmvc/jquery/class/test/qunit/test.html +20 -0
- data/lib/javascriptmvc/jquery/controller/controller.html +89 -0
- data/lib/javascriptmvc/jquery/controller/controller.js +735 -0
- data/lib/javascriptmvc/jquery/controller/history/history.html +44 -0
- data/lib/javascriptmvc/jquery/controller/history/history.js +177 -0
- data/lib/javascriptmvc/jquery/controller/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/scripts/compress.js +6 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/scripts/docs.js +6 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/subscribe.html +56 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/subscribe.js +27 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/test/funcunit/subscribe_test.js +11 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/test/qunit/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/test/qunit/subscribe_test.js +4 -0
- data/lib/javascriptmvc/jquery/controller/test/qunit/controller_test.js +170 -0
- data/lib/javascriptmvc/jquery/controller/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/controller/view/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/controller/view/test/qunit/controller_view_test.js +15 -0
- data/lib/javascriptmvc/jquery/controller/view/test/qunit/qunit.js +6 -0
- data/lib/javascriptmvc/jquery/controller/view/test/qunit/views/init.micro +1 -0
- data/lib/javascriptmvc/jquery/controller/view/view.js +102 -0
- data/lib/javascriptmvc/jquery/dom/closest/closest.html +23 -0
- data/lib/javascriptmvc/jquery/dom/closest/closest.js +47 -0
- data/lib/javascriptmvc/jquery/dom/closest/funcunit.html +20 -0
- data/lib/javascriptmvc/jquery/dom/closest/qunit.html +22 -0
- data/lib/javascriptmvc/jquery/dom/closest/scripts/compress.js +3 -0
- data/lib/javascriptmvc/jquery/dom/closest/scripts/doc.js +4 -0
- data/lib/javascriptmvc/jquery/dom/closest/scripts/test.js +55 -0
- data/lib/javascriptmvc/jquery/dom/closest/settings.js +40 -0
- data/lib/javascriptmvc/jquery/dom/closest/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/dom/closest/test/funcunit/tests/basic.js +11 -0
- data/lib/javascriptmvc/jquery/dom/closest/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/dom/closest/test/qunit/tests/basic.js +4 -0
- data/lib/javascriptmvc/jquery/dom/compare/compare.html +88 -0
- data/lib/javascriptmvc/jquery/dom/compare/compare.js +67 -0
- data/lib/javascriptmvc/jquery/dom/compare/qunit.html +20 -0
- data/lib/javascriptmvc/jquery/dom/compare/test/qunit/compare_test.js +19 -0
- data/lib/javascriptmvc/jquery/dom/compare/test/qunit/qunit.js +5 -0
- data/lib/javascriptmvc/jquery/dom/cookie/cookie.html +25 -0
- data/lib/javascriptmvc/jquery/dom/cookie/cookie.js +119 -0
- data/lib/javascriptmvc/jquery/dom/cookie/scripts/compress.js +6 -0
- data/lib/javascriptmvc/jquery/dom/cookie/scripts/doc.js +6 -0
- data/lib/javascriptmvc/jquery/dom/cookie/test/funcunit/cookie_test.js +11 -0
- data/lib/javascriptmvc/jquery/dom/cookie/test/funcunit/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/dom/cookie/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/dom/cookie/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/dom/cookie/test/qunit/cookie_test.js +4 -0
- data/lib/javascriptmvc/jquery/dom/cookie/test/qunit/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/dom/cookie/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/dom/cookie/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/dom/cur_styles/cur_styles.html +71 -0
- data/lib/javascriptmvc/jquery/dom/cur_styles/cur_styles.js +120 -0
- data/lib/javascriptmvc/jquery/dom/cur_styles/qunit.html +22 -0
- data/lib/javascriptmvc/jquery/dom/cur_styles/test/qunit/curStyles.micro +3 -0
- data/lib/javascriptmvc/jquery/dom/cur_styles/test/qunit/cur_styles_test.js +22 -0
- data/lib/javascriptmvc/jquery/dom/cur_styles/test/qunit/outer.micro +0 -0
- data/lib/javascriptmvc/jquery/dom/cur_styles/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/dom/dimensions/curstyles.html +22 -0
- data/lib/javascriptmvc/jquery/dom/dimensions/dimensions.html +132 -0
- data/lib/javascriptmvc/jquery/dom/dimensions/dimensions.js +140 -0
- data/lib/javascriptmvc/jquery/dom/dimensions/qunit.html +22 -0
- data/lib/javascriptmvc/jquery/dom/dimensions/test/qunit/curStyles.micro +3 -0
- data/lib/javascriptmvc/jquery/dom/dimensions/test/qunit/dimensions_test.js +8 -0
- data/lib/javascriptmvc/jquery/dom/dimensions/test/qunit/outer.micro +0 -0
- data/lib/javascriptmvc/jquery/dom/dimensions/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/dom/dom.js +7 -0
- data/lib/javascriptmvc/jquery/dom/fixture/fixture.html +143 -0
- data/lib/javascriptmvc/jquery/dom/fixture/fixture.js +521 -0
- data/lib/javascriptmvc/jquery/dom/fixture/fixtures/messages.html +31 -0
- data/lib/javascriptmvc/jquery/dom/fixture/fixtures/test.json +3 -0
- data/lib/javascriptmvc/jquery/dom/fixture/qunit.html +22 -0
- data/lib/javascriptmvc/jquery/dom/fixture/test/qunit/fixture_test.js +50 -0
- data/lib/javascriptmvc/jquery/dom/fixture/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/dom/form_params/form_params.html +57 -0
- data/lib/javascriptmvc/jquery/dom/form_params/form_params.js +106 -0
- data/lib/javascriptmvc/jquery/dom/form_params/qunit.html +22 -0
- data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/basics.micro +27 -0
- data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/checkbox.micro +20 -0
- data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/form_params_test.js +43 -0
- data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/truthy.micro +8 -0
- data/lib/javascriptmvc/jquery/dom/within/within.js +67 -0
- data/lib/javascriptmvc/jquery/error/background.png +0 -0
- data/lib/javascriptmvc/jquery/error/error.html +31 -0
- data/lib/javascriptmvc/jquery/error/error.js +227 -0
- data/lib/javascriptmvc/jquery/error/setup.js +4 -0
- data/lib/javascriptmvc/jquery/error/test/test.html +23 -0
- data/lib/javascriptmvc/jquery/error/test/test.js +4 -0
- data/lib/javascriptmvc/jquery/event/default/compress.js +7 -0
- data/lib/javascriptmvc/jquery/event/default/default.html +85 -0
- data/lib/javascriptmvc/jquery/event/default/default.js +193 -0
- data/lib/javascriptmvc/jquery/event/default/defaultjquery.html +117 -0
- data/lib/javascriptmvc/jquery/event/default/qunit.html +22 -0
- data/lib/javascriptmvc/jquery/event/default/test/qunit/default_test.js +104 -0
- data/lib/javascriptmvc/jquery/event/default/test/qunit/html.micro +8 -0
- data/lib/javascriptmvc/jquery/event/default/test/qunit/qunit.js +6 -0
- data/lib/javascriptmvc/jquery/event/default/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/event/destroyed/destroyed.html +24 -0
- data/lib/javascriptmvc/jquery/event/destroyed/destroyed.js +40 -0
- data/lib/javascriptmvc/jquery/event/destroyed/destroyed_menu.html +96 -0
- data/lib/javascriptmvc/jquery/event/destroyed/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/event/destroyed/test/qunit/destroyed_test.js +12 -0
- data/lib/javascriptmvc/jquery/event/destroyed/test/qunit/qunit.js +6 -0
- data/lib/javascriptmvc/jquery/event/drag/drag.html +105 -0
- data/lib/javascriptmvc/jquery/event/drag/drag.js +466 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/limit.html +74 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/limit.js +56 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/scripts/compress.js +6 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/scripts/doc.js +6 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/test/funcunit/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/test/funcunit/limit_test.js +11 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/test/qunit/limit_test.js +4 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/test/qunit/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/event/drag/qunit.html +16 -0
- data/lib/javascriptmvc/jquery/event/drag/scroll/scroll.js +120 -0
- data/lib/javascriptmvc/jquery/event/drag/test/qunit/drag_test.js +130 -0
- data/lib/javascriptmvc/jquery/event/drag/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/event/drop/drop.html +74 -0
- data/lib/javascriptmvc/jquery/event/drop/drop.js +301 -0
- data/lib/javascriptmvc/jquery/event/event.js +6 -0
- data/lib/javascriptmvc/jquery/event/hashchange/hashchange.js +245 -0
- data/lib/javascriptmvc/jquery/event/hover/compress.js +7 -0
- data/lib/javascriptmvc/jquery/event/hover/hover.html +56 -0
- data/lib/javascriptmvc/jquery/event/hover/hover.js +219 -0
- data/lib/javascriptmvc/jquery/event/hover/qunit.html +16 -0
- data/lib/javascriptmvc/jquery/event/hover/test/qunit/hover_test.js +55 -0
- data/lib/javascriptmvc/jquery/event/hover/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/event/livehack/compress.js +7 -0
- data/lib/javascriptmvc/jquery/event/livehack/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/event/livehack/livehack.html +25 -0
- data/lib/javascriptmvc/jquery/event/livehack/livehack.js +167 -0
- data/lib/javascriptmvc/jquery/event/offline/funcunit.html +20 -0
- data/lib/javascriptmvc/jquery/event/offline/offline.html +26 -0
- data/lib/javascriptmvc/jquery/event/offline/offline.js +36 -0
- data/lib/javascriptmvc/jquery/event/offline/qunit.html +22 -0
- data/lib/javascriptmvc/jquery/event/offline/scripts/compress.js +3 -0
- data/lib/javascriptmvc/jquery/event/offline/scripts/doc.js +4 -0
- data/lib/javascriptmvc/jquery/event/offline/settings.js +41 -0
- data/lib/javascriptmvc/jquery/event/offline/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/event/offline/test/funcunit/tests/basic.js +11 -0
- data/lib/javascriptmvc/jquery/event/offline/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/event/offline/test/qunit/tests/basic.js +4 -0
- data/lib/javascriptmvc/jquery/event/resize/funcunit.html +20 -0
- data/lib/javascriptmvc/jquery/event/resize/qunit.html +22 -0
- data/lib/javascriptmvc/jquery/event/resize/resize.html +23 -0
- data/lib/javascriptmvc/jquery/event/resize/resize.js +50 -0
- data/lib/javascriptmvc/jquery/event/resize/scripts/compress.js +3 -0
- data/lib/javascriptmvc/jquery/event/resize/scripts/doc.js +4 -0
- data/lib/javascriptmvc/jquery/event/resize/scripts/test.js +55 -0
- data/lib/javascriptmvc/jquery/event/resize/settings.js +40 -0
- data/lib/javascriptmvc/jquery/event/resize/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/event/resize/test/funcunit/tests/basic.js +11 -0
- data/lib/javascriptmvc/jquery/event/resize/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/event/resize/test/qunit/tests/basic.js +4 -0
- data/lib/javascriptmvc/jquery/event/select/scripts/compress.js +6 -0
- data/lib/javascriptmvc/jquery/event/select/scripts/doc.js +6 -0
- data/lib/javascriptmvc/jquery/event/select/select.html +63 -0
- data/lib/javascriptmvc/jquery/event/select/select.js +65 -0
- data/lib/javascriptmvc/jquery/event/select/test/funcunit/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/event/select/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/event/select/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/event/select/test/funcunit/select_test.js +11 -0
- data/lib/javascriptmvc/jquery/event/select/test/qunit/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/event/select/test/qunit/qunit.js +5 -0
- data/lib/javascriptmvc/jquery/event/select/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/event/select/test/qunit/select_test.js +4 -0
- data/lib/javascriptmvc/jquery/generate/app +23 -0
- data/lib/javascriptmvc/jquery/generate/controller +21 -0
- data/lib/javascriptmvc/jquery/generate/model +26 -0
- data/lib/javascriptmvc/jquery/generate/page +20 -0
- data/lib/javascriptmvc/jquery/generate/plugin +20 -0
- data/lib/javascriptmvc/jquery/generate/scaffold +23 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/(application_name).css.ejs +4 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/(application_name).html.ejs +23 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/(application_name).js.ejs +21 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/controllers/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/docs/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/fixtures/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/funcunit.html.ejs +15 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/models/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/qunit.html.ejs +20 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/resources/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/scripts/build.js.ejs +6 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/scripts/clean.js.ejs +6 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/scripts/docs.js.ejs +4 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/test/funcunit/(application_name)_test.js.ejs +9 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/test/funcunit/funcunit.js.ejs +3 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/test/qunit/(application_name)_test.js.ejs +5 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/test/qunit/qunit.js.ejs +3 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/views/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/controller/controllers/(underscore)_controller.js.ejs +12 -0
- data/lib/javascriptmvc/jquery/generate/templates/model/fixtures.link +1 -0
- data/lib/javascriptmvc/jquery/generate/templates/model/models.link +1 -0
- data/lib/javascriptmvc/jquery/generate/templates/model/test/qunit.link +1 -0
- data/lib/javascriptmvc/jquery/generate/templates/page.ejs +23 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/(application_name).html.ejs +23 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/(application_name).js.ejs +3 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/fixtures/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/funcunit.html.ejs +15 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/qunit.html.ejs +20 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/resources/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/scripts.link +1 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/test.link +1 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/views/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/controllers/(underscore)_controller.js.ejs +96 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/fixtures/(plural).json.get.ejs +3 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/models/(underscore).js.ejs +83 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/test/funcunit/(underscore)_controller_test.js.ejs +63 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/test/qunit/(underscore)_test.js.ejs +45 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/views/(underscore)/edit.ejs.ejs +10 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/views/(underscore)/init.ejs.ejs +26 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/views/(underscore)/list.ejs.ejs +5 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/views/(underscore)/show.ejs.ejs +10 -0
- data/lib/javascriptmvc/jquery/jquery.js +6360 -0
- data/lib/javascriptmvc/jquery/lang/json/json.html +25 -0
- data/lib/javascriptmvc/jquery/lang/json/json.js +201 -0
- data/lib/javascriptmvc/jquery/lang/json/scripts/compress.js +6 -0
- data/lib/javascriptmvc/jquery/lang/json/scripts/doc.js +6 -0
- data/lib/javascriptmvc/jquery/lang/json/test/funcunit/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/lang/json/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/lang/json/test/funcunit/json_test.js +11 -0
- data/lib/javascriptmvc/jquery/lang/json/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/lang/json/test/qunit/json_test.js +4 -0
- data/lib/javascriptmvc/jquery/lang/json/test/qunit/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/lang/json/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/lang/json/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/lang/lang.html +27 -0
- data/lib/javascriptmvc/jquery/lang/lang.js +104 -0
- data/lib/javascriptmvc/jquery/lang/openajax/openajax.js +202 -0
- data/lib/javascriptmvc/jquery/lang/rsplit/rsplit.js +31 -0
- data/lib/javascriptmvc/jquery/lang/vector/vector.js +167 -0
- data/lib/javascriptmvc/jquery/model/associations/associations.html +25 -0
- data/lib/javascriptmvc/jquery/model/associations/associations.js +46 -0
- data/lib/javascriptmvc/jquery/model/associations/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/model/associations/test/qunit/associations_test.js +51 -0
- data/lib/javascriptmvc/jquery/model/associations/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/model/associations/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/model/backup/backup.js +82 -0
- data/lib/javascriptmvc/jquery/model/json_rest/json_rest.js +91 -0
- data/lib/javascriptmvc/jquery/model/list/list.js +148 -0
- data/lib/javascriptmvc/jquery/model/list/qunit.html +16 -0
- data/lib/javascriptmvc/jquery/model/list/test/qunit/list_test.js +58 -0
- data/lib/javascriptmvc/jquery/model/list/test/qunit/qunit.js +6 -0
- data/lib/javascriptmvc/jquery/model/list/test/qunit/run.js +0 -0
- data/lib/javascriptmvc/jquery/model/model.js +537 -0
- data/lib/javascriptmvc/jquery/model/qunit.html +17 -0
- data/lib/javascriptmvc/jquery/model/store/store.js +66 -0
- data/lib/javascriptmvc/jquery/model/test/qunit/model_test.js +71 -0
- data/lib/javascriptmvc/jquery/model/test/qunit/qunit.js +5 -0
- data/lib/javascriptmvc/jquery/qunit.html +15 -0
- data/lib/javascriptmvc/jquery/test/funcunit/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/test/funcunit/jquerytest_test.js +11 -0
- data/lib/javascriptmvc/jquery/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/test/qunit/qunit.js +22 -0
- data/lib/javascriptmvc/jquery/update +5 -0
- data/lib/javascriptmvc/jquery/view/compress.js +7 -0
- data/lib/javascriptmvc/jquery/view/ejs/ejs.html +25 -0
- data/lib/javascriptmvc/jquery/view/ejs/ejs.js +489 -0
- data/lib/javascriptmvc/jquery/view/ejs/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/view/ejs/test/funcunit/ejs_test.js +11 -0
- data/lib/javascriptmvc/jquery/view/ejs/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/view/ejs/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/view/ejs/test/qunit/ejs_test.js +4 -0
- data/lib/javascriptmvc/jquery/view/ejs/test/qunit/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/view/ejs/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/view/ejs/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/view/fulljslint.js +3774 -0
- data/lib/javascriptmvc/jquery/view/helpers/helpers.js +338 -0
- data/lib/javascriptmvc/jquery/view/jaml/compress.js +7 -0
- data/lib/javascriptmvc/jquery/view/jaml/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/view/jaml/jaml.html +25 -0
- data/lib/javascriptmvc/jquery/view/jaml/jaml.js +73 -0
- data/lib/javascriptmvc/jquery/view/jaml/node.js +149 -0
- data/lib/javascriptmvc/jquery/view/jaml/template.js +131 -0
- data/lib/javascriptmvc/jquery/view/jaml/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/view/jaml/test/funcunit/jaml_test.js +11 -0
- data/lib/javascriptmvc/jquery/view/jaml/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/view/jaml/test/qunit/jaml_test.js +4 -0
- data/lib/javascriptmvc/jquery/view/jaml/test/qunit/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/view/jaml/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/view/jaml/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/view/micro/compress.js +7 -0
- data/lib/javascriptmvc/jquery/view/micro/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/view/micro/micro.html +25 -0
- data/lib/javascriptmvc/jquery/view/micro/micro.js +57 -0
- data/lib/javascriptmvc/jquery/view/micro/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/view/micro/test/funcunit/micro_test.js +11 -0
- data/lib/javascriptmvc/jquery/view/micro/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/view/micro/test/qunit/micro_test.js +4 -0
- data/lib/javascriptmvc/jquery/view/micro/test/qunit/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/view/micro/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/view/micro/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/view/qunit.html +16 -0
- data/lib/javascriptmvc/jquery/view/test/compression/compression.html +12 -0
- data/lib/javascriptmvc/jquery/view/test/compression/compression.js +11 -0
- data/lib/javascriptmvc/jquery/view/test/compression/run.js +36 -0
- data/lib/javascriptmvc/jquery/view/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/view/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/view/test/funcunit/view_test.js +11 -0
- data/lib/javascriptmvc/jquery/view/test/qunit/nested_plugin.ejs +1 -0
- data/lib/javascriptmvc/jquery/view/test/qunit/plugin.ejs +1 -0
- data/lib/javascriptmvc/jquery/view/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/view/test/qunit/template.ejs +1 -0
- data/lib/javascriptmvc/jquery/view/test/qunit/template.jaml +3 -0
- data/lib/javascriptmvc/jquery/view/test/qunit/template.micro +1 -0
- data/lib/javascriptmvc/jquery/view/test/qunit/template.tmpl +1 -0
- data/lib/javascriptmvc/jquery/view/test/qunit/view_test.js +24 -0
- data/lib/javascriptmvc/jquery/view/tmpl/tmpl.js +150 -0
- data/lib/javascriptmvc/jquery/view/view.html +65 -0
- data/lib/javascriptmvc/jquery/view/view.js +296 -0
- data/lib/javascriptmvc/js +56 -0
- data/lib/javascriptmvc/js.bat +57 -0
- data/lib/javascriptmvc/steal/README +26 -0
- data/lib/javascriptmvc/steal/build/apps/apps.js +208 -0
- data/lib/javascriptmvc/steal/build/apps/test.js +4 -0
- data/lib/javascriptmvc/steal/build/build.js +281 -0
- data/lib/javascriptmvc/steal/build/pluginify.js +73 -0
- data/lib/javascriptmvc/steal/build/scripts/compiler.jar +0 -0
- data/lib/javascriptmvc/steal/build/scripts/scripts.js +155 -0
- data/lib/javascriptmvc/steal/build/styles/cssmin.js +17 -0
- data/lib/javascriptmvc/steal/build/styles/styles.js +84 -0
- data/lib/javascriptmvc/steal/build/test/basicpage.html +6 -0
- data/lib/javascriptmvc/steal/build/test/basicproduction.js +1 -0
- data/lib/javascriptmvc/steal/build/test/basicsource.js +6 -0
- data/lib/javascriptmvc/steal/build/test/css/css/css1.css +1 -0
- data/lib/javascriptmvc/steal/build/test/css/css/justin.png +0 -0
- data/lib/javascriptmvc/steal/build/test/css/css2.css +5 -0
- data/lib/javascriptmvc/steal/build/test/css/page.html +9 -0
- data/lib/javascriptmvc/steal/build/test/css/production.css +1 -0
- data/lib/javascriptmvc/steal/build/test/css/test.js +7 -0
- data/lib/javascriptmvc/steal/build/test/css/upload.PNG +0 -0
- data/lib/javascriptmvc/steal/build/test/foreign.html +6 -0
- data/lib/javascriptmvc/steal/build/test/foreign.js +2 -0
- data/lib/javascriptmvc/steal/build/test/removecode.js +11 -0
- data/lib/javascriptmvc/steal/build/test/run.js +57 -0
- data/lib/javascriptmvc/steal/build/test/stealpage.html +10 -0
- data/lib/javascriptmvc/steal/build/test/stealprodpage.html +10 -0
- data/lib/javascriptmvc/steal/build/test/test.js +3 -0
- data/lib/javascriptmvc/steal/buildjs +21 -0
- data/lib/javascriptmvc/steal/clean/beautify.js +1108 -0
- data/lib/javascriptmvc/steal/clean/clean.js +179 -0
- data/lib/javascriptmvc/steal/clean/jslint.js +5662 -0
- data/lib/javascriptmvc/steal/clean/test.js +7 -0
- data/lib/javascriptmvc/steal/cleanjs +5 -0
- data/lib/javascriptmvc/steal/coffee/coffee-script.js +9 -0
- data/lib/javascriptmvc/steal/coffee/coffee.js +56 -0
- data/lib/javascriptmvc/steal/dev/dev.js +83 -0
- data/lib/javascriptmvc/steal/end.js +1 -0
- data/lib/javascriptmvc/steal/generate/app +23 -0
- data/lib/javascriptmvc/steal/generate/ejs.js +470 -0
- data/lib/javascriptmvc/steal/generate/generate.js +211 -0
- data/lib/javascriptmvc/steal/generate/inflector.js +117 -0
- data/lib/javascriptmvc/steal/generate/system.js +33 -0
- data/lib/javascriptmvc/steal/generate/templates/app/(application_name).css.ejs +10 -0
- data/lib/javascriptmvc/steal/generate/templates/app/(application_name).html.ejs +18 -0
- data/lib/javascriptmvc/steal/generate/templates/app/(application_name).js.ejs +10 -0
- data/lib/javascriptmvc/steal/generate/templates/app/docs/.ignore +0 -0
- data/lib/javascriptmvc/steal/generate/templates/app/resources/.ignore +0 -0
- data/lib/javascriptmvc/steal/generate/templates/app/resources/example.coffee.ejs +5 -0
- data/lib/javascriptmvc/steal/generate/templates/app/resources/example.js.ejs +13 -0
- data/lib/javascriptmvc/steal/generate/templates/app/resources/example.less.ejs +9 -0
- data/lib/javascriptmvc/steal/generate/templates/app/scripts/build.js.ejs +6 -0
- data/lib/javascriptmvc/steal/generate/templates/app/scripts/clean.js.ejs +6 -0
- data/lib/javascriptmvc/steal/generate/templates/app/test/.ignore +0 -0
- data/lib/javascriptmvc/steal/generate/templates/page.ejs +23 -0
- data/lib/javascriptmvc/steal/generate/test/test.js +92 -0
- data/lib/javascriptmvc/steal/get/get.js +163 -0
- data/lib/javascriptmvc/steal/get/gets.json +10 -0
- data/lib/javascriptmvc/steal/get/getter.js +115 -0
- data/lib/javascriptmvc/steal/get/github.js +134 -0
- data/lib/javascriptmvc/steal/get/json.js +172 -0
- data/lib/javascriptmvc/steal/getjs +5 -0
- data/lib/javascriptmvc/steal/js +56 -0
- data/lib/javascriptmvc/steal/js.bat +57 -0
- data/lib/javascriptmvc/steal/less/less.js +117 -0
- data/lib/javascriptmvc/steal/less/less_engine.js +2529 -0
- data/lib/javascriptmvc/steal/rhino/blank.html +6 -0
- data/lib/javascriptmvc/steal/rhino/build.js +31 -0
- data/lib/javascriptmvc/steal/rhino/docs.js +68 -0
- data/lib/javascriptmvc/steal/rhino/empty.html +12 -0
- data/lib/javascriptmvc/steal/rhino/env.js +11537 -0
- data/lib/javascriptmvc/steal/rhino/file.js +299 -0
- data/lib/javascriptmvc/steal/rhino/js.jar +0 -0
- data/lib/javascriptmvc/steal/rhino/loader.js +8 -0
- data/lib/javascriptmvc/steal/rhino/prompt.js +49 -0
- data/lib/javascriptmvc/steal/rhino/steal.js +122 -0
- data/lib/javascriptmvc/steal/rhino/test.js +16 -0
- data/lib/javascriptmvc/steal/steal.js +1317 -0
- data/lib/javascriptmvc/steal/steal.production.js +23 -0
- data/lib/javascriptmvc/steal/test/absoluteurl.html +7 -0
- data/lib/javascriptmvc/steal/test/absoluteurl/absoluteurl.js +1 -0
- data/lib/javascriptmvc/steal/test/absoluteurl/alert.js +1 -0
- data/lib/javascriptmvc/steal/test/another/two.js +2 -0
- data/lib/javascriptmvc/steal/test/one/four.js +1 -0
- data/lib/javascriptmvc/steal/test/one/one.js +6 -0
- data/lib/javascriptmvc/steal/test/qunit/qunit.html +22 -0
- data/lib/javascriptmvc/steal/test/qunit/qunit.js +3 -0
- data/lib/javascriptmvc/steal/test/qunit/steal_test.js +197 -0
- data/lib/javascriptmvc/steal/test/run.js +12 -0
- data/lib/javascriptmvc/steal/test/steal.html +37 -0
- data/lib/javascriptmvc/steal/test/test.js +82 -0
- data/lib/javascriptmvc/steal/test/three.js +3 -0
- data/lib/javascriptmvc/steal/testing/test.html +20 -0
- data/lib/javascriptmvc/steal/testing/testing.js +48 -0
- data/lib/javascriptmvc/steal/update +5 -0
- metadata +622 -0
@@ -0,0 +1,391 @@
|
|
1
|
+
module("funcunit/synthetic/key",{
|
2
|
+
setup: function() {
|
3
|
+
st.g("qunit-test-area").innerHTML = "<form id='outer'>"+
|
4
|
+
"<div id='inner'>"+
|
5
|
+
"<input type='input' id='key' value=''/>"+
|
6
|
+
"<a href='#abc' id='focusLink'>click me</a>"+
|
7
|
+
"<textarea id='synTextArea'></textarea>"
|
8
|
+
"</div></form>";
|
9
|
+
}
|
10
|
+
})
|
11
|
+
test("Key Characters", function(){
|
12
|
+
st.g("key").value = "";
|
13
|
+
Syn.key("a","key");
|
14
|
+
equals(st.g("key").value, "a", "a written");
|
15
|
+
|
16
|
+
st.g("key").value = "";
|
17
|
+
Syn.key("A","key");
|
18
|
+
equals(st.g("key").value, "A", "A written");
|
19
|
+
|
20
|
+
st.g("key").value = "";
|
21
|
+
Syn.key("1","key");
|
22
|
+
equals(st.g("key").value, "1", "1 written");
|
23
|
+
})
|
24
|
+
|
25
|
+
test("Key Event Order", 1, function(){
|
26
|
+
var order = [],
|
27
|
+
recorder = function(ev){
|
28
|
+
order.push(ev.type)
|
29
|
+
};
|
30
|
+
|
31
|
+
st.binder("key","keydown", recorder );
|
32
|
+
st.binder("key","keypress", recorder );
|
33
|
+
st.binder("key","keyup", recorder );
|
34
|
+
stop();
|
35
|
+
Syn.key("B","key", function(){
|
36
|
+
same(order,["keydown","keypress","keyup"],"Key order is correct")
|
37
|
+
start();
|
38
|
+
});
|
39
|
+
|
40
|
+
})
|
41
|
+
|
42
|
+
test("Key \\r Submits Forms", 1, function(){
|
43
|
+
var submit = 0;
|
44
|
+
st.binder("outer","submit",function(ev){
|
45
|
+
submit++;
|
46
|
+
if ( ev.preventDefault ) {
|
47
|
+
ev.preventDefault();
|
48
|
+
}
|
49
|
+
ev.returnValue = false;
|
50
|
+
return false;
|
51
|
+
});
|
52
|
+
stop()
|
53
|
+
Syn.key("\r","key", function(){
|
54
|
+
equals(submit, 1, "submit on keypress");
|
55
|
+
start();
|
56
|
+
})
|
57
|
+
})
|
58
|
+
|
59
|
+
test("Key \\r Clicks Links", 1, function(){
|
60
|
+
var clicked = 0;
|
61
|
+
st.binder("focusLink","click",function(ev){
|
62
|
+
clicked++;
|
63
|
+
if ( ev.preventDefault ) {
|
64
|
+
ev.preventDefault();
|
65
|
+
}
|
66
|
+
ev.returnValue = false;
|
67
|
+
return false;
|
68
|
+
});
|
69
|
+
stop()
|
70
|
+
Syn.key("\r","focusLink", function(){
|
71
|
+
equals(clicked, 1, "clicked");
|
72
|
+
start();
|
73
|
+
})
|
74
|
+
});
|
75
|
+
|
76
|
+
test("Key \\r Adds Newline in Textarea", function(){
|
77
|
+
st.g('synTextArea').value = "";
|
78
|
+
stop()
|
79
|
+
Syn.type("ab\rcd","synTextArea", function(){
|
80
|
+
equals( st.g('synTextArea').value.replace("\r","") , "ab\ncd" ,"typed new line correctly")
|
81
|
+
start();
|
82
|
+
})
|
83
|
+
});
|
84
|
+
|
85
|
+
test("Key \\b", function(){
|
86
|
+
st.g("key").value = "";
|
87
|
+
stop();
|
88
|
+
Syn.type("abc","key", function(){
|
89
|
+
equals(st.g("key").value, "abc", "abc written");
|
90
|
+
Syn.key("\b","key");
|
91
|
+
equals(st.g("key").value, "ab", "ab written (key deleted)");
|
92
|
+
start();
|
93
|
+
});
|
94
|
+
})
|
95
|
+
|
96
|
+
|
97
|
+
//tests when the key is inserted
|
98
|
+
test("Key Character Order", function(){
|
99
|
+
|
100
|
+
var upVal,
|
101
|
+
pressVal,
|
102
|
+
downVal
|
103
|
+
st.binder("key","keyup",function(){
|
104
|
+
upVal = st.g("key").value
|
105
|
+
} );
|
106
|
+
st.binder("key","keypress",function(){
|
107
|
+
pressVal = st.g("key").value
|
108
|
+
|
109
|
+
} );
|
110
|
+
st.binder("key","keydown",function(){
|
111
|
+
downVal = st.g("key").value
|
112
|
+
} );
|
113
|
+
stop();
|
114
|
+
Syn.key("J","key", function(){
|
115
|
+
equals(upVal, "J" , "Up Typing works")
|
116
|
+
equals(pressVal, "" , "Press Typing works")
|
117
|
+
equals(downVal, "" , "Down Typing works");
|
118
|
+
start();
|
119
|
+
})
|
120
|
+
|
121
|
+
})
|
122
|
+
|
123
|
+
asyncTest("page down, page up, home, end", function(){
|
124
|
+
st.g("qunit-test-area").innerHTML =
|
125
|
+
"<div id='scrolldiv' style='width:100px;height:200px;overflow-y:scroll;' tabindex='0'>"+
|
126
|
+
"<div id='innerdiv' style='height:1000px;'><a href='javascript://'>Scroll on me</a></div></div>";
|
127
|
+
|
128
|
+
//reset the scroll top
|
129
|
+
st.g("scrolldiv").scrollTop =0;
|
130
|
+
|
131
|
+
//list of keys to press and what to test after the scroll event
|
132
|
+
var keyTest = {
|
133
|
+
"page-down": function() {
|
134
|
+
ok( st.g("scrolldiv").scrollTop > 10 , "Moved down")
|
135
|
+
},
|
136
|
+
"page-up": function() {
|
137
|
+
ok( st.g("scrolldiv").scrollTop == 0 , "Moved back up (page-up)")
|
138
|
+
},
|
139
|
+
"end" : function() {
|
140
|
+
var sd = st.g("scrolldiv")
|
141
|
+
ok( sd.scrollTop == sd.scrollHeight - sd.clientHeight , "Moved to the end")
|
142
|
+
},
|
143
|
+
"home" : function() {
|
144
|
+
ok( st.g("scrolldiv").scrollTop == 0 , "Moved back up (home)")
|
145
|
+
}
|
146
|
+
},
|
147
|
+
order = [],
|
148
|
+
i = 0,
|
149
|
+
runNext = function(){
|
150
|
+
var name = order[i];
|
151
|
+
if(!name){
|
152
|
+
start();
|
153
|
+
return;
|
154
|
+
}
|
155
|
+
Syn.key( name, "scrolldiv")
|
156
|
+
};
|
157
|
+
for(var name in keyTest){
|
158
|
+
order.push(name)
|
159
|
+
}
|
160
|
+
|
161
|
+
st.bind(st.g("scrolldiv"),"scroll",function(ev){
|
162
|
+
keyTest[order[i]]()
|
163
|
+
i++;
|
164
|
+
setTimeout(runNext,1)
|
165
|
+
|
166
|
+
} );
|
167
|
+
stop(1000);
|
168
|
+
|
169
|
+
st.g("scrolldiv").focus();
|
170
|
+
runNext();
|
171
|
+
|
172
|
+
})
|
173
|
+
test("range tests", function(){
|
174
|
+
var selectText = function(el, start, end){
|
175
|
+
if(el.setSelectionRange){
|
176
|
+
if(!end){
|
177
|
+
el.focus();
|
178
|
+
el.setSelectionRange(start, start);
|
179
|
+
} else {
|
180
|
+
el.selectionStart = start;
|
181
|
+
el.selectionEnd = end;
|
182
|
+
}
|
183
|
+
}else if (el.createTextRange) {
|
184
|
+
//el.focus();
|
185
|
+
var r = el.createTextRange();
|
186
|
+
r.moveStart('character', start);
|
187
|
+
end = end || start;
|
188
|
+
r.moveEnd('character', end - el.value.length);
|
189
|
+
|
190
|
+
r.select();
|
191
|
+
}
|
192
|
+
}
|
193
|
+
st.g("qunit-test-area").innerHTML = "<form id='outer'><div id='inner'><input type='input' id='key' value=''/></div></form>"+
|
194
|
+
"<textarea id='mytextarea' />";
|
195
|
+
|
196
|
+
var keyEl = st.g("key")
|
197
|
+
var textAreaEl = st.g("mytextarea")
|
198
|
+
|
199
|
+
// test delete range
|
200
|
+
keyEl.value = "012345";
|
201
|
+
selectText(keyEl, 1, 3);
|
202
|
+
|
203
|
+
Syn.key("delete","key")
|
204
|
+
|
205
|
+
equals(keyEl.value, "0345", "delete range works");
|
206
|
+
|
207
|
+
// test delete key
|
208
|
+
keyEl.value = "012345";
|
209
|
+
selectText(keyEl, 2);
|
210
|
+
|
211
|
+
Syn.key("delete","key");
|
212
|
+
equals(keyEl.value, "01345", "delete works");
|
213
|
+
|
214
|
+
|
215
|
+
// test character range
|
216
|
+
keyEl.value = "123456";
|
217
|
+
selectText(keyEl, 1, 3);
|
218
|
+
|
219
|
+
|
220
|
+
Syn.key("a","key");
|
221
|
+
equals(keyEl.value, "1a456", "character range works");
|
222
|
+
|
223
|
+
// test character key
|
224
|
+
keyEl.value = "123456";
|
225
|
+
selectText(keyEl, 2);
|
226
|
+
|
227
|
+
Syn.key("a","key");
|
228
|
+
equals(keyEl.value, "12a3456", "character insertion works");
|
229
|
+
|
230
|
+
// test backspace range
|
231
|
+
keyEl.value = "123456";
|
232
|
+
selectText(keyEl, 1, 3);
|
233
|
+
Syn.key("\b","key");
|
234
|
+
equals(keyEl.value, "1456", "backspace range works");
|
235
|
+
|
236
|
+
// test backspace key
|
237
|
+
keyEl.value = "123456";
|
238
|
+
selectText(keyEl, 2);
|
239
|
+
Syn.key("\b","key");
|
240
|
+
equals(keyEl.value, "13456", "backspace works");
|
241
|
+
|
242
|
+
// test textarea ranges
|
243
|
+
textAreaEl.value = "123456";
|
244
|
+
selectText(textAreaEl, 1, 3);
|
245
|
+
|
246
|
+
Syn.key("delete",textAreaEl);
|
247
|
+
equals(textAreaEl.value, "1456", "delete range works in a textarea");
|
248
|
+
|
249
|
+
// test textarea ranges
|
250
|
+
textAreaEl.value = "123456";
|
251
|
+
selectText(textAreaEl, 1, 3);
|
252
|
+
Syn.key("a",textAreaEl);
|
253
|
+
equals(textAreaEl.value, "1a456", "character range works in a textarea");
|
254
|
+
|
255
|
+
// test textarea ranges
|
256
|
+
textAreaEl.value = "123456";
|
257
|
+
selectText(textAreaEl, 1, 3);
|
258
|
+
Syn.key("\b",textAreaEl);
|
259
|
+
equals(textAreaEl.value, "1456", "backspace range works in a textarea");
|
260
|
+
|
261
|
+
// test textarea ranges
|
262
|
+
textAreaEl.value = "123456";
|
263
|
+
selectText(textAreaEl, 1, 3);
|
264
|
+
Syn.key("\r",textAreaEl);
|
265
|
+
|
266
|
+
equals(textAreaEl.value.replace("\r",""), "1\n456", "return range works in a textarea");
|
267
|
+
|
268
|
+
//st.g("qunit-test-area").innerHTML = "";
|
269
|
+
|
270
|
+
})
|
271
|
+
|
272
|
+
test("Type with tabs", function(){
|
273
|
+
st.g("qunit-test-area").innerHTML
|
274
|
+
= "<input id='third'/>" +
|
275
|
+
"<a tabindex='1' id='first' href='javascript://'>First</a>"+
|
276
|
+
"<input tabindex='2' id='second'/>"+
|
277
|
+
"<input id='fourth'/>"
|
278
|
+
st.g('first').focus();
|
279
|
+
|
280
|
+
var clicked = 0;
|
281
|
+
st.binder('first', 'click', function(){
|
282
|
+
clicked++;
|
283
|
+
})
|
284
|
+
stop();
|
285
|
+
//give ie a second to focus
|
286
|
+
setTimeout(function(){
|
287
|
+
Syn.type('\r\tSecond\tThird\tFourth', 'first', function(){
|
288
|
+
equals(clicked,1,"clickd first");
|
289
|
+
equals(st.g('second').value,"Second","moved to second");
|
290
|
+
equals(st.g('third').value,"Third","moved to Third");
|
291
|
+
equals(st.g('fourth').value,"Fourth","moved to Fourth");
|
292
|
+
start();
|
293
|
+
})
|
294
|
+
},1)
|
295
|
+
});
|
296
|
+
|
297
|
+
test("Type with shift tabs", function(){
|
298
|
+
st.g("qunit-test-area").innerHTML
|
299
|
+
= "<input id='third'/>" +
|
300
|
+
"<a tabindex='1' id='first' href='javascript://'>First</a>"+
|
301
|
+
"<input tabindex='2' id='second'/>"+
|
302
|
+
"<input id='fourth'/>"
|
303
|
+
st.g('first').focus();
|
304
|
+
|
305
|
+
var clicked = 0;
|
306
|
+
st.binder('first', 'click', function(){
|
307
|
+
clicked++;
|
308
|
+
})
|
309
|
+
stop();
|
310
|
+
//give ie a second to focus
|
311
|
+
setTimeout(function(){
|
312
|
+
Syn.type('[shift]4\t3\t2\t\r[shift-up]', 'fourth', function(){
|
313
|
+
equals(clicked,1,"clickd first");
|
314
|
+
equals(st.g('second').value,"2","moved to second");
|
315
|
+
equals(st.g('third').value,"3","moved to Third");
|
316
|
+
equals(st.g('fourth').value,"4","moved to Fourth");
|
317
|
+
start();
|
318
|
+
})
|
319
|
+
},1)
|
320
|
+
});
|
321
|
+
|
322
|
+
|
323
|
+
test("Type left and right", function(){
|
324
|
+
stop()
|
325
|
+
Syn.type("012345678[left][left][left]\b",'key', function(){
|
326
|
+
equals( st.g('key').value, "01234678", "left works" );
|
327
|
+
|
328
|
+
|
329
|
+
Syn.type("[right][right]a",'key', function(){
|
330
|
+
equals( st.g('key').value, "0123467a8", "right works" );
|
331
|
+
start();
|
332
|
+
})
|
333
|
+
|
334
|
+
})
|
335
|
+
|
336
|
+
|
337
|
+
});
|
338
|
+
test("Type left and delete", function(){
|
339
|
+
stop()
|
340
|
+
Syn.type("123[left][delete]",'key', function(){
|
341
|
+
equals( st.g('key').value, "12", "left delete works" );
|
342
|
+
start();
|
343
|
+
})
|
344
|
+
|
345
|
+
});
|
346
|
+
test("Typing Shift", function(){
|
347
|
+
stop()
|
348
|
+
|
349
|
+
|
350
|
+
var shift = false;
|
351
|
+
st.binder('key','keypress', function(ev){
|
352
|
+
shift = ev.shiftKey
|
353
|
+
})
|
354
|
+
Syn.type("[shift]A[shift-up]",'key',function(){
|
355
|
+
ok(shift,"Shift key on")
|
356
|
+
start();
|
357
|
+
})
|
358
|
+
})
|
359
|
+
test("Typing Shift then clicking", function(){
|
360
|
+
stop()
|
361
|
+
|
362
|
+
var shift = false;
|
363
|
+
st.binder('inner','click', function(ev){
|
364
|
+
shift = ev.shiftKey
|
365
|
+
})
|
366
|
+
Syn.type("[shift]A",'key')
|
367
|
+
.click({},'inner')
|
368
|
+
.type("[shift-up]",'key', function(){
|
369
|
+
ok(shift,"Shift key on click")
|
370
|
+
start();
|
371
|
+
})
|
372
|
+
})
|
373
|
+
|
374
|
+
|
375
|
+
test("Typing Shift Left and Right", function(){
|
376
|
+
stop()
|
377
|
+
|
378
|
+
Syn.type("012345678[shift][left][left][left][shift-up]\b[left]\b",'key', function(){
|
379
|
+
equals( st.g('key').value, "01235", "shift left works" );
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
|
384
|
+
Syn.type("[left][left][shift][right][right]\b[shift-up]",'key', function(){
|
385
|
+
|
386
|
+
equals( st.g('key').value, "015", "shift right works" );
|
387
|
+
start();
|
388
|
+
})
|
389
|
+
|
390
|
+
})
|
391
|
+
})
|
@@ -0,0 +1,233 @@
|
|
1
|
+
module("funcunit/synthetic/mouse",{
|
2
|
+
setup: function() {
|
3
|
+
st.g("qunit-test-area").innerHTML = "<form id='outer'><div id='inner'>"+
|
4
|
+
"<input type='checkbox' id='checkbox'/>"+
|
5
|
+
"<input type='radio' name='radio' value='radio1' id='radio1'/>"+
|
6
|
+
"<input type='radio' name='radio' value='radio2' id='radio2'/>"+
|
7
|
+
"<a href='javascript:doSomething()' id='jsHref'>click me</a>"+
|
8
|
+
"<input type='submit' id='submit'/></div></form>"
|
9
|
+
|
10
|
+
}
|
11
|
+
})
|
12
|
+
|
13
|
+
test("Syn basics", function(){
|
14
|
+
|
15
|
+
ok(Syn,"Syn exists")
|
16
|
+
|
17
|
+
st.g("qunit-test-area").innerHTML = "<div id='outer'><div id='inner'></div></div>"
|
18
|
+
var mouseover = 0, mouseoverf = function(){
|
19
|
+
mouseover++;
|
20
|
+
};
|
21
|
+
st.bind(st.g("outer"),"mouseover",mouseoverf );
|
22
|
+
Syn("mouseover",st.g("inner"))
|
23
|
+
|
24
|
+
st.unbinder("outer","mouseover",mouseoverf );
|
25
|
+
equals(mouseover, 1, "Mouseover");
|
26
|
+
Syn("mouseover",{},'inner')
|
27
|
+
|
28
|
+
equals(mouseover, 1, "Mouseover on no event handlers");
|
29
|
+
st.g("qunit-test-area").innerHTML = "";
|
30
|
+
|
31
|
+
})
|
32
|
+
|
33
|
+
test("Click Forms", function(){
|
34
|
+
var submit = 0, submitf = function(ev){
|
35
|
+
submit++;
|
36
|
+
if ( ev.preventDefault ) {
|
37
|
+
ev.preventDefault();
|
38
|
+
}
|
39
|
+
ev.returnValue = false;
|
40
|
+
return false;
|
41
|
+
};
|
42
|
+
st.bind(st.g("outer"),"submit",submitf );
|
43
|
+
Syn.trigger("click",{},st.g("submit"));
|
44
|
+
Syn("submit",{},"outer")
|
45
|
+
|
46
|
+
|
47
|
+
equals(submit, 2, "Click on submit");
|
48
|
+
|
49
|
+
//make sure clicking the div does not submit the form
|
50
|
+
var click =0, clickf = function(ev){
|
51
|
+
click++;
|
52
|
+
if ( ev.preventDefault ) {
|
53
|
+
ev.preventDefault();
|
54
|
+
}
|
55
|
+
return false;
|
56
|
+
}
|
57
|
+
st.binder("inner","click",clickf );
|
58
|
+
|
59
|
+
Syn.trigger("click",{},st.g("submit"));
|
60
|
+
|
61
|
+
equals(submit, 2, "Submit prevented");
|
62
|
+
equals(click, 1, "Clicked");
|
63
|
+
|
64
|
+
st.unbinder("outer","submit",submitf );
|
65
|
+
st.unbinder("inner","click",clickf );
|
66
|
+
})
|
67
|
+
test("Click Checkboxes", function(){
|
68
|
+
var checkbox =0;
|
69
|
+
|
70
|
+
st.binder("checkbox","change",function(ev){
|
71
|
+
checkbox++;
|
72
|
+
});
|
73
|
+
|
74
|
+
st.g("checkbox").checked = false;
|
75
|
+
|
76
|
+
Syn.trigger("click",{},st.g("checkbox"));
|
77
|
+
|
78
|
+
ok(st.g("checkbox").checked, "click checks on");
|
79
|
+
|
80
|
+
Syn.trigger("click",{},st.g("checkbox"));
|
81
|
+
|
82
|
+
ok(!st.g("checkbox").checked, "click checks off");
|
83
|
+
})
|
84
|
+
|
85
|
+
test("Click Radio Buttons", function(){
|
86
|
+
|
87
|
+
var radio1=0,
|
88
|
+
radio2=0;
|
89
|
+
|
90
|
+
st.g("radio1").checked = false;
|
91
|
+
//make sure changes are called
|
92
|
+
st.bind(st.g("radio1"),"change",function(ev){
|
93
|
+
radio1++;
|
94
|
+
} );
|
95
|
+
st.bind(st.g("radio2"),"change",function(ev){
|
96
|
+
radio2++;
|
97
|
+
} );
|
98
|
+
|
99
|
+
Syn.trigger("click",{},st.g("radio1") );
|
100
|
+
|
101
|
+
equals(radio1, 1, "radio event");
|
102
|
+
ok( st.g("radio1").checked, "radio checked" );
|
103
|
+
|
104
|
+
Syn.trigger("click",{},st.g("radio2") );
|
105
|
+
|
106
|
+
equals(radio2, 1, "radio event");
|
107
|
+
ok( st.g("radio2").checked, "radio checked" );
|
108
|
+
|
109
|
+
|
110
|
+
ok( !st.g("radio1").checked, "radio unchecked" );
|
111
|
+
|
112
|
+
});
|
113
|
+
|
114
|
+
test("Click! Event Order", 4, function(){
|
115
|
+
var order = 0;
|
116
|
+
st.g("qunit-test-area").innerHTML = "<input id='focusme'/>";
|
117
|
+
|
118
|
+
|
119
|
+
st.binder("focusme","mousedown",function(){
|
120
|
+
equals(++order,1,"mousedown")
|
121
|
+
});
|
122
|
+
|
123
|
+
st.binder("focusme","focus",function(){
|
124
|
+
equals(++order, 2,"focus")
|
125
|
+
});
|
126
|
+
|
127
|
+
st.binder("focusme","mouseup",function(){
|
128
|
+
equals(++order,3,"mouseup")
|
129
|
+
});
|
130
|
+
st.binder("focusme","click",function(ev){
|
131
|
+
equals(++order,4,"click")
|
132
|
+
if(ev.preventDefault)
|
133
|
+
ev.preventDefault();
|
134
|
+
ev.returnValue = false;
|
135
|
+
});
|
136
|
+
|
137
|
+
stop();
|
138
|
+
Syn.click({},"focusme", function(){
|
139
|
+
start();
|
140
|
+
})
|
141
|
+
|
142
|
+
})
|
143
|
+
|
144
|
+
test("Click Anchor Runs HREF JavaScript", function(){
|
145
|
+
var didSomething = false,
|
146
|
+
doSomething = window.doSomething;
|
147
|
+
window.doSomething = function(){
|
148
|
+
didSomething = true;
|
149
|
+
}
|
150
|
+
|
151
|
+
|
152
|
+
Syn.trigger("click",{},st.g("jsHref"))
|
153
|
+
|
154
|
+
ok( didSomething, "link href JS run" );
|
155
|
+
|
156
|
+
window.doSomething = doSomething;
|
157
|
+
})
|
158
|
+
test("Click! Anchor Focuses", 2, function(){
|
159
|
+
st.g("qunit-test-area").innerHTML = "<a href='#abc' id='focusme'>I am visible</a>";
|
160
|
+
|
161
|
+
st.binder("focusme","focus",function(ev){
|
162
|
+
ok(true,"focused");
|
163
|
+
});
|
164
|
+
|
165
|
+
st.binder("focusme","click",function(ev){
|
166
|
+
ok(true,"clicked");
|
167
|
+
st.g("qunit-test-area").innerHTML ="";
|
168
|
+
if(ev.preventDefault)
|
169
|
+
ev.preventDefault();
|
170
|
+
ev.returnValue = false;
|
171
|
+
return false;
|
172
|
+
});
|
173
|
+
stop();
|
174
|
+
//need to give browsers a second to show element
|
175
|
+
|
176
|
+
Syn.click({},"focusme", function(){
|
177
|
+
start();
|
178
|
+
})
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
})
|
183
|
+
test("Click away causes Blur", function(){
|
184
|
+
st.g("qunit-test-area").innerHTML = "<input id='one'/><input id='two'/>";
|
185
|
+
|
186
|
+
var change = 0;
|
187
|
+
st.binder("one","change",function(){
|
188
|
+
change++;
|
189
|
+
} );
|
190
|
+
|
191
|
+
stop();
|
192
|
+
Syn.click({},"one")
|
193
|
+
.key("a")
|
194
|
+
.click({},"two", function(){
|
195
|
+
start()
|
196
|
+
equals(change, 1 , "Change called once");
|
197
|
+
})
|
198
|
+
|
199
|
+
})
|
200
|
+
test("Right Click", function(){
|
201
|
+
st.g("qunit-test-area").innerHTML = "<div id='one'>right click me</div>";
|
202
|
+
stop()
|
203
|
+
var context = 0;
|
204
|
+
st.binder("one","contextmenu",function(){
|
205
|
+
context++;
|
206
|
+
});
|
207
|
+
|
208
|
+
Syn.rightClick({},"one", function(){
|
209
|
+
if(Syn.mouse.browser.contextmenu){
|
210
|
+
equals(1, context, "context was called")
|
211
|
+
}else{
|
212
|
+
ok(true,"context shouldn't be called in this browser")
|
213
|
+
}
|
214
|
+
start();
|
215
|
+
})
|
216
|
+
})
|
217
|
+
|
218
|
+
test("Double Click", function(){
|
219
|
+
st.g("qunit-test-area").innerHTML = "<div id='dblclickme'>double click me</div>";
|
220
|
+
stop()
|
221
|
+
var eventSequence = [];
|
222
|
+
st.binder("dblclickme","dblclick",function(){
|
223
|
+
eventSequence.push('dblclick');
|
224
|
+
});
|
225
|
+
st.binder("dblclickme","click",function(){
|
226
|
+
eventSequence.push('click');
|
227
|
+
});
|
228
|
+
|
229
|
+
Syn.dblclick({},"dblclickme", function(){
|
230
|
+
equals(eventSequence.join(', '), 'click, click, dblclick', 'expected event sequence for doubleclick');
|
231
|
+
start();
|
232
|
+
})
|
233
|
+
})
|