Fix printing/zoomed-document.html for QT
https://bugs.webkit.org/show_bug.cgi?id=79808
Reviewed by Adam Barth.
Fix zoomed document test case to work on QT port and remove it from skip
list.
* platform/qt/Skipped:
* printing/zoomed-document.html:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@109126 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 8f450b9..a36a83d 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2012-02-28 Emil A Eklund <eae@chromium.org>
+
+ Fix printing/zoomed-document.html for QT
+ https://bugs.webkit.org/show_bug.cgi?id=79808
+
+ Reviewed by Adam Barth.
+
+ Fix zoomed document test case to work on QT port and remove it from skip
+ list.
+
+ * platform/qt/Skipped:
+ * printing/zoomed-document.html:
+
2012-02-28 Alok Priyadarshi <alokp@chromium.org>
Heap-use-after-free in WebCore::RenderLayer::addChild
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index 5ddd2ee..a36aeb4 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -2656,8 +2656,3 @@
# [Qt] transitions/cancel-transition.html fails
# https://bugs.webkit.org/show_bug.cgi?id=79564
transitions/cancel-transition.html
-
-# Printed font-size should not be dependant on zoom level
-# New test introduced in r109073 fails on Qt
-# https://bugs.webkit.org/show_bug.cgi?id=79717
-printing/zoomed-document.html
diff --git a/LayoutTests/printing/zoomed-document.html b/LayoutTests/printing/zoomed-document.html
index 41e71a3..aa64a2f 100644
--- a/LayoutTests/printing/zoomed-document.html
+++ b/LayoutTests/printing/zoomed-document.html
@@ -9,12 +9,22 @@
var msg = 'Document zoom should not apply when printing.';
var pass = true;
-
+
+ // Determine minium page size height where text fits on a single page.
+ var height;
+ for (var i = 10; i < 100; i += 5) {
+ if (layoutTestController.numberOfPages(100, i) == 1) {
+ height = i;
+ break;
+ }
+ }
+
+ // Zoom in and verify that page count does not change.
for (var i = 0; i < 10; i++) {
- var numberOfPages = layoutTestController.numberOfPages(100, 30);
+ var numberOfPages = layoutTestController.numberOfPages(100, height);
if (numberOfPages != 1) {
pass = false;
- msg += 'Got ' + numberOfPages + ' pages, expected 1.\n';
+ msg += 'Got ' + numberOfPages + ' pages, expected 1 page.\n';
}
eventSender.zoomPageIn();
}