Skip to content

Commit

Permalink
Fixing tests to pass on Firefox. Apparently if you have <link> to a
Browse files Browse the repository at this point in the history
stylesheet but the href attribute is missing or the stylesheet can't be
found, the <link> can NOT be disabled and its .disabled property will
ALWAYS return false.
  • Loading branch information
odraencoded committed Feb 4, 2015
1 parent 3d476bd commit 95beaf3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Empty file added tests/tests.css
Empty file.
14 changes: 8 additions & 6 deletions tests/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,29 @@
var testHeadHtml = (
// Not in groups
'<style id="lone-style"></style>' +
'<link id="lone-link" rel="stylesheet">' +
'<link id="lone-link" rel="stylesheet" href="tests.css">' +

// Not stylesheets
'<link id="icon-link" rel="icon" title="Icon" class="group-a group-b group-c">' +
'<meta id="meta-element" class="group-a group-b group-c">' +

// Group of standard links
'<link id="standard-link" rel="stylesheet" title="Default">' +
'<link id="alternate-link" rel="alternate stylesheet" title="Alternate">' +
// Note: On Firefox links to inexistent stylesheets can NOT be disabled and
// their .disabled property always returns false.
'<link id="standard-link" rel="stylesheet" title="Default" href="tests.css">' +
'<link id="alternate-link" rel="alternate stylesheet" title="Alternate" href="tests.css">' +

// Group of styles
'<style id="style-a-1" class="group-a 1"></style>' +
'<style id="style-a-2" class="group-a 2"></style>' +

// Mixed group
'<style id="style-b-1" class="group-b 1"></style>' +
'<link id="link-b-2" class="group-b 2" rel="stylesheet">' +
'<link id="link-b-2" class="group-b 2" rel="stylesheet" href="tests.css">' +

// Group of two non-standard links
'<link id="link-c-1" class="group-c 1" rel="stylesheet">' +
'<link id="link-c-2" class="group-c 2" rel="stylesheet">'
'<link id="link-c-1" class="group-c 1" rel="stylesheet" href="tests.css">' +
'<link id="link-c-2" class="group-c 2" rel="stylesheet" href="tests.css">'
);

QUnit.test("Export test", function( assert ) {
Expand Down

0 comments on commit 95beaf3

Please sign in to comment.