mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
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
This commit is contained in:
@@ -355,7 +355,7 @@ QUnit.test( "table dimensions", function( assert ) {
|
||||
QUnit.test( "SVG dimensions (basic content-box)", function( assert ) {
|
||||
assert.expect( 8 );
|
||||
|
||||
var svg = jQuery( "<svg width='100' height='100'></svg>" ).appendTo( "#qunit-fixture" );
|
||||
var svg = jQuery( "<svg style='width: 100px; height: 100px;'></svg>" ).appendTo( "#qunit-fixture" );
|
||||
|
||||
assert.equal( svg.width(), 100 );
|
||||
assert.equal( svg.height(), 100 );
|
||||
@@ -375,7 +375,7 @@ QUnit.test( "SVG dimensions (basic content-box)", function( assert ) {
|
||||
QUnit.test( "SVG dimensions (content-box)", function( assert ) {
|
||||
assert.expect( 8 );
|
||||
|
||||
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" );
|
||||
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" );
|
||||
|
||||
assert.equal( svg.width(), 100 );
|
||||
assert.equal( svg.height(), 100 );
|
||||
@@ -395,7 +395,7 @@ QUnit.test( "SVG dimensions (content-box)", function( assert ) {
|
||||
QUnit.test( "SVG dimensions (border-box)", function( assert ) {
|
||||
assert.expect( 8 );
|
||||
|
||||
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" );
|
||||
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" );
|
||||
|
||||
assert.equal( svg.width(), 94 );
|
||||
assert.equal( svg.height(), 94 );
|
||||
|
||||
Reference in New Issue
Block a user