Remove sniffing from one of the DOM tests, making it pass in IE8.
This commit is contained in:
parent
4b9bf985a2
commit
a97c044361
|
@ -1,3 +1,5 @@
|
|||
* Remove sniffing from one of the DOM tests, which produced failures in IE8 (kangax)
|
||||
|
||||
* Fix `Form.reset` test where `respondsTo` wouldn't detect a method due to typeof returning "object" (rather than "function") in IE (kangax)
|
||||
|
||||
* Remove Array#reduce which currently overrides native `reduce` in clients implementing JS1.8, e.g. Firefox 3+ (Tobie Langel, Andrew Dupont, kangax)
|
||||
|
|
|
@ -73,7 +73,15 @@ new Test.Unit.Runner({
|
|||
|
||||
this.assertElementsMatch(document.getElementsByClassName('A'), 'p.A', 'ul#class_names_ul.A', 'li.A.C');
|
||||
|
||||
if (Prototype.Browser.IE)
|
||||
|
||||
var isElementPrototypeSupported = (function(){
|
||||
var el = document.createElement('div');
|
||||
var result = typeof el.show != 'undefined';
|
||||
el = null;
|
||||
return result;
|
||||
})();
|
||||
|
||||
if (!isElementPrototypeSupported)
|
||||
this.assertUndefined(document.getElementById('unextended').show);
|
||||
|
||||
this.assertElementsMatch(div.getElementsByClassName('B'), 'ul#class_names_ul.A.B', 'div.B.C.D');
|
||||
|
@ -95,7 +103,8 @@ new Test.Unit.Runner({
|
|||
this.assertElementsMatch(list.getElementsByClassName({}));
|
||||
|
||||
// those lookups shouldn't have extended all nodes in document
|
||||
if (Prototype.Browser.IE) this.assertUndefined(document.getElementById('unextended')['show']);
|
||||
if (!isElementPrototypeSupported)
|
||||
this.assertUndefined(document.getElementById('unextended')['show']);
|
||||
},
|
||||
|
||||
testElementInsertWithHTML: function() {
|
||||
|
|
Loading…
Reference in New Issue