Bug 1483943 [wpt PR 12528] - TrustedTypes tests updated to match newest API version., a=testonly
authorMaja Kabus <kabusm@google.com>
Wed, 22 Aug 2018 13:19:39 +0000
changeset 831102 cd8f7a9072e730f2601721069f57a193c105c170
parent 831101 9025cd12ce67c2c3ac66dd51fb811b7f6da7167c
child 831103 fb5f92fb339bedd97e7f19e6e4649c80bfe92f32
push id118868
push userbmo:zjz@zjz.name
push dateFri, 24 Aug 2018 07:04:39 +0000
reviewerstestonly
bugs1483943, 12528, 739170, 1177752, 584108
milestone63.0a1
Bug 1483943 [wpt PR 12528] - TrustedTypes tests updated to match newest API version., a=testonly Automatic update from web-platform-testsTrustedTypes tests updated to match newest API version. Bug: 739170 Change-Id: Ia0ec627627b8ad6b208eb9351f3e7786e6d2c9b2 Reviewed-on: https://chromium-review.googlesource.com/1177752 Commit-Queue: Maja Kabus <kabusm@google.com> Reviewed-by: Mike West <mkwst@chromium.org> Cr-Commit-Position: refs/heads/master@{#584108} -- wpt-commits: 8da098cb12eeaa1e869e1173b6c4dadbce95062e wpt-pr: 12528
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/trusted-types/DOMParser-parseFromString.tentative.html
testing/web-platform/tests/trusted-types/DOMParser-requiresTrustedTypes.tentative.html
testing/web-platform/tests/trusted-types/DOMParser.tentative.html
testing/web-platform/tests/trusted-types/Document-write.tentative.html
testing/web-platform/tests/trusted-types/Element-insertAdjacentHTML.tentative.html
testing/web-platform/tests/trusted-types/Element-outerHTML.tentative.html
testing/web-platform/tests/trusted-types/HTMLElement-generic.tentative.html
testing/web-platform/tests/trusted-types/Location-assign.tentative.html
testing/web-platform/tests/trusted-types/Location-href.tentative.html
testing/web-platform/tests/trusted-types/Location-replace.tentative.html
testing/web-platform/tests/trusted-types/Range-createContextualFragment.tentative.html
testing/web-platform/tests/trusted-types/TrustedHTML.tentative.html
testing/web-platform/tests/trusted-types/TrustedScriptURL.tentative.html
testing/web-platform/tests/trusted-types/TrustedTypePolicyFactory-createPolicy.tentative.html
testing/web-platform/tests/trusted-types/TrustedURL.tentative.html
testing/web-platform/tests/trusted-types/Window-open.tentative.html
testing/web-platform/tests/trusted-types/block-string-assignment-to-DOMParser-parseFromString.tentative.html
testing/web-platform/tests/trusted-types/block-string-assignment-to-Document-write.tentative.html
testing/web-platform/tests/trusted-types/block-string-assignment-to-Element-insertAdjacentHTML.tentative.html
testing/web-platform/tests/trusted-types/block-string-assignment-to-Element-outerHTML.tentative.html
testing/web-platform/tests/trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html
testing/web-platform/tests/trusted-types/block-string-assignment-to-Location-assign.tentative.html
testing/web-platform/tests/trusted-types/block-string-assignment-to-Location-href.tentative.html
testing/web-platform/tests/trusted-types/block-string-assignment-to-Location-replace.tentative.html
testing/web-platform/tests/trusted-types/block-string-assignment-to-Range-createContextualFragment.tentative.html
testing/web-platform/tests/trusted-types/block-string-assignment-to-Window-open.tentative.html
testing/web-platform/tests/trusted-types/block-string-assignment-to-createContextualFragment.tentative.html
testing/web-platform/tests/trusted-types/block-string-assignment-to-innerHTML.tentative.html
testing/web-platform/tests/trusted-types/block-string-assignment-to-insertAdjacentHTML.tentative.html
testing/web-platform/tests/trusted-types/block-string-assignment-to-location-assign.tentative.html
testing/web-platform/tests/trusted-types/block-string-assignment-to-location-href.tentative.html
testing/web-platform/tests/trusted-types/block-string-assignment-to-location-replace.tentative.html
testing/web-platform/tests/trusted-types/block-string-assignment-to-outerHTML.tentative.html
testing/web-platform/tests/trusted-types/block-string-assignment-to-window-open.tentative.html
testing/web-platform/tests/trusted-types/createContextualFragment.tentative.html
testing/web-platform/tests/trusted-types/document-write.tentative.html
testing/web-platform/tests/trusted-types/innerHTML.tentative.html
testing/web-platform/tests/trusted-types/insertAdjacentHTML.tentative.html
testing/web-platform/tests/trusted-types/location-assign.tentative.html
testing/web-platform/tests/trusted-types/location-href.tentative.html
testing/web-platform/tests/trusted-types/location-replace.tentative.html
testing/web-platform/tests/trusted-types/outerHTML.tentative.html
testing/web-platform/tests/trusted-types/srcDoc-requiresTrustedTypes.tentative.html
testing/web-platform/tests/trusted-types/srcDoc.tentative.html
testing/web-platform/tests/trusted-types/support/helper.sub.js
testing/web-platform/tests/trusted-types/window-open.tentative.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -393195,181 +393195,145 @@
     ]
    ],
    "touch-events/touch-touchevent-constructor.html": [
     [
      "/touch-events/touch-touchevent-constructor.html",
      {}
     ]
    ],
