Skip to content

Commit

Permalink
Bug yatil#13, Buster.js unit tests do NOT work on Internet Explorer, so
Browse files Browse the repository at this point in the history
* Add conditional comments so that tests aren't run! (They crash MSIE)
* Add a "Sorry.." message for MSIE
  • Loading branch information
nfreear committed Mar 19, 2013
1 parent 06a4c4d commit 679125d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
6 changes: 5 additions & 1 deletion test/bjs1.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
<script src="http://html5shim.googlecode.com/svn/trunk/html5-els.js"></script>
<![endif]-->

<style>body > *{margin:2em; font-size:1.2em}</style>
<style>body > *{display:block; margin:2em; font-size:1.2em} script{display:none} /*--header,nav,section,aside,footer{ display:block; }--*/</style>

<!--[if IE]><p style="color:red">Sorry, Buster.js tests currently do NOT work with Internet Explorer :(. `AccessifyHTML5()` does though ;)<![endif]-->
<hr id="page" />


Expand Down Expand Up @@ -42,6 +44,7 @@
http://docs.busterjs.org/en/latest/modules/buster-assertions/
-->
<!--[if !IE]>-->
<script src="http://cdn.busterjs.org/releases/0.6.2/buster-test.js"></script>
<script>
var q = {
Expand Down Expand Up @@ -88,5 +91,6 @@
});
</script>
<hr id="test-result" />
<!--<![endif]-->

</html>
17 changes: 16 additions & 1 deletion test/bjs2.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<!doctype html><html><title>AccessifyHTML5 test 2: WAI-ARIA roles on HTML 4 elements*</title>

<style>body > *{margin:2em; font-size:1.2em}</style>

<!--[if IE]><p style="color:red">Sorry, Buster.js tests currently do NOT work with Internet Explorer :(. `AccessifyHTML5()` does though ;)<![endif]-->
<hr id="page" />


Expand All @@ -20,7 +22,12 @@
AccessifyHTML5(false, {
'#ou-org-header': {
role: 'banner',
'aria-label': 'Site logo'
'aria-label': 'Site logo',

"href": "http://example.org",
"data-ob_test": { },
"data-fn_test": function() { },
"data-nm_test": 1
},
'#ou-site-header': {
role: 'navigation',
Expand All @@ -45,6 +52,7 @@
http://docs.busterjs.org/en/latest/modules/buster-assertions/
-->
<!--[if !IE]>-->
<script src="http://cdn.busterjs.org/releases/0.6.2/buster-test.js"></script>
<script>
var q = {
Expand Down Expand Up @@ -109,8 +117,15 @@
, "An &lt;input> field that is `required` has an `aria-required` property.": function () {
assert(q.select("input[required]").getAttribute("aria-required"));
}
, "A `href` attribute is NOT set - not allowed.": function () {
assert.isNull(q.select("#ou-org-header").getAttribute("href"));
}
, "An attribute of type `object` is NOT set - not allowed.": function () {
assert.isNull(q.select("#ou-org-header").getAttribute("data-ob_test"));
}
});
</script>
<hr id="test-result" />
<!--<![endif]-->

</html>

0 comments on commit 679125d

Please sign in to comment.