source: main/trunk/greenstone3/web/interfaces/oran/js/jquery-ui-1.8rc1/tests/unit/autocomplete/autocomplete_core.js@ 24245

Last change on this file since 24245 was 24245, checked in by sjb48, 13 years ago

Oran code for supporting format changes to document.

  • Property svn:executable set to *
File size: 911 bytes
Line 
1/*
2 * autocomplete_core.js
3 */
4
5
6(function($) {
7
8module("autocomplete: core");
9
10test("close-on-blur is properly delayed", function() {
11 var ac = $("#autocomplete").autocomplete({
12 source: ["java", "javascript"]
13 }).val("ja").autocomplete("search");
14 same( $(".ui-menu:visible").length, 1 );
15 ac.blur();
16 same( $(".ui-menu:visible").length, 1 );
17 stop();
18 setTimeout(function() {
19 same( $(".ui-menu:visible").length, 0 );
20 start();
21 }, 200);
22})
23
24test("close-on-blur is cancelled when starting a search", function() {
25 var ac = $("#autocomplete").autocomplete({
26 source: ["java", "javascript"]
27 }).val("ja").autocomplete("search");
28 same( $(".ui-menu:visible").length, 1 );
29 ac.blur();
30 same( $(".ui-menu:visible").length, 1 );
31 ac.autocomplete("search");
32 stop();
33 setTimeout(function() {
34 same( $(".ui-menu:visible").length, 1 );
35 start();
36 }, 200);
37})
38
39})(jQuery);
Note: See TracBrowser for help on using the repository browser.