-   "trusted-types/DOMParser-requiresTrustedTypes.tentative.html": [
-    [
-     "/trusted-types/DOMParser-requiresTrustedTypes.tentative.html",
-     {}
-    ]
-   ],
-   "trusted-types/DOMParser.tentative.html": [
-    [
-     "/trusted-types/DOMParser.tentative.html",
+   "trusted-types/DOMParser-parseFromString.tentative.html": [
+    [
+     "/trusted-types/DOMParser-parseFromString.tentative.html",
+     {}
+    ]
+   ],
+   "trusted-types/Document-write.tentative.html": [
+    [
+     "/trusted-types/Document-write.tentative.html",
+     {}
+    ]
+   ],
+   "trusted-types/Element-insertAdjacentHTML.tentative.html": [
+    [
+     "/trusted-types/Element-insertAdjacentHTML.tentative.html",
+     {}
+    ]
+   ],
+   "trusted-types/Element-outerHTML.tentative.html": [
+    [
+     "/trusted-types/Element-outerHTML.tentative.html",
      {}
     ]
    ],
    "trusted-types/HTMLElement-generic.tentative.html": [
     [
      "/trusted-types/HTMLElement-generic.tentative.html",
      {}
     ]
    ],
-   "trusted-types/TrustedHTML.tentative.html": [
-    [
-     "/trusted-types/TrustedHTML.tentative.html",
-     {}
-    ]
-   ],
-   "trusted-types/TrustedScriptURL.tentative.html": [
-    [
-     "/trusted-types/TrustedScriptURL.tentative.html",
+   "trusted-types/Location-assign.tentative.html": [
+    [
+     "/trusted-types/Location-assign.tentative.html",
+     {}
+    ]
+   ],
+   "trusted-types/Location-href.tentative.html": [
+    [
+     "/trusted-types/Location-href.tentative.html",
+     {}
+    ]
+   ],
+   "trusted-types/Location-replace.tentative.html": [
+    [
+     "/trusted-types/Location-replace.tentative.html",
+     {}
+    ]
+   ],
+   "trusted-types/Range-createContextualFragment.tentative.html": [
+    [
+     "/trusted-types/Range-createContextualFragment.tentative.html",
      {}
     ]
    ],
    "trusted-types/TrustedTypePolicyFactory-createPolicy.tentative.html": [
     [
      "/trusted-types/TrustedTypePolicyFactory-createPolicy.tentative.html",
      {}
     ]
    ],
-   "trusted-types/TrustedURL.tentative.html": [
-    [
-     "/trusted-types/TrustedURL.tentative.html",
+   "trusted-types/Window-open.tentative.html": [
+    [
+     "/trusted-types/Window-open.tentative.html",
      {}
     ]
    ],
    "trusted-types/Window-trustedTypes.tentative.html": [
     [
      "/trusted-types/Window-trustedTypes.tentative.html",
      {}
     ]
    ],
+   "trusted-types/block-string-assignment-to-DOMParser-parseFromString.tentative.html": [
+    [
+     "/trusted-types/block-string-assignment-to-DOMParser-parseFromString.tentative.html",
+     {}
+    ]
+   ],
+   "trusted-types/block-string-assignment-to-Document-write.tentative.html": [
+    [
+     "/trusted-types/block-string-assignment-to-Document-write.tentative.html",
+     {}
+    ]
+   ],
+   "trusted-types/block-string-assignment-to-Element-insertAdjacentHTML.tentative.html": [
+    [
+     "/trusted-types/block-string-assignment-to-Element-insertAdjacentHTML.tentative.html",
+     {}
+    ]
+   ],
+   "trusted-types/block-string-assignment-to-Element-outerHTML.tentative.html": [
+    [
+     "/trusted-types/block-string-assignment-to-Element-outerHTML.tentative.html",
+     {}
+    ]
+   ],
    "trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html": [
     [
      "/trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html",
      {}
     ]
    ],
-   "trusted-types/block-string-assignment-to-createContextualFragment.tentative.html": [
-    [
-     "/trusted-types/block-string-assignment-to-createContextualFragment.tentative.html",
-     {}
-    ]
-   ],
-   "trusted-types/block-string-assignment-to-innerHTML.tentative.html": [
-    [
-     "/trusted-types/block-string-assignment-to-innerHTML.tentative.html",
-     {}
-    ]
-   ],
-   "trusted-types/block-string-assignment-to-insertAdjacentHTML.tentative.html": [
-    [
-     "/trusted-types/block-string-assignment-to-insertAdjacentHTML.tentative.html",
-     {}
-    ]
-   ],
-   "trusted-types/block-string-assignment-to-location-assign.tentative.html": [
-    [
-     "/trusted-types/block-string-assignment-to-location-assign.tentative.html",
-     {}
-    ]
-   ],
-   "trusted-types/block-string-assignment-to-location-href.tentative.html": [
-    [
-     "/trusted-types/block-string-assignment-to-location-href.tentative.html",
-     {}
-    ]
-   ],
-   "trusted-types/block-string-assignment-to-location-replace.tentative.html": [
-    [
-     "/trusted-types/block-string-assignment-to-location-replace.tentative.html",
-     {}
-    ]
-   ],
-   "trusted-types/block-string-assignment-to-outerHTML.tentative.html": [
-    [
-     "/trusted-types/block-string-assignment-to-outerHTML.tentative.html",
-     {}
-    ]
-   ],
-   "trusted-types/block-string-assignment-to-window-open.tentative.html": [
-    [
-     "/trusted-types/block-string-assignment-to-window-open.tentative.html",
-     {}
-    ]
-   ],
-   "trusted-types/createContextualFragment.tentative.html": [
-    [
-     "/trusted-types/createContextualFragment.tentative.html",
-     {}
-    ]
-   ],
-   "trusted-types/document-write.tentative.html": [
-    [
-     "/trusted-types/document-write.tentative.html",
-     {}
-    ]
-   ],
-   "trusted-types/innerHTML.tentative.html": [
-    [
-     "/trusted-types/innerHTML.tentative.html",
-     {}
-    ]
-   ],
-   "trusted-types/insertAdjacentHTML.tentative.html": [
-    [
-     "/trusted-types/insertAdjacentHTML.tentative.html",
-     {}
-    ]
-   ],
-   "trusted-types/location-assign.tentative.html": [
-    [
-     "/trusted-types/location-assign.tentative.html",
-     {}
-    ]
-   ],
-   "trusted-types/location-href.tentative.html": [
-    [
-     "/trusted-types/location-href.tentative.html",
-     {}
-    ]
-   ],
-   "trusted-types/location-replace.tentative.html": [
-    [
-     "/trusted-types/location-replace.tentative.html",
-     {}
-    ]
-   ],
-   "trusted-types/outerHTML.tentative.html": [
-    [
-     "/trusted-types/outerHTML.tentative.html",
-     {}
-    ]
-   ],
-   "trusted-types/srcDoc-requiresTrustedTypes.tentative.html": [
-    [
-     "/trusted-types/srcDoc-requiresTrustedTypes.tentative.html",
-     {}
-    ]
-   ],
-   "trusted-types/srcDoc.tentative.html": [
-    [
-     "/trusted-types/srcDoc.tentative.html",
-     {}
-    ]
-   ],
-   "trusted-types/window-open.tentative.html": [
-    [
-     "/trusted-types/window-open.tentative.html",
+   "trusted-types/block-string-assignment-to-Location-assign.tentative.html": [
+    [
+     "/trusted-types/block-string-assignment-to-Location-assign.tentative.html",
+     {}
+    ]
+   ],
+   "trusted-types/block-string-assignment-to-Location-href.tentative.html": [
+    [
+     "/trusted-types/block-string-assignment-to-Location-href.tentative.html",
+     {}
+    ]
+   ],
+   "trusted-types/block-string-assignment-to-Location-replace.tentative.html": [
+    [
+     "/trusted-types/block-string-assignment-to-Location-replace.tentative.html",
+     {}
+    ]
+   ],
+   "trusted-types/block-string-assignment-to-Range-createContextualFragment.tentative.html": [
+    [
+     "/trusted-types/block-string-assignment-to-Range-createContextualFragment.tentative.html",
+     {}
+    ]
+   ],
+   "trusted-types/block-string-assignment-to-Window-open.tentative.html": [
+    [
+     "/trusted-types/block-string-assignment-to-Window-open.tentative.html",
      {}
     ]
    ],
    "uievents/constructors/inputevent-constructor.html": [
     [
      "/uievents/constructors/inputevent-constructor.html",
      {}
     ]
@@ -644248,135 +644212,111 @@
   "touch-events/touch-support.js": [
    "f4bc0467db8a215fa85fb7e1c483b3d99a458ef7",
    "support"
   ],
   "touch-events/touch-touchevent-constructor.html": [
    "15b2db735fd0d7a01d9e9bd3a1f3719f790d62e5",
    "testharness"
   ],
-  "trusted-types/DOMParser-requiresTrustedTypes.tentative.html": [
-   "7e21feabd24c653cbe0b713d01e20aeade534b6e",
-   "testharness"
-  ],
-  "trusted-types/DOMParser.tentative.html": [
-   "53d2b44febd6510b4216bb21cb22a83ed6663e5b",
+  "trusted-types/DOMParser-parseFromString.tentative.html": [
+   "2fe9b31b787e1fb458a3ed8996b2d79f7e14aa35",
+   "testharness"
+  ],
+  "trusted-types/Document-write.tentative.html": [
+   "3a63e923543b999b05d1fab926ad33d7d2719dfa",
+   "testharness"
+  ],
+  "trusted-types/Element-insertAdjacentHTML.tentative.html": [
+   "599ade44ec117ecb429659a9f969a2767bd95cbb",
+   "testharness"
+  ],
+  "trusted-types/Element-outerHTML.tentative.html": [
+   "a0bb6c1a5e3fef47e4351353befbfc8eb105652f",
    "testharness"
   ],
   "trusted-types/HTMLElement-generic.tentative.html": [
-   "486b008986bc4e3328c8b709674359538d408800",
+   "cea32a5a2df1d9b255f5aaf85ac5a694fdb3a618",
+   "testharness"
+  ],
+  "trusted-types/Location-assign.tentative.html": [
+   "13cca5679488d0b3e12631d5f70408565ea1b065",
+   "testharness"
+  ],
+  "trusted-types/Location-href.tentative.html": [
+   "d759d28593e67f25d8bc28d36cf0ff4912460dc0",
+   "testharness"
+  ],
+  "trusted-types/Location-replace.tentative.html": [
+   "7d84905d19878d57634a8497b81ef86d8114b72e",
    "testharness"
   ],
   "trusted-types/META.yml": [
    "d0743949b6a122d8bd0adf7b1ed0181f0c51429d",
    "support"
   ],
-  "trusted-types/TrustedHTML.tentative.html": [
-   "a8d4e78b06d124b05aa640aad563b3d9e9003046",
-   "testharness"
-  ],
-  "trusted-types/TrustedScriptURL.tentative.html": [
-   "92bc87f1e1da3eec8a0d597687e04857ad079359",
+  "trusted-types/Range-createContextualFragment.tentative.html": [
+   "3d45b33486d3971c0c58180fa4034dbfae18f135",
    "testharness"
   ],
   "trusted-types/TrustedTypePolicyFactory-createPolicy.tentative.html": [
-   "a37b5a7197f264bb8f75e1582debff5a53cd8d5e",
-   "testharness"
-  ],
-  "trusted-types/TrustedURL.tentative.html": [
-   "5048326fad81af68915b9f83b56da375388fcbef",
+   "d6f6b355c6acfa3de2049c8105c008c90edae11c",
+   "testharness"
+  ],
+  "trusted-types/Window-open.tentative.html": [
+   "c005fbba143f66a9540deebba7988fdea9661558",
    "testharness"
   ],
   "trusted-types/Window-trustedTypes.tentative.html": [
    "ef4487749dd0c12a00bd3ab42c1353467a6eeb8f",
    "testharness"
   ],
+  "trusted-types/block-string-assignment-to-DOMParser-parseFromString.tentative.html": [
+   "cc575dc0085bce3aa1370fb528e28003ad3c1c2b",
+   "testharness"
+  ],
+  "trusted-types/block-string-assignment-to-Document-write.tentative.html": [
+   "28813d72e0e1833e25658e2210abb9b0a30b2137",
+   "testharness"
+  ],
+  "trusted-types/block-string-assignment-to-Element-insertAdjacentHTML.tentative.html": [
+   "ad94b44e8fb7621ba4693ad65377872281f3e9a6",
+   "testharness"
+  ],
+  "trusted-types/block-string-assignment-to-Element-outerHTML.tentative.html": [
+   "47f1165b1a69366848dd5dd21a2ad2199b9c2e81",
+   "testharness"
+  ],
   "trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html": [
-   "79bbb24f541b43123ef1d5f814fb3108275b974c",
-   "testharness"
-  ],
-  "trusted-types/block-string-assignment-to-createContextualFragment.tentative.html": [
-   "1d67a51ff6ab1df879a59af5ee7c6ad9a0609be0",
-   "testharness"
-  ],
-  "trusted-types/block-string-assignment-to-innerHTML.tentative.html": [
-   "67faf6ea7d30ebb76bb857faf0faf04743917dfb",
-   "testharness"
-  ],
-  "trusted-types/block-string-assignment-to-insertAdjacentHTML.tentative.html": [
-   "70bb803442f14cbdcb356be6f6cdceca83522008",
-   "testharness"
-  ],
-  "trusted-types/block-string-assignment-to-location-assign.tentative.html": [
-   "76725da7c72e2f137b15c065bf74a43fc95c1933",
-   "testharness"
-  ],
-  "trusted-types/block-string-assignment-to-location-href.tentative.html": [
-   "07cc4d5fe29f79ae0239035dba1430f326945d70",
-   "testharness"
-  ],
-  "trusted-types/block-string-assignment-to-location-replace.tentative.html": [
-   "9736a84b3ada709ac7ea758ccca10b766130b9aa",
-   "testharness"
-  ],
-  "trusted-types/block-string-assignment-to-outerHTML.tentative.html": [
-   "8cf6c4b065a87f83015e5519ce86ecb6e1115e12",
-   "testharness"
-  ],
-  "trusted-types/block-string-assignment-to-window-open.tentative.html": [
-   "2c3a8ce056685a5306472ee2e1a87bcbfc4c11e9",
-   "testharness"
-  ],
-  "trusted-types/createContextualFragment.tentative.html": [
-   "5e50acc80650e4cc66e045735b301df3cdcaa307",
-   "testharness"
-  ],
-  "trusted-types/document-write.tentative.html": [
-   "12794199722f6e2f078efa9ce9f91146c8ae9219",
-   "testharness"
-  ],
-  "trusted-types/innerHTML.tentative.html": [
-   "f9f32d42a766346f5fd4e5fd18d8e20f7acba810",
-   "testharness"
-  ],
-  "trusted-types/insertAdjacentHTML.tentative.html": [
-   "a95dd6c0bacc9844d25e64453b66aab759c76ad7",
-   "testharness"
-  ],
-  "trusted-types/location-assign.tentative.html": [
-   "07cb4a801966006065adca4a5635d798c5c8ef94",
-   "testharness"
-  ],
-  "trusted-types/location-href.tentative.html": [
-   "2527fbf4847b767d0252c86bddce0ab8127fd15b",
-   "testharness"
-  ],
-  "trusted-types/location-replace.tentative.html": [
-   "097c24d593aa1eb34d452dd1d2812f2cc72ae1ad",
-   "testharness"
-  ],
-  "trusted-types/outerHTML.tentative.html": [
-   "1deb46bf5e3d102550575d5e79eaf05cdf9739f6",
-   "testharness"
-  ],
-  "trusted-types/srcDoc-requiresTrustedTypes.tentative.html": [
-   "b957488bee42d17b3160144b1cdaccfdfb8f1689",
-   "testharness"
-  ],
-  "trusted-types/srcDoc.tentative.html": [
-   "b23703e22329a088b9459bdbbda367b5debf184f",
+   "eae52626190746ad0a8b436f74981009e400232b",
+   "testharness"
+  ],
+  "trusted-types/block-string-assignment-to-Location-assign.tentative.html": [
+   "8079335bc5861fa723691a0f884cf249e6f63e24",
+   "testharness"
+  ],
+  "trusted-types/block-string-assignment-to-Location-href.tentative.html": [
+   "4e393f92506e00276a4440e1023ac23e7a6138e8",
+   "testharness"
+  ],
+  "trusted-types/block-string-assignment-to-Location-replace.tentative.html": [
+   "872f14e144830ed87b51e352f93c32ce85438bfe",
+   "testharness"
+  ],
+  "trusted-types/block-string-assignment-to-Range-createContextualFragment.tentative.html": [
+   "2afa2572c350071b791ee280bce0a1e5135dc2aa",
+   "testharness"
+  ],
+  "trusted-types/block-string-assignment-to-Window-open.tentative.html": [
+   "f5712295d30d7b1d680ad6753dd401d21c0409f9",
    "testharness"
   ],
   "trusted-types/support/helper.sub.js": [
-   "91112d8f239069a9f88fdcffc46f5b2d49e49321",
-   "support"
-  ],
-  "trusted-types/window-open.tentative.html": [
-   "66ffbd78399c70cca883ac55b6f380587bffc9ab",
-   "testharness"
+   "07e8902a168838f6ae71895b63051d1d6cc3b462",
+   "support"
   ],
   "uievents/META.yml": [
    "2f1ec58efec10e0dd6374aac05cb926c8cffa3f1",
    "support"
   ],
   "uievents/README.md": [
    "065c0c78848af60244a860c2d785fa48c66e5ef5",
    "support"
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/trusted-types/DOMParser-parseFromString.tentative.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/helper.sub.js"></script>
+<body>
+<script>
+  async_test(t => {
+    createHTML_policy(window)
+      .then(t.step_func_done(p => {
+        let html = p.createHTML(INPUTS.HTML);
+        let parser = new DOMParser();
+        let doc = parser.parseFromString(html, "text/html");
+        assert_equals(doc.body.innerText, RESULTS.HTML);
+    }));
+  }, "document.innerText assigned via policy (successful HTML transformation).");
+
+  test(t => {
+    var parser = new DOMParser();
+    var doc = parser.parseFromString(null, "text/html");
+    assert_equals(doc.body.innerText, "null");
+  }, "document.innerText = null.");
+</script>
deleted file mode 100644
--- a/testing/web-platform/tests/trusted-types/DOMParser-requiresTrustedTypes.tentative.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="support/helper.sub.js"></script>
-
-<meta http-equiv="Content-Security-Policy" content="require-trusted-types">
-<body>
-<script>
-  //HTML assignments don't throw
-  test(t => {
-    var html = TrustedHTML.escape(STRINGS.unescapedHTML);
-
-    var parser = new DOMParser();
-    var doc = parser.parseFromString(html, "text/html");
-    assert_equals(doc.body.innerText, STRINGS.unescapedHTML);
-  }, "innerTextOfDoc = TrustedHTML.escape().");
-
-  test(t => {
-    var html = TrustedHTML.unsafelyCreate(STRINGS.unescapedHTML);
-
-    var parser = new DOMParser();
-    var doc = parser.parseFromString(html, "text/html");
-    assert_equals(doc.body.innerText, STRINGS.unescapedText);
-  }, "innerTextOfDoc = TrustedHTML.unsafelyCreate().");
-
-  //Null assignment throws
-  test(t => {
-    var parser = new DOMParser();
-    assert_throws(new TypeError(), _ => {
-      var doc = parser.parseFromString(null, "text/html");
-    });
-  }, "'innerTextOfDoc = null' throws");
-
-  // String assignments throw.
-  test(t => {
-    var parser = new DOMParser();
-    assert_throws(new TypeError(), _ => {
-      var doc = parser.parseFromString("Fail", "text/html");
-    });
-  }, "`innerTextOfDoc = string` throws.");
-</script>
deleted file mode 100644
--- a/testing/web-platform/tests/trusted-types/DOMParser.tentative.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="support/helper.sub.js"></script>
-<body>
-<script>
-  test(t => {
-    var html = TrustedHTML.escape(STRINGS.unescapedHTML);
-
-    var parser = new DOMParser();
-    var doc = parser.parseFromString(html, "text/html");
-    assert_equals(doc.body.innerText, STRINGS.unescapedHTML);
-  }, "innerTextOfDoc = TrustedHTML.escape().");
-
-  test(t => {
-    var html = TrustedHTML.unsafelyCreate(STRINGS.unescapedHTML);
-
-    var parser = new DOMParser();
-    var doc = parser.parseFromString(html, "text/html");
-    assert_equals(doc.body.innerText, STRINGS.unescapedText);
-  }, "innerTextOfDoc = TrustedHTML.unsafelyCreate().");
-
-  test(t => {
-    var parser = new DOMParser();
-    var doc = parser.parseFromString(null, "text/html");
-    assert_equals(doc.body.innerText, "null");
-  }, "innerTextOfDoc = null.");
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/trusted-types/Document-write.tentative.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/helper.sub.js"></script>
+<body>
+<script>
+  async_test(t => {
+    createHTML_policy(window)
+      .then(t.step_func_done(p => {
+        let html = p.createHTML(INPUTS.HTML);
+        document.write(html);
+        assert_equals(document.body.innerText, RESULTS.HTML);
+    }));
+  }, "document.write with html assigned via policy (successful URL transformation).");
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/trusted-types/Element-insertAdjacentHTML.tentative.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/helper.sub.js"></script>
+<body>
+<div id="container"></div>
+<script>
+  var container = document.querySelector('#container');
+
+  async_test(t => {
+    createHTML_policy(window)
+      .then(t.step_func_done(p => {
+        let html = p.createHTML(INPUTS.HTML);
+
+        var d = document.createElement('div');
+        container.appendChild(d);
+
+        d.insertAdjacentHTML('beforebegin', html);
+        assert_equals(d.previousSibling.nodeType, Node.TEXT_NODE);
+        assert_equals(d.previousSibling.data, RESULTS.HTML);
+
+        d.insertAdjacentHTML('afterbegin', html);
+        assert_equals(d.firstChild.nodeType, Node.TEXT_NODE);
+        assert_equals(d.firstChild.data, RESULTS.HTML);
+
+        d.insertAdjacentHTML('beforeend', html);
+        assert_equals(d.lastChild.nodeType, Node.TEXT_NODE);
+        assert_equals(d.lastChild.data, RESULTS.HTML);
+
+        d.insertAdjacentHTML('afterend', html);
+        assert_equals(d.nextSibling.nodeType, Node.TEXT_NODE);
+        assert_equals(d.nextSibling.data, RESULTS.HTML);
+
+        while (container.firstChild)
+          container.firstChild.remove();
+    }));
+  }, "insertAdjacentHTML with html assigned via policy (successful HTML transformation).");
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/trusted-types/Element-outerHTML.tentative.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/helper.sub.js"></script>
+<body>
+<div id="container"></div>
+<script>
+  var container = document.querySelector('#container')
+
+  async_test(t => {
+    createHTML_policy(window)
+      .then(t.step_func_done(p => {
+        let html = p.createHTML(INPUTS.HTML);
+
+        var d = document.createElement('div');
+        document.querySelector('#container').appendChild(d);
+        d.outerHTML = html;
+        assert_equals(container.innerText, RESULTS.HTML);
+
+        while (container.firstChild)
+          container.firstChild.remove();
+    }));
+  }, "outerHTML with html assigned via policy (successful HTML transformation).");
+</script>
--- a/testing/web-platform/tests/trusted-types/HTMLElement-generic.tentative.html
+++ b/testing/web-platform/tests/trusted-types/HTMLElement-generic.tentative.html
@@ -1,17 +1,17 @@
 <!DOCTYPE html>
 <head>
   <script src="/resources/testharness.js"></script>
   <script src="/resources/testharnessreport.js"></script>
   <script src="support/helper.sub.js"></script>
 </head>
 <body>
 <script>
-  //TrustedURL Assignments
+  // TrustedURL Assignments
   let testCases = [
     [ 'a', 'href' ],
     [ 'area', 'href' ],
     [ 'base', 'href' ],
     [ 'frame', 'src' ],
     [ 'iframe', 'src' ],
     [ 'img', 'src' ],
     [ 'input', 'src' ],
@@ -19,25 +19,37 @@
     [ 'video', 'src' ],
     [ 'object', 'data' ],
     [ 'object', 'codeBase' ],
     [ 'source', 'src' ],
     [ 'track', 'src' ]
   ];
 
   testCases.forEach(c => {
-    test(t => {
-      assert_accepts_trusted_url(c[0], c[1]);
-    }, c[0] + "." + c[1] + " accepts TrustedURL");
+    async_test(t => {
+      assert_element_accepts_trusted_url(window, t, c[0], c[1], RESULTS.URL);
+    }, c[0] + "." + c[1] + " assigned via policy (successful URL transformation)");
   });
 
-  //TrustedScriptURL Assignments
+  // TrustedScriptURL Assignments
   let scriptTestCases = [
     [ 'embed', 'src' ],
     [ 'script', 'src' ]
   ];
 
   scriptTestCases.forEach(c => {
-    test(t => {
-      assert_accepts_trusted_script_url(c[0], c[1]);
-    }, c[0] + "." + c[1] + " accepts TrustedScriptURL");
+    async_test(t => {
+      assert_element_accepts_trusted_script_url(window, t, c[0], c[1], RESULTS.SCRIPTURL);
+    }, c[0] + "." + c[1] + " assigned via policy (successful ScriptURL transformation)");
+  });
+
+  // TrustedHTML Assignments
+  let HTMLTestCases = [
+    [ 'div', 'innerHTML' ],
+    [ 'iframe', 'srcdoc' ]
+  ];
+
+  HTMLTestCases.forEach(c => {
+    async_test(t => {
+      assert_element_accepts_trusted_html(window, t, c[0], c[1], RESULTS.HTML);
+    }, c[0] + "." + c[1] + " assigned via policy (successful HTML transformation)");
   });
 </script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/trusted-types/Location-assign.tentative.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/helper.sub.js"></script>
+<body>
+<script>
+  async_test(t => {
+    createURL_policy(window)
+        .then(t.step_func_done(p => {
+          let url = p.createURL(location.href + "#xxx");
+          location.assign(url);
+          assert_equals("" + url, location.href, "location href");
+    }));
+  }, "location.assign via policy (successful URL transformation).");
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/trusted-types/Location-href.tentative.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/helper.sub.js"></script>
+<body>
+<script>
+  async_test(t => {
+    createURL_policy(window)
+      .then(t.step_func_done(p => {
+        let url = p.createURL(location.href + "#xxx");
+        location.href = url;
+        assert_equals("" + url, location.href, "location href");
+    }));
+  }, "location.href assigned via policy (successful URL transformation).");
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/trusted-types/Location-replace.tentative.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/helper.sub.js"></script>
+<body>
+<script>
+  async_test(t => {
+    createURL_policy(window)
+        .then(t.step_func_done(p => {
+          let url = p.createURL(location.href + "#xxx");
+          location.replace(url);
+          assert_equals("" + url, location.href, "location href");
+    }));
+  }, "location.replace via policy (successful URL transformation).");
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/trusted-types/Range-createContextualFragment.tentative.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/helper.sub.js"></script>
+<body>
+<script>
+  async_test(t => {
+    createHTML_policy(window)
+      .then(t.step_func_done(p => {
+        let html = p.createHTML(INPUTS.HTML);
+        var range = document.createRange();
+        range.selectNodeContents(document.documentElement);
+        var result = range.createContextualFragment(html);
+        assert_equals(result.textContent, RESULTS.HTML);
+    }));
+  }, "range.createContextualFragment assigned via policy (successful HTML transformation).");
+</script>
deleted file mode 100644
--- a/testing/web-platform/tests/trusted-types/TrustedHTML.tentative.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="support/helper.sub.js"></script>
-<script>
-  test(t => {
-    var html = TrustedHTML.escape(STRINGS.unescapedHTML);
-
-    assert_equals(html.toString(), STRINGS.escapedHTML);
-  }, "Basic escaping.");
-
-  test(t => {
-    var html = TrustedHTML.unsafelyCreate(STRINGS.unescapedHTML);
-
-    assert_equals(html.toString(), STRINGS.unescapedHTML);
-  }, "Basic unsafe construction.");
-</script>
deleted file mode 100644
--- a/testing/web-platform/tests/trusted-types/TrustedScriptURL.tentative.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="support/helper.sub.js"></script>
-<script>
-  test(t => {
-    var url = TrustedScriptURL.unsafelyCreate(URLS.safe);
-
-    assert_equals(url.toString(), URLS.safe);
-  }, "Basic processing: safe URL, unsafe construction.");
-
-  test(t => {
-    var url = TrustedScriptURL.unsafelyCreate(URLS.javascript);
-
-    assert_equals(url.toString(), URLS.javascript);
-  }, "Basic processing: javascript URL, unsafe construction.");
-
-  test(t => {
-    var url = TrustedScriptURL.unsafelyCreate(URLS.external);
-
-    assert_equals(url.toString(), URLS.external);
-  }, "Basic processing: external protocol URL, unsafe construction.");
-</script>
--- a/testing/web-platform/tests/trusted-types/TrustedTypePolicyFactory-createPolicy.tentative.html
+++ b/testing/web-platform/tests/trusted-types/TrustedTypePolicyFactory-createPolicy.tentative.html
@@ -1,26 +1,26 @@
 <!DOCTYPE html>
 <script src="/resources/testharness.js" ></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="support/helper.sub.js"></script>
 <body>
 <script>
   //Policy name test
   async_test(t => {
-    let policy = window.trustedTypes.createPolicy('SomeName', { createHTML: s => s } )
+    window.trustedTypes.createPolicy('SomeName', { createHTML: s => s } )
         .then(t.step_func_done(policy => {
             assert_true(policy instanceof TrustedTypePolicy);
             assert_equals(policy.name, 'SomeName');
     }));
   }, "policy.name = name");
 
   //HTML tests
   function createHTMLTest(policy, expectedHTML, t) {
-    let p = window.trustedTypes.createPolicy('SomeName', policy)
+    window.trustedTypes.createPolicy('SomeName', policy)
         .then(t.step_func_done(p => {
             assert_true(p.createHTML('whatever') instanceof TrustedHTML);
             assert_equals(p.createHTML('whatever') + "", expectedHTML);
     }));
   }
 
   async_test(t => {
     createHTMLTest( { createHTML: s => s }, 'whatever', t);
@@ -32,28 +32,28 @@
 
   var HTMLstr = 'well, ';
   async_test(t => {
     createHTMLTest( { createHTML: s => HTMLstr + s }, HTMLstr + 'whatever', t);
   }, "html = string + global string");
 
   var HTMLx = 'global';
   async_test(t => {
-    let p = window.trustedTypes.createPolicy('SomeName', {
+    window.trustedTypes.createPolicy('SomeName', {
         createHTML: s => { HTMLx = s; return s; }
       })
       .then(t.step_func_done(p => {
         assert_true(p.createHTML('whatever') instanceof TrustedHTML);
         assert_equals(p.createHTML('whatever') + "", 'whatever');
         assert_equals(HTMLx, 'whatever');
     }));
   }, "html = identity function, global string changed");
 
   async_test(t => {
-    let p = window.trustedTypes.createPolicy('SomeName', {
+    window.trustedTypes.createPolicy('SomeName', {
         createHTML: s => { throw new Error(); }
       })
       .then(t.step_func_done(p => {
         assert_throws(new Error(), _ => {
           p.createHTML('whatever');
         });
     }));
   }, "html = callback that throws");
@@ -73,157 +73,156 @@
   }, "html = this bound to an object");
 
   var foo = "well,";
   async_test(t => {
     createHTMLTest( { createHTML: s => getHTML(s) }, 'well, whatever', t);
   }, "html = this without bind");
 
   async_test(t => {
-    let p = window.trustedTypes.createPolicy('SomeName', null)
+    window.trustedTypes.createPolicy('SomeName', null)
         .then(t.step_func_done(p => {
             assert_equals(p.createHTML('whatever'), null);
     }));
   }, "html - calling undefined callback");
 
   //ScriptURL tests
   function createScriptURLTest(policy, expectedScriptURL, t) {
-    let p = window.trustedTypes.createPolicy('SomeName', policy)
+    window.trustedTypes.createPolicy('SomeName', policy)
         .then(t.step_func_done(p => {
-            assert_true(p.createScriptURL(URLS.safe) instanceof TrustedScriptURL);
-            assert_equals(p.createScriptURL(URLS.safe) + "", expectedScriptURL);
+            assert_true(p.createScriptURL(INPUTS.SCRIPTURL) instanceof TrustedScriptURL);
+            assert_equals(p.createScriptURL(INPUTS.SCRIPTURL) + "", expectedScriptURL);
     }));
   }
 
   async_test(t => {
-    createScriptURLTest( { createScriptURL: s => s }, URLS.safe, t);
+    createScriptURLTest( { createScriptURL: s => s }, INPUTS.SCRIPTURL, t);
   }, "script_url = identity function");
 
   async_test(t => {
     createScriptURLTest( { createScriptURL: s => null }, "", t);
   }, "script_url = null");
 
-  var scriptURLstr = 'duck';
+  var scriptURLstr = '#duck';
   async_test(t => {
-    createScriptURLTest( { createScriptURL: s => s + scriptURLstr }, URLS.safe + scriptURLstr, t);
+    createScriptURLTest( { createScriptURL: s => s + scriptURLstr }, INPUTS.SCRIPTURL + scriptURLstr, t);
   }, "script_url = string + global string");
 
   var scriptURLx = 'global';
   async_test(t => {
-    let p = window.trustedTypes.createPolicy('SomeName', {
+    window.trustedTypes.createPolicy('SomeName', {
         createScriptURL: s => { ScriptURLx = s; return s; }
       })
       .then(t.step_func_done(p => {
-        assert_true(p.createScriptURL(URLS.safe) instanceof TrustedScriptURL);
-        assert_equals(p.createScriptURL(URLS.safe) + "", URLS.safe);
-        assert_equals(ScriptURLx, URLS.safe);
+        assert_true(p.createScriptURL(INPUTS.SCRIPTURL) instanceof TrustedScriptURL);
+        assert_equals(p.createScriptURL(INPUTS.SCRIPTURL) + "", INPUTS.SCRIPTURL);
+        assert_equals(ScriptURLx, INPUTS.SCRIPTURL);
     }));
   }, "script_url = identity function, global string changed");
 
   async_test(t => {
-    let p = window.trustedTypes.createPolicy('SomeName', {
+    window.trustedTypes.createPolicy('SomeName', {
         createScriptURL: s => { throw new Error(); }
       })
       .then(t.step_func_done(p => {
         assert_throws(new Error(), _ => {
-          p.createScriptURL(URLS.safe);
+          p.createScriptURL(INPUTS.SCRIPTURL);
         });
     }));
   }, "script_url = callback that throws");
 
   function getScriptURL(s) {
     return s + this.baz;
   }
 
   var obj = {
-    "baz": "duck"
+    "baz": "#duck"
   }
 
   async_test(t => {
     createScriptURLTest( {
       createScriptURL: getScriptURL.bind(obj)},
-      URLS.safe + "duck", t);
+      INPUTS.SCRIPTURL + "#duck", t);
   }, "script_url = this bound to an object");
 
-  var baz = "duck";
-
+  var baz = "#duck";
   async_test(t => {
-    createScriptURLTest( { createScriptURL: s => getScriptURL(s) }, URLS.safe + baz, t);
+    createScriptURLTest( { createScriptURL: s => getScriptURL(s) }, INPUTS.SCRIPTURL + baz, t);
   }, "script_url = this without bind");
 
   async_test(t => {
-    let p = window.trustedTypes.createPolicy('SomeName', null)
+    window.trustedTypes.createPolicy('SomeName', null)
         .then(t.step_func_done(p => {
-            assert_equals(p.createScriptURL('whatever'), null);
+            assert_equals(p.createScriptURL(INPUTS.SCRIPTURL), null);
     }));
   }, "script_url - calling undefined callback");
 
   //URL tests
   function createURLTest(policy, expectedURL, t) {
-    let p = window.trustedTypes.createPolicy('SomeName', policy)
+    window.trustedTypes.createPolicy('SomeName', policy)
         .then(t.step_func_done(p => {
-            assert_true(p.createURL(URLS.safe) instanceof TrustedURL);
-            assert_equals(p.createURL(URLS.safe) + "", expectedURL);
+            assert_true(p.createURL(INPUTS.URL) instanceof TrustedURL);
+            assert_equals(p.createURL(INPUTS.URL) + "", expectedURL);
     }));
   }
 
   async_test(t => {
-    createURLTest( { createURL: s => s }, URLS.safe, t);
+    createURLTest( { createURL: s => s }, INPUTS.URL, t);
   }, "url = identity function");
 
   async_test(t => {
     createURLTest( { createURL: s => null }, "", t);
   }, "url = null");
 
   var URLstr = '#x';
   async_test(t => {
-    createURLTest( { createURL: s => s + URLstr }, URLS.safe + URLstr, t);
+    createURLTest( { createURL: s => s + URLstr }, INPUTS.URL + URLstr, t);
   }, "url = string + global string");
 
   var URLx = 'global';
   async_test(t => {
-    let p = window.trustedTypes.createPolicy('SomeName', {
+    window.trustedTypes.createPolicy('SomeName', {
         createURL: s => { URLx = s; return s; }
       })
       .then(t.step_func_done(p => {
-        assert_true(p.createURL(URLS.safe) instanceof TrustedURL);
-        assert_equals(p.createURL(URLS.safe) + "", URLS.safe);
-        assert_equals(URLx, URLS.safe);
+        assert_true(p.createURL(INPUTS.URL) instanceof TrustedURL);
+        assert_equals(p.createURL(INPUTS.URL) + "", INPUTS.URL);
+        assert_equals(URLx, INPUTS.URL);
     }));
   }, "url = identity function, global string changed");
 
   async_test(t => {
-    let p = window.trustedTypes.createPolicy('SomeName', {
+    window.trustedTypes.createPolicy('SomeName', {
         createURL: s => { throw new Error(); }
       })
       .then(t.step_func_done(p => {
         assert_throws(new Error(), _ => {
-          p.createURL(URLS.safe);
+          p.createURL(INPUTS.URL);
         });
     }));
   }, "url = callback that throws");
 
   function getURL(s) {
     return s + this.bar;
   }
 
   var obj = {
     "bar": "#x"
   }
 
   async_test(t => {
     createURLTest( {
       createURL: getURL.bind(obj)},
-      URLS.safe + "#x", t);
+      INPUTS.URL + "#x", t);
   }, "url = this bound to an object");
 
   var bar = "#x";
   async_test(t => {
-    createURLTest( { createURL: s => getURL(s) }, URLS.safe + bar, t);
+    createURLTest( { createURL: s => getURL(s) }, INPUTS.URL + bar, t);
   }, "url = this without bind");
 
   async_test(t => {
-    let p = window.trustedTypes.createPolicy('SomeName', null)
+    window.trustedTypes.createPolicy('SomeName', null)
         .then(t.step_func_done(p => {
-            assert_equals(p.createURL('whatever'), null);
+            assert_equals(p.createURL(INPUTS.URL), null);
     }));
   }, "url - calling undefined callback");
 </script>
deleted file mode 100644
--- a/testing/web-platform/tests/trusted-types/TrustedURL.tentative.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="support/helper.sub.js"></script>
-<script>
-  test(t => {
-    var url = TrustedURL.create(URLS.safe);
-
-    assert_equals(url.toString(), URLS.safe);
-  }, "Basic processing: safe URL, safe construction.");
-
-  test(t => {
-    var url = TrustedURL.unsafelyCreate(URLS.safe);
-
-    assert_equals(url.toString(), URLS.safe);
-  }, "Basic processing: safe URL, unsafe construction.");
-
-  test(t => {
-    var url = TrustedURL.create(URLS.javascript);
-
-    assert_equals(url.toString(), URLS.sanitized);
-  }, "Basic processing: javascript URL, safe construction.");
-
-  test(t => {
-    var url = TrustedURL.unsafelyCreate(URLS.javascript);
-
-    assert_equals(url.toString(), URLS.javascript);
-  }, "Basic processing: javascript URL, unsafe construction.");
-
-  test(t => {
-    var url = TrustedURL.create(URLS.external);
-
-    assert_equals(url.toString(), URLS.sanitized);
-  }, "Basic processing: external protocol URL, safe construction.");
-
-  test(t => {
-    var url = TrustedURL.unsafelyCreate(URLS.external);
-
-    assert_equals(url.toString(), URLS.external);
-  }, "Basic processing: external protocol URL, unsafe construction.");
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/trusted-types/Window-open.tentative.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/helper.sub.js"></script>
+<body>
+<script>
+  // helper functions for the tests
+  function testWindowOpen(t, win) {
+    createURL_policy(window)
+        .then(t.step_func_done(p => {
+            let url = p.createURL(INPUTS.URL);
+            let child_window = win.open(url, "", "");
+            child_window.onload = t.step_func_done(_ => {
+              assert_equals(child_window.location.href, "" + url);
+              child_window.close();
+            });
+        }));
+  }
+
+  async_test(t => {
+    testWindowOpen(t, window);
+  }, "window.open via policy (successful URL transformation).");
+
+  async_test(t => {
+    testWindowOpen(t, document);
+  }, "document.open via policy (successful URL transformation).");
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/trusted-types/block-string-assignment-to-DOMParser-parseFromString.tentative.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/helper.sub.js"></script>
+
+<meta http-equiv="Content-Security-Policy" content="require-trusted-types">
+<body>
+<script>
+  // Trusted HTML assignments do not throw.
+  async_test(t => {
+    createHTML_policy(window)
+      .then(t.step_func_done(p => {
+        let html = p.createHTML(INPUTS.HTML);
+        let parser = new DOMParser();
+        let doc = parser.parseFromString(html, "text/html");
+        assert_equals(doc.body.innerText, RESULTS.HTML);
+    }));
+  }, "document.innerText assigned via policy (successful HTML transformation).");
+
+  // String assignments throw.
+  test(t => {
+    var parser = new DOMParser();
+    assert_throws(new TypeError(), _ => {
+      var doc = parser.parseFromString("Fail", "text/html");
+    });
+  }, "`document.innerText = string` throws.");
+
+  // Null assignment throws.
+  test(t => {
+    var parser = new DOMParser();
+    assert_throws(new TypeError(), _ => {
+      var doc = parser.parseFromString(null, "text/html");
+    });
+  }, "'document.innerText = null' throws");
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/trusted-types/block-string-assignment-to-Document-write.tentative.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <script src="/resources/testharness.js"></script>
+  <script src="/resources/testharnessreport.js"></script>
+  <script src="support/helper.sub.js"></script>
+
+  <meta http-equiv="Content-Security-Policy" content="require-trusted-types">
+</head>
+<body>
+<script>
+  // TrustedURL assignments do not throw.
+  async_test(t => {
+    createHTML_policy(window)
+      .then(t.step_func_done(p => {
+        let html = p.createHTML(INPUTS.HTML);
+        document.write(html);
+        assert_equals(document.body.innerText, RESULTS.HTML);
+    }));
+  }, "document.write with html assigned via policy (successful URL transformation).");
+
+  // String assignments throw.
+  test(t => {
+    assert_throws(new TypeError(), _ => {
+      document.write('A string');
+    });
+  }, "`document.write(string)` throws");
+
+  // Null assignment throws.
+  test(t => {
+    assert_throws(new TypeError(), _ => {
+      document.write(null);
+    });
+  }, "`document.write(null)` throws");
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/trusted-types/block-string-assignment-to-Element-insertAdjacentHTML.tentative.html
@@ -0,0 +1,97 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <script src="/resources/testharness.js"></script>
+  <script src="/resources/testharnessreport.js"></script>
+  <script src="support/helper.sub.js"></script>
+
+  <meta http-equiv="Content-Security-Policy" content="require-trusted-types">
+</head>
+<body>
+<div id="container"></div>
+<script>
+  var container = document.querySelector('#container');
+
+  // Trusted HTML assignments do not throw.
+  async_test(t => {
+    createHTML_policy(window)
+      .then(t.step_func_done(p => {
+        let html = p.createHTML(INPUTS.HTML);
+
+        var d = document.createElement('div');
+        container.appendChild(d);
+
+        d.insertAdjacentHTML('beforebegin', html);
+        assert_equals(d.previousSibling.nodeType, Node.TEXT_NODE);
+        assert_equals(d.previousSibling.data, RESULTS.HTML);
+
+        d.insertAdjacentHTML('afterbegin', html);
+        assert_equals(d.firstChild.nodeType, Node.TEXT_NODE);
+        assert_equals(d.firstChild.data, RESULTS.HTML);
+
+        d.insertAdjacentHTML('beforeend', html);
+        assert_equals(d.lastChild.nodeType, Node.TEXT_NODE);
+        assert_equals(d.lastChild.data, RESULTS.HTML);
+
+        d.insertAdjacentHTML('afterend', html);
+        assert_equals(d.nextSibling.nodeType, Node.TEXT_NODE);
+        assert_equals(d.nextSibling.data, RESULTS.HTML);
+
+        while (container.firstChild)
+          container.firstChild.remove();
+    }));
+  }, "insertAdjacentHTML with html assigned via policy (successful HTML transformation).");
+
+  // String assignments throw.
+  test(t => {
+    var d = document.createElement('div');
+    container.appendChild(d);
+
+    assert_throws(new TypeError(), _ => {
+      d.insertAdjacentHTML('beforebegin', "<p>Fail</p>");
+    });
+    assert_throws(new TypeError(), _ => {
+      d.insertAdjacentHTML('afterbegin', "<p>Fail</p>");
+    });
+    assert_throws(new TypeError(), _ => {
+      d.insertAdjacentHTML('beforeend', "<p>Fail</p>");
+    });
+    assert_throws(new TypeError(), _ => {
+      d.insertAdjacentHTML('afterend', "<p>Fail</p>");
+    });
+
+    assert_equals(d.previousSibling, null);
+    assert_equals(d.firstChild, null);
+    assert_equals(d.lastChild, null);
+    assert_equals(d.nextSibling, null);
+
+    while (container.firstChild)
+      container.firstChild.remove();
+  }, "`insertAdjacentHTML(string)` throws.");
+
+  // Null assignment throws.
+  test(t => {
+    var d = document.createElement('div');
+    container.appendChild(d);
+
+    assert_throws(new TypeError(), _ => {
+      d.insertAdjacentHTML('beforebegin', null);
+    });
+    assert_throws(new TypeError(), _ => {
+      d.insertAdjacentHTML('afterbegin', null);
+    });
+    assert_throws(new TypeError(), _ => {
+      d.insertAdjacentHTML('beforeend', null);
+    });
+    assert_throws(new TypeError(), _ => {
+      d.insertAdjacentHTML('afterend', null);
+    });
+
+    assert_equals(d.previousSibling, null);
+    assert_equals(d.firstChild, null);
+    assert_equals(d.lastChild, null);
+    assert_equals(d.nextSibling, null);
+  }, "`insertAdjacentHTML(null)` throws.");
+</script>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/trusted-types/block-string-assignment-to-Element-outerHTML.tentative.html
@@ -0,0 +1,56 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <script src="/resources/testharness.js"></script>
+  <script src="/resources/testharnessreport.js"></script>
+  <script src="support/helper.sub.js"></script>
+
+  <meta http-equiv="Content-Security-Policy" content="require-trusted-types">
+</head>
+<body>
+<div id="container"></div>
+<script>
+  var container = document.querySelector('#container')
+
+  // TrustedHTML assignments do not throw.
+  async_test(t => {
+    createHTML_policy(window)
+      .then(t.step_func_done(p => {
+        let html = p.createHTML(INPUTS.HTML);
+
+        var d = document.createElement('div');
+        document.querySelector('#container').appendChild(d);
+        d.outerHTML = html;
+        assert_equals(container.innerText, RESULTS.HTML);
+
+        while (container.firstChild)
+          container.firstChild.remove();
+    }));
+  }, "outerHTML with html assigned via policy (successful HTML transformation).");
+
+  // String assignments throw.
+  test(t => {
+    var d = document.createElement('div');
+    container.appendChild(d);
+    assert_throws(new TypeError(), _ => {
+      d.outerHTML = "Fail.";
+    });
+    assert_equals(container.innerText, "");
+    while (container.firstChild)
+      container.firstChild.remove();
+  }, "`outerHTML = string` throws.");
+
+  // Null assignment throws.
+  test(t => {
+    var d = document.createElement('div');
+    container.appendChild(d);
+    assert_throws(new TypeError(), _ => {
+      d.outerHTML = null;
+    });
+    assert_equals(container.innerText, "");
+    while (container.firstChild)
+      container.firstChild.remove();
+  }, "`outerHTML = null` throws.");
+</script>
+</body>
+</html>
--- a/testing/web-platform/tests/trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html
+++ b/testing/web-platform/tests/trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html
@@ -4,17 +4,17 @@
   <script src="/resources/testharness.js"></script>
   <script src="/resources/testharnessreport.js"></script>
   <script src="support/helper.sub.js"></script>
 
   <meta http-equiv="Content-Security-Policy" content="require-trusted-types">
 </head>
 <body>
 <script>
-  //TrustedURL Assignments
+  // TrustedURL Assignments
   let testCases = [
     [ 'a', 'href' ],
     [ 'area', 'href' ],
     [ 'base', 'href' ],
     [ 'frame', 'src' ],
     [ 'iframe', 'src' ],
     [ 'img', 'src' ],
     [ 'input', 'src' ],
@@ -22,29 +22,43 @@
     [ 'video', 'src' ],
     [ 'object', 'data' ],
     [ 'object', 'codeBase' ],
     [ 'source', 'src' ],
     [ 'track', 'src' ]
   ];
 
   testCases.forEach(c => {
-    test(t => {
-      assert_accepts_trusted_url(c[0], c[1]);
+    async_test(t => {
+      assert_element_accepts_trusted_url(window, t, c[0], c[1], RESULTS.URL);
       assert_throws_no_trusted_type(c[0], c[1], 'A string');
       assert_throws_no_trusted_type(c[0], c[1], null);
-    }, c[0] + "." + c[1] + " accepts TrustedURL");
+    }, c[0] + "." + c[1] + " accepts only TrustedURL");
   });
 
-  //TrustedScriptURL Assignments
+  // TrustedScriptURL Assignments
   let scriptTestCases = [
     [ 'embed', 'src' ],
     [ 'script', 'src' ]
   ];
 
   scriptTestCases.forEach(c => {
-    test(t => {
-      assert_accepts_trusted_script_url(c[0], c[1]);
+    async_test(t => {
+      assert_element_accepts_trusted_script_url(window, t, c[0], c[1], RESULTS.SCRIPTURL);
       assert_throws_no_trusted_type(c[0], c[1], 'A string');
       assert_throws_no_trusted_type(c[0], c[1], null);
-    }, c[0] + "." + c[1] + " accepts TrustedScriptURL");
+    }, c[0] + "." + c[1] + " accepts only TrustedScriptURL");
+  });
+
+  // TrustedHTML Assignments
+  let HTMLTestCases = [
+    [ 'div', 'innerHTML' ],
+    [ 'iframe', 'srcdoc' ]
+  ];
+
+  HTMLTestCases.forEach(c => {
+    async_test(t => {
+      assert_element_accepts_trusted_html(window, t, c[0], c[1], RESULTS.HTML);
+      assert_throws_no_trusted_type(c[0], c[1], 'A string');
+      assert_throws_no_trusted_type(c[0], c[1], null);
+    }, c[0] + "." + c[1] + " accepts only TrustedHTML");
   });
 </script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/trusted-types/block-string-assignment-to-Location-assign.tentative.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <script src="/resources/testharness.js"></script>
+  <script src="/resources/testharnessreport.js"></script>
+  <script src="support/helper.sub.js"></script>
+
+  <meta http-equiv="Content-Security-Policy" content="require-trusted-types">
+</head>
+<body>
+<script>
+  // TrustedURL assignments do not throw.
+  async_test(t => {
+    createURL_policy(window)
+        .then(t.step_func_done(p => {
+          let url = p.createURL(location.href + "#xxx");
+          location.assign(url);
+          assert_equals("" + url, location.href, "location href");
+    }));
+  }, "location.assign via policy (successful URL transformation).");
+
+  // String assignments throw.
+  test(t => {
+    assert_throws(new TypeError(), _ => {
+      location.assign("A string");
+    });
+  }, "`location.assign = string` throws");
+
+  // Null assignment throws.
+  test(t => {
+    assert_throws(new TypeError(), _ => {
+      location.assign(null);
+    });
+  }, "`location.assign = null` throws");
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/trusted-types/block-string-assignment-to-Location-href.tentative.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <script src="/resources/testharness.js"></script>
+  <script src="/resources/testharnessreport.js"></script>
+  <script src="support/helper.sub.js"></script>
+
+  <meta http-equiv="Content-Security-Policy" content="require-trusted-types">
+</head>
+<body>
+<script>
+  // TrustedURL assignments do not throw.
+  async_test(t => {
+    createURL_policy(window)
+      .then(t.step_func_done(p => {
+        let url = p.createURL(location.href + "#xxx");
+        location.href = url;
+        assert_equals("" + url, location.href, "location href");
+    }));
+  }, "location.href assigned via policy (successful URL transformation).");
+
+  // String assignments throw.
+  test(t => {
+    assert_throws(new TypeError(), _ => {
+      location.href = 'A string';
+    });
+  }, "`location.href = string` throws");
+
+  // Null assignment throws.
+  test(t => {
+    assert_throws(new TypeError(), _ => {
+      location.href = null;
+    });
+  }, "`location.href = null` throws");
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/trusted-types/block-string-assignment-to-Location-replace.tentative.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <script src="/resources/testharness.js"></script>
+  <script src="/resources/testharnessreport.js"></script>
+  <script src="support/helper.sub.js"></script>
+
+  <meta http-equiv="Content-Security-Policy" content="require-trusted-types">
+</head>
+<body>
+<script>
+  // TrustedURL replacements do not throw.
+  async_test(t => {
+    createURL_policy(window)
+        .then(t.step_func_done(p => {
+          let url = p.createURL(location.href + "#xxx");
+          location.replace(url);
+          assert_equals("" + url, location.href, "location href");
+    }));
+  }, "location.replace via policy (successful URL transformation).");
+
+  // String replacements throw.
+  test(t => {
+    assert_throws(new TypeError(), _ => {
+      location.replace("A string");
+    });
+  }, "`location.replace = string` throws");
+
+  // Null replacement throws.
+  test(t => {
+    assert_throws(new TypeError(), _ => {
+      location.replace(null);
+    });
+  }, "`location.replace = null` throws");
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/trusted-types/block-string-assignment-to-Range-createContextualFragment.tentative.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/helper.sub.js"></script>
+
+<meta http-equiv="Content-Security-Policy" content="require-trusted-types">
+<body>
+<script>
+  // TrustedHTML assignments do not throw.
+  async_test(t => {
+    createHTML_policy(window)
+      .then(t.step_func_done(p => {
+        let html = p.createHTML(INPUTS.HTML);
+        var range = document.createRange();
+        range.selectNodeContents(document.documentElement);
+        var result = range.createContextualFragment(html);
+        assert_equals(result.textContent, RESULTS.HTML);
+    }));
+  }, "range.createContextualFragment assigned via policy (successful HTML transformation).");
+
+  // String assignments throw.
+  test(t => {
+    var range = document.createRange();
+    range.selectNodeContents(document.documentElement);
+    assert_throws(new TypeError(), _ => {
+      var result = range.createContextualFragment("A string");
+    });
+  }, "`range.createContextualFragment(string)` throws.");
+
+  // Null assignment throws.
+  test(t => {
+    var range = document.createRange();
+    range.selectNodeContents(document.documentElement);
+    assert_throws(new TypeError(), _ => {
+      var result = range.createContextualFragment(null);
+    });
+  }, "`range.createContextualFragment(null)` throws.");
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/trusted-types/block-string-assignment-to-Window-open.tentative.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <script src="/resources/testharness.js"></script>
+  <script src="/resources/testharnessreport.js"></script>
+  <script src="support/helper.sub.js"></script>
+
+  <meta http-equiv="Content-Security-Policy" content="require-trusted-types">
+</head>
+<body>
+<script>
+  // helper functions for the tests
+  function testWindowOpen(t, win) {
+    createURL_policy(window)
+        .then(t.step_func_done(p => {
+            let url = p.createURL(INPUTS.URL);
+            let child_window = win.open(url, "", "");
+            child_window.onload = t.step_func_done(_ => {
+              assert_equals(child_window.location.href, "" + url);
+              child_window.close();
+            });
+        }));
+  }
+
+  function testWindowThrows(t, url, win) {
+    createURL_policy(window)
+        .then(t.step_func_done(p => {
+            assert_throws(new TypeError(), _ => {
+              let child_window = win.open(url, "", "");
+              child_window.close();
+            });
+        }));
+  }
+
+  // TrustedURL assignments do not throw.
+  async_test(t => {
+    testWindowOpen(t, window);
+  }, "window.open via policy (successful URL transformation).");
+
+  async_test(t => {
+    testWindowOpen(t, document);
+  }, "document.open via policy (successful URL transformation).");
+
+  // String assignments throw.
+  async_test(t => {
+    testWindowThrows(t, 'A string', window);
+  }, "`window.open(string)` throws.");
+
+  async_test(t => {
+    testWindowThrows(t, 'A string', document);
+  }, "`document.open(string)` throws.");
+
+  // Null assignment throws.
+  async_test(t => {
+    testWindowThrows(t, null, window);
+  }, "`window.open(null)` throws.");
+
+  async_test(t => {
+    testWindowThrows(t, null, document);
+  }, "`document.open(null)` throws.");
+</script>
+</body>
+</html>
deleted file mode 100644
--- a/testing/web-platform/tests/trusted-types/block-string-assignment-to-createContextualFragment.tentative.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="support/helper.sub.js"></script>
-
-<meta http-equiv="Content-Security-Policy" content="require-trusted-types">
-<body>
-<script>
-  //TrustedHTML assignments work
-  test(t => {
-    var html = TrustedHTML.escape(STRINGS.unescapedHTML);
-    var range = document.createRange();
-    range.selectNodeContents(document.documentElement);
-    var result = range.createContextualFragment(html);
-    assert_equals(result.textContent, STRINGS.unescapedHTML);
-  }, "DocumentFragment.textContent = TrustedHTML.escape().");
-
-  test(t => {
-    var html = TrustedHTML.unsafelyCreate(STRINGS.unescapedHTML);
-    var range = document.createRange();
-    range.selectNodeContents(document.documentElement);
-    var result = range.createContextualFragment(html);
-    assert_equals(result.textContent, STRINGS.unescapedText);
-  }, "DocumentFragment.textContent = TrustedHTML.unsafelyCreate().");
-
-  //Null assignment throws
-  test(t => {
-    var range = document.createRange();
-    range.selectNodeContents(document.documentElement);
-    assert_throws(new TypeError(), _ => {
-      var result = range.createContextualFragment(null);
-    });
-  }, "`DocumentFragment.textContent = null` throws.");
-
-  // String assignments throw.
-  test(t => {
-    var range = document.createRange();
-    range.selectNodeContents(document.documentElement);
-    assert_throws(new TypeError(), _ => {
-      var result = range.createContextualFragment("A string");
-    });
-  }, "`DocumentFragment.textContent = string` throws.");
-</script>
deleted file mode 100644
--- a/testing/web-platform/tests/trusted-types/block-string-assignment-to-innerHTML.tentative.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-  <script src="/resources/testharness.js"></script>
-  <script src="/resources/testharnessreport.js"></script>
-  <script src="support/helper.sub.js"></script>
-
-  <meta http-equiv="Content-Security-Policy" content="require-trusted-types">
-</head>
-<body>
-<script>
-  // String assignments throw.
-  test(t => {
-    var d = document.createElement('div');
-    assert_throws(new TypeError(), _ => {
-      d.innerHTML = "Fail.";
-    });
-  }, "`innerHTML = string` throws.");
-
-  // TrustedHTML assignments work.
-  test(t => {
-    var html = TrustedHTML.escape(STRINGS.unescapedHTML);
-    var d = document.createElement('div');
-    d.innerHTML = html;
-    assert_equals(d.innerText, STRINGS.unescapedHTML);
-  }, "innerHTML = TrustedHTML.escape().");
-
-  test(t => {
-    var html = TrustedHTML.unsafelyCreate(STRINGS.unescapedHTML);
-    var d = document.createElement('div');
-    d.innerHTML = html;
-    assert_equals(d.innerText, STRINGS.unescapedText);
-  }, "innerHTML = TrustedHTML.unsafelyCreate().");
-</script>
-</body>
-</html>
deleted file mode 100644
--- a/testing/web-platform/tests/trusted-types/block-string-assignment-to-insertAdjacentHTML.tentative.html
+++ /dev/null
@@ -1,93 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-  <script src="/resources/testharness.js"></script>
-  <script src="/resources/testharnessreport.js"></script>
-  <script src="support/helper.sub.js"></script>
-
-  <meta http-equiv="Content-Security-Policy" content="require-trusted-types">
-</head>
-<body>
-<div id="container"></div>
-<script>
-  var container = document.querySelector('#container');
-
-  // String assignments throw.
-  test(t => {
-    var d = document.createElement('div');
-    container.appendChild(d);
-
-    assert_throws(new TypeError(), _ => {
-      d.insertAdjacentHTML('beforebegin', "<p>Fail</p>");
-    });
-    assert_throws(new TypeError(), _ => {
-      d.insertAdjacentHTML('afterbegin', "<p>Fail</p>");
-    });
-    assert_throws(new TypeError(), _ => {
-      d.insertAdjacentHTML('beforeend', "<p>Fail</p>");
-    });
-    assert_throws(new TypeError(), _ => {
-      d.insertAdjacentHTML('afterend', "<p>Fail</p>");
-    });
-
-    assert_equals(d.previousSibling, null);
-    assert_equals(d.firstChild, null);
-    assert_equals(d.lastChild, null);
-    assert_equals(d.nextSibling, null);
-  }, "`insertAdjacentHTML(string)` throws.");
-
-  // TrustedHTML assignments work.
-  test(t => {
-    var html = TrustedHTML.escape(STRINGS.unescapedHTML);
-
-    var d = document.createElement('div');
-    container.appendChild(d);
-
-    d.insertAdjacentHTML('beforebegin', html);
-    assert_equals(d.previousSibling.nodeType, Node.TEXT_NODE);
-    assert_equals(d.previousSibling.data, STRINGS.unescapedHTML);
-
-    d.insertAdjacentHTML('afterbegin', html);
-    assert_equals(d.firstChild.nodeType, Node.TEXT_NODE);
-    assert_equals(d.firstChild.data, STRINGS.unescapedHTML);
-
-    d.insertAdjacentHTML('beforeend', html);
-    assert_equals(d.lastChild.nodeType, Node.TEXT_NODE);
-    assert_equals(d.lastChild.data, STRINGS.unescapedHTML);
-
-    d.insertAdjacentHTML('afterend', html);
-    assert_equals(d.nextSibling.nodeType, Node.TEXT_NODE);
-    assert_equals(d.nextSibling.data, STRINGS.unescapedHTML);
-
-    while (container.firstChild)
-      container.firstChild.remove();
-  }, "insertAdjacentHTML = TrustedHTML.escape().");
-
-  test(t => {
-    var html = TrustedHTML.unsafelyCreate(STRINGS.unescapedHTML);
-
-    var d = document.createElement('div');
-    container.appendChild(d);
-
-    d.insertAdjacentHTML('beforebegin', html);
-    assert_equals(d.previousSibling.nodeType, Node.TEXT_NODE);
-    assert_equals(d.previousSibling.data, STRINGS.unescapedText);
-
-    d.insertAdjacentHTML('afterbegin', html);
-    assert_equals(d.firstChild.nodeType, Node.TEXT_NODE);
-    assert_equals(d.firstChild.data, STRINGS.unescapedText);
-
-    d.insertAdjacentHTML('beforeend', html);
-    assert_equals(d.lastChild.nodeType, Node.TEXT_NODE);
-    assert_equals(d.lastChild.data, STRINGS.unescapedText);
-
-    d.insertAdjacentHTML('afterend', html);
-    assert_equals(d.nextSibling.nodeType, Node.TEXT_NODE);
-    assert_equals(d.nextSibling.data, STRINGS.unescapedText);
-
-    while (container.firstChild)
-      container.firstChild.remove();
-  }, "insertAdjacentHTML = TrustedHTML.unsafelyCreate().");
-</script>
-</body>
-</html>
deleted file mode 100644
--- a/testing/web-platform/tests/trusted-types/block-string-assignment-to-location-assign.tentative.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-  <script src="/resources/testharness.js"></script>
-  <script src="/resources/testharnessreport.js"></script>
-  <script src="support/helper.sub.js"></script>
-
-  <meta http-equiv="Content-Security-Policy" content="require-trusted-types">
-</head>
-<body>
-<script>
-  //TrustedURL assignments work
-  test(t => {
-    var url = TrustedURL.create(location.href + "#xxx");
-    location.assign(url);
-    assert_equals("" + url, location.href, "location href");
-  }, "Basic processing: safe URL, safe construction.");
-
-  test(t => {
-    var url = TrustedURL.unsafelyCreate(location.href + "#xxx");
-    location.assign(url);
-    assert_equals("" + url, location.href, "location href");
-  }, "Basic processing: safe URL, unsafe construction.");
-
-  // String assignments throw.
-  test(t => {
-    assert_throws(new TypeError(), _ => {
-      location.assign("A string");
-    });
-  }, "`location.assign = string` throws");
-
-  //Null assignment throws
-  test(t => {
-    assert_throws(new TypeError(), _ => {
-      location.assign(null);
-    });
-  }, "`location.assign = null` throws");
-</script>
deleted file mode 100644
--- a/testing/web-platform/tests/trusted-types/block-string-assignment-to-location-href.tentative.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-  <script src="/resources/testharness.js"></script>
-  <script src="/resources/testharnessreport.js"></script>
-  <script src="support/helper.sub.js"></script>
-
-  <meta http-equiv="Content-Security-Policy" content="require-trusted-types">
-</head>
-<body>
-<script>
-  // String assignments throw.
-  promise_test(t => {
-    return promise_rejects(t, new TypeError(), createFrameAndHref("about:blank"));
-  }, "`location.href = string` throws");
-
-  // TrustedURL assignments work.
-  promise_test(t => {
-    var url = TrustedURL.create(URLS.safe);
-    return createFrameAndHref(url);
-  }, "Basic processing: safe URL, safe construction.");
-
-  promise_test(t => {
-    var url = TrustedURL.unsafelyCreate(URLS.safe);
-    return createFrameAndHref(url);
-  }, "Basic processing: safe URL, unsafe construction.");
-
-  promise_test(t => {
-    var url = TrustedURL.create(URLS.javascript);
-    return createFrameAndHref(url).then(i => {
-      assert_equals(i.contentDocument.body.innerText, "");
-    });
-  }, "Basic processing: javascript URL, safe construction.");
-
-  promise_test(t => {
-    var url = TrustedURL.unsafelyCreate(URLS.javascript);
-    return createFrameAndHref(url).then(i => {
-      assert_equals(i.contentDocument.body.innerText, "scripted");
-    });
-  }, "Basic processing: javascript URL, unsafe construction.");
-</script>
deleted file mode 100644
--- a/testing/web-platform/tests/trusted-types/block-string-assignment-to-location-replace.tentative.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-  <script src="/resources/testharness.js"></script>
-  <script src="/resources/testharnessreport.js"></script>
-  <script src="support/helper.sub.js"></script>
-
-  <meta http-equiv="Content-Security-Policy" content="require-trusted-types">
-</head>
-<body>
-<script>
-  //TrustedURL replacements work
-  test(t => {
-    var url = TrustedURL.create(location.href + "#xxx");
-    location.replace(url);
-    assert_equals("" + url, location.href, "location href");
-  }, "Basic processing: safe URL, safe construction.");
-
-  test(t => {
-    var url = TrustedURL.unsafelyCreate(location.href + "#xxx");
-    location.replace(url);
-    assert_equals("" + url, location.href, "location href");
-  }, "Basic processing: safe URL, unsafe construction.");
-
-  // String replacements throw.
-  test(t => {
-    assert_throws(new TypeError(), _ => {
-      location.replace("A string");
-    });
-  }, "`location.replace = string` throws");
-
-  //Null replacement throws
-  test(t => {
-    assert_throws(new TypeError(), _ => {
-      location.replace(null);
-    });
-  }, "`location.replace = null` throws");
-</script>
deleted file mode 100644
--- a/testing/web-platform/tests/trusted-types/block-string-assignment-to-outerHTML.tentative.html
+++ /dev/null
@@ -1,53 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-  <script src="/resources/testharness.js"></script>
-  <script src="/resources/testharnessreport.js"></script>
-  <script src="support/helper.sub.js"></script>
-
-  <meta http-equiv="Content-Security-Policy" content="require-trusted-types">
-</head>
-<body>
-<div id="container"></div>
-<script>
-  var container = document.querySelector('#container')
-
-  // String assignments throw.
-  test(t => {
-    var d = document.createElement('div');
-    container.appendChild(d);
-    assert_throws(new TypeError(), _ => {
-      d.outerHTML = "Fail.";
-    });
-    assert_equals(container.innerText, "");
-    while (container.firstChild)
-      container.firstChild.remove();
-  }, "`outerHTML = string` throws.");
-
-  // TrustedHTML assignments work.
-  test(t => {
-    var html = TrustedHTML.escape(STRINGS.unescapedHTML);
-
-    var d = document.createElement('div');
-    document.querySelector('#container').appendChild(d);
-    d.outerHTML = html;
-    assert_equals(container.innerText, STRINGS.unescapedHTML);
-
-    while (container.firstChild)
-      container.firstChild.remove();
-  }, "outerHTML = TrustedHTML.escape().");
-
-  test(t => {
-    var html = TrustedHTML.unsafelyCreate(STRINGS.unescapedHTML);
-
-    var d = document.createElement('div');
-    container.appendChild(d);
-    d.outerHTML = html;
-    assert_equals(container.innerText, STRINGS.unescapedText);
-
-    while (container.firstChild)
-      container.firstChild.remove();
-  }, "outerHTML = TrustedHTML.unsafelyCreate().");
-</script>
-</body>
-</html>
deleted file mode 100644
--- a/testing/web-platform/tests/trusted-types/block-string-assignment-to-window-open.tentative.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-  <script src="/resources/testharness.js"></script>
-  <script src="/resources/testharnessreport.js"></script>
-  <script src="support/helper.sub.js"></script>
-
-  <meta http-equiv="Content-Security-Policy" content="require-trusted-types">
-</head>
-<body>
-<script>
-  //helper functions for the tests
-  function testWindowOpen(t, url, win) {
-    let child_window = win.open(url, "", "");
-    child_window.onload = t.step_func_done(_ => {
-      assert_equals(child_window.location.href, "" + url);
-      child_window.close();
-    });
-  }
-
-  function testWindowThrows(t, url, win) {
-    let child_window = win.open(TrustedURL.create(URLS.safe), "", "");
-    child_window.onload = t.step_func_done(_ => {
-      assert_throws(new TypeError(), _ => {
-        child_window = win.open(url, "", "");
-        child_window.close();
-      });
-    });
-  }
-
-  //TrustedURL assignments do not throw
-  async_test(t => {
-    testWindowOpen(t, TrustedURL.create(URLS.safe), window);
-  }, "window.open: safe URL, safe construction.");
-
-  async_test(t => {
-    testWindowOpen(t, TrustedURL.unsafelyCreate(URLS.safe), window);
-  }, "window.open: safe URL, unsafe construction.");
-
-  async_test(t => {
-    testWindowOpen(t, TrustedURL.create(URLS.safe), document);
-  }, "document.open: safe URL, safe construction.");
-
-  async_test(t => {
-    testWindowOpen(t, TrustedURL.unsafelyCreate(URLS.safe), document);
-  }, "document.open: safe URL, unsafe construction.");
-
-  //String assignments throw
-  async_test(t => {
-    testWindowThrows(t, 'A string', window);
-  }, "`window.open(string)` throws.");
-
-  async_test(t => {
-    testWindowThrows(t, 'A string', document);
-  }, "`document.open(string)` throws.");
-
-  //Null assignment throws
-  async_test(t => {
-    testWindowThrows(t, null, window);
-  }, "`window.open(null)` throws.");
-
-  //Null assignment throws
-  async_test(t => {
-    testWindowThrows(t, null, document);
-  }, "`document.open(null)` throws.");
-</script>
-</body>
-</html>
deleted file mode 100644
--- a/testing/web-platform/tests/trusted-types/createContextualFragment.tentative.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="support/helper.sub.js"></script>
-<body>
-<script>
-  test(t => {
-    var html = TrustedHTML.escape(STRINGS.unescapedHTML);
-
-    var range = document.createRange();
-    range.selectNodeContents(document.documentElement);
-    var result = range.createContextualFragment(html);
-    assert_equals(result.textContent, STRINGS.unescapedHTML);
-  }, "DocumentFragment.textContent = TrustedHTML.escape().");
-
-  test(t => {
-    var html = TrustedHTML.unsafelyCreate(STRINGS.unescapedHTML);
-
-    var range = document.createRange();
-    range.selectNodeContents(document.documentElement);
-    var result = range.createContextualFragment(html);
-    assert_equals(result.textContent, STRINGS.unescapedText);
-  }, "DocumentFragment.textContent = TrustedHTML.unsafelyCreate().");
-
-  test(t => {
-    var range = document.createRange();
-    range.selectNodeContents(document.documentElement);
-    var result = range.createContextualFragment(null);
-    assert_equals(result.textContent, "null");
-  }, "DocumentFragment.textContent = null.");
-</script>
deleted file mode 100644
--- a/testing/web-platform/tests/trusted-types/document-write.tentative.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="support/helper.sub.js"></script>
-<body>
-<script>
-  promise_test(t => {
-    var html = TrustedHTML.escape(STRINGS.unescapedHTML);
-    return createFrameAndWrite(html).then(i => {
-      assert_equals(i.contentDocument.body.innerText, STRINGS.unescapedHTML, "innerText");
-      i.remove();
-    });
-  }, "document.write(TrustedHTML).");
-</script>
deleted file mode 100644
--- a/testing/web-platform/tests/trusted-types/innerHTML.tentative.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="support/helper.sub.js"></script>
-<body>
-<script>
-  test(t => {
-    var html = TrustedHTML.escape(STRINGS.unescapedHTML);
-
-    var d = document.createElement('div');
-    d.innerHTML = html;
-    assert_equals(d.innerText, STRINGS.unescapedHTML);
-  }, "innerHTML = TrustedHTML.escape().");
-
-  test(t => {
-    var html = TrustedHTML.unsafelyCreate(STRINGS.unescapedHTML);
-
-    var d = document.createElement('div');
-    d.innerHTML = html;
-    assert_equals(d.innerText, STRINGS.unescapedText);
-  }, "innerHTML = TrustedHTML.unsafelyCreate().");
-</script>
deleted file mode 100644
--- a/testing/web-platform/tests/trusted-types/insertAdjacentHTML.tentative.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="support/helper.sub.js"></script>
-<body>
-<div id="container"></div>
-<script>
-  var container = document.querySelector('#container');
-
-  test(t => {
-    var html = TrustedHTML.escape(STRINGS.unescapedHTML);
-
-    var d = document.createElement('div');
-    container.appendChild(d);
-
-    d.insertAdjacentHTML('beforebegin', html);
-    assert_equals(d.previousSibling.nodeType, Node.TEXT_NODE);
-    assert_equals(d.previousSibling.data, STRINGS.unescapedHTML);
-
-    d.insertAdjacentHTML('afterbegin', html);
-    assert_equals(d.firstChild.nodeType, Node.TEXT_NODE);
-    assert_equals(d.firstChild.data, STRINGS.unescapedHTML);
-
-    d.insertAdjacentHTML('beforeend', html);
-    assert_equals(d.lastChild.nodeType, Node.TEXT_NODE);
-    assert_equals(d.lastChild.data, STRINGS.unescapedHTML);
-
-    d.insertAdjacentHTML('afterend', html);
-    assert_equals(d.nextSibling.nodeType, Node.TEXT_NODE);
-    assert_equals(d.nextSibling.data, STRINGS.unescapedHTML);
-
-    while (container.firstChild)
-      container.firstChild.remove();
-  }, "insertAdjacentHTML = TrustedHTML.escape().");
-
-  test(t => {
-    var html = TrustedHTML.unsafelyCreate(STRINGS.unescapedHTML);
-
-    var d = document.createElement('div');
-    container.appendChild(d);
-
-    d.insertAdjacentHTML('beforebegin', html);
-    assert_equals(d.previousSibling.nodeType, Node.TEXT_NODE);
-    assert_equals(d.previousSibling.data, STRINGS.unescapedText);
-
-    d.insertAdjacentHTML('afterbegin', html);
-    assert_equals(d.firstChild.nodeType, Node.TEXT_NODE);
-    assert_equals(d.firstChild.data, STRINGS.unescapedText);
-
-    d.insertAdjacentHTML('beforeend', html);
-    assert_equals(d.lastChild.nodeType, Node.TEXT_NODE);
-    assert_equals(d.lastChild.data, STRINGS.unescapedText);
-
-    d.insertAdjacentHTML('afterend', html);
-    assert_equals(d.nextSibling.nodeType, Node.TEXT_NODE);
-    assert_equals(d.nextSibling.data, STRINGS.unescapedText);
-
-    while (container.firstChild)
-      container.firstChild.remove();
-  }, "insertAdjacentHTML = TrustedHTML.unsafelyCreate().");
-</script>
deleted file mode 100644
--- a/testing/web-platform/tests/trusted-types/location-assign.tentative.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="support/helper.sub.js"></script>
-<body>
-<script>
-  test(t => {
-    var url = TrustedURL.create(location.href + "#xxx");
-    location.assign(url);
-    assert_equals("" + url, location.href, "location href");
-  }, "Basic processing: safe URL, safe construction.");
-
-  test(t => {
-    var url = TrustedURL.unsafelyCreate(location.href + "#xxx");
-    location.assign(url);
-    assert_equals("" + url, location.href, "location href");
-  }, "Basic processing: safe URL, unsafe construction.");
-</script>
deleted file mode 100644
--- a/testing/web-platform/tests/trusted-types/location-href.tentative.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="support/helper.sub.js"></script>
-<body>
-<script>
-  promise_test(t => {
-    var url = TrustedURL.create(URLS.safe);
-    return createFrameAndHref(url);
-  }, "Basic processing: safe URL, safe construction.");
-
-  promise_test(t => {
-    var url = TrustedURL.unsafelyCreate(URLS.safe);
-    return createFrameAndHref(url);
-  }, "Basic processing: safe URL, unsafe construction.");
-
-  promise_test(t => {
-    var url = TrustedURL.create(URLS.javascript);
-    return createFrameAndHref(url).then(i => {
-      assert_equals(i.contentDocument.body.innerText, "");
-    });
-  }, "Basic processing: javascript URL, safe construction.");
-
-  promise_test(t => {
-    var url = TrustedURL.unsafelyCreate(URLS.javascript);
-    return createFrameAndHref(url).then(i => {
-      assert_equals(i.contentDocument.body.innerText, "scripted");
-    });
-  }, "Basic processing: javascript URL, unsafe construction.");
-</script>
deleted file mode 100644
--- a/testing/web-platform/tests/trusted-types/location-replace.tentative.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="support/helper.sub.js"></script>
-<body>
-<script>
-  test(t => {
-    var url = TrustedURL.create(location.href + "#xxx");
-    location.replace(url);
-    assert_equals("" + url, location.href, "location href");
-  }, "Basic processing: safe URL, safe construction.");
-
-  test(t => {
-    var url = TrustedURL.unsafelyCreate(location.href + "#xxx");
-    location.replace(url);
-    assert_equals("" + url, location.href, "location href");
-  }, "Basic processing: safe URL, unsafe construction.");
-</script>
deleted file mode 100644
--- a/testing/web-platform/tests/trusted-types/outerHTML.tentative.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="support/helper.sub.js"></script>
-<body>
-<div id="container"></div>
-<script>
-  var container = document.querySelector('#container')
-  test(t => {
-    var html = TrustedHTML.escape(STRINGS.unescapedHTML);
-
-    var d = document.createElement('div');
-    document.querySelector('#container').appendChild(d);
-    d.outerHTML = html;
-    assert_equals(container.innerText, STRINGS.unescapedHTML);
-    while (container.firstChild)
-      container.firstChild.remove();
-  }, "outerHTML = TrustedHTML.escape().");
-
-  test(t => {
-    var html = TrustedHTML.unsafelyCreate(STRINGS.unescapedHTML);
-
-    var d = document.createElement('div');
-    container.appendChild(d);
-    d.outerHTML = html;
-    assert_equals(container.innerText, STRINGS.unescapedText);
-    while (container.firstChild)
-      container.firstChild.remove();
-  }, "outerHTML = TrustedHTML.unsafelyCreate().");
-</script>
deleted file mode 100644
--- a/testing/web-platform/tests/trusted-types/srcDoc-requiresTrustedTypes.tentative.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="support/helper.sub.js"></script>
-
-<meta http-equiv="Content-Security-Policy" content="require-trusted-types">
-<body>
-<script>
-  //HTML assignments don't throw
-  async_test(t => {
-    var html = TrustedHTML.escape(STRINGS.unescapedHTML);
-
-    var frame = document.createElement('iframe');
-    frame.srcdoc = html;
-    frame.onload = t.step_func_done(_ => {
-      assert_equals(frame.srcdoc, STRINGS.escapedHTML);
-    });
-    document.body.appendChild(frame);
-  }, "srcdoc = TrustedHTML.escape().");
-
-  async_test(t => {
-    var html = TrustedHTML.unsafelyCreate(STRINGS.unescapedHTML);
-
-    var frame = document.createElement('iframe');
-    frame.srcdoc = html;
-    frame.onload = t.step_func_done(_ => {
-      assert_equals(frame.srcdoc, STRINGS.unescapedHTML);
-    });
-    document.body.appendChild(frame);
-  }, "srcdoc = TrustedHTML.unsafelyCreate().");
-
-  //String assignment throws
-  test(t => {
-    var frame = document.createElement('iframe');
-    assert_throws(new TypeError(), _ => {
-      frame.srcdoc = "Fail";
-    });
-  document.body.appendChild(frame);
-  }, "'srcdoc = string' throws.");
-</script>
deleted file mode 100644
--- a/testing/web-platform/tests/trusted-types/srcDoc.tentative.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="support/helper.sub.js"></script>
-<body>
-<script>
-  async_test(t => {
-    var html = TrustedHTML.escape(STRINGS.unescapedHTML);
-
-    var frame = document.createElement('iframe');
-    frame.srcdoc = html;
-    frame.onload = t.step_func_done(_ => {
-      assert_equals(frame.srcdoc, STRINGS.escapedHTML);
-    });
-    document.body.appendChild(frame);
- }, "srcdoc = TrustedHTML.escape().");
-
-  async_test(t => {
-    var html = TrustedHTML.unsafelyCreate(STRINGS.unescapedHTML);
-
-    var frame = document.createElement('iframe');
-    frame.srcdoc = html;
-    frame.onload = t.step_func_done(_ => {
-      assert_equals(frame.srcdoc, STRINGS.unescapedHTML);
-    });
-    document.body.appendChild(frame);
-  }, "srcdoc = TrustedHTML.unsafelyCreate().");
-</script>
--- a/testing/web-platform/tests/trusted-types/support/helper.sub.js
+++ b/testing/web-platform/tests/trusted-types/support/helper.sub.js
@@ -1,75 +1,74 @@
-var STRINGS = {
-  unescapedHTML: "<html>This has ', \", >, <, &amp; & characters!</html>",
-  escapedHTML: "&lt;html&gt;This has &#39;, &quot;, &gt;, &lt;, &amp;amp; &amp; characters!&lt;/html&gt;",
-  unescapedText: "This has ', \", >, <, & & characters!",
+var INPUTS = {
+  HTML: "Hi, I want to be transformed!",
+  SCRIPTURL: "http://this.is.a.scripturl.test/",
+  URL: "http://hello.i.am.an.url/"
 };
 
-var URLS = {
-  safe: "http://{{host}}:{{ports[http][0]}}/",
-  javascript: "javascript:'scripted'",
-  external: "custom-handler:whatever",
-  sanitized: "about:invalid"
+var RESULTS = {
+  HTML: "Quack, I want to be a duck!",
+  SCRIPTURL: "http://this.is.a.successful.test/",
+  URL: "http://hooray.i.am.successfully.transformed/"
 };
 
-function createFrameAndWrite(html) {
-  return new Promise((resolve, reject) => {
-    var i = document.createElement('iframe');
-    i.onload = e => {
-      i.contentDocument.open();
-      try {
-        i.contentDocument.write(html);
-      } catch (e) {
-        i.remove();
-        reject(e);
-      }
-      i.contentDocument.close();
-      resolve(i);
-    };
-    document.body.appendChild(i);
-  });
+function createHTMLJS(html) {
+  return html.replace("Hi", "Quack")
+      .replace("transformed", "a duck");
+}
+
+function createScriptURLJS(scripturl) {
+  return scripturl.replace("scripturl", "successful");
+}
+
+function createURLJS(url) {
+  return url.replace("hello", "hooray")
+      .replace("an.url", "successfully.transformed");
+}
+
+function createHTML_policy(win) {
+  return win.trustedTypes.createPolicy('SomeName', { createHTML: createHTMLJS });
 }
 
-function createFrameAndHref(href) {
-  return new Promise((resolve, reject) => {
-    var i = document.createElement('iframe');
-    i.onload = _ => {
-      i.onload = null;
-      try {
-        i.onload = _ => resolve(i);
-        i.contentWindow.location.href = href;
-      } catch (ex) {
-        i.remove();
-        reject(ex);
-      }
-    };
-    document.body.appendChild(i);
-  });
+function createScriptURL_policy(win) {
+  return win.trustedTypes.createPolicy('SomeName', { createScriptURL: createScriptURLJS });
+}
+
+function createURL_policy(win) {
+  return win.trustedTypes.createPolicy('SomeName', { createURL: createURLJS });
+}
+
+function assert_element_accepts_trusted_html(win, t, tag, attribute, expected) {
+  createHTML_policy(win)
+      .then(t.step_func_done(p => {
+          let html = p.createHTML(INPUTS.HTML);
+          assert_element_accepts_trusted_type(tag, attribute, html, expected);
+      }));
 }
 
-let trustedHTML = TrustedHTML.escape(STRINGS.unescapedHTML);
-function assert_accepts_trusted_html(tag, attribute) {
-  let elem = document.createElement(tag);
-  elem[attribute] = trustedHTML;
-  assert_equals(elem[attribute] + "", STRINGS.unescapedHTML);
+function assert_element_accepts_trusted_script_url(win, t, tag, attribute, expected) {
+  createScriptURL_policy(win)
+      .then(t.step_func_done(p => {
+          let scripturl = p.createScriptURL(INPUTS.SCRIPTURL);
+          assert_element_accepts_trusted_type(tag, attribute, scripturl, expected);
+      }));
 }
 
-let trustedURL = TrustedURL.create(URLS.safe);
-function assert_accepts_trusted_url(tag, attribute) {
-  let elem = document.createElement(tag);
-  elem[attribute] = trustedURL;
-  assert_equals(elem[attribute] + "", URLS.safe);
+function assert_element_accepts_trusted_url(win, t, tag, attribute, expected) {
+  createURL_policy(win)
+      .then(t.step_func_done(p => {
+          let url = p.createURL(INPUTS.URL);
+          assert_element_accepts_trusted_type(tag, attribute, url, expected);
+      }));
 }
 
-let trustedScriptURL = TrustedScriptURL.unsafelyCreate(URLS.safe);
-function assert_accepts_trusted_script_url(tag, attribute) {
+function assert_element_accepts_trusted_type(tag, attribute, value, expected) {
   let elem = document.createElement(tag);
-  elem[attribute] = trustedScriptURL;
-  assert_equals(elem[attribute] + "", URLS.safe);
+  elem[attribute] = value;
+  assert_equals(elem[attribute] + "", expected);
 }
 
 function assert_throws_no_trusted_type(tag, attribute, value) {
   let elem = document.createElement(tag);
   assert_throws(new TypeError(), _ => {
     elem[attribute] = value;
   });
 }
deleted file mode 100644
--- a/testing/web-platform/tests/trusted-types/window-open.tentative.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="support/helper.sub.js"></script>
-<body>
-<script>
-  //helper functions for the tests
-  function testWindowOpen(t, url, win) {
-    let child_window = win.open(url, "", "");
-    child_window.onload = t.step_func_done(_ => {
-      assert_equals(child_window.location.href, "" + url);
-      child_window.close();
-    });
-  }
-
-  async_test(t => {
-    testWindowOpen(t, TrustedURL.create(URLS.safe), window);
-  }, "window.open: safe URL, safe construction.");
-
-  async_test(t => {
-    testWindowOpen(t, TrustedURL.unsafelyCreate(URLS.safe), window);
-  }, "window.open: safe URL, unsafe construction.");
-
-  async_test(t => {
-    testWindowOpen(t, TrustedURL.create(URLS.safe), document);
-  }, "document.open: safe URL, safe construction.");
-
-  async_test(t => {
-    testWindowOpen(t, TrustedURL.unsafelyCreate(URLS.safe), document);
-  }, "document.open: safe URL, unsafe construction.");
-</script>