diff options
Diffstat (limited to 'gfx/layers/apz/test/reftest')
22 files changed, 323 insertions, 0 deletions
diff --git a/gfx/layers/apz/test/reftest/async-scrollbar-1-h-ref.html b/gfx/layers/apz/test/reftest/async-scrollbar-1-h-ref.html new file mode 100644 index 000000000..0e2698b86 --- /dev/null +++ b/gfx/layers/apz/test/reftest/async-scrollbar-1-h-ref.html @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<html class="reftest-wait"><head> +<meta name="viewport" content="width=device-width"> +</head> +<body onload="scrollTo(450,0); document.documentElement.classList.remove('reftest-wait')"> +<div style="width: 9000px; height: 10px; background: white;"></div> +</body> +</html> + diff --git a/gfx/layers/apz/test/reftest/async-scrollbar-1-h-rtl-ref.html b/gfx/layers/apz/test/reftest/async-scrollbar-1-h-rtl-ref.html new file mode 100644 index 000000000..ee2524a16 --- /dev/null +++ b/gfx/layers/apz/test/reftest/async-scrollbar-1-h-rtl-ref.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<html class="reftest-wait"><head> +<meta name="viewport" content="width=device-width"> +<style> html { direction: rtl; } </style> +</head> +<body onload="scrollTo(-450,0); document.documentElement.classList.remove('reftest-wait')"> +<div style="width: 9000px; height: 10px; background: white;"></div> +</body> +</html> + diff --git a/gfx/layers/apz/test/reftest/async-scrollbar-1-h-rtl.html b/gfx/layers/apz/test/reftest/async-scrollbar-1-h-rtl.html new file mode 100644 index 000000000..2f3d94639 --- /dev/null +++ b/gfx/layers/apz/test/reftest/async-scrollbar-1-h-rtl.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<html class="reftest-wait" + reftest-async-scroll + reftest-async-scroll-x="-449" reftest-async-scroll-y="0"><head> +<meta name="viewport" content="width=device-width"> +<style> html { direction: rtl; } </style> +</head> +<!-- Doing scrollTo(-1,0) is to activate the right arrow in the scrollbar + for non-overlay scrollbar environments --> +<body onload="scrollTo(-1,0); document.documentElement.classList.remove('reftest-wait')"> +<div style="width: 9000px; height: 10px; background: white"></div> +</body> +</html> + diff --git a/gfx/layers/apz/test/reftest/async-scrollbar-1-h.html b/gfx/layers/apz/test/reftest/async-scrollbar-1-h.html new file mode 100644 index 000000000..1eca19246 --- /dev/null +++ b/gfx/layers/apz/test/reftest/async-scrollbar-1-h.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html class="reftest-wait" + reftest-async-scroll + reftest-async-scroll-x="449" reftest-async-scroll-y="0"><head> +<meta name="viewport" content="width=device-width"> +</head> +<!-- Doing scrollTo(1,0) is to activate the left arrow in the scrollbar + for non-overlay scrollbar environments --> +<body onload="scrollTo(1,0); document.documentElement.classList.remove('reftest-wait')"> +<div style="width: 9000px; height: 10px; background: white"></div> +</body> +</html> + diff --git a/gfx/layers/apz/test/reftest/async-scrollbar-1-v-ref.html b/gfx/layers/apz/test/reftest/async-scrollbar-1-v-ref.html new file mode 100644 index 000000000..9ac5485bc --- /dev/null +++ b/gfx/layers/apz/test/reftest/async-scrollbar-1-v-ref.html @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<html class="reftest-wait"><head> +<meta name="viewport" content="width=device-width"> +</head> +<body onload="scrollTo(0,10000); document.documentElement.classList.remove('reftest-wait')"> +<div style="width: 10px; height: 20000px; background: white;"></div> +</body> +</html> + diff --git a/gfx/layers/apz/test/reftest/async-scrollbar-1-v-rtl-ref.html b/gfx/layers/apz/test/reftest/async-scrollbar-1-v-rtl-ref.html new file mode 100644 index 000000000..94fb501ba --- /dev/null +++ b/gfx/layers/apz/test/reftest/async-scrollbar-1-v-rtl-ref.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<html class="reftest-wait"><head> +<meta name="viewport" content="width=device-width"> +<style> html { direction: rtl; } </style> +</head> +<body onload="scrollTo(0,10000); document.documentElement.classList.remove('reftest-wait')"> +<div style="width: 10px; height: 20000px; background: white;"></div> +</body> +</html> + diff --git a/gfx/layers/apz/test/reftest/async-scrollbar-1-v-rtl.html b/gfx/layers/apz/test/reftest/async-scrollbar-1-v-rtl.html new file mode 100644 index 000000000..9a2eb8818 --- /dev/null +++ b/gfx/layers/apz/test/reftest/async-scrollbar-1-v-rtl.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<html class="reftest-wait" + reftest-async-scroll + reftest-async-scroll-x="0" reftest-async-scroll-y="9999"><head> +<meta name="viewport" content="width=device-width"> +<style> html { direction: rtl; } </style> +</head> +<!-- Doing scrollTo(0,1) is to activate the up arrow in the scrollbar + for non-overlay scrollbar environments --> +<body onload="scrollTo(0,1); document.documentElement.classList.remove('reftest-wait')"> +<div style="width: 10px; height: 20000px; background: white;"></div> +</body> +</html> + diff --git a/gfx/layers/apz/test/reftest/async-scrollbar-1-v.html b/gfx/layers/apz/test/reftest/async-scrollbar-1-v.html new file mode 100644 index 000000000..56fe23c28 --- /dev/null +++ b/gfx/layers/apz/test/reftest/async-scrollbar-1-v.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html class="reftest-wait" + reftest-async-scroll + reftest-async-scroll-x="0" reftest-async-scroll-y="9999"><head> +<meta name="viewport" content="width=device-width"> +</head> +<!-- Doing scrollTo(0,1) is to activate the up arrow in the scrollbar + for non-overlay scrollbar environments --> +<body onload="scrollTo(0,1); document.documentElement.classList.remove('reftest-wait')"> +<div style="width: 10px; height: 20000px; background: white;"></div> +</body> +</html> + diff --git a/gfx/layers/apz/test/reftest/async-scrollbar-1-vh-ref.html b/gfx/layers/apz/test/reftest/async-scrollbar-1-vh-ref.html new file mode 100644 index 000000000..564697b37 --- /dev/null +++ b/gfx/layers/apz/test/reftest/async-scrollbar-1-vh-ref.html @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<html class="reftest-wait"><head> +<meta name="viewport" content="width=device-width"> +</head> +<body onload="scrollTo(450,8000); document.documentElement.classList.remove('reftest-wait')"> +<div style="width: 9000px; height: 20000px; background: white;"></div> +</body> +</html> + diff --git a/gfx/layers/apz/test/reftest/async-scrollbar-1-vh-rtl-ref.html b/gfx/layers/apz/test/reftest/async-scrollbar-1-vh-rtl-ref.html new file mode 100644 index 000000000..78cb0332c --- /dev/null +++ b/gfx/layers/apz/test/reftest/async-scrollbar-1-vh-rtl-ref.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<html class="reftest-wait"><head> +<meta name="viewport" content="width=device-width"> +<style> html { direction: rtl; } </style> +</head> +<body onload="scrollTo(-450,8000); document.documentElement.classList.remove('reftest-wait')"> +<div style="width: 9000px; height: 20000px; background: white;"></div> +</body> +</html> + diff --git a/gfx/layers/apz/test/reftest/async-scrollbar-1-vh-rtl.html b/gfx/layers/apz/test/reftest/async-scrollbar-1-vh-rtl.html new file mode 100644 index 000000000..397d1cf9b --- /dev/null +++ b/gfx/layers/apz/test/reftest/async-scrollbar-1-vh-rtl.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<html class="reftest-wait" + reftest-async-scroll + reftest-async-scroll-x="-440" reftest-async-scroll-y="7999"><head> +<meta name="viewport" content="width=device-width"> +<style> html { direction: rtl; } </style> +</head> +<!-- Doing scrollTo(-10,1) is to activate the right/up arrows in the scrollbars + for non-overlay scrollbar environments --> +<body onload="scrollTo(-10,1); document.documentElement.classList.remove('reftest-wait')"> +<div style="width: 9000px; height: 20000px; background: white;"></div> +</body> +</html> + diff --git a/gfx/layers/apz/test/reftest/async-scrollbar-1-vh.html b/gfx/layers/apz/test/reftest/async-scrollbar-1-vh.html new file mode 100644 index 000000000..a1d1527dd --- /dev/null +++ b/gfx/layers/apz/test/reftest/async-scrollbar-1-vh.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html class="reftest-wait" + reftest-async-scroll + reftest-async-scroll-x="449" reftest-async-scroll-y="7999"><head> +<meta name="viewport" content="width=device-width"> +</head> +<!-- Doing scrollTo(1,1) is to activate the left/up arrows in the scrollbars + for non-overlay scrollbar environments --> +<body onload="scrollTo(1,1); document.documentElement.classList.remove('reftest-wait')"> +<div style="width: 9000px; height: 20000px; background: white;"></div> +</body> +</html> + diff --git a/gfx/layers/apz/test/reftest/async-scrollbar-zoom-1-ref.html b/gfx/layers/apz/test/reftest/async-scrollbar-zoom-1-ref.html new file mode 100644 index 000000000..5ed970f76 --- /dev/null +++ b/gfx/layers/apz/test/reftest/async-scrollbar-zoom-1-ref.html @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<html class="reftest-wait"><head> +<meta name="viewport" content="width=device-width"> +</head> +<body onload="scrollTo(450,10000); document.documentElement.classList.remove('reftest-wait')"> +<div style="width: 9000px; height: 20000px; background: white;"></div> +</body> +</html> + diff --git a/gfx/layers/apz/test/reftest/async-scrollbar-zoom-1.html b/gfx/layers/apz/test/reftest/async-scrollbar-zoom-1.html new file mode 100644 index 000000000..09be51a79 --- /dev/null +++ b/gfx/layers/apz/test/reftest/async-scrollbar-zoom-1.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<html class="reftest-wait" + reftest-async-scroll + reftest-async-scroll-x="224" reftest-async-scroll-y="4999" + reftest-async-zoom="2.0"><head> +<meta name="viewport" content="width=device-width"> +</head> +<!-- Doing scrollTo(1,1) is to activate the left/up arrows in the scrollbars + for non-overlay scrollbar environments --> +<body onload="scrollTo(1,1); document.documentElement.classList.remove('reftest-wait')"> +<div style="width: 4500px; height: 10000px; background: white;"></div> +</body> +</html> + diff --git a/gfx/layers/apz/test/reftest/async-scrollbar-zoom-2-ref.html b/gfx/layers/apz/test/reftest/async-scrollbar-zoom-2-ref.html new file mode 100644 index 000000000..5ed970f76 --- /dev/null +++ b/gfx/layers/apz/test/reftest/async-scrollbar-zoom-2-ref.html @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<html class="reftest-wait"><head> +<meta name="viewport" content="width=device-width"> +</head> +<body onload="scrollTo(450,10000); document.documentElement.classList.remove('reftest-wait')"> +<div style="width: 9000px; height: 20000px; background: white;"></div> +</body> +</html> + diff --git a/gfx/layers/apz/test/reftest/async-scrollbar-zoom-2.html b/gfx/layers/apz/test/reftest/async-scrollbar-zoom-2.html new file mode 100644 index 000000000..abe822c21 --- /dev/null +++ b/gfx/layers/apz/test/reftest/async-scrollbar-zoom-2.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<html class="reftest-wait" + reftest-async-scroll + reftest-async-scroll-x="899" reftest-async-scroll-y="19999" + reftest-async-zoom="0.5"><head> +<meta name="viewport" content="width=device-width"> +</head> +<!-- Doing scrollTo(1,1) is to activate the left/up arrows in the scrollbars + for non-overlay scrollbar environments --> +<body onload="scrollTo(1,1); document.documentElement.classList.remove('reftest-wait')"> +<div style="width: 18000px; height: 40000px; background: white;"></div> +</body> +</html> + diff --git a/gfx/layers/apz/test/reftest/frame-reconstruction-scroll-clamping-ref.html b/gfx/layers/apz/test/reftest/frame-reconstruction-scroll-clamping-ref.html new file mode 100644 index 000000000..3db9f2969 --- /dev/null +++ b/gfx/layers/apz/test/reftest/frame-reconstruction-scroll-clamping-ref.html @@ -0,0 +1,27 @@ +<html> +<script> + function run() { + document.body.classList.toggle('noscroll'); + document.getElementById('spacer').style.height = '100%'; + // Scroll to the very end, including any fractional pixels + document.body.scrollTop = document.body.scrollTopMax + 1; + } +</script> +<style> + html, body { + margin: 0; + padding: 0; + background-color: green; + } + + .noscroll { + overflow: hidden; + height: 100%; + } +</style> +<body onload="run()"> + <div id="spacer" style="height: 5000px"> + This is the top of the page. + </div> + This is the bottom of the page. +</body> diff --git a/gfx/layers/apz/test/reftest/frame-reconstruction-scroll-clamping.html b/gfx/layers/apz/test/reftest/frame-reconstruction-scroll-clamping.html new file mode 100644 index 000000000..479363f3f --- /dev/null +++ b/gfx/layers/apz/test/reftest/frame-reconstruction-scroll-clamping.html @@ -0,0 +1,53 @@ +<html class="reftest-wait"> +<!-- +For bug 1266833; syncing the scroll offset to APZ properly when the scroll +position is clamped to a smaller value during a frame reconstruction. +--> +<script> + function run() { + document.body.scrollTop = document.body.scrollTopMax; + + // Let the scroll position propagate to APZ before we do the frame + // reconstruction. Ideally we would wait for flushApzRepaints here but + // we don't have access to DOMWindowUtils in a reftest, so we just wait + // 100ms to approximate it. With bug 1266833 fixed, this test should + // never fail regardless of what this timeout value is. + setTimeout(frameReconstruction, 100); + } + + function frameReconstruction() { + document.body.classList.toggle('noscroll'); + document.documentElement.classList.toggle('reconstruct-body'); + document.getElementById('spacer').style.height = '100%'; + document.documentElement.classList.remove('reftest-wait'); + } +</script> +<style> + html, body { + margin: 0; + padding: 0; + background-color: green; + } + + .noscroll { + overflow: hidden; + height: 100%; + } + + /* Toggling this on and off triggers a frame reconstruction on the <body> */ + html.reconstruct-body::before { + top: 0; + content: ''; + display: block; + height: 2px; + position: absolute; + width: 100%; + z-index: 99; + } +</style> +<body onload="setTimeout(run, 0)"> + <div id="spacer" style="height: 5000px"> + This is the top of the page. + </div> + This is the bottom of the page. +</body> diff --git a/gfx/layers/apz/test/reftest/initial-scale-1-ref.html b/gfx/layers/apz/test/reftest/initial-scale-1-ref.html new file mode 100644 index 000000000..dc99712d3 --- /dev/null +++ b/gfx/layers/apz/test/reftest/initial-scale-1-ref.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<html><head> +<meta name="viewport" content="width=device-width"> +</head> +<body> +This tests that an initial-scale of 0 (i.e. garbage) is overridden<br/> +with something a little more sane. +</body> +</html> + diff --git a/gfx/layers/apz/test/reftest/initial-scale-1.html b/gfx/layers/apz/test/reftest/initial-scale-1.html new file mode 100644 index 000000000..45bed0809 --- /dev/null +++ b/gfx/layers/apz/test/reftest/initial-scale-1.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<html><head> +<meta name="viewport" content="initial-scale=0; width=device-width"> +</head> +<body> +This tests that an initial-scale of 0 (i.e. garbage) is overridden<br/> +with something a little more sane. +</body> +</html> + diff --git a/gfx/layers/apz/test/reftest/reftest-stylo.list b/gfx/layers/apz/test/reftest/reftest-stylo.list new file mode 100644 index 000000000..cc2c76827 --- /dev/null +++ b/gfx/layers/apz/test/reftest/reftest-stylo.list @@ -0,0 +1,20 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# The following tests test the async positioning of the scrollbars. +# Basic root-frame scrollbar with async scrolling +skip-if(!asyncPan) fuzzy-if(Android,6,8) == async-scrollbar-1-v.html async-scrollbar-1-v.html +skip-if(!asyncPan) fuzzy-if(Android,6,8) == async-scrollbar-1-h.html async-scrollbar-1-h.html +skip-if(!asyncPan) fuzzy-if(Android,6,8) == async-scrollbar-1-vh.html async-scrollbar-1-vh.html +skip-if(!asyncPan) fuzzy-if(Android,6,8) == async-scrollbar-1-v-rtl.html async-scrollbar-1-v-rtl.html +skip-if(!asyncPan) fuzzy-if(Android,13,8) == async-scrollbar-1-h-rtl.html async-scrollbar-1-h-rtl.html +skip-if(!asyncPan) fuzzy-if(Android,8,10) == async-scrollbar-1-vh-rtl.html async-scrollbar-1-vh-rtl.html + +# Different async zoom levels. Since the scrollthumb gets async-scaled in the +# compositor, the border-radius ends of the scrollthumb are going to be a little +# off, hence the fuzzy-if clauses. +skip-if(!asyncZoom) fuzzy-if(B2G,98,82) == async-scrollbar-zoom-1.html async-scrollbar-zoom-1.html +skip-if(!asyncZoom) fuzzy-if(B2G,94,146) == async-scrollbar-zoom-2.html async-scrollbar-zoom-2.html + +# Meta-viewport tag support +skip-if(!asyncZoom) == initial-scale-1.html initial-scale-1.html + +skip-if(!asyncPan) == frame-reconstruction-scroll-clamping.html frame-reconstruction-scroll-clamping.html diff --git a/gfx/layers/apz/test/reftest/reftest.list b/gfx/layers/apz/test/reftest/reftest.list new file mode 100644 index 000000000..4ab29420c --- /dev/null +++ b/gfx/layers/apz/test/reftest/reftest.list @@ -0,0 +1,19 @@ +# The following tests test the async positioning of the scrollbars. +# Basic root-frame scrollbar with async scrolling +fuzzy-if(Android,1,2) skip-if(!Android) pref(apz.allow_zooming,true) == async-scrollbar-1-v.html async-scrollbar-1-v-ref.html +fuzzy-if(Android,4,5) skip-if(!Android) pref(apz.allow_zooming,true) == async-scrollbar-1-h.html async-scrollbar-1-h-ref.html +fuzzy-if(Android,3,5) skip-if(!Android) pref(apz.allow_zooming,true) == async-scrollbar-1-vh.html async-scrollbar-1-vh-ref.html +fuzzy-if(Android,1,2) skip-if(!Android) pref(apz.allow_zooming,true) == async-scrollbar-1-v-rtl.html async-scrollbar-1-v-rtl-ref.html +fuzzy-if(Android,4,5) skip-if(!Android) pref(apz.allow_zooming,true) == async-scrollbar-1-h-rtl.html async-scrollbar-1-h-rtl-ref.html +fuzzy-if(Android,3,7) skip-if(!Android) pref(apz.allow_zooming,true) == async-scrollbar-1-vh-rtl.html async-scrollbar-1-vh-rtl-ref.html + +# Different async zoom levels. Since the scrollthumb gets async-scaled in the +# compositor, the border-radius ends of the scrollthumb are going to be a little +# off, hence the fuzzy-if clauses. +fuzzy-if(Android,54,18) skip-if(!Android) pref(apz.allow_zooming,true) == async-scrollbar-zoom-1.html async-scrollbar-zoom-1-ref.html +fuzzy-if(Android,45,21) skip-if(!Android) pref(apz.allow_zooming,true) == async-scrollbar-zoom-2.html async-scrollbar-zoom-2-ref.html + +# Meta-viewport tag support +skip-if(!Android) pref(apz.allow_zooming,true) == initial-scale-1.html initial-scale-1-ref.html + +skip-if(!asyncPan) == frame-reconstruction-scroll-clamping.html frame-reconstruction-scroll-clamping-ref.html |