Bug 1496450 [wpt PR 13141] - Attribute case-insensivity for Trusted Type attribute assignments, a=testonly
authorMaja Kabus <kabusm@google.com>
Tue, 09 Oct 2018 04:12:01 +0000
changeset 498612 ef3fd2694a99ae9794f650ec6ca5282117d600b3
parent 498611 afc8d7a964b47b410da037039017544a7cd1b7d6
child 498613 3c94940adbe9343c881ca742c42f665625146780
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1496450, 13141, 739170, 1238539, 595493
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1496450 [wpt PR 13141] - Attribute case-insensivity for Trusted Type attribute assignments, a=testonly Automatic update from web-platform-testsAttribute case-insensivity for Trusted Type attribute assignments Element::setAttribute() implementation with TrustedType modified to prevent insecure case-insensitive attributes change with strings. Bug: 739170 Change-Id: Ia0636f4791cbc204b679de510e5c676de817dd11 Reviewed-on: https://chromium-review.googlesource.com/1238539 Commit-Queue: Daniel Vogelheim <vogelheim@chromium.org> Reviewed-by: Mike West <mkwst@chromium.org> Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org> Cr-Commit-Position: refs/heads/master@{#595493} -- wpt-commits: 37c7236e23771f5bf7c5ad249021d8d669e0dd92 wpt-pr: 13141
testing/web-platform/tests/trusted-types/block-string-assignment-to-Element-setAttribute.tentative.html
--- a/testing/web-platform/tests/trusted-types/block-string-assignment-to-Element-setAttribute.tentative.html
+++ b/testing/web-platform/tests/trusted-types/block-string-assignment-to-Element-setAttribute.tentative.html
@@ -68,9 +68,19 @@
 
   test(t => {
     assert_element_accepts_non_trusted_type_explicit_set('a', 'rel', 'A string', 'A string');
   }, "a.rel accepts strings");
 
   test(t => {
     assert_element_accepts_non_trusted_type_explicit_set('a', 'rel', null, 'null');
   }, "a.rel accepts null");
+
+  test(t => {
+    let el = document.createElement('iframe');
+
+    assert_throws(new TypeError(), _ => {
+      el.setAttribute('SrC', INPUTS.URL);
+    });
+
+    assert_equals(el.src, '');
+  }, "`Element.prototype.setAttribute.SrC = string` throws.");
 </script>