|
537 | 537 | expect(img.width).to.equal(240)
|
538 | 538 | expect(img.height).to.equal(160)
|
539 | 539 | expect(img.style.width).to.equal('120px')
|
540 |
| - expect(img.style.height).to.equal('80px') |
541 | 540 | // Check if pixelRatio scaling is idempotent:
|
542 | 541 | var img2 = loadImage.scale(img, { minWidth: 120, pixelRatio: 2 })
|
543 | 542 | expect(img2.width).to.equal(240)
|
544 | 543 | expect(img2.height).to.equal(160)
|
545 | 544 | expect(img2.style.width).to.equal('120px')
|
546 |
| - expect(img2.style.height).to.equal('80px') |
547 | 545 | done()
|
548 | 546 | },
|
549 | 547 | { minWidth: 120, canvas: true, pixelRatio: 2 }
|
|
559 | 557 | expect(img.width).to.equal(60)
|
560 | 558 | expect(img.height).to.equal(40)
|
561 | 559 | expect(img.style.width).to.equal('30px')
|
562 |
| - expect(img.style.height).to.equal('20px') |
563 | 560 | // Check if pixelRatio scaling is idempotent:
|
564 | 561 | var img2 = loadImage.scale(img, { minWidth: 30, pixelRatio: 2 })
|
565 | 562 | expect(img2.width).to.equal(60)
|
566 | 563 | expect(img2.height).to.equal(40)
|
567 | 564 | expect(img2.style.width).to.equal('30px')
|
568 |
| - expect(img2.style.height).to.equal('20px') |
569 | 565 | done()
|
570 | 566 | },
|
571 | 567 | { maxWidth: 30, canvas: true, pixelRatio: 2 }
|
|
913 | 909 | expect(img.width).to.equal(80)
|
914 | 910 | expect(img.height).to.equal(80)
|
915 | 911 | expect(img.style.width).to.equal('40px')
|
916 |
| - expect(img.style.height).to.equal('40px') |
917 | 912 | done()
|
918 | 913 | },
|
919 | 914 | { maxWidth: 40, maxHeight: 40, crop: true, pixelRatio: 2 }
|
|
929 | 924 | expect(img.width).to.equal(80)
|
930 | 925 | expect(img.height).to.equal(80)
|
931 | 926 | expect(img.style.width).to.equal('40px')
|
932 |
| - expect(img.style.height).to.equal('40px') |
933 | 927 | done()
|
934 | 928 | },
|
935 | 929 | { sourceWidth: 40, sourceHeight: 40, crop: true, pixelRatio: 2 }
|
|
1087 | 1081 | expect(img.width).to.equal(80)
|
1088 | 1082 | expect(img.height).to.equal(120)
|
1089 | 1083 | expect(img.style.width).to.equal('40px')
|
1090 |
| - expect(img.style.height).to.equal('60px') |
1091 | 1084 | done()
|
1092 | 1085 | },
|
1093 | 1086 | { orientation: 8, pixelRatio: 2 }
|
|
1103 | 1096 | expect(img.width).to.equal(80)
|
1104 | 1097 | expect(img.height).to.equal(120)
|
1105 | 1098 | expect(img.style.width).to.equal('40px')
|
1106 |
| - expect(img.style.height).to.equal('60px') |
1107 | 1099 | done()
|
1108 | 1100 | },
|
1109 | 1101 | { orientation: 6, pixelRatio: 2 }
|
|
0 commit comments