{
  "rule": "attVal",
  "timeLimit": 20,
  "acts": [
    {
      "type": "launch",
      "target": {
        "url": "file://validation/tests/targets/attVal/good.html",
        "what": "page with permitted attribute values"
      }
    },
    {
      "type": "test",
      "which": "testaro",
      "withItems": true,
      "stopOnFail": true,
      "expect": [
        [
          "standardResult.totals.2",
          "=",
          0
        ],
        [
          "standardResult.instances.length",
          "=",
          0
        ]
      ],
      "rules": [
        "y",
        "attVal"
      ],
      "args": {
        "attVal": ["lang", true, ["en-US", "de-CH"]]
      }
    },
    {
      "type": "test",
      "which": "testaro",
      "withItems": false,
      "stopOnFail": true,
      "expect": [
        [
          "standardResult.totals.2",
          "=",
          0
        ],
        [
          "standardResult.instances.length",
          "=",
          0
        ]
      ],
      "rules": [
        "y",
        "attVal"
      ],
      "args": {
        "attVal": ["lang", true, ["en-US", "de-CH"]]
      }
    },
    {
      "type": "url",
      "which": "file://validation/tests/targets/attVal/bad.html",
      "what": "page with illicit attribute values"
    },
    {
      "type": "test",
      "which": "testaro",
      "withItems": true,
      "stopOnFail": true,
      "expect": [
        [
          "standardResult.totals.2",
          "=",
          2
        ],
        [
          "standardResult.instances.0.tagName",
          "=",
          "HTML"
        ],
        [
          "standardResult.instances.0.what",
          "i",
          "Element has attribute"
        ],
        [
          "standardResult.instances.0.location.doc",
          "=",
          "dom"
        ],
        [
          "standardResult.instances.0.location.type",
          "=",
          "box"
        ],
        [
          "standardResult.instances.0.location.spec.x",
          "<",
          1
        ],
        [
          "standardResult.instances.1.tagName",
          "=",
          "SPAN"
        ],
        [
          "standardResult.instances.1.id",
          "=",
          "velo"
        ],
        [
          "standardResult.instances.1.location.doc",
          "=",
          "dom"
        ],
        [
          "standardResult.instances.1.location.type",
          "=",
          "selector"
        ],
        [
          "standardResult.instances.1.location.spec",
          "=",
          "#velo"
        ],
        [
          "standardResult.instances.1.excerpt",
          "i",
          "Veloparkieren"
        ]
      ],
      "rules": [
        "y",
        "attVal"
      ],
      "args": {
        "attVal": ["lang", true, ["en-US", "de-CH"]]
      }
    },
    {
      "type": "test",
      "which": "testaro",
      "withItems": false,
      "stopOnFail": true,
      "expect": [
        [
          "standardResult.totals.3",
          "=",
          0
        ],
        [
          "standardResult.totals.2",
          "=",
          2
        ],
        [
          "standardResult.instances.0.ordinalSeverity",
          "=",
          2
        ],
        [
          "standardResult.instances.0.count",
          "=",
          2
        ],
        [
          "standardResult.instances.0.what",
          "i",
          "Elements have attribute lang"
        ]
      ],
      "rules": [
        "y",
        "attVal"
      ],
      "args": {
        "attVal": ["lang", true, ["en-US", "de-CH"]]
      }
    }
  ]
}
