Commit 773261e7 authored by Joey Arhar's avatar Joey Arhar Committed by Commit Bot

Add test for BeforeMatchEvent origin trial

You can tell that the origin trial is enabled and CSS.supports() isn't
working as expected because of the document.body.onbeforematch check in
the first assert.

Bug: 1134237
Change-Id: I992e05dcf3cb0a3d07fcc1aedb1efb67630b9b1a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2447051Reviewed-by: default avatarJason Chase <chasej@chromium.org>
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Auto-Submit: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#815233}
parent c689eca4
...@@ -6617,3 +6617,5 @@ crbug.com/1133821 virtual/off-main-thread-css-paint/external/wpt/css/css-paint-a ...@@ -6617,3 +6617,5 @@ crbug.com/1133821 virtual/off-main-thread-css-paint/external/wpt/css/css-paint-a
#Sheriff 2020-10-07 #Sheriff 2020-10-07
crbug.com/1135405 http/tests/devtools/sources/debugger-pause/debugger-pause-infinite-loop.js [ Pass Timeout ] crbug.com/1135405 http/tests/devtools/sources/debugger-pause/debugger-pause-infinite-loop.js [ Pass Timeout ]
crbug.com/1135978 [ Linux Release ] fast/dom/css-delete-doc.html [ Pass Timeout ] crbug.com/1135978 [ Linux Release ] fast/dom/css-delete-doc.html [ Pass Timeout ]
crbug.com/1134237 virtual/origin-trials-runtimeflags-disabled/http/tests/origin_trials/webexposed/beforematch-origin-trial-interfaces.html [ Failure ]
<!DOCTYPE html>
<meta charset="utf-8">
<!-- Generate token with the command:
generate_token.py http://127.0.0.1:8000 BeforeMatchEvent --expire-timestamp=2000000000 --version 3
-->
<meta http-equiv="origin-trial" content="A6qG2zhYsapjwU1J8SBwg56JXGIaUKzBXWy2hJ8V1U2fX/ZRPCwdajgTdBT/BFdDTmst9Dl2uFqsxc/3LPqmFgQAAABYeyJvcmlnaW4iOiAiaHR0cDovLzEyNy4wLjAuMTo4MDAwIiwgImZlYXR1cmUiOiAiQmVmb3JlTWF0Y2hFdmVudCIsICJleHBpcnkiOiAyMDAwMDAwMDAwfQ==">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<script>
test(t => {
assert_equals(document.body.onbeforematch, null,
'onbeforematch should be null instead of undefined when the feature is enabled.');
assert_true(CSS.supports('content-visibility', 'hidden-matchable'),
'CSS.supports() should show that hidden-matchable is enabled when the feature is enabled.');
}, 'Tests feature detection for the BeforeMatchEvent origin trial');
</script>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment