From 65b85031fb5688361c077bc04e641e4b502671e1 Mon Sep 17 00:00:00 2001 From: Michał Gołębiowski-Owczarek Date: Mon, 10 Jul 2023 18:33:05 +0200 Subject: CSS: Make the reliableTrDimensions support test work with Bootstrap CSS Bootstrap 5 includes the following CSS on the page: ```css *, *::before, *::after { box-sizing: border-box; } ``` That threw our `reliableTrDimensions` support test off. This change fixes the support test and adds a unit test ensuring support test values on a page including Bootstrap 5 CSS are the same as on a page without it. Fixes gh-5270 Closes gh-5278 Ref gh-5279 --- test/data/support/bootstrap.html | 20 ++++++++++++++++++++ test/unit/support.js | 12 ++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 test/data/support/bootstrap.html (limited to 'test') diff --git a/test/data/support/bootstrap.html b/test/data/support/bootstrap.html new file mode 100644 index 000000000..d8e643ac2 --- /dev/null +++ b/test/data/support/bootstrap.html @@ -0,0 +1,20 @@ + + + + + + + +
+ + + +
+ + + diff --git a/test/unit/support.js b/test/unit/support.js index 05e669de3..f9ae2718e 100644 --- a/test/unit/support.js +++ b/test/unit/support.js @@ -54,6 +54,18 @@ testIframe( } ); +testIframe( + "Verify correctness of support tests with bootstrap CSS on the page", + "support/bootstrap.html", + function( assert, jQuery, window, document, bodyStyle, support ) { + assert.expect( 2 ); + assert.strictEqual( bodyStyle.boxSizing, "border-box", + "border-box applied on body by Bootstrap" ); + assert.deepEqual( jQuery.extend( {}, support ), computedSupport, + "Same support properties" ); + } +); + ( function() { var expected, browserKey, userAgent = window.navigator.userAgent, -- cgit v1.2.3