mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1010538 - Part 4 - Tests. r=mstange
scroll-behavior-1.html - Viewport Scrolling, expected to be smooth: - DOM Method not specifying scroll-behavior, for <body> tag with 'scroll-behavior: smooth’ scroll-behavior-2.html - Div Scrolling, expected to be smooth: - DOM Method not specifying scroll-behavior, for <div> tag with 'scroll-behavior: smooth’ - DOM Method specifying ‘auto’ scroll-behavior, for <div> tag with ‘scroll-behavior: smooth’ - DOM Method specifying 'smooth’ scroll-behavior, for <div> tag with ‘scroll-behavior: smooth’ - DOM Method specifying ‘smooth’ scroll-behavior, for <div> tag with ‘scroll-behavior: instant’ - DOM Method specifying ‘smooth’ scroll-behavior, for <div> tag with ‘scroll-behavior: auto’ - DOM Method specifying ‘smooth’ scroll-behavior, for <div> tag with no scroll-behavior attribute. scroll-behavior-3.html - Div Scrolling, expected to be instant: - DOM Method not specifying scroll-behavior, for <div> tag with ‘scroll-behavior: instant’ - DOM Method not specifying scroll-behavior, for <div> tag with ‘scroll-behavior: auto’ - DOM Method not specifying scroll-behavior, for <div> tag with no scroll-behavior attribute. - DOM Method specifying ‘instant’ scroll-behavior, for <div> tag with ‘scroll-behavior: smooth’ - DOM Method specifying ‘instant’ scroll-behavior, for <div> tag with ‘scroll-behavior: instant’ - DOM Method specifying ‘instant’ scroll-behavior, for <div> tag with ‘scroll-behavior: auto’ - DOM Method specifying ‘instant’ scroll-behavior, for <div> tag with no scroll-behavior attribute. - DOM Method specifying ‘auto’ scroll-behavior, for <div> tag with ‘scroll-behavior: instant’ - DOM Method specifying ‘auto’ scroll-behavior, for <div> tag with ‘scroll-behavior: auto’ - DOM Method specifying ‘auto’ scroll-behavior, for <div> tag with no scroll-behavior attribute.
This commit is contained in:
parent
66d8fcb0fb
commit
4a9d8a6ee4
@ -9,6 +9,9 @@ random-if(Android&&!browserIsRemote) skip-if(B2G&&browserIsRemote) == iframe-bor
|
||||
random-if(Android) HTTP == image-1.html image-1.html?ref
|
||||
random-if(Android&&!browserIsRemote) HTTP == opacity-mixed-scrolling-1.html opacity-mixed-scrolling-1.html?ref # bug 760269
|
||||
skip-if(B2G) random-if(cocoaWidget) HTTP == opacity-mixed-scrolling-2.html opacity-mixed-scrolling-2.html?ref # see bug 625357
|
||||
skip-if(Android) pref(layout.css.scroll-behavior.enabled,true) pref(layout.css.scroll-behavior.property-enabled,true) == scroll-behavior-1.html scroll-behavior-1.html?ref # see bug 1041833
|
||||
skip-if(Android) pref(layout.css.scroll-behavior.enabled,true) pref(layout.css.scroll-behavior.property-enabled,true) == scroll-behavior-2.html scroll-behavior-2.html?ref # see bug 1041833
|
||||
skip-if(Android) pref(layout.css.scroll-behavior.enabled,true) pref(layout.css.scroll-behavior.property-enabled,true) == scroll-behavior-3.html scroll-behavior-3.html?ref # see bug 1041833
|
||||
skip-if(B2G&&browserIsRemote) HTTP == simple-1.html simple-1.html?ref
|
||||
skip-if(B2G) HTTP == subpixel-1.html#d subpixel-1-ref.html#d
|
||||
fuzzy-if(Android,4,120) HTTP == text-1.html text-1.html?ref
|
||||
|
55
layout/reftests/scrolling/scroll-behavior-1.html
Normal file
55
layout/reftests/scrolling/scroll-behavior-1.html
Normal file
@ -0,0 +1,55 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Testcase for bug 1010538, smooth scrolling expected</title>
|
||||
<style type="text/css">
|
||||
|
||||
html,body {
|
||||
color: black;
|
||||
background-color: white;
|
||||
font-size: 16px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
#a_box {
|
||||
position: relative;
|
||||
left: 10px;
|
||||
top: 10px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background: blue;
|
||||
}
|
||||
|
||||
#another_box {
|
||||
position: relative;
|
||||
left: 2000px;
|
||||
top: 2000px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background: green;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="a_box"></div>
|
||||
<div id="another_box"></div>
|
||||
<script>
|
||||
function doTest() {
|
||||
if (document.location.search != '?ref') {
|
||||
window.scrollTo(500, 500);
|
||||
window.scrollTo(window.scrollX, window.scrollY);
|
||||
}
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
window.scrollTo(0,0, {behavior: "instant"});
|
||||
window.addEventListener("MozReftestInvalidate", doTest, false);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
106
layout/reftests/scrolling/scroll-behavior-2.html
Normal file
106
layout/reftests/scrolling/scroll-behavior-2.html
Normal file
@ -0,0 +1,106 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Testcase for bug 1010538, smooth scrolling expected</title>
|
||||
<style type="text/css">
|
||||
|
||||
html,body {
|
||||
color: black;
|
||||
background-color: white;
|
||||
font-size: 16px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.a_box {
|
||||
position: relative;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background: blue;
|
||||
}
|
||||
|
||||
.another_box {
|
||||
position: relative;
|
||||
left: 2000px;
|
||||
top: 2000px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background: green;
|
||||
}
|
||||
|
||||
.scroll_box {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
#scroll_1, #scroll_2, #scroll_3 {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
#scroll_4 {
|
||||
scroll-behavior: instant;
|
||||
}
|
||||
|
||||
#scroll_5 {
|
||||
scroll-behavior: auto;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="scroll_1" class="scroll_box">
|
||||
<div id="box1a" class="a_box"></div>
|
||||
<div id="box1b" class="another_box"></div>
|
||||
</div>
|
||||
<div id="scroll_2" class="scroll_box">
|
||||
<div id="box2a" class="a_box"></div>
|
||||
<div id="box2b" class="another_box"></div>
|
||||
</div>
|
||||
<div id="scroll_3" class="scroll_box">
|
||||
<div id="box3a" class="a_box"></div>
|
||||
<div id="box3b" class="another_box"></div>
|
||||
</div>
|
||||
<div id="scroll_4" class="scroll_box">
|
||||
<div id="box4a" class="a_box"></div>
|
||||
<div id="box4b" class="another_box"></div>
|
||||
</div>
|
||||
<div id="scroll_5" class="scroll_box">
|
||||
<div id="box5a" class="a_box"></div>
|
||||
<div id="box5b" class="another_box"></div>
|
||||
</div>
|
||||
<div id="scroll_6" class="scroll_box">
|
||||
<div id="box6a" class="a_box"></div>
|
||||
<div id="box6b" class="another_box"></div>
|
||||
</div>
|
||||
<script>
|
||||
function doTest() {
|
||||
if (document.location.search != '?ref') {
|
||||
document.getElementById("box1b").scrollIntoView(false);
|
||||
document.getElementById("box2b").scrollIntoView(false, {behavior: "auto"});
|
||||
document.getElementById("box3b").scrollIntoView(false, {behavior: "smooth"});
|
||||
document.getElementById("box4b").scrollIntoView(false, {behavior: "smooth"});
|
||||
document.getElementById("box5b").scrollIntoView(false, {behavior: "smooth"});
|
||||
document.getElementById("box6b").scrollIntoView(false, {behavior: "smooth"});
|
||||
|
||||
// Interrupt any smooth scrolling
|
||||
for (var i=1; i <= 6; i++) {
|
||||
document.getElementById("scroll_" + i).scrollLeft
|
||||
= document.getElementById("scroll_" + i).scrollLeft;
|
||||
document.getElementById("scroll_" + i).scrollTop
|
||||
= document.getElementById("scroll_" + i).scrollTop;
|
||||
}
|
||||
}
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
for (var i=1; i <= 6; i++) {
|
||||
document.getElementById("box" + i + "a")
|
||||
.scrollIntoView(true, {behavior: "instant"});
|
||||
}
|
||||
window.addEventListener("MozReftestInvalidate", doTest, false);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
140
layout/reftests/scrolling/scroll-behavior-3.html
Normal file
140
layout/reftests/scrolling/scroll-behavior-3.html
Normal file
@ -0,0 +1,140 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Testcase for bug 1010538, instant scrolling expected</title>
|
||||
<style type="text/css">
|
||||
|
||||
html,body {
|
||||
color: black;
|
||||
background-color: white;
|
||||
font-size: 16px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.a_box {
|
||||
position: relative;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background: blue;
|
||||
}
|
||||
|
||||
.another_box {
|
||||
position: relative;
|
||||
left: 2000px;
|
||||
top: 2000px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background: green;
|
||||
}
|
||||
|
||||
.scroll_box {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
#scroll_2, #scroll_6, #scroll_9 {
|
||||
scroll-behavior: auto;
|
||||
}
|
||||
|
||||
#scroll_1, #scroll_5, #scroll_8 {
|
||||
scroll-behavior: instant;
|
||||
}
|
||||
|
||||
#scroll_4 {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="scroll_1" class="scroll_box">
|
||||
<div id="box1a" class="a_box"></div>
|
||||
<div id="box1b" class="another_box"></div>
|
||||
</div>
|
||||
<div id="scroll_2" class="scroll_box">
|
||||
<div id="box2a" class="a_box"></div>
|
||||
<div id="box2b" class="another_box"></div>
|
||||
</div>
|
||||
<div id="scroll_3" class="scroll_box">
|
||||
<div id="box3a" class="a_box"></div>
|
||||
<div id="box3b" class="another_box"></div>
|
||||
</div>
|
||||
<div id="scroll_4" class="scroll_box">
|
||||
<div id="box4a" class="a_box"></div>
|
||||
<div id="box4b" class="another_box"></div>
|
||||
</div>
|
||||
<div id="scroll_5" class="scroll_box">
|
||||
<div id="box5a" class="a_box"></div>
|
||||
<div id="box5b" class="another_box"></div>
|
||||
</div>
|
||||
<div id="scroll_6" class="scroll_box">
|
||||
<div id="box6a" class="a_box"></div>
|
||||
<div id="box6b" class="another_box"></div>
|
||||
</div>
|
||||
<div id="scroll_7" class="scroll_box">
|
||||
<div id="box7a" class="a_box"></div>
|
||||
<div id="box7b" class="another_box"></div>
|
||||
</div>
|
||||
<div id="scroll_8" class="scroll_box">
|
||||
<div id="box8a" class="a_box"></div>
|
||||
<div id="box8b" class="another_box"></div>
|
||||
</div>
|
||||
<div id="scroll_9" class="scroll_box">
|
||||
<div id="box9a" class="a_box"></div>
|
||||
<div id="box9b" class="another_box"></div>
|
||||
</div>
|
||||
<div id="scroll_10" class="scroll_box">
|
||||
<div id="box10a" class="a_box"></div>
|
||||
<div id="box10b" class="another_box"></div>
|
||||
</div>
|
||||
<div id="scroll_11" class="scroll_box">
|
||||
<div id="box11a" class="a_box"></div>
|
||||
<div id="box11b" class="another_box"></div>
|
||||
</div>
|
||||
<script>
|
||||
function doTest() {
|
||||
if (document.location.search != '?ref') {
|
||||
document.getElementById("box1b").scrollIntoView(false);
|
||||
document.getElementById("box2b").scrollIntoView(false);
|
||||
document.getElementById("box3b").scrollIntoView(false);
|
||||
document.getElementById("box4b").scrollIntoView(false, {behavior: "instant"});
|
||||
document.getElementById("box5b").scrollIntoView(false, {behavior: "instant"});
|
||||
document.getElementById("box6b").scrollIntoView(false, {behavior: "instant"});
|
||||
document.getElementById("box7b").scrollIntoView(false, {behavior: "instant"});
|
||||
document.getElementById("box8b").scrollIntoView(false, {behavior: "auto"});
|
||||
document.getElementById("box9b").scrollIntoView(false, {behavior: "auto"});
|
||||
document.getElementById("box10b").scrollIntoView(false, {behavior: "auto"});
|
||||
|
||||
// Scroll_11 is a control, expected to scroll smoothly
|
||||
document.getElementById("box11b").scrollIntoView(false, {behavior: "smooth"});
|
||||
|
||||
// Interrupt any smooth scrolling
|
||||
for (var i=1; i <= 11; i++) {
|
||||
document.getElementById("scroll_" + i).scrollLeft
|
||||
= document.getElementById("scroll_" + i).scrollLeft;
|
||||
document.getElementById("scroll_" + i).scrollTop
|
||||
= document.getElementById("scroll_" + i).scrollTop;
|
||||
}
|
||||
} else {
|
||||
// Scroll all boxes except box 11
|
||||
for (var i=1; i <= 10; i++) {
|
||||
document.getElementById("box" + i + "b").scrollIntoView(false, {behavior: "instant"});
|
||||
}
|
||||
}
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
|
||||
for (var i=1; i <= 11; i++) {
|
||||
document.getElementById("box" + i + "a")
|
||||
.scrollIntoView(true, {behavior: "instant"});
|
||||
}
|
||||
|
||||
window.addEventListener("MozReftestInvalidate", doTest, false);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user