instiki/vendor/plugins/HTML5lib/testdata/validator/tabindexattribute.test
Jacques Distler ed68d975df Update to latest HTML5lib
Fix that Tokenizer bug for real this time.
2007-09-09 22:26:19 -05:00

79 lines
No EOL
2.7 KiB
Text
Executable file

{"tests": [
{"description": "valid tabindex attribute value '-1'",
"input": "<span tabindex=-1>",
"fail-if": "invalid-integer-value"},
{"description": "valid tabindex attribute value '0'",
"input": "<span tabindex=0>",
"fail-if": "invalid-integer-value"},
{"description": "valid tabindex attribute value '1'",
"input": "<span tabindex=1>",
"fail-if": "invalid-integer-value"},
{"description": "valid tabindex attribute value '32768'",
"input": "<span tabindex=32768>",
"fail-if": "invalid-integer-value"},
{"description": "valid tabindex attribute value '-32768'",
"input": "<span tabindex=-32768>",
"fail-if": "invalid-integer-value"},
{"description": "valid tabindex attribute value with leading spaces",
"input": "<span tabindex=' -32768'>",
"fail-if": "invalid-integer-value"},
{"description": "valid tabindex attribute value with trailing spaces",
"input": "<span tabindex='-32768 '>",
"fail-if": "invalid-integer-value"},
{"description": "valid tabindex attribute value with trailing junk",
"input": "<span tabindex='32768a'>",
"fail-if": "invalid-integer-value"},
{"description": "valid tabindex attribute value with trailing junk and whitespace",
"input": "<span tabindex='32768a '>",
"fail-if": "invalid-integer-value"},
{"description": "valid tabindex attribute value with trailing whitespace and junk",
"input": "<span tabindex='32768 a'>",
"fail-if": "invalid-integer-value"},
{"description": "valid tabindex attribute value with leading spaces",
"input": "<span tabindex=' 32768'>",
"fail-if": "invalid-integer-value"},
{"description": "valid tabindex attribute value with leading spaces (with sign)",
"input": "<span tabindex=' -32768'>",
"fail-if": "invalid-integer-value"},
{"description": "invalid tabindex attribute value (blank)",
"input": "<span tabindex>",
"fail-unless": "attribute-value-can-not-be-blank"},
{"description": "invalid tabindex attribute value due to leading junk",
"input": "<span tabindex=a1>",
"fail-unless": "invalid-integer-value"},
{"description": "invalid tabindex attribute value due to two hyphens",
"input": "<span tabindex=--1>",
"fail-unless": "invalid-integer-value"},
{"description": "invalid tabindex attribute value due to non-numeric",
"input": "<span tabindex=foo>",
"fail-unless": "invalid-integer-value"},
{"description": "invalid tabindex attribute value due to positive sign",
"input": "<span tabindex=+1>",
"fail-unless": "invalid-integer-value"},
{"description": "invalid tabindex attribute value due to decimal point",
"input": "<span tabindex=.1>",
"fail-unless": "invalid-integer-value"},
{"description": "valid tabindex attribute value with trailing decimal point",
"input": "<span tabindex=1.0>",
"fail-if": "invalid-integer-value"}
]}