Commit f7295c5b authored by Eric Willigers's avatar Eric Willigers Committed by Commit Bot

CSS: WPT for scroll-behavior parsing, serialization

scroll-behavior is auto or smooth.
https://drafts.csswg.org/cssom-view/#propdef-scroll-behavior

Change-Id: I3620234e38bb4905176bce61b2ebc8f66537ca7d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1732789Reviewed-by: default avatarRune Lillesveen <futhark@chromium.org>
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#683539}
parent b04bda62
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSSOM View: getComputedStyle().scrollBehavior</title>
<link rel="help" href="https://drafts.csswg.org/cssom-view/#propdef-scroll-behavior">
<meta name="assert" content="scroll-behavior computed value is as specified.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<script>
test_computed_value("scroll-behavior", 'auto');
test_computed_value("scroll-behavior", 'smooth');
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSSOM View: parsing scroll-behavior with invalid values</title>
<link rel="help" href="https://drafts.csswg.org/cssom-view/#propdef-scroll-behavior">
<meta name="assert" content="scroll-behavior supports only the grammar 'auto | smooth'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_invalid_value("scroll-behavior", 'normal');
test_invalid_value("scroll-behavior", 'auto smooth');
test_invalid_value("scroll-behavior", 'auto, smooth');
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSSOM View: parsing scroll-behavior with valid values</title>
<link rel="help" href="https://drafts.csswg.org/cssom-view/#propdef-scroll-behavior">
<meta name="assert" content="scroll-behavior supports the full grammar 'auto | smooth'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_valid_value("scroll-behavior", 'auto');
test_valid_value("scroll-behavior", 'smooth');
</script>
</body>
</html>
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