Skip to content

Commit

Permalink
Remove testharness from reftest
Browse files Browse the repository at this point in the history
I somehow made this both a testharness test and a reftest. This
CL converts this to just a reftest, to avoid breaking things [1].

[1] #43303

Bug: 1236777
Change-Id: I89fc76e68a24ab12c4a9efeaac36183dfb85b746
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5055427
Commit-Queue: Mason Freed <masonf@chromium.org>
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1228158}
  • Loading branch information
Mason Freed authored and chromium-wpt-export-bot committed Nov 22, 2023
1 parent 5a8f920 commit a51e6fc
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions css/cssom/CSSStyleSheet-constructable-concat.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,20 @@
<link rel="author" href="mailto:masonf@chromium.org">
<link rel="help" href="https://drafts.csswg.org/cssom/#extensions-to-the-document-or-shadow-root-interface">
<link rel="match" href="CSSStyleSheet-constructable-concat-ref.html">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>

<span>This should be green</span>
<div id=host></div>
<pre id=errors></pre>

<script>
test(function() {
function assert_equals(val1,val2) {
if (val1 === val2) {
return;
}
const t = document.createTextNode(`FAIL! ${val1} should be equal to ${val2}\n`);
errors.appendChild(t);
}
window.onload = () => {
const sheet = new CSSStyleSheet();
sheet.replaceSync('span {background-color:green;}');
assert_equals(document.adoptedStyleSheets.length,0);
Expand All @@ -24,5 +30,5 @@
assert_equals(shadow.adoptedStyleSheets.length,0);
shadow.adoptedStyleSheets = shadow.adoptedStyleSheets.concat([sheet]);
assert_equals(shadow.adoptedStyleSheets.length,1);
}, "adoptedStyleSheets should allow .concat on empty starting values");
};
</script>

0 comments on commit a51e6fc

Please sign in to comment.