Skip to content

Commit 69866fd

Browse files
author
timmywil
committed
VML.type test was causing multiple test suite fails, fix attributes.js fail in IE6 where the val(String/Number) tests were interfering with the val(Function) tests
1 parent 6d49e84 commit 69866fd

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

test/data/testsuite.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,6 @@ div#show-tests * { display: none; }
109109
#nothiddendiv { font-size: 16px; }
110110
#nothiddendivchild.em { font-size: 2em; }
111111
#nothiddendivchild.prct { font-size: 150%; }
112+
113+
/* For testing type on vml in IE #7071 */
114+
v\:oval { behavior:url(#default#VML); display:inline-block; }

test/index.html

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@
4545
<script src="unit/effects.js"></script>
4646
<script src="unit/offset.js"></script>
4747
<script src="unit/dimensions.js"></script>
48-
49-
<!-- For testing http://bugs.jquery.com/ticket/7071 -->
50-
<xml:namespace ns="urn:schemas-microsoft-com:vml" prefix="v" />
51-
<style>v\:oval { behavior:url(#default#VML); display:inline-block; }</style>
5248
</head>
5349

5450
<body id="body">
@@ -151,7 +147,6 @@ <h2 id="qunit-userAgent"></h2>
151147
<span id="test.foo[5]bar" class="test.foo[5]bar"></span>
152148

153149
<foo_bar id="foobar">test element</foo_bar>
154-
<v:oval id="oval" style="width:100pt;height:75pt;" fillcolor="red"> </v:oval>
155150
</form>
156151
<b id="floatTest">Float test.</b>
157152
<iframe id="iframe" name="iframe"></iframe>

test/unit/attributes.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,7 @@ test("val()", function() {
492492
var testVal = function(valueObj) {
493493
expect(8);
494494

495+
QUnit.reset();
495496
jQuery("#text1").val(valueObj( "test" ));
496497
equals( document.getElementById("text1").value, "test", "Check for modified (via val(String)) value of input element" );
497498

@@ -504,15 +505,16 @@ var testVal = function(valueObj) {
504505
jQuery("#text1").val(valueObj( null ));
505506
equals( document.getElementById("text1").value, "", "Check for modified (via val(null)) value of input element" );
506507

507-
jQuery("#select1").val(valueObj( "3" ));
508-
equals( jQuery("#select1").val(), "3", "Check for modified (via val(String)) value of select element" );
508+
var $select1 = jQuery("#select1");
509+
$select1.val(valueObj( "3" ));
510+
equals( $select1.val(), "3", "Check for modified (via val(String)) value of select element" );
509511

510-
jQuery("#select1").val(valueObj( 2 ));
511-
equals( jQuery("#select1").val(), "2", "Check for modified (via val(Number)) value of select element" );
512+
$select1.val(valueObj( 2 ));
513+
equals( $select1.val(), "2", "Check for modified (via val(Number)) value of select element" );
512514

513-
jQuery("#select1").append("<option value='4'>four</option>");
514-
jQuery("#select1").val(valueObj( 4 ));
515-
equals( jQuery("#select1").val(), "4", "Should be possible to set the val() to a newly created option" );
515+
$select1.append("<option value='4'>four</option>");
516+
$select1.val(valueObj( 4 ));
517+
equals( $select1.val(), "4", "Should be possible to set the val() to a newly created option" );
516518

517519
// using contents will get comments regular, text, and comment nodes
518520
var j = jQuery("#nonnodes").contents();

test/unit/event.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -778,6 +778,8 @@ test("trigger() shortcuts", function() {
778778
elem.remove();
779779

780780
// test that special handlers do not blow up with VML elements (#7071)
781+
jQuery('<xml:namespace ns="urn:schemas-microsoft-com:vml" prefix="v" />').appendTo('head');
782+
jQuery('<v:oval id="oval" style="width:100pt;height:75pt;" fillcolor="red"> </v:oval>').appendTo('#form');
781783
jQuery("#oval").click().keydown();
782784
});
783785

0 commit comments

Comments
 (0)