🌐 AI搜索 & 代理 主页
Skip to content

Commit 6153eb0

Browse files
authored
Tests: use width style instead of SVG width attribute (#4157)
The SVG width attribute seems to not support border-box in iOS7. Closes gh-4155
1 parent c9aae35 commit 6153eb0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/unit/dimensions.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ QUnit.test( "table dimensions", function( assert ) {
355355
QUnit.test( "SVG dimensions (basic content-box)", function( assert ) {
356356
assert.expect( 8 );
357357

358-
var svg = jQuery( "<svg width='100' height='100'></svg>" ).appendTo( "#qunit-fixture" );
358+
var svg = jQuery( "<svg style='width: 100px; height: 100px;'></svg>" ).appendTo( "#qunit-fixture" );
359359

360360
assert.equal( svg.width(), 100 );
361361
assert.equal( svg.height(), 100 );
@@ -375,7 +375,7 @@ QUnit.test( "SVG dimensions (basic content-box)", function( assert ) {
375375
QUnit.test( "SVG dimensions (content-box)", function( assert ) {
376376
assert.expect( 8 );
377377

378-
var svg = jQuery( "<svg width='100' height='100' style='box-sizing: content-box; border: 1px solid white; padding: 2px; margin: 3px'></svg>" ).appendTo( "#qunit-fixture" );
378+
var svg = jQuery( "<svg style='width: 100px; height: 100px; box-sizing: content-box; border: 1px solid white; padding: 2px; margin: 3px'></svg>" ).appendTo( "#qunit-fixture" );
379379

380380
assert.equal( svg.width(), 100 );
381381
assert.equal( svg.height(), 100 );
@@ -395,7 +395,7 @@ QUnit.test( "SVG dimensions (content-box)", function( assert ) {
395395
QUnit.test( "SVG dimensions (border-box)", function( assert ) {
396396
assert.expect( 8 );
397397

398-
var svg = jQuery( "<svg width='100' height='100' style='box-sizing: border-box; border: 1px solid white; padding: 2px; margin: 3px'></svg>" ).appendTo( "#qunit-fixture" );
398+
var svg = jQuery( "<svg style='width: 100px; height: 100px; box-sizing: border-box; border: 1px solid white; padding: 2px; margin: 3px'></svg>" ).appendTo( "#qunit-fixture" );
399399

400400
assert.equal( svg.width(), 94 );
401401
assert.equal( svg.height(), 94 );

0 commit comments

Comments
 (0)