Bug 34310

Summary: LayoutTests/fast/dom/Window/window-resize.html always fails with a rotated display
Product: WebKit Reporter: Kent Tamura <tkent>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: kmccullough
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   

Description Kent Tamura 2010-01-28 22:43:27 PST
LayoutTests/fast/dom/Window/window-resize.html always fails with the following environment.
  Model Identifier: MacPro4.1
  Graphics card: NVIDIA GeForce GT 120
  Display: DELL 2405FPW 1200x1920 (rotated by 90 degree)
  Mac OS X 10.5.8 (9L31a)


window-resize.html checks window.outerWidth==screen.width in some testcases. In my enviroment, window.outerWidth is 1196 and screen.width is 1200.

screenRect() in PlatformScreenMac.mm is the source of screen.width, and screenAvailableRet() in PlatformScreenMac.mm is the source of screen size parameter for DOMWindows::adjustScreenRect(). The former uses [screenForWindow(window) frame] and the latter uses [screenForWindow(window) visibleFarme].  They seem to return different values in my environment.



Test result diff:
--- /tmp/layout-test-results/fast/dom/Window/window-resize-expected.txt	2010-01-29 15:32:05.000000000 +0900
+++ /tmp/layout-test-results/fast/dom/Window/window-resize-actual.txt	2010-01-29 15:32:05.000000000 +0900
@@ -7,7 +7,7 @@
 window.resizeTo Tests
 
 Testing - resizeTo: Too Big
-PASS window.outerWidth is screen.width
+FAIL window.outerWidth should be 1200. Was 1196.
 
 Testing - resizeTo: Too Small
 PASS window.outerWidth is 100
@@ -16,11 +16,11 @@
 PASS window.screenY is screen.availTop
 PASS window.outerHeight is screen.availHeight
 PASS window.screenX is screen.availLeft
-PASS window.outerWidth is screen.width
+FAIL window.outerWidth should be 1200. Was 1196.
 
 Testing - resizeTo: Not Full Screen Out of Bounds
 PASS window.outerHeight + window.screenY - screen.availTop is screen.availHeight
-PASS window.outerWidth + window.screenX - screen.availLeft is screen.width
+FAIL window.outerWidth + window.screenX - screen.availLeft should be 1200. Was 1196.
 
 window.resizeBy Tests
 
@@ -28,7 +28,7 @@
 PASS window.outerWidth is 100
 
 Testing - resizeBy: Too Big
-PASS window.outerWidth is screen.width
+FAIL window.outerWidth should be 1200. Was 1196.
 
 window.moveTo Tests
 
@@ -42,15 +42,15 @@
 
 Testing - moveTo: Top Right
 PASS window.screenY is screen.availTop
-PASS window.outerWidth is screen.width
+FAIL window.outerWidth should be 1200. Was 1196.
 
 Testing - moveTo: Right
 PASS window.screenY is screen.availTop
-PASS window.outerWidth is screen.width
+FAIL window.outerWidth should be 1200. Was 1196.
 
 Testing - moveTo: Bottom Right
 PASS window.outerHeight is screen.availHeight
-PASS window.outerWidth is screen.width
+FAIL window.outerWidth should be 1200. Was 1196.
 
 Testing - moveTo: Bottom
 PASS window.outerHeight is screen.availHeight
@@ -88,15 +88,15 @@
 
 Testing - moveBy: Top Right
 PASS window.screenY is screen.availTop
-PASS window.outerWidth is screen.width
+FAIL window.outerWidth should be 1200. Was 1196.
 
 Testing - moveBy: Right
 PASS window.screenY is screen.availTop
-PASS window.outerWidth is screen.width
+FAIL window.outerWidth should be 1200. Was 1196.
 
 Testing - moveBy: Bottom Right
 PASS window.outerHeight is screen.availHeight
-PASS window.outerWidth is screen.width
+FAIL window.outerWidth should be 1200. Was 1196.
 
 Testing - moveBy: Bottom
 PASS window.outerHeight is screen.availHeight
Comment 1 Kent Tamura 2010-03-30 02:42:11 PDT
Bug#36813 is right. This is caused by not a rotated display, but Dock on the left or right.

*** This bug has been marked as a duplicate of bug 36813 ***