-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests to the scroll unification virtual test case
We add all failing tests because of enabling scroll unification into the scroll unification virtual test case, and add them to the test expectation file. Bug: 1047176 Change-Id: I47d1c70d6583d10bd08209934110d43f4cf692ae Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2766362 Reviewed-by: Liviu Tinta <liviutinta@chromium.org> Commit-Queue: Lan Wei <lanwei@chromium.org> Cr-Commit-Position: refs/heads/master@{#867986}
- Loading branch information
Showing
12 changed files
with
225 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
.../web_tests/virtual/scroll-unification-disable-navigator-plugins-empty/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This directory is dedicated for testing the "ScrollUnification" and "DisableNavigatorPluginsEmpty" feature. |
1 change: 1 addition & 0 deletions
1
third_party/blink/web_tests/virtual/scroll-unification-hidpi/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This directory is dedicated for testing the "ScrollUnification" and "hidpi" feature. |
1 change: 1 addition & 0 deletions
1
...party/blink/web_tests/virtual/scroll-unification-layout_ng_block_frag/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This directory is dedicated for testing the "ScrollUnification" and "LayoutNGBlockFragmentation" feature. |
1 change: 1 addition & 0 deletions
1
third_party/blink/web_tests/virtual/scroll-unification-overlay-scrollbar/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This directory is dedicated for testing the "ScrollUnification" and "OverlayScrollbar" feature. |
79 changes: 79 additions & 0 deletions
79
.../virtual/scroll-unification-overlay-scrollbar/plugin-overlay-scrollbar-mouse-capture.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<head> | ||
<script src="../../resources/js-test.js"></script> | ||
<style> | ||
body { | ||
/* Hide the horizontal-scrollbar so that clicking right at the | ||
bottom of the vertical scrollbar will trigger a scroll */ | ||
overflow-x: hidden; | ||
} | ||
#container { | ||
/* The plugin is guaranteed not to be in the margin. */ | ||
margin-left: 10px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="container"></div> | ||
<pre id="console"></pre> | ||
</body> | ||
<script> | ||
description('This tests whether scrolling still works correctly when an ' | ||
+ 'overlay scrollbar is over a plugin. Clicking on the overlay scrollbar ' | ||
+ 'should cause it to activate and capture input.'); | ||
|
||
window.jsTestIsAsync = true; | ||
var startLogging = false; | ||
var eventHistory = []; | ||
|
||
function runTest() { | ||
internals.setScrollbarVisibilityInScrollableArea(document, true); | ||
|
||
// Mouse down on the scrollbar thumb which is over the plugin. | ||
eventSender.mouseMoveTo(window.innerWidth - 1, 50); | ||
eventSender.mouseDown(); | ||
// Drag the thumb down but move off the thumb, the plugin shouldn't | ||
// receive any events because there shouldn't be any mouse capture. | ||
eventSender.mouseMoveTo(window.innerWidth - 20, window.innerHeight - 10); | ||
// A mouse up will be received because when dragging off a | ||
// scrollbar and releasing, it dispatches an event to the last | ||
// element under the mouse. | ||
eventSender.mouseUp(); | ||
|
||
// The scrollbar captures the input and the plugin should not receive | ||
// events. | ||
shouldBe('eventHistory.length', '0'); | ||
requestAnimationFrame(function() { | ||
shouldBeTrue('window.scrollY > 0'); | ||
finishJSTest(); | ||
}); | ||
} | ||
|
||
window.onload = function() { | ||
if (!window.eventSender || !window.internals) { | ||
finishJSTest(); | ||
return; | ||
} | ||
|
||
var plugin = document.createElement('object'); | ||
plugin.type = 'application/x-blink-test-plugin'; | ||
plugin.width = window.innerWidth * 2; | ||
plugin.height = window.innerHeight * 2; | ||
plugin.addEventListener('mousedown', function(e) { | ||
startLogging = true; | ||
eventHistory.push('plugin.mousedown'); | ||
}); | ||
plugin.addEventListener('mouseup', function(e) { | ||
if (startLogging) | ||
eventHistory.push('plugin.mouseup'); | ||
}); | ||
plugin.addEventListener('mousemove', function(e) { | ||
if (startLogging) | ||
eventHistory.push('plugin.mousemove'); | ||
}); | ||
|
||
var d = document.getElementById('container'); | ||
d.appendChild(plugin); | ||
|
||
runTest(); | ||
} | ||
</script> |
1 change: 1 addition & 0 deletions
1
...ty/blink/web_tests/virtual/scroll-unification-percent-based-scrolling/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This directory is dedicated for testing the "ScrollUnification" and "PercentBasedScrolling" feature. |
1 change: 1 addition & 0 deletions
1
...k/web_tests/virtual/scroll-unification-prefer_compositing_to_lcd_text/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This directory is dedicated for testing the "ScrollUnification" and "PreferCompositingToLcdText" feature. |
1 change: 1 addition & 0 deletions
1
...ty/blink/web_tests/virtual/scroll-unification-synchronous_html_parser/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This directory is dedicated for testing the "ScrollUnification" and "ForceSynchronousHTMLParsing" feature. |
1 change: 1 addition & 0 deletions
1
third_party/blink/web_tests/virtual/scroll-unification-unified-autoplay/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This directory is dedicated for testing the "ScrollUnification" and "UnifiedAutoplay" feature. |
1 change: 1 addition & 0 deletions
1
..._party/blink/web_tests/virtual/scroll-unification-wheel-event-regions/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This directory is dedicated for testing the "ScrollUnification" and "WheelEventRegions" feature. |