Skip to content

Commit

Permalink
Inline the boxModel test, and correct unit test. Closes jquerygh-781.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikesherov authored and dmethvin committed May 18, 2012
1 parent d12e9b2 commit 0a2f93e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/support.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ jQuery.support = (function() {
// Where outerHTML is undefined, this still works
html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>",

// jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode
boxModel: (document.compatMode === "CSS1Compat"),

// Will be defined later
submitBubbles: true,
changeBubbles: true,
Expand All @@ -95,9 +98,6 @@ jQuery.support = (function() {
boxSizingReliable: true
};

// jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode
support.boxModel = (document.compatMode === "CSS1Compat");

// Make sure checked status is properly cloned
input.checked = true;
support.noCloneChecked = input.cloneNode( true ).checked;
Expand Down
6 changes: 5 additions & 1 deletion test/unit/support.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
module("support", { teardown: moduleTeardown });

ok( jQuery.support.boxModel, "jQuery.support.boxModel is perpetually true since 1.8" );
test("boxModel", function() {
expect( 1 );

equal( jQuery.support.boxModel, document.compatMode === "CSS1Compat" , "jQuery.support.boxModel is sort of tied to quirks mode but unstable since 1.8" );
});

testIframeWithCallback( "body background is not lost if set prior to loading jQuery (#9238)", "support/bodyBackground", function( color, support ) {
expect( 2 );
Expand Down

0 comments on commit 0a2f93e

Please sign in to comment.