Bug 1474849 [wpt PR 11907] - Correctly initialize and test SnapContainerData in cc., a=testonly

Automatic update from web-platform-testsCorrectly initialize and test SnapContainerData in cc.

This patch initializes the rect_ field in SnapContainerData in copy
constructor and move constructor. Fixing a snapping issue in the
composited pages.

We also adds external/wpt/css/css-scroll-snap/ to the virtual/threaded
test suite so that they are tested with the composited cases.

snap-at-user-scroll-end-manual-automation.js calls
mouseClickInTarget() of pointerevent_common_input.js. That method
invokes programmatic scrolls. The test was written before programmatic
scroll snapping was implemented so it worked at that time. However,
with programmatic scroll snapping implemented, it will always snap
in mouseClickIntarget() and cannot test whether the user scroll snaps.
This patch adds a parameter shouldScrollToTarget to mouseClickInTarget
to avoid invoking programmatic scrolls in the test.

This patch also checks nullptr for layout_box in
ScrollManager::SnapAtGestureScrollEnd() to fix a crash.

Bug: 862406, 862571
Cq-Include-Trybots: luci.chromium.try :android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I6a53818cf74421a4100ad6f908158abf302a5b8e
Reviewed-on: https://chromium-review.googlesource.com/1132386
Commit-Queue: Sandra Sun <sunyunjia@chromium.org>
Reviewed-by: Majid Valipour <majidvp@chromium.org>
Reviewed-by: Robert Flack <flackr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574781}

--

wpt-commits: ffcd0bede8fa1e7da8c8216655193584795dcca7
wpt-pr: 11907
This commit is contained in:
Sandra Sun 2018-07-23 10:38:47 +00:00 committed by moz-wptsync-bot
parent 7eec6de1fc
commit 312b7c64ef
2 changed files with 4 additions and 3 deletions

View File

@ -528267,7 +528267,7 @@
"testharness"
],
"css/css-scroll-snap/snap-at-user-scroll-end-manual.html": [
"51f08f58135901b332ff43d15fbdc8d0a22f962c",
"4ab47c6043d258fa613325f767f5ec8004031a9e",
"manual"
],
"css/css-scroll-snap/snap-inline-block.html": [

View File

@ -45,6 +45,7 @@ body {
</div>
<script>
var snap_test = async_test('Tests that window should snap at user scroll end.');
var body = document.body;
var button = document.getElementById("btn");
var target = document.getElementById("target");
@ -80,7 +81,7 @@ button.onclick = function() {
// To make the test result visible.
var content = document.getElementById("content");
body.removeChild(content);
done();
snap_test.done();
}
</script>
</script>