From 528bb73923afc41faf02923828af80abc05b3ba2 Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Mon, 16 Mar 2020 12:08:13 +0000 Subject: [PATCH] Bug 1622229 [wpt PR 22236] - Correctly test document.all quirks, a=testonly Automatic update from web-platform-tests Correctly test document.all quirks For legacy compatibility, this property is specified with some willful violations of JS: . Prior to this commit, idlharness wasn't accounting for these, so html/dom/interfaces.html was wrong for document.all/HTMLAllCollection tests. It's a bit ugly to include this directly in idlharness.js and testharness.js, but it's the cleanest solution I can think of. Fixes #4207. -- wpt-commits: 687b92d025e32df7f5217bc06b0e510a39953ef9 wpt-pr: 22236 UltraBlame original commit: 65eedd9b56ee16dc1b0f23ad5835cb7805dd2d94 --- .../tests/resources/idlharness.js | 87 ++++++++++++++++++- .../tests/resources/testharness.js | 24 +++++ 2 files changed, 109 insertions(+), 2 deletions(-) diff --git a/testing/web-platform/tests/resources/idlharness.js b/testing/web-platform/tests/resources/idlharness.js index 8c19275cd9aaf..d4437c8304fbe 100644 --- a/testing/web-platform/tests/resources/idlharness.js +++ b/testing/web-platform/tests/resources/idlharness.js @@ -22923,7 +22923,38 @@ e } var expected_typeof +; +if +( +this +. +name += += +" +HTMLAllCollection +" +) +{ +/ +/ +Willful +violation +of +JS +. +: +( +expected_typeof = +" +undefined +" +; +} +else +if +( this . members @@ -22942,15 +22973,24 @@ legacycaller ; } ) -? +) +{ +expected_typeof += " function " -: +; +} +else +{ +expected_typeof += " object " ; +} this . test_primary_interface_of @@ -24257,6 +24297,48 @@ if thrown ) { +if +( +this +. +name += += +" +Document +" +& +& +member +. +name += += +" +all +" +) +{ +/ +/ +Willful +violation +of +JS +: +( +assert_equals +( +typeof +property +" +undefined +" +) +; +} +else +{ this . array @@ -24271,6 +24353,7 @@ idlType ; } } +} if ( member diff --git a/testing/web-platform/tests/resources/testharness.js b/testing/web-platform/tests/resources/testharness.js index 69b65d0200ee3..f4d76b9141105 100644 --- a/testing/web-platform/tests/resources/testharness.js +++ b/testing/web-platform/tests/resources/testharness.js @@ -10099,6 +10099,30 @@ object " function " +| +| +/ +/ +Willful +violation +of +JS +. +: +( +String +( +object +) += += += +" +[ +object +HTMLAllCollection +] +" name description "