<script src="../testing.js"></script>

<a id="link" href="foo" class="ok">OK</a>

<script id=character_data>
  let link = document.getElementById('link');
  let cdata = link.firstChild;
  testing.expectEqual('OK', cdata.data);

  cdata.data = 'OK modified';
  testing.expectEqual('OK modified', cdata.data);
  cdata.data = 'OK';

  testing.expectEqual(2, cdata.length);

  testing.expectEqual(true, cdata.nextElementSibling === null);

  // create a next element
  let next = document.createElement('a');
  testi