@@ -39,14 +39,14 @@ QUnit[/Opera\/9\.80\s.*Version\/12\.16/.test(navigator.userAgent)
39
39
assert . equal ( getOriginalStyle ( element , 'width' ) , '20%' , 'Container Query with crossOrigin' ) ;
40
40
load ( 'cors.css' , false , false , function ( ) {
41
41
assert . ok ( getOriginalStyle ( element , 'width' ) === undefined || getOriginalStyle ( element , 'width' ) === '10%' , 'Non-CORS Style Stylesheet' ) ;
42
- assert . equal ( getComputedStyle ( element ) . color , 'rgb(255, 0, 0)' , 'Non-CORS Style Stylesheet computed style' ) ;
42
+ assert . equal ( getComputedStyle ( element , ' color' ) , 'rgb(255, 0, 0)' , 'Non-CORS Style Stylesheet computed style' ) ;
43
43
load ( 'cors.css' , true , false , function ( ) {
44
44
assert . ok ( getOriginalStyle ( element , 'width' ) === undefined || getOriginalStyle ( element , 'width' ) === '10%' , 'Non-CORS Style Stylesheet with crossOrigin' ) ;
45
45
if ( 'crossOrigin' in document . createElement ( 'link' ) ) {
46
- assert . equal ( getComputedStyle ( element ) . color , 'rgb(0, 0, 0)' , 'Non-CORS Style Stylesheet with crossOrigin computed style (crossOrigin supported)' ) ;
46
+ assert . equal ( getComputedStyle ( element , ' color' ) , 'rgb(0, 0, 0)' , 'Non-CORS Style Stylesheet with crossOrigin computed style (crossOrigin supported)' ) ;
47
47
}
48
48
else {
49
- assert . equal ( getComputedStyle ( element ) . color , 'rgb(255, 0, 0)' , 'Non-CORS Style Stylesheet with crossOrigin computed style (crossOrigin not supported)' ) ;
49
+ assert . equal ( getComputedStyle ( element , ' color' ) , 'rgb(255, 0, 0)' , 'Non-CORS Style Stylesheet with crossOrigin computed style (crossOrigin not supported)' ) ;
50
50
}
51
51
load ( 'cors-with-cq.css' , false , false , function ( ) {
52
52
assert . strictEqual ( getOriginalStyle ( element , 'width' ) , undefined , 'Non-CORS Container Query' ) ;
@@ -93,7 +93,7 @@ QUnit.test('DOM Mutations', function(assert) {
93
93
delete config . skipObserving ;
94
94
startObserving ( ) ;
95
95
96
- assert . equal ( getComputedStyle ( element ) . display , 'block' , 'Display block' ) ;
96
+ assert . equal ( getComputedStyle ( element , ' display' ) , 'block' , 'Display block' ) ;
97
97
98
98
var style = document . createElement ( 'style' ) ;
99
99
style . type = 'text/css' ;
@@ -102,7 +102,7 @@ QUnit.test('DOM Mutations', function(assert) {
102
102
103
103
requestAnimationFrame ( function ( ) { setTimeout ( function ( ) {
104
104
105
- assert . equal ( getComputedStyle ( element ) . display , 'none' , 'Display none' ) ;
105
+ assert . equal ( getComputedStyle ( element , ' display' ) , 'none' , 'Display none' ) ;
106
106
107
107
var element2 = document . createElement ( 'div' ) ;
108
108
element2 . className = 'mutations-test' ;
@@ -115,18 +115,18 @@ QUnit.test('DOM Mutations', function(assert) {
115
115
116
116
requestAnimationFrame ( function ( ) { setTimeout ( function ( ) {
117
117
118
- assert . equal ( getComputedStyle ( element2 ) . display , 'none' , 'Display none' ) ;
118
+ assert . equal ( getComputedStyle ( element2 , ' display' ) , 'none' , 'Display none' ) ;
119
119
120
120
fixture . appendChild ( element3 ) ;
121
- assert . equal ( getComputedStyle ( element3 ) . display , 'block' , 'Display block' ) ;
121
+ assert . equal ( getComputedStyle ( element3 , ' display' ) , 'block' , 'Display block' ) ;
122
122
123
123
fixture . removeChild ( style ) ;
124
124
125
125
requestAnimationFrame ( function ( ) { setTimeout ( function ( ) {
126
126
127
- assert . equal ( getComputedStyle ( element ) . display , 'block' , 'Display block' ) ;
128
- assert . equal ( getComputedStyle ( element2 ) . display , 'block' , 'Display block' ) ;
129
- assert . equal ( getComputedStyle ( element3 ) . display , 'block' , 'Display block' ) ;
127
+ assert . equal ( getComputedStyle ( element , ' display' ) , 'block' , 'Display block' ) ;
128
+ assert . equal ( getComputedStyle ( element2 , ' display' ) , 'block' , 'Display block' ) ;
129
+ assert . equal ( getComputedStyle ( element3 , ' display' ) , 'block' , 'Display block' ) ;
130
130
131
131
// Cleanup
132
132
if ( observer ) {
@@ -798,15 +798,15 @@ QUnit.test('getComputedStyle', function(assert) {
798
798
element . style . height = '1in' ;
799
799
element . style . cssFloat = 'left' ;
800
800
fixture . appendChild ( element ) ;
801
- assert . equal ( getComputedStyle ( element ) . width , '100px' , 'Normal style' ) ;
802
- assert . equal ( getComputedStyle ( element ) . height , '96px' , 'Converted to pixel' ) ;
803
- assert . equal ( getComputedStyle ( element ) . cssFloat , 'left' , 'Float left' ) ;
804
- assert . equal ( getComputedStyle ( element ) . display , 'block' , 'Default style' ) ;
801
+ assert . equal ( getComputedStyle ( element , 'width' ) , '100px' , 'Normal style' ) ;
802
+ assert . equal ( getComputedStyle ( element , 'height' ) , '96px' , 'Converted to pixel' ) ;
803
+ assert . equal ( getComputedStyle ( element , 'float' ) , 'left' , 'Float left' ) ;
804
+ assert . equal ( getComputedStyle ( element , 'cssFloat' ) , 'left' , 'Float left cssFloat' ) ;
805
+ assert . equal ( getComputedStyle ( element , 'display' ) , 'block' , 'Default style' ) ;
805
806
element . style . cssText = 'display: inline; float: left; font-size: 10px' ;
806
- assert . equal ( getComputedStyle ( element ) . display , 'block' , 'Correct display value' ) ;
807
- assert . equal ( getComputedStyle ( element ) . getPropertyValue ( 'display' ) , 'block' , 'Correct display value via getPropertyValue' ) ;
808
- assert . equal ( getComputedStyle ( element ) . fontSize , '10px' , 'Correct font-size value' ) ;
809
- assert . equal ( getComputedStyle ( element ) . getPropertyValue ( 'font-size' ) , '10px' , 'Correct font-size value via getPropertyValue' ) ;
807
+ assert . equal ( getComputedStyle ( element , 'display' ) , 'block' , 'Correct display value' ) ;
808
+ assert . equal ( getComputedStyle ( element , 'fontSize' ) , '10px' , 'Correct font-size value' ) ;
809
+ assert . equal ( getComputedStyle ( element , 'font-size' ) , '10px' , 'Correct font-size value via getPropertyValue' ) ;
810
810
} ) ;
811
811
812
812
/*global getOriginalStyle, buildStyleCache*/
0 commit comments