Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 2 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /css/css-overflow/scroll-axis-lock-none-touch-subframe.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>CSS Overflow: scroll-axis-lock</title>
<link rel="help"
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/dom/events/scrolling/scroll_support.js"></script>
<script src="/service-workers/service-worker/resources/test-helpers.sub.js"></script>
<script src="./support/scroll-axis-lock.js"></script>
<link rel="stylesheet" href="./support/scroll-axis-lock.css">
<body>
<script>
let iframe;
promise_setup(async _ => {
iframe = await with_iframe("./support/scroll-axis-lock-subframe.html");
iframe.className = 'scrollbox';
});
const input_source = 'touch';
for (const dominant_axis of ['X', 'Y']) {
promise_test(async t => {
await check_scroll_axis_lock(t, {iframe, input_source, expects_scroll_axis_lock: false, dominant_axis, delta_dominant_axis_sign: 1, delta_minor_axis_sign: 1});
await check_scroll_axis_lock(t, {iframe, input_source, expects_scroll_axis_lock: false, dominant_axis, delta_dominant_axis_sign: -1, delta_minor_axis_sign: -1});
}, `scroll-axis-lock: none on iframe.contentDocument.scrollingElement allows free diagonal ${input_source} scroll even with steep angle (no railing to ${dominant_axis})`);
}
</script>
</body>