From 0c36525f53294da85616f3957705b31e3a184fd6 Mon Sep 17 00:00:00 2001 From: Joey Arhar Date: Fri, 18 Oct 2024 09:13:32 -0700 Subject: [PATCH] Improve select-parsing test readability It was recommended here to use trim() to make these test cases more readable: https://chromium-review.googlesource.com/c/chromium/src/+/5936092/comment/051341cb_4c94e057/ Change-Id: I532b08bef1a7f04e4be3325d2ed3769d7ed564b9 --- .../select-parsing.tentative.html | 35 +++++++++---------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/html/semantics/forms/the-select-element/customizable-select/select-parsing.tentative.html b/html/semantics/forms/the-select-element/customizable-select/select-parsing.tentative.html index 1a5b059997bac4..e2d39ff3995373 100644 --- a/html/semantics/forms/the-select-element/customizable-select/select-parsing.tentative.html +++ b/html/semantics/forms/the-select-element/customizable-select/select-parsing.tentative.html @@ -55,60 +55,57 @@ // The document.body check here and in the other tests is to make sure that a // previous test case didn't leave the HTML parser open on another element. assert_equals(document.getElementById('s1').parentNode, document.body); - assert_equals(document.getElementById('s1').innerHTML, ` -
div 1
+ assert_equals(document.getElementById('s1').innerHTML.trim(), + `
div 1
div 2
-
div 3
-`); +
div 3
`); }, '
s, `); }, ' should remove inner in .'); test(() => { assert_equals(document.getElementById('s6').parentNode, document.body); - assert_equals(document.getElementById('s6').innerHTML, ` -
+ assert_equals(document.getElementById('s6').innerHTML.trim(), + `
-
-`); +
`); }, 'Divs and imgs should be allowed as direct children of select and within options without a datalist.'); test(() => { assert_equals(document.getElementById('s7').parentNode, document.body); - assert_equals(document.getElementById('s7').innerHTML, ` - -`); + assert_equals(document.getElementById('s7').innerHTML.trim(), + ``); }, 'Input tags should parse inside select instead of closing the select.'); test(() => {