     { createHTML: x => x});
    });
    let p = window.trustedTypes.createPolicy("AllowedPolicyName",
                                             { createHTML: x => `[${x}]`});
    assert_equals(p.name, "AllowedPolicyName");
    assert_equals(p.createHTML("Hello World!").toString(), "[Hello World!]");
  }, "window.trustedTypes.createPolicy() in a sandboxed page with allow-scripts.");

  test(_ => {
    let div = document.createElement("div");
    assert_throws_js(TypeError, _ => div.innerHTML = "abcd");
 