2007-08-30 19:19:10 +02:00
|
|
|
{"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",
|
2007-09-10 05:26:19 +02:00
|
|
|
"input": "<span contextmenu='\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 contextmenu='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 contextmenu='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 contextmenu='\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 contextmenu='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 contextmenu='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 contextmenu='\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 contextmenu='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 contextmenu='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 contextmenu='\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 contextmenu='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 contextmenu='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 contextmenu='\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 contextmenu='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 contextmenu='a\rb'>",
|
2007-08-30 19:19:10 +02:00
|
|
|
"fail-unless": "space-in-id"}
|
|
|
|
|
2007-09-10 05:26:19 +02:00
|
|
|
]}
|