118 lines
3.5 KiB
Plaintext
Executable file
118 lines
3.5 KiB
Plaintext
Executable file
{"tests": [
|
||
|
||
{"description": "contextmenu points to valid ID earlier",
|
||
"input": "<menu id=a><span contextmenu=a>",
|
||
"fail-if": "id-does-not-exist"},
|
||
|
||
{"description": "contextmenu points to valid ID later",
|
||
"input": "<span contextmenu=a><menu id=a>",
|
||
"fail-if": "id-does-not-exist"},
|
||
|
||
{"description": "contextmenu points to non-existent ID",
|
||
"input": "<span contextmenu=a>",
|
||
"fail-unless": "id-does-not-exist"},
|
||
|
||
{"description": "contextmenu points to ID on non-menu element",
|
||
"input": "<span id=a><span contextmenu=a>",
|
||
"fail-unless": "contextmenu-must-point-to-menu"},
|
||
|
||
{"description": "uppercase contextmenu points to ID on non-menu element",
|
||
"input": "<span id=a><span CONTEXTMENU=a>",
|
||
"fail-unless": "contextmenu-must-point-to-menu"},
|
||
|
||
{"description": "valid ID 'a'",
|
||
"input": "<span contextmenu=a>",
|
||
"fail-if": "invalid-attribute-value"},
|
||
|
||
{"description": "valid ID '1'",
|
||
"input": "<span contextmenu=1>",
|
||
"fail-if": "invalid-attribute-value"},
|
||
|
||
{"description": "wacky but valid ID",
|
||
"input": "<span contextmenu='<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 contextmenu=''>",
|
||
"fail-unless": "attribute-value-can-not-be-blank"},
|
||
|
||
{"description": "invalid ID because of leading space",
|
||
"input": "<span contextmenu=' a'>",
|
||
"fail-unless": "space-in-id"},
|
||
|
||
{"description": "invalid ID because of trailing space",
|
||
"input": "<span contextmenu='a '>",
|
||
"fail-unless": "space-in-id"},
|
||
|
||
{"description": "invalid ID because of space in value",
|
||
"input": "<span contextmenu='a b'>",
|
||
"fail-unless": "space-in-id"},
|
||
|
||
{"description": "invalid ID because of leading tab",
|
||
"input": "<span contextmenu=' a'>",
|
||
"fail-unless": "space-in-id"},
|
||
|
||
{"description": "invalid ID because of trailing tab",
|
||
"input": "<span contextmenu='a '>",
|
||
"fail-unless": "space-in-id"},
|
||
|
||
{"description": "invalid ID because of tab in value",
|
||
"input": "<span contextmenu='a b'>",
|
||
"fail-unless": "space-in-id"},
|
||
|
||
{"description": "invalid ID because of leading LF",
|
||
"input": "<span contextmenu='
|
||
a'>",
|
||
"fail-unless": "space-in-id"},
|
||
|
||
{"description": "invalid ID because of trailing LF",
|
||
"input": "<span contextmenu='a
|
||
'>",
|
||
"fail-unless": "space-in-id"},
|
||
|
||
{"description": "invalid ID because of LF in value",
|
||
"input": "<span contextmenu='a
|
||
b'>",
|
||
"fail-unless": "space-in-id"},
|
||
|
||
{"description": "invalid ID because of leading LT",
|
||
"input": "<span contextmenu='a'>",
|
||
"fail-unless": "space-in-id"},
|
||
|
||
{"description": "invalid ID because of trailing LT",
|
||
"input": "<span contextmenu='a'>",
|
||
"fail-unless": "space-in-id"},
|
||
|
||
{"description": "invalid ID because of LT in value",
|
||
"input": "<span contextmenu='ab'>",
|
||
"fail-unless": "space-in-id"},
|
||
|
||
{"description": "invalid ID because of leading FF",
|
||
"input": "<span contextmenu='a'>",
|
||
"fail-unless": "space-in-id"},
|
||
|
||
{"description": "invalid ID because of trailing FF",
|
||
"input": "<span contextmenu='a'>",
|
||
"fail-unless": "space-in-id"},
|
||
|
||
{"description": "invalid ID because of FF in value",
|
||
"input": "<span contextmenu='ab'>",
|
||
"fail-unless": "space-in-id"},
|
||
|
||
{"description": "invalid ID because of leading CR",
|
||
"input": "<span contextmenu='
|
||
a'>",
|
||
"fail-unless": "space-in-id"},
|
||
|
||
{"description": "invalid ID because of trailing CR",
|
||
"input": "<span contextmenu='a
|
||
'>",
|
||
"fail-unless": "space-in-id"},
|
||
|
||
{"description": "invalid ID because of CR in value",
|
||
"input": "<span contextmenu='a
|
||
b'>",
|
||
"fail-unless": "space-in-id"}
|
||
|
||
]} |