source: main/trunk/greenstone3/web/interfaces/oran/js/jquery-ui-1.8rc1/tests/unit/tabs/tabs_tickets.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: 1.8 KB
Line 
1/*
2 * tabs_tickets.js
3 */
4(function($) {
5
6module("tabs: tickets");
7
8test('#2715 - id containing colon', function() {
9 // http://dev.jqueryui.com/ticket/2715
10 expect(4);
11
12 el = $('#tabs2').tabs();
13 ok( $('div.ui-tabs-panel:eq(0)', '#tabs2').is(':visible'), 'first panel should be visible' );
14 ok( $('div.ui-tabs-panel:eq(1)', '#tabs2').is(':hidden'), 'second panel should be hidden' );
15
16 el.tabs('select', 1).tabs('select', 0);
17 ok( $('div.ui-tabs-panel:eq(0)', '#tabs2').is(':visible'), 'first panel should be visible' );
18 ok( $('div.ui-tabs-panel:eq(1)', '#tabs2').is(':hidden'), 'second panel should be hidden' );
19
20});
21
22test('#???? - panel containing inline style', function() {
23 expect(3);
24
25 var inlineStyle = function(property) {
26 return $('#inline-style')[0].style[property];
27 };
28 var expected = inlineStyle('height');
29
30 el = $('#tabs2').tabs();
31 equals(inlineStyle('height'), expected, 'init should not remove inline style');
32
33 el.tabs('select', 1);
34 equals(inlineStyle('height'), expected, 'show tab should not remove inline style');
35
36 el.tabs('select', 0);
37 equals(inlineStyle('height'), expected, 'hide tab should not remove inline style');
38
39});
40
41test('#3627 - Ajax tab with url containing a fragment identifier fails to load', function() {
42 // http://dev.jqueryui.com/ticket/3627
43 expect(1);
44
45 el = $('#tabs2').tabs();
46
47 ok(/test.html$/.test( $('a:eq(2)', el).data('load.tabs') ), 'should ignore fragment identifier');
48
49});
50
51test('#4033 - IE expands hash to full url and misinterprets tab as ajax', function() {
52 // http://dev.jqueryui.com/ticket/4033
53 expect(1);
54
55 el = $('<div><ul><li><a href="#tab">Tab</a></li></ul><div id="tab"></div></div>')
56 .appendTo('#main').tabs();
57
58 equals($('a', el).data('load.tabs'), undefined, 'should not create ajax tab');
59
60});
61
62
63})(jQuery);
Note: See TracBrowser for help on using the repository browser.