Commit 296051ea authored by Fergal Daly's avatar Fergal Daly Committed by Commit Bot

Fix virtual scroller WPT tests and reenable most of them.

There were multiple problems:

- the tests all passed all the time because displayLocking was
  disabled, so nothing ever got locked (crbug.com/986574)

- the content of the test files was incorrect, they were all executing
  the same test entry from ref-tests.js (looks like the last patchset
  overwrote them all, https://chromium-review.googlesource.com/c/chromium/src/+/1680170/35..36 .

- the scroller takes several frames to full unlock the correct
  elements, so this change adds a 1s delay to give it time.

- the part.html test is actually failing crbug.com/998356 and so
  remains disabled for now.

BUG=986574

Change-Id: I443ad7a1ce1eb6fd3d8c227e4635ceec0ebcd81e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1772951Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Commit-Queue: Fergal Daly <fergal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#691043}
parent e6977912
...@@ -251,7 +251,7 @@ crbug.com/991095 wpt_internal/display-lock/rendersubtree/acquire-clone.html [ Fa ...@@ -251,7 +251,7 @@ crbug.com/991095 wpt_internal/display-lock/rendersubtree/acquire-clone.html [ Fa
crbug.com/996625 inspector-protocol/accessibility/accessibility-getFullAXTree-display-locked.js [ Skip ] crbug.com/996625 inspector-protocol/accessibility/accessibility-getFullAXTree-display-locked.js [ Skip ]
# virtual-scroller failures # virtual-scroller failures
crbug.com/986574 wpt_internal/virtual-scroller/ [ Failure ] crbug.com/998356 wpt_internal/virtual-scroller/part.html [ Failure ]
# Sheriff 2018/05/25 # Sheriff 2018/05/25
crbug.com/846747 http/tests/navigation/navigation-interrupted-by-fragment.html [ Pass Timeout ] crbug.com/846747 http/tests/navigation/navigation-interrupted-by-fragment.html [ Pass Timeout ]
......
...@@ -3,6 +3,6 @@ ...@@ -3,6 +3,6 @@
<style>body { overflow:hidden; }</style> <style>body { overflow:hidden; }</style>
<script type="module"> <script type="module">
import * as refTests from './resources/ref-tests.mjs'; import * as refTests from './resources/ref-tests.mjs';
refTests.withDiv(refTests.testFullScroll500px); refTests.withDiv(refTests.testFull);
</script> </script>
</html> </html>
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
<title>Creates more than a screenful of divs.</title> <title>Creates more than a screenful of divs.</title>
<style>body { overflow:hidden; }</style> <style>body { overflow:hidden; }</style>
<link rel="author" title="Fergal Daly" href="mailto:fergal@chromium.org"> <link rel="author" title="Fergal Daly" href="mailto:fergal@chromium.org">
<link rel="match" href="full-scroll-500px-ref.html"> <link rel="match" href="full-ref.html">
<script type="module"> <script type="module">
import 'std:elements/virtual-scroller'; import 'std:elements/virtual-scroller';
import * as refTests from './resources/ref-tests.mjs'; import * as refTests from './resources/ref-tests.mjs';
refTests.withVirtualScroller(refTests.testFullScroll500px); refTests.withVirtualScroller(refTests.testFull);
</script> </script>
</html> </html>
...@@ -3,6 +3,6 @@ ...@@ -3,6 +3,6 @@
<style>body { overflow:hidden; }</style> <style>body { overflow:hidden; }</style>
<script type="module"> <script type="module">
import * as refTests from './resources/ref-tests.mjs'; import * as refTests from './resources/ref-tests.mjs';
refTests.withDiv(refTests.testFullScroll500px); refTests.withDiv(refTests.testMoveElement);
</script> </script>
</html> </html>
...@@ -3,6 +3,6 @@ ...@@ -3,6 +3,6 @@
<style>body { overflow:hidden; }</style> <style>body { overflow:hidden; }</style>
<script type="module"> <script type="module">
import * as refTests from './resources/ref-tests.mjs'; import * as refTests from './resources/ref-tests.mjs';
refTests.withDiv(refTests.testFullScroll500px); refTests.withDiv(refTests.testMoveElementScrollIntoView);
</script> </script>
</html> </html>
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
</title> </title>
<style>body { overflow:hidden; }</style> <style>body { overflow:hidden; }</style>
<link rel="author" title="Fergal Daly" href="mailto:fergal@chromium.org"> <link rel="author" title="Fergal Daly" href="mailto:fergal@chromium.org">
<link rel="match" href="full-scroll-500px-ref.html"> <link rel="match" href="move-element-scroll-into-view-ref.html">
<script type="module"> <script type="module">
import 'std:elements/virtual-scroller'; import 'std:elements/virtual-scroller';
import * as refTests from './resources/ref-tests.mjs'; import * as refTests from './resources/ref-tests.mjs';
refTests.withVirtualScroller(refTests.testFullScroll500px); refTests.withVirtualScroller(refTests.testMoveElementScrollIntoView);
</script> </script>
</html> </html>
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
<title>Creates more than a screenful of divs and moves the first to the end.</title> <title>Creates more than a screenful of divs and moves the first to the end.</title>
<style>body { overflow:hidden; }</style> <style>body { overflow:hidden; }</style>
<link rel="author" title="Fergal Daly" href="mailto:fergal@chromium.org"> <link rel="author" title="Fergal Daly" href="mailto:fergal@chromium.org">
<link rel="match" href="full-scroll-500px-ref.html"> <link rel="match" href="move-element-ref.html">
<script type="module"> <script type="module">
import 'std:elements/virtual-scroller'; import 'std:elements/virtual-scroller';
import * as refTests from './resources/ref-tests.mjs'; import * as refTests from './resources/ref-tests.mjs';
refTests.withVirtualScroller(refTests.testFullScroll500px); refTests.withVirtualScroller(refTests.testMoveElement);
</script> </script>
</html> </html>
...@@ -3,6 +3,6 @@ ...@@ -3,6 +3,6 @@
<style>body { overflow:hidden; }</style> <style>body { overflow:hidden; }</style>
<script type="module"> <script type="module">
import * as refTests from './resources/ref-tests.mjs'; import * as refTests from './resources/ref-tests.mjs';
refTests.withDiv(refTests.testFullScroll500px); refTests.withDiv(refTests.testPart);
</script> </script>
</html> </html>
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
<title>Creates less than a screenful of divs.</title> <title>Creates less than a screenful of divs.</title>
<style>body { overflow:hidden; }</style> <style>body { overflow:hidden; }</style>
<link rel="author" title="Fergal Daly" href="mailto:fergal@chromium.org"> <link rel="author" title="Fergal Daly" href="mailto:fergal@chromium.org">
<link rel="match" href="full-scroll-500px-ref.html"> <link rel="match" href="part-ref.html">
<script type="module"> <script type="module">
import 'std:elements/virtual-scroller'; import 'std:elements/virtual-scroller';
import * as refTests from './resources/ref-tests.mjs'; import * as refTests from './resources/ref-tests.mjs';
refTests.withVirtualScroller(refTests.testFullScroll500px); refTests.withVirtualScroller(refTests.testPart);
</script> </script>
</html> </html>
...@@ -3,6 +3,6 @@ ...@@ -3,6 +3,6 @@
<style>body { overflow:hidden; }</style> <style>body { overflow:hidden; }</style>
<script type="module"> <script type="module">
import * as refTests from './resources/ref-tests.mjs'; import * as refTests from './resources/ref-tests.mjs';
refTests.withDiv(refTests.testFullScroll500px); refTests.withDiv(refTests.testResize);
</script> </script>
</html> </html>
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
<title>Creates more than a screenful of divs and then resizes the container.</title> <title>Creates more than a screenful of divs and then resizes the container.</title>
<style>body { overflow:hidden; }</style> <style>body { overflow:hidden; }</style>
<link rel="author" title="Fergal Daly" href="mailto:fergal@chromium.org"> <link rel="author" title="Fergal Daly" href="mailto:fergal@chromium.org">
<link rel="match" href="full-scroll-500px-ref.html"> <link rel="match" href="resize-ref.html">
<script type="module"> <script type="module">
import 'std:elements/virtual-scroller'; import 'std:elements/virtual-scroller';
import * as refTests from './resources/ref-tests.mjs'; import * as refTests from './resources/ref-tests.mjs';
refTests.withVirtualScroller(refTests.testFullScroll500px); refTests.withVirtualScroller(refTests.testResize);
</script> </script>
</html> </html>
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
* @package * @package
*/ */
const ONE_SECOND_MS = 1000;
/** /**
* Creates a DIV with id and textContent set to |id|. * Creates a DIV with id and textContent set to |id|.
*/ */
...@@ -44,9 +46,14 @@ export function withElement(name, callback) { ...@@ -44,9 +46,14 @@ export function withElement(name, callback) {
/** /**
* Remove the reftest-wait class from the HTML element. * Remove the reftest-wait class from the HTML element.
*
* This includes a hack to wait 1s to give the virtual-scroller
* elements time to settle.
*/ */
export function stopWaiting() { export function stopWaiting() {
document.documentElement.classList.remove('reftest-wait'); setTimeout(() => {
document.documentElement.classList.remove('reftest-wait');
}, ONE_SECOND_MS);
} }
/** /**
......
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