@@ -24,8 +24,6 @@ function getAttributes(node) {
2424 return attrs ;
2525}
2626
27- const isIE11 = / T r i d e n t \/ / . test ( navigator . userAgent ) ;
28-
2927describe ( 'render()' , ( ) => {
3028 let scratch , rerender ;
3129
@@ -84,13 +82,10 @@ describe('render()', () => {
8482 expect ( scratch . innerHTML ) . to . eql ( `<img width="100%" height="100%">` ) ;
8583 } ) ;
8684
87- // IE11 doesn't support these.
88- if ( ! / T r i d e n t / . test ( window . navigator . userAgent ) ) {
89- it ( 'should render px width and height on img correctly' , ( ) => {
90- render ( < img width = "100px" height = "100px" /> , scratch ) ;
91- expect ( scratch . innerHTML ) . to . eql ( `<img width="100px" height="100px">` ) ;
92- } ) ;
93- }
85+ it ( 'should render px width and height on img correctly' , ( ) => {
86+ render ( < img width = "100px" height = "100px" /> , scratch ) ;
87+ expect ( scratch . innerHTML ) . to . eql ( `<img width="100px" height="100px">` ) ;
88+ } ) ;
9489
9590 it ( 'should support the <template> tag' , ( ) => {
9691 function App ( ) {
@@ -126,10 +121,6 @@ describe('render()', () => {
126121 expect ( scratch . childNodes [ 0 ] . nodeName ) . to . equal ( 'SPAN' ) ;
127122 } ) ;
128123
129- it ( 'should not throw error in IE11 with type date' , ( ) => {
130- expect ( ( ) => render ( < input type = "date" /> , scratch ) ) . to . not . throw ( ) ;
131- } ) ;
132-
133124 it ( 'should support custom tag names' , ( ) => {
134125 render ( < foo /> , scratch ) ;
135126 expect ( scratch . childNodes ) . to . have . length ( 1 ) ;
@@ -168,11 +159,8 @@ describe('render()', () => {
168159 const button = div . childNodes [ 1 ] ;
169160 const input = div . childNodes [ 2 ] ;
170161
171- // IE11 doesn't support the form attribute
172- if ( ! isIE11 ) {
173- expect ( button ) . to . have . property ( 'form' , form ) ;
174- expect ( input ) . to . have . property ( 'form' , form ) ;
175- }
162+ expect ( button ) . to . have . property ( 'form' , form ) ;
163+ expect ( input ) . to . have . property ( 'form' , form ) ;
176164 } ) ;
177165
178166 it ( 'should allow VNode reuse' , ( ) => {
@@ -401,42 +389,38 @@ describe('render()', () => {
401389 expect ( scratch . firstChild . value ) . to . equal ( '0.5' ) ;
402390 } ) ;
403391
404- // IE or IE Edge will throw when attribute values don't conform to the
405- // spec. That's the correct behaviour, but bad for this test...
406- if ( ! / ( E d g e | M S I E | T r i d e n t ) / . test ( navigator . userAgent ) ) {
407- it ( 'should not clear falsy DOM properties' , ( ) => {
408- function test ( val ) {
409- render (
410- < div >
411- < input value = { val } />
412- < table border = { val } />
413- </ div > ,
414- scratch
415- ) ;
416- }
417-
418- test ( '2' ) ;
419- test ( false ) ;
420- expect ( scratch . innerHTML ) . to . equal (
421- '<div><input><table border="false"></table></div>' ,
422- 'for false'
392+ it ( 'should not clear falsy DOM properties' , ( ) => {
393+ function test ( val ) {
394+ render (
395+ < div >
396+ < input value = { val } />
397+ < table border = { val } />
398+ </ div > ,
399+ scratch
423400 ) ;
401+ }
424402
425- test ( '3 ' ) ;
426- test ( null ) ;
427- expect ( scratch . innerHTML ) . to . equal (
428- '<div><input><table border=""></table></div>' ,
429- 'for null '
430- ) ;
403+ test ( '2 ' ) ;
404+ test ( false ) ;
405+ expect ( scratch . innerHTML ) . to . equal (
406+ '<div><input><table border="false "></table></div>' ,
407+ 'for false '
408+ ) ;
431409
432- test ( '4' ) ;
433- test ( undefined ) ;
434- expect ( scratch . innerHTML ) . to . equal (
435- '<div><input><table border=""></table></div>' ,
436- 'for undefined'
437- ) ;
438- } ) ;
439- }
410+ test ( '3' ) ;
411+ test ( null ) ;
412+ expect ( scratch . innerHTML ) . to . equal (
413+ '<div><input><table border=""></table></div>' ,
414+ 'for null'
415+ ) ;
416+
417+ test ( '4' ) ;
418+ test ( undefined ) ;
419+ expect ( scratch . innerHTML ) . to . equal (
420+ '<div><input><table border=""></table></div>' ,
421+ 'for undefined'
422+ ) ;
423+ } ) ;
440424
441425 // Test for #3969
442426 it ( 'should clear rowspan and colspan' , ( ) => {
@@ -1316,11 +1300,7 @@ describe('render()', () => {
13161300 '<div id="wrapper"><div id="page1">Page 1</div></div>'
13171301 ) ;
13181302
1319- // IE11 doesn't allow modifying Element.prototype functions properly.
1320- // Custom spies will never be called.
1321- if ( ! isIE11 ) {
1322- expect ( attributesSpy . get ) . to . not . have . been . called ;
1323- }
1303+ expect ( attributesSpy . get ) . to . not . have . been . called ;
13241304
13251305 render (
13261306 < div id = "wrapper" >
@@ -1332,11 +1312,7 @@ describe('render()', () => {
13321312 '<div id="wrapper"><div id="page2">Page 2</div></div>'
13331313 ) ;
13341314
1335- // IE11 doesn't allow modifying Element.prototype functions properly.
1336- // Custom spies will never be called.
1337- if ( ! isIE11 ) {
1338- expect ( attributesSpy . get ) . to . not . have . been . called ;
1339- }
1315+ expect ( attributesSpy . get ) . to . not . have . been . called ;
13401316 } ) ;
13411317
13421318 // #2926
@@ -1370,7 +1346,7 @@ describe('render()', () => {
13701346
13711347 // #3060
13721348 it ( 'should reset tabindex on undefined/null' , ( ) => {
1373- const defaultValue = isIE11 ? 0 : - 1 ;
1349+ const defaultValue = - 1 ;
13741350
13751351 render ( < div tabIndex = { 0 } /> , scratch ) ;
13761352 expect ( scratch . firstChild . tabIndex ) . to . equal ( 0 ) ;
0 commit comments