summaryrefslogtreecommitdiff
path: root/includes/js/dijit/tests/_base/wai.html
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-14 15:39:19 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-14 15:39:19 +0000
commit1c5685d68f1b73270fb814fe04cbb490eb90ba5f (patch)
tree3d3ada08a934b96fc31531f1327690d7edc6f766 /includes/js/dijit/tests/_base/wai.html
parent104d59099e048688c4dbac37d72137006e396558 (diff)
downloadsemanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.gz
semanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.bz2
Minor fix: Remove DOJO library (60Mo) replaced by link to Google CDN (online DOJO library)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@159 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'includes/js/dijit/tests/_base/wai.html')
-rw-r--r--includes/js/dijit/tests/_base/wai.html115
1 files changed, 0 insertions, 115 deletions
diff --git a/includes/js/dijit/tests/_base/wai.html b/includes/js/dijit/tests/_base/wai.html
deleted file mode 100644
index 50ab8ca..0000000
--- a/includes/js/dijit/tests/_base/wai.html
+++ /dev/null
@@ -1,115 +0,0 @@
-<html>
-<head>
- <title>Dijit wai unit test</title>
- <script type="text/javascript" src="../../../dojo/dojo.js"
- djConfig="isDebug: true"></script>
- <script type="text/javascript">
- dojo.require("doh.runner");
- dojo.require("dijit.dijit");
-
- dojo.addOnLoad(function(){
- doh.register("dijit.tests._base.wai",
- [
- function getWaiRoleOnElementWithNoRole(){
- var elem = dojo.byId("no-role-or-states");
- doh.assertFalse(dijit.hasWaiRole(elem));
- doh.assertEqual("", dijit.getWaiRole(elem));
- },
-
- function getEmptyWairoleRole(){
- var elem = dojo.byId("empty-wairole");
- doh.assertTrue(dijit.hasWaiRole(elem));
- doh.assertEqual("", dijit.getWaiRole(elem));
- },
-
- function getWairoleRole(){
- var elem = dojo.byId("wairole");
- doh.assertTrue(dijit.hasWaiRole(elem));
- doh.assertEqual("menuitem", dijit.getWaiRole(elem));
- },
-
- function getUnprefixedRole(){
- var elem = dojo.byId("unprefixed-role");
- doh.assertTrue(dijit.hasWaiRole(elem));
- doh.assertEqual("menuitem", dijit.getWaiRole(elem));
- },
-
- function setWaiRole(){
- var div = document.createElement("div");
- dijit.setWaiRole(div, "menuitem");
- if(dojo.isFF && dojo.isFF < 3){
- doh.assertEqual("wairole:menuitem",
- div.getAttribute("role"));
- }else{
- doh.assertEqual("menuitem",
- div.getAttribute("role"));
- }
- },
-
- function removeWaiRole(){
- var div = document.createElement("div");
- dijit.setWaiRole(div, "menuitem");
- dijit.removeWaiRole(div);
- if(div.hasAttribute){
- doh.assertFalse(div.hasAttribute("role"));
- }else{
- doh.assertTrue(div.getAttribute("role") == null
- || div.getAttribute("role") == "");
- }
- },
-
- function getWaiStateOnElementWithNoState(){
- var elem = dojo.byId("no-role-or-states");
- doh.assertFalse(dijit.hasWaiState(elem, "checked"));
- doh.assertEqual("", dijit.getWaiState(elem, "checked"));
- },
-
- function getWaiState(){
- if(dojo.isFF && dojo.isFF < 3){
- var div = document.createElement("div");
- div.setAttributeNS("http://www.w3.org/2005/07/aaa",
- "aaa:checked", "true");
- doh.assertTrue(dijit.hasWaiState(div, "checked"));
- doh.assertEqual("true",
- dijit.getWaiState(div, "checked"));
- }else{
- var elem = dojo.byId("checked");
- doh.assertTrue(dijit.hasWaiState(elem, "checked"));
- doh.assertEqual("true",
- dijit.getWaiState(elem, "checked"));
- }
- },
-
- function setWaiState(){
- var div = document.createElement("div");
- dijit.setWaiState(div, "checked", "true");
- if(dojo.isFF && dojo.isFF < 3){
- doh.assertEqual("true",
- div.getAttributeNS("http://www.w3.org/2005/07/aaa",
- "checked"));
- }else{
- doh.assertEqual("true",
- div.getAttribute("aria-checked"));
- }
- },
-
- function removeWaiState(){
- var div = document.createElement("div");
- dijit.setWaiState(div, "checked", "true");
- dijit.removeWaiState(div, "checked");
- doh.assertEqual("", dijit.getWaiState(div, "checked"));
- }
- ]
- );
- doh.run();
- });
- </script>
-</head>
-<body>
- <div id="no-role-or-states"></div>
- <div id="empty-wairole" role="wairole:"></div>
- <div id="wairole" role="wairole:menuitem"></div>
- <div id="unprefixed-role" role="menuitem"></div>
- <div id="checked" aria-checked="true"></div>
-</body>
-</html>