2007-08-30 19:19:10 +02:00
|
|
|
{"tests": [
|
|
|
|
|
|
|
|
{"description": "valid ID 'a'",
|
|
|
|
"input": "<span id=a>",
|
|
|
|
"fail-if": "invalid-attribute-value"},
|
|
|
|
|
|
|
|
{"description": "valid ID '1'",
|
|
|
|
"input": "<span id=1>",
|
|
|
|
"fail-if": "invalid-attribute-value"},
|
|
|
|
|
|
|
|
{"description": "wacky but valid ID",
|
|
|
|
"input": "<span id='<html><head><title>a</title></head><body><p>b</p></body></html>'>",
|
|
|
|
"fail-if": "invalid-attribute-value"},
|
|
|
|
|
|
|
|
{"description": "invalid blank ID",
|
|
|
|
"input": "<span id>",
|
|
|
|
"fail-unless": "attribute-value-can-not-be-blank"},
|
|
|
|
|
|
|
|
{"description": "invalid blank ID with quotes",
|
|
|
|
"input": "<span id=''>",
|
|
|
|
"fail-unless": "attribute-value-can-not-be-blank"},
|
|
|
|
|
|
|
|
{"description": "invalid ID because of leading space",
|
|
|
|
"input": "<span id=' a'>",
|
|
|
|
"fail-unless": "space-in-id"},
|
|
|
|
|
|
|
|
{"description": "invalid ID because of trailing space",
|
|
|
|
"input": "<span id='a '>",
|
|
|
|
"fail-unless": "space-in-id"},
|
|
|
|
|
|
|
|
{"description": "invalid ID because of space in value",
|
|
|
|
"input": "<span id='a b'>",
|
|
|
|
"fail-unless": "space-in-id"},
|
|
|
|
|
|
|
|
{"description": "invalid ID because of leading tab",
|
2007-09-10 05:26:19 +02:00
|
|
|
"input": "<span id='\ta'>",
|
2007-08-30 19:19:10 +02:00
|
|
|
"fail-unless": "space-in-id"},
|
|
|
|
|
|
|
|
{"description": "invalid ID because of trailing tab",
|
2007-09-10 05:26:19 +02:00
|
|
|
"input": "<span id='a\t'>",
|
2007-08-30 19:19:10 +02:00
|
|
|
"fail-unless": "space-in-id"},
|
|
|
|
|
|
|
|
{"description": "invalid ID because of tab in value",
|
2007-09-10 05:26:19 +02:00
|
|
|
"input": "<span id='a\tb'>",
|
2007-08-30 19:19:10 +02:00
|
|
|
"fail-unless": "space-in-id"},
|
|
|
|
|
|
|
|
{"description": "invalid ID because of leading LF",
|
2007-09-10 05:26:19 +02:00
|
|
|
"input": "<span id='\na'>",
|
2007-08-30 19:19:10 +02:00
|
|
|
"fail-unless": "space-in-id"},
|
|
|
|
|
|
|
|
{"description": "invalid ID because of trailing LF",
|
2007-09-10 05:26:19 +02:00
|
|
|
"input": "<span id='a\n'>",
|
2007-08-30 19:19:10 +02:00
|
|
|
"fail-unless": "space-in-id"},
|
|
|
|
|
|
|
|
{"description": "invalid ID because of LF in value",
|
2007-09-10 05:26:19 +02:00
|
|
|
"input": "<span id='a\nb'>",
|
2007-08-30 19:19:10 +02:00
|
|
|
"fail-unless": "space-in-id"},
|
|
|
|
|
|
|
|
{"description": "invalid ID because of leading LT",
|
2007-09-10 05:26:19 +02:00
|
|
|
"input": "<span id='\u000Ba'>",
|
2007-08-30 19:19:10 +02:00
|
|
|
"fail-unless": "space-in-id"},
|
|
|
|
|
|
|
|
{"description": "invalid ID because of trailing LT",
|
2007-09-10 05:26:19 +02:00
|
|
|
"input": "<span id='a\u000B'>",
|
2007-08-30 19:19:10 +02:00
|
|
|
"fail-unless": "space-in-id"},
|
|
|
|
|
|
|
|
{"description": "invalid ID because of LT in value",
|
2007-09-10 05:26:19 +02:00
|
|
|
"input": "<span id='a\u000Bb'>",
|
2007-08-30 19:19:10 +02:00
|
|
|
"fail-unless": "space-in-id"},
|
|
|
|
|
|
|
|
{"description": "invalid ID because of leading FF",
|
2007-09-10 05:26:19 +02:00
|
|
|
"input": "<span id='\u000Ca'>",
|
2007-08-30 19:19:10 +02:00
|
|
|
"fail-unless": "space-in-id"},
|
|
|
|
|
|
|
|
{"description": "invalid ID because of trailing FF",
|
2007-09-10 05:26:19 +02:00
|
|
|
"input": "<span id='a\u000C'>",
|
2007-08-30 19:19:10 +02:00
|
|
|
"fail-unless": "space-in-id"},
|
|
|
|
|
|
|
|
{"description": "invalid ID because of FF in value",
|
2007-09-10 05:26:19 +02:00
|
|
|
"input": "<span id='a\u000Cb'>",
|
2007-08-30 19:19:10 +02:00
|
|
|
"fail-unless": "space-in-id"},
|
|
|
|
|
|
|
|
{"description": "invalid ID because of leading CR",
|
2007-09-10 05:26:19 +02:00
|
|
|
"input": "<span id='\ra'>",
|
2007-08-30 19:19:10 +02:00
|
|
|
"fail-unless": "space-in-id"},
|
|
|
|
|
|
|
|
{"description": "invalid ID because of trailing CR",
|
2007-09-10 05:26:19 +02:00
|
|
|
"input": "<span id='a\r'>",
|
2007-08-30 19:19:10 +02:00
|
|
|
"fail-unless": "space-in-id"},
|
|
|
|
|
|
|
|
{"description": "invalid ID because of CR in value",
|
2007-09-10 05:26:19 +02:00
|
|
|
"input": "<span id='a\rb'>",
|
2007-08-30 19:19:10 +02:00
|
|
|
"fail-unless": "space-in-id"},
|
|
|
|
|
|
|
|
{"description": "duplicate ID values",
|
|
|
|
"input": "<span id=a><span id=a>",
|
|
|
|
"fail-unless": "duplicate-id"},
|
|
|
|
|
|
|
|
{"description": "duplicate ID values with spaces (weird but true)",
|
|
|
|
"input": "<span id='a '><span id='a '>",
|
|
|
|
"fail-unless": "duplicate-id"},
|
|
|
|
|
|
|
|
{"description": "not duplicate ID values because spaces don't match",
|
|
|
|
"input": "<span id=a><span id='a '>",
|
|
|
|
"fail-if": "duplicate-id"},
|
|
|
|
|
|
|
|
{"description": "not duplicate ID values because spaces don't match",
|
|
|
|
"input": "<span id=' a'><span id='a '>",
|
|
|
|
"fail-if": "duplicate-id"},
|
|
|
|
|
|
|
|
{"description": "not duplicate ID values because case doesn't match",
|
|
|
|
"input": "<span id=a><span id=A>",
|
|
|
|
"fail-if": "duplicate-id"}
|
|
|
|
|
2007-09-10 05:26:19 +02:00
|
|
|
]}
|