Bug 1147038 - Update some tests to pass on desktop platforms. r=tn

The test in question sets up an inconsistent state for desktop platforms because
it intends to simulate what the APZ does, but does it only partially. The APZ
code would set a CSS viewport (which the test does) but it doesn't set the
scroll-position-clamping-scroll-port-size which the APZ would always do.
This commit is contained in:
Kartikaya Gupta 2015-04-22 10:16:33 -04:00
Родитель 02fc2e12be
Коммит 57fccccc35
5 изменённых файлов: 19 добавлений и 2 удалений

Просмотреть файл

@ -1,6 +1,7 @@
<!DOCTYPE HTML>
<html class="reftest-wait"
reftest-viewport-w="600" reftest-viewport-h="400"
reftest-scrollport-w="800" reftest-scrollport-h="1000"
reftest-displayport-w="800" reftest-displayport-h="1000"
reftest-no-sync-layers>
<head>

Просмотреть файл

@ -1,6 +1,7 @@
<!DOCTYPE HTML>
<html class="reftest-wait"
reftest-viewport-w="600" reftest-viewport-h="400"
reftest-scrollport-w="800" reftest-scrollport-h="1000"
reftest-displayport-w="800" reftest-displayport-h="1000"
reftest-no-sync-layers>
<head>

Просмотреть файл

@ -1593,8 +1593,8 @@ skip-if(B2G||Mulet) fuzzy-if(d2d,52,1051) fuzzy-if(OSX==1008,129,1068) == 586683
== 589615-1b.html 589615-1-ref.html
== 589672-1.html 589672-1-ref.html
!= 589682-1.html 589682-1-notref.html
skip-if(!asyncPanZoom) == 593243-1.html 593243-1-ref.html # bug 593168
skip-if(!asyncPanZoom) == 593243-2.html 593243-2-ref.html # bug 593168
skip-if(Android) == 593243-1.html 593243-1-ref.html # bug 593168
skip-if(Android) == 593243-2.html 593243-2-ref.html # bug 593168
== 593544-1.html 593544-1-ref.html
random-if(Android) == 594333-1.html 594333-1-ref.html
fuzzy-if(B2G,1,40000) == 594624-1.html 594624-1-ref.html

Просмотреть файл

@ -509,6 +509,14 @@ If either of the "reftest-viewport-w" and "reftest-viewport-h" attributes on
the root element are non-zero, sets the CSS viewport to the given size in
CSS pixels. This does not affect the size of the snapshot that is taken.
Setting Scrollport Size: reftest-scrollport-w/h="<int>"
=======================================================
If either of the "reftest-scrollport-w" and "reftest-scrollport-h" attributes on
the root element are non-zero, sets the scroll-position-clamping scroll-port
size to the given size in CSS pixels. This does not affect the size of the
snapshot that is taken.
Setting Async Scroll Mode: reftest-async-scroll attribute
=========================================================

Просмотреть файл

@ -202,6 +202,13 @@ function setupViewport(contentRootElement) {
windowUtils().setCSSViewport(vw, vh);
}
var sw = attrOrDefault(contentRootElement, "reftest-scrollport-w", 0);
var sh = attrOrDefault(contentRootElement, "reftest-scrollport-h", 0);
if (sw !== 0 || sh !== 0) {
LogInfo("Setting scrollport to <w=" + sw + ", h=" + sh + ">");
windowUtils().setScrollPositionClampingScrollPortSize(sw, sh);
}
// XXX support resolution when needed
// XXX support viewconfig when needed