const testCases = [
  [ "script", "src" ],
  [ "div", "innerHTML" ],
  [ "script", "text" ],
];

trustedTypes.createPolicy("default", {});

testCases.forEach(c => {
  const name = `${c[0]}.${c[1]} `;
  test(t => {
    const element = document.createElement(c[0]);
    assert_throws_js(TypeError, _ => element[c[1]] = "abc");
    assert_equals(element[c[1]], "");
  }, name + "default");
});

// Trigger the exit condition in the "Count" promise test above.
try { document.createElement("script").text = "done"; }