// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`html normalizer <Label onClick=doClick..">Hello, World</Label> 1`] = `
{
  "actual": "<Label onClick="doClick.." xmlns="http://www.w3.org/1999/xhtml">Hello, World</Label>",
  "errors": [
    [
      "warning",
      "attribute "onClick" missed start quot(")!!",
      {
        "columnNumber": 27,
        "lineNumber": 1,
      },
    ],
  ],
}
`;

exports[`html normalizer <div a=& bb c d=123&&456/> 1`] = `
{
  "actual": "<div a="&amp;" bb="bb" c="c" d="123&amp;&amp;456" xmlns="http://www.w3.org/1999/xhtml"></div>",
  "errors": [
    [
      "warning",
      "attribute "&" missed quot(")!!",
      {
        "columnNumber": 17,
        "lineNumber": 1,
      },
    ],
    [
      "warning",
      "attribute "123&&456" missed quot(")!",
      {
        "columnNumber": 17,
        "lineNumber": 1,
      },
    ],
    [
      "error",
      "entity not matching Reference production: &456",
      {
        "columnNumber": 17,
        "lineNumber": 1,
      },
    ],
  ],
}
`;

exports[`html normalizer <div test="a<b&&a< c && a>d"></div> 1`] = `
{
  "actual": "<div test="a&lt;b&amp;&amp;a&lt; c &amp;&amp; a&gt;d" xmlns="http://www.w3.org/1999/xhtml"></div>",
  "errors": [
    [
      "error",
      "entity not found:&a",
      {
        "columnNumber": 11,
        "lineNumber": 1,
      },
    ],
  ],
}
`;

exports[`html normalizer <div test="alert('<br/>')"/> 1`] = `
{
  "actual": "<div test="alert('&lt;br/&gt;')" xmlns="http://www.w3.org/1999/xhtml"></div>",
}
`;

exports[`html normalizer <div>&amp;&lt;123&456<789;&&</div> 1`] = `
{
  "actual": "<div xmlns="http://www.w3.org/1999/xhtml">&amp;&lt;123&amp;456&lt;789;&amp;&amp;</div>",
  "errors": [
    [
      "error",
      "entity not matching Reference production: &456",
      {
        "columnNumber": 23,
        "lineNumber": 1,
      },
    ],
    [
      "error",
      "element parse error: Error: unexpected < in tag name: 789;&&",
      {
        "columnNumber": 23,
        "lineNumber": 1,
      },
    ],
  ],
}
`;

exports[`html normalizer <div>&nbsp;&copy;&nbsp&copy</div> 1`] = `
{
  "actual": "<div xmlns="http://www.w3.org/1999/xhtml"> © ©</div>",
}
`;

exports[`html normalizer <div><123e>&<a<br/></div> 1`] = `
{
  "actual": "<div xmlns="http://www.w3.org/1999/xhtml">&lt;123e&gt;&amp;&lt;a<br/></div>",
  "errors": [
    [
      "error",
      "element parse error: Error: invalid tagName:123e",
      {
        "columnNumber": 15,
        "lineNumber": 1,
      },
    ],
    [
      "error",
      "element parse error: Error: unexpected < in tag name: a",
      {
        "columnNumber": 15,
        "lineNumber": 1,
      },
    ],
  ],
}
`;

exports[`html normalizer <html test="123"/> 1`] = `
{
  "actual": "<html test="123" xmlns="http://www.w3.org/1999/xhtml"></html>",
}
`;

exports[`html normalizer <html test="a<b && a>b && '&amp;&&'"/> 1`] = `
{
  "actual": "<html test="a&lt;b &amp;&amp; a&gt;b &amp;&amp; '&amp;&amp;&amp;'" xmlns="http://www.w3.org/1999/xhtml"></html>",
}
`;

exports[`html normalizer <html xmlns:x="1"><body/></html> 1`] = `
{
  "actual": "<html xmlns:x="1" xmlns="http://www.w3.org/1999/xhtml"><body></body></html>",
}
`;

exports[`html normalizer text/html: script <input type="button" disabled></input>: reported 1`] = `
{
  "actual": "<input type="button" disabled="disabled" xmlns="http://www.w3.org/1999/xhtml"/>",
}
`;

exports[`html normalizer text/html: script <input type="checkbox" checked></input>: reported 1`] = `
{
  "actual": "<input type="checkbox" checked="checked" xmlns="http://www.w3.org/1999/xhtml"/>",
}
`;

exports[`html normalizer text/html: script <option selected></option>: reported 1`] = `
{
  "actual": "<option selected="selected" xmlns="http://www.w3.org/1999/xhtml"></option>",
}
`;

exports[`html normalizer text/html: script <script src="./test.js"/>: reported 1`] = `
{
  "actual": "<script src="./test.js" xmlns="http://www.w3.org/1999/xhtml"></script>",
}
`;

exports[`html normalizer text/html: script <script>alert(a<b&&c?"<br/>":">>");</script>: reported 1`] = `
{
  "actual": "<script xmlns="http://www.w3.org/1999/xhtml">alert(a<b&&c?"<br/>":">>");</script>",
}
`;

exports[`html normalizer text/html: script <script>alert(a<b&&c?"<br>":">>");</script>: reported 1`] = `
{
  "actual": "<script xmlns="http://www.w3.org/1999/xhtml">alert(a<b&&c?"<br>":">>");</script>",
}
`;

exports[`html normalizer text/html: script <textarea>alert(a<b&&c?"<br>":">>");</textarea>: reported 1`] = `
{
  "actual": "<textarea xmlns="http://www.w3.org/1999/xhtml">alert(a&lt;b&amp;&amp;c?"&lt;br&gt;":"&gt;&gt;");</textarea>",
  "errors": [
    [
      "error",
      "entity not found:&c",
      {
        "columnNumber": 1,
        "lineNumber": 1,
      },
    ],
  ],
}
`;

exports[`html normalizer text/html: script <ul><li>abc<li>def</ul>: caught 1`] = `[ParseError: Opening and ending tag mismatch: "li" != "ul"]`;

exports[`html normalizer text/xml: script <input type="button" disabled></input>: reported 1`] = `
{
  "actual": "<input type="button" disabled="disabled"/>",
  "errors": [
    [
      "warning",
      "attribute "disabled" missed value!! "disabled" instead!!",
      {
        "columnNumber": 22,
        "lineNumber": 1,
      },
    ],
  ],
}
`;

exports[`html normalizer text/xml: script <input type="checkbox" checked></input>: reported 1`] = `
{
  "actual": "<input type="checkbox" checked="checked"/>",
  "errors": [
    [
      "warning",
      "attribute "checked" missed value!! "checked" instead!!",
      {
        "columnNumber": 24,
        "lineNumber": 1,
      },
    ],
  ],
}
`;

exports[`html normalizer text/xml: script <option selected></option>: reported 1`] = `
{
  "actual": "<option selected="selected"/>",
  "errors": [
    [
      "warning",
      "attribute "selected" missed value!! "selected" instead!!",
      {
        "columnNumber": 9,
        "lineNumber": 1,
      },
    ],
  ],
}
`;

exports[`html normalizer text/xml: script <script src="./test.js"/>: reported 1`] = `
{
  "actual": "<script src="./test.js"/>",
}
`;

exports[`html normalizer text/xml: script <script>alert(a<b&&c?"<br/>":">>");</script>: reported 1`] = `
{
  "actual": "<script>alert(a&lt;b&amp;&amp;c?"<br/>":"&gt;&gt;");</script>",
  "errors": [
    [
      "error",
      "element parse error: Error: attribute value must after "="",
      {
        "columnNumber": 28,
        "lineNumber": 1,
      },
    ],
    [
      "error",
      "EntityRef: expecting ;",
      {
        "columnNumber": 28,
        "lineNumber": 1,
      },
    ],
  ],
}
`;

exports[`html normalizer text/xml: script <script>alert(a<b&&c?"<br>":">>");</script>: caught 1`] = `[ParseError: Opening and ending tag mismatch: "br" != "script"]`;

exports[`html normalizer text/xml: script <textarea>alert(a<b&&c?"<br>":">>");</textarea>: caught 1`] = `[ParseError: Opening and ending tag mismatch: "br" != "textarea"]`;

exports[`html normalizer text/xml: script <ul><li>abc<li>def</ul>: caught 1`] = `[ParseError: Opening and ending tag mismatch: "li" != "ul"]`;

exports[`html normalizer unclosed html <html title = 1/> 1`] = `
{
  "actual": "<html title="1" xmlns="http://www.w3.org/1999/xhtml"></html>",
  "errors": [
    [
      "warning",
      "attribute "1" missed quot(")!",
      {
        "columnNumber": 15,
        "lineNumber": 1,
      },
    ],
  ],
}
`;

exports[`html normalizer unclosed html <html title =1/2></html> 1`] = `
{
  "actual": "<html title="1/2" xmlns="http://www.w3.org/1999/xhtml"></html>",
  "errors": [
    [
      "warning",
      "attribute "1/2" missed quot(")!",
      {
        "columnNumber": 14,
        "lineNumber": 1,
      },
    ],
  ],
}
`;

exports[`html normalizer unclosed html <html title/> 1`] = `
{
  "actual": "<html title="title" xmlns="http://www.w3.org/1999/xhtml"></html>",
}
`;

exports[`html normalizer unclosed html <html title= 1/> 1`] = `
{
  "actual": "<html title="1" xmlns="http://www.w3.org/1999/xhtml"></html>",
  "errors": [
    [
      "warning",
      "attribute "1" missed quot(")!",
      {
        "columnNumber": 14,
        "lineNumber": 1,
      },
    ],
  ],
}
`;

exports[`html normalizer unclosed html <html><meta><link><img><br><hr><input></html> 1`] = `
{
  "actual": "<html xmlns="http://www.w3.org/1999/xhtml"><meta/><link/><img/><br/><hr/><input/></html>",
}
`;
