From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- .../4.4-styleClassValidIfPresent.json | 88 ++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 testing/web-platform/tests/annotation-model/annotations/specificResource/4.4-styleClassValidIfPresent.json (limited to 'testing/web-platform/tests/annotation-model/annotations/specificResource/4.4-styleClassValidIfPresent.json') diff --git a/testing/web-platform/tests/annotation-model/annotations/specificResource/4.4-styleClassValidIfPresent.json b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.4-styleClassValidIfPresent.json new file mode 100644 index 0000000000..3e599a0590 --- /dev/null +++ b/testing/web-platform/tests/annotation-model/annotations/specificResource/4.4-styleClassValidIfPresent.json @@ -0,0 +1,88 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "4.4-styleClassValidIfPresent.json", + "assertionType": "must", + "expectedResult": "valid", + "onUnexpectedResult" : "failAndContinue", + "errorMessage": "ERROR: Annotation contains one or more Specific Resources with styleClass key, but does not contain an Annotation-level stylesheet key.", + "title": "If any **Specific Resource _styleClass_ keys** are present, a **_stylesheet_ key** (a key of Annotation) with a **single value** is also present [model 4.4](https://www.w3.org/TR/annotation-model/#styles)", + "description": "True when no Specific Resources styleClass present or all Specific Resource styleClass values are strings / array of strings and Annotation has a stylesheet key. (Section 4.4)", + "type": "object", + "anyOf": + [ + { "required": ["stylesheet"] }, + { "not": + { + "anyOf": + [ + { "$ref": "#/definitions/bodyHasStyleClass" }, + { "$ref": "#/definitions/targHasStyleClass" } + ] + } + } + ], + "definitions": + { + "bodyHasStyleClass": + { + "properties": + { + "body": + { + "oneOf": + [ + { "anyOf": + [ + { "$ref": "specificResource.json#/definitions/styleClassDetected" }, + { "$ref": "specificResource.json#/definitions/itemStyleClassPropertyDetected" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "specificResource.json#/definitions/styleClassDetected" }, + { "$ref": "specificResource.json#/definitions/itemStyleClassPropertyDetected" } + ] + } + } + } + } + ] + } + }, + "required": ["body"] + }, + + "targHasStyleClass": + { + "properties": + { + "target": + { + "oneOf": + [ + { "anyOf": + [ + { "$ref": "specificResource.json#/definitions/styleClassDetected" }, + { "$ref": "specificResource.json#/definitions/itemStyleClassPropertyDetected" } + ] + }, + { "not": + { "items": + { "not": + { "anyOf": [ + { "$ref": "specificResource.json#/definitions/styleClassDetected" }, + { "$ref": "specificResource.json#/definitions/itemStyleClassPropertyDetected" } + ] + } + } + } + } + ] + } + }, + "required": [ "target" ] + } + } +} -- cgit v1.2.3