@@ -316,36 +316,6 @@ test('One selector and two properties, set by two separate scriptlets - getCompu
316
316
matchStyle . remove ( ) ;
317
317
} ) ;
318
318
319
- test ( 'One selector and two properties - getComputedStyle' , ( assert ) => {
320
- const matchClassName = 'testClassFewProps' ;
321
-
322
- const matchElem = createElem ( matchClassName ) ;
323
- const cssProperty = 'display: none !important; visibility: hidden !important;' ;
324
- const matchStyle = addStyle ( `.${ matchClassName } { ${ cssProperty } }` ) ;
325
-
326
- const cssNameProperty = 'display, visibility' ;
327
- const cssValueProperty = 'block, visible' ;
328
-
329
- const scriptletArgs = [ `.${ matchClassName } ` , cssNameProperty , cssValueProperty ] ;
330
- runScriptlet ( name , scriptletArgs ) ;
331
-
332
- const computedStyle = window . getComputedStyle ( matchElem ) ;
333
- const elStyleDisplay = computedStyle . display ;
334
- const elStylePropValDisplay = computedStyle . getPropertyValue ( 'display' ) ;
335
- const elStyleVisibility = computedStyle . visibility ;
336
- const elStylePropValVisibility = computedStyle . getPropertyValue ( 'visibility' ) ;
337
-
338
- assert . strictEqual ( elStyleDisplay , 'block' , 'display style is set to block' ) ;
339
- assert . strictEqual ( elStylePropValDisplay , 'block' , 'display style is set to block - getPropertyValue' ) ;
340
- assert . strictEqual ( elStyleVisibility , 'visible' , 'visibility style is set to visible' ) ;
341
- assert . strictEqual ( elStylePropValVisibility , 'visible' , 'visibility style is set to visible - getPropertyValue' ) ;
342
- assert . strictEqual ( window . hit , 'FIRED' ) ;
343
-
344
- clearGlobalProps ( 'hit' ) ;
345
- matchElem . remove ( ) ;
346
- matchStyle . remove ( ) ;
347
- } ) ;
348
-
349
319
test ( 'Two selectors and one property - getComputedStyle' , ( assert ) => {
350
320
const matchClassNameFirst = 'testClassFirst' ;
351
321
const matchClassNameSecond = 'testClassSecond' ;
@@ -421,64 +391,6 @@ test('Two selectors divided by escaped comma and one property - getComputedStyle
421
391
matchStyle . remove ( ) ;
422
392
} ) ;
423
393
424
- test ( 'Two selectors and two properties - getComputedStyle' , ( assert ) => {
425
- const matchClassNameFirst = 'testClassFirst' ;
426
- const matchClassNameSecond = 'testClassSecond' ;
427
-
428
- const matchElemFirst = createElem ( matchClassNameFirst ) ;
429
- const matchElemSecond = createElem ( matchClassNameFirst ) ;
430
- const cssProperty = 'display: none !important; visibility: hidden !important;' ;
431
- const matchStyle = addStyle (
432
- `
433
- .${ matchClassNameFirst } { ${ cssProperty } }
434
- .${ matchClassNameSecond } { ${ cssProperty } }
435
- ` ,
436
- ) ;
437
-
438
- const cssNameProperty = 'display, visibility' ;
439
- const cssValueProperty = 'block, visible' ;
440
-
441
- const scriptletArgs = [ `.${ matchClassNameFirst } , .${ matchClassNameSecond } ` , cssNameProperty , cssValueProperty ] ;
442
- runScriptlet ( name , scriptletArgs ) ;
443
-
444
- const computedStyleSecond = window . getComputedStyle ( matchElemSecond ) ;
445
- const elStyleDisplaySecond = computedStyleSecond . display ;
446
- const elStylePropValDisplaySecond = computedStyleSecond . getPropertyValue ( 'display' ) ;
447
- const elStyleVisibilitySecond = computedStyleSecond . visibility ;
448
- const elStylePropValVisibilitySecond = computedStyleSecond . getPropertyValue ( 'visibility' ) ;
449
-
450
- const computedStyleFirst = window . getComputedStyle ( matchElemFirst ) ;
451
- const elStyleDisplayFirst = computedStyleFirst . display ;
452
- const elStylePropValDisplayFirst = computedStyleFirst . getPropertyValue ( 'display' ) ;
453
- const elStyleVisibilityFirst = computedStyleFirst . visibility ;
454
- const elStylePropValVisibilityFirst = computedStyleFirst . getPropertyValue ( 'visibility' ) ;
455
-
456
- assert . strictEqual ( elStyleDisplayFirst , 'block' , 'display style is set to block' ) ;
457
- assert . strictEqual ( elStylePropValDisplayFirst , 'block' , 'display style is set to block - getPropertyValue' ) ;
458
- assert . strictEqual ( elStyleVisibilityFirst , 'visible' , 'visibility style is set to visible' ) ;
459
- assert . strictEqual (
460
- elStylePropValVisibilityFirst ,
461
- 'visible' ,
462
- 'visibility style is set to visible - getPropertyValue' ,
463
- ) ;
464
-
465
- assert . strictEqual ( elStyleDisplaySecond , 'block' , 'display style is set to block' ) ;
466
- assert . strictEqual ( elStylePropValDisplaySecond , 'block' , 'display style is set to block - getPropertyValue' ) ;
467
- assert . strictEqual ( elStyleVisibilitySecond , 'visible' , 'visibility style is set to visible' ) ;
468
- assert . strictEqual (
469
- elStylePropValVisibilitySecond ,
470
- 'visible' ,
471
- 'visibility style is set to visible - getPropertyValue' ,
472
- ) ;
473
-
474
- assert . strictEqual ( window . hit , 'FIRED' ) ;
475
-
476
- clearGlobalProps ( 'hit' ) ;
477
- matchElemFirst . remove ( ) ;
478
- matchElemSecond . remove ( ) ;
479
- matchStyle . remove ( ) ;
480
- } ) ;
481
-
482
394
test ( 'One selector and one property - getComputedStyle getOwnPropertyDescriptor' , ( assert ) => {
483
395
const matchClassName = 'testClassGetOwnPropertyDescriptor' ;
484
396
@@ -553,34 +465,6 @@ test('One selector and one property - getBoundingClientRect top', (assert) => {
553
465
matchStyle . remove ( ) ;
554
466
} ) ;
555
467
556
- test ( 'One selector and two properties - getBoundingClientRect' , ( assert ) => {
557
- const EXPECTED_HEIGHT = 555 ;
558
- const EXPECTED_WIDTH = 666 ;
559
- const matchClassName = 'testClassClientRect' ;
560
-
561
- const matchElem = createElem ( matchClassName ) ;
562
- const cssProperty = 'height: 100px !important; width: 100px !important;' ;
563
- const matchStyle = addStyle ( `.${ matchClassName } { ${ cssProperty } }` ) ;
564
-
565
- const cssNameProperty = 'height, width' ;
566
- const cssValueProperty = `${ EXPECTED_HEIGHT } , ${ EXPECTED_WIDTH } ` ;
567
-
568
- const scriptletArgs = [ `.${ matchClassName } ` , cssNameProperty , cssValueProperty ] ;
569
- runScriptlet ( name , scriptletArgs ) ;
570
-
571
- const boundingClientRect = matchElem . getBoundingClientRect ( ) ;
572
- const elStyleHeight = boundingClientRect . height ;
573
- const elStyleWidth = boundingClientRect . width ;
574
-
575
- assert . strictEqual ( elStyleHeight , EXPECTED_HEIGHT , `height is set to ${ EXPECTED_HEIGHT } ` ) ;
576
- assert . strictEqual ( elStyleWidth , EXPECTED_WIDTH , `width is set to ${ EXPECTED_HEIGHT } ` ) ;
577
- assert . strictEqual ( window . hit , 'FIRED' ) ;
578
-
579
- clearGlobalProps ( 'hit' ) ;
580
- matchElem . remove ( ) ;
581
- matchStyle . remove ( ) ;
582
- } ) ;
583
-
584
468
test ( 'Native code check' , ( assert ) => {
585
469
const matchClassName = 'testClassNativeCode' ;
586
470
const matchElem = createElem ( matchClassName ) ;
0 commit comments