Bug 1630628 [wpt PR 23007] - Replace assert_precondition with assert_equals in domparsing/, a=testonly
authorStephen McGruer <smcgruer@chromium.org>
Tue, 28 Apr 2020 11:37:22 +0000
changeset 527573 ed97836553af5bc29989d8e941f331cf956394e7
parent 527572 d999146c5b07bcc326ee8f88a9fea0a5dd988405
child 527574 fb45c867b69d09c119cf38ccdcd0844066d4ebf8
push id37368
push userbtara@mozilla.com
push dateFri, 01 May 2020 21:45:51 +0000
treeherdermozilla-central@0f9c5a59e45d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1630628, 23007
milestone77.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 1630628 [wpt PR 23007] - Replace assert_precondition with assert_equals in domparsing/, a=testonly Automatic update from web-platform-tests Replace assert_precondition with assert_equals in domparsing/ (#23007) assert_precondition is deprecated (see https://github.com/web-platform-tests/rfcs/blob/master/rfcs/assert_precondition_rename.md). In this particular case, the assertion is actually checking for an equality rather than an 'implements' phrase, so switch to assert_equals. -- wpt-commits: e65087045387dd4ecb9d5c675062a6643e00c7ad wpt-pr: 23007
testing/web-platform/tests/domparsing/DOMParser-parseFromString-encoding.html
--- a/testing/web-platform/tests/domparsing/DOMParser-parseFromString-encoding.html
+++ b/testing/web-platform/tests/domparsing/DOMParser-parseFromString-encoding.html
@@ -9,17 +9,17 @@
 
 function assertEncoding(doc) {
   assert_equals(doc.charset, "UTF-8", "document.charset");
   assert_equals(doc.characterSet, "UTF-8", "document.characterSet");
   assert_equals(doc.inputEncoding, "UTF-8", "document.characterSet");
 }
 
 setup(() => {
-  assert_precondition(document.characterSet === "windows-1252", "the meta charset must be in effect, making the main document windows-1252");
+  assert_equals(document.characterSet, "windows-1252", "the meta charset must be in effect, making the main document windows-1252");
 });
 
 test(() => {
   const parser = new DOMParser();
   const doc = parser.parseFromString("", "text/html");
 
   assertEncoding(doc);
 }, "HTML: empty");