aboutsummaryrefslogtreecommitdiff
path: root/exampleData/ruleSets
diff options
context:
space:
mode:
authorGravatar Benjamin Jones <bjones@galois.com>2012-10-05 17:49:40 -0700
committerGravatar Benjamin Jones <bjones@galois.com>2012-10-05 17:49:40 -0700
commitce511cd19b0b9a321aa740d75ef4a41ee57b7345 (patch)
tree7a833b54097a2228ee971286b4b5fd425a5c85ce /exampleData/ruleSets
parent087f2dce8ff273eaee33afaf7af353d6cd2d98ec (diff)
updates to fiveui.prelude
added fiveui.color.colorCheck -- simple rule compiler added exampleData/ruleSets/colorRulesRF.json -- refactored color check rule improved fiveui.color.colorToHex added tests to prelude-test.js
Diffstat (limited to 'exampleData/ruleSets')
-rw-r--r--exampleData/ruleSets/colorRulesRF.json17
1 files changed, 17 insertions, 0 deletions
diff --git a/exampleData/ruleSets/colorRulesRF.json b/exampleData/ruleSets/colorRulesRF.json
new file mode 100644
index 0000000..1bd41a5
--- /dev/null
+++ b/exampleData/ruleSets/colorRulesRF.json
@@ -0,0 +1,17 @@
+/* colorRules.json
+ * Author: Benjamin Jones <bjones@galois.com>
+ *
+ * Simple rules for checking that the colors of specific elements are in a specific set.
+ * Test using exampleData/basic/testColorRules.html
+ */
+
+{ 'name': "Colors are in a specified set"
+, 'description': "All background and foreground colors used on a page should be in a specificed set"
+, 'rules': [
+ { 'name': "Foregrounds"
+ , 'description': "Foreground colors should be in the set:"+
+ "'#0, #FFFFFF, #3D3D3D, #B4B4B4, #4E4E4E, #C2C2C2, #F7F7F7"
+ , 'rule': fiveui.color.colorCheck(':visible', [ '#0', '#000000', '#FFFFFF', '#3D3D3D', '#B4B4B4', '#4E4E4E', '#C2C2C2', '#F7F7F7' ])
+ }
+ ]
+}