Title: [139344] trunk/LayoutTests
Revision
139344
Author
o...@chromium.org
Date
2013-01-10 11:22:49 -0800 (Thu, 10 Jan 2013)

Log Message

Convert fast/css/positioned-overflow-scroll.html to a check-layout.js test
https://bugs.webkit.org/show_bug.cgi?id=106585

Reviewed by Tony Chang.

This is in preparation for adding more cases to this test.

* fast/css/positioned-overflow-scroll-expected.txt: Added.
* fast/css/positioned-overflow-scroll.html:
* platform/chromium-android/fast/css/positioned-overflow-scroll-expected.png: Removed.
* platform/chromium-android/fast/css/positioned-overflow-scroll-expected.txt: Removed.
* platform/chromium-linux/fast/css/positioned-overflow-scroll-expected.png: Removed.
* platform/chromium-mac-lion/fast/css/positioned-overflow-scroll-expected.png: Removed.
* platform/chromium-mac-snowleopard/fast/css/positioned-overflow-scroll-expected.png: Removed.
* platform/chromium-mac/fast/css/positioned-overflow-scroll-expected.png: Removed.
* platform/chromium-win/fast/css/positioned-overflow-scroll-expected.png: Removed.
* platform/chromium/fast/css/positioned-overflow-scroll-expected.txt: Removed.
* platform/efl/fast/css/positioned-overflow-scroll-expected.png: Removed.
* platform/efl/fast/css/positioned-overflow-scroll-expected.txt: Removed.
* platform/gtk/fast/css/positioned-overflow-scroll-expected.png: Removed.
* platform/gtk/fast/css/positioned-overflow-scroll-expected.txt: Removed.
* platform/mac/fast/css/positioned-overflow-scroll-expected.png: Removed.
* platform/mac/fast/css/positioned-overflow-scroll-expected.txt: Removed.
* platform/qt/fast/css/positioned-overflow-scroll-expected.png: Removed.
* platform/qt/fast/css/positioned-overflow-scroll-expected.txt: Removed.
* resources/check-layout.js:

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (139343 => 139344)


--- trunk/LayoutTests/ChangeLog	2013-01-10 19:22:11 UTC (rev 139343)
+++ trunk/LayoutTests/ChangeLog	2013-01-10 19:22:49 UTC (rev 139344)
@@ -1,3 +1,32 @@
+2013-01-10  Ojan Vafai  <o...@chromium.org>
+
+        Convert fast/css/positioned-overflow-scroll.html to a check-layout.js test
+        https://bugs.webkit.org/show_bug.cgi?id=106585
+
+        Reviewed by Tony Chang.
+
+        This is in preparation for adding more cases to this test.
+
+        * fast/css/positioned-overflow-scroll-expected.txt: Added.
+        * fast/css/positioned-overflow-scroll.html:
+        * platform/chromium-android/fast/css/positioned-overflow-scroll-expected.png: Removed.
+        * platform/chromium-android/fast/css/positioned-overflow-scroll-expected.txt: Removed.
+        * platform/chromium-linux/fast/css/positioned-overflow-scroll-expected.png: Removed.
+        * platform/chromium-mac-lion/fast/css/positioned-overflow-scroll-expected.png: Removed.
+        * platform/chromium-mac-snowleopard/fast/css/positioned-overflow-scroll-expected.png: Removed.
+        * platform/chromium-mac/fast/css/positioned-overflow-scroll-expected.png: Removed.
+        * platform/chromium-win/fast/css/positioned-overflow-scroll-expected.png: Removed.
+        * platform/chromium/fast/css/positioned-overflow-scroll-expected.txt: Removed.
+        * platform/efl/fast/css/positioned-overflow-scroll-expected.png: Removed.
+        * platform/efl/fast/css/positioned-overflow-scroll-expected.txt: Removed.
+        * platform/gtk/fast/css/positioned-overflow-scroll-expected.png: Removed.
+        * platform/gtk/fast/css/positioned-overflow-scroll-expected.txt: Removed.
+        * platform/mac/fast/css/positioned-overflow-scroll-expected.png: Removed.
+        * platform/mac/fast/css/positioned-overflow-scroll-expected.txt: Removed.
+        * platform/qt/fast/css/positioned-overflow-scroll-expected.png: Removed.
+        * platform/qt/fast/css/positioned-overflow-scroll-expected.txt: Removed.
+        * resources/check-layout.js:
+
 2013-01-10  Robert Kroeger  <rjkro...@chromium.org>
 
         Manually revert http://trac.webkit.org/changeset/136012

Added: trunk/LayoutTests/fast/css/positioned-overflow-scroll-expected.txt (0 => 139344)


--- trunk/LayoutTests/fast/css/positioned-overflow-scroll-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/css/positioned-overflow-scroll-expected.txt	2013-01-10 19:22:49 UTC (rev 139344)
@@ -0,0 +1,3 @@
+Test that scrollbar width is added to the intrinsic width of different display types.
+ PASS
+

Modified: trunk/LayoutTests/fast/css/positioned-overflow-scroll.html (139343 => 139344)


--- trunk/LayoutTests/fast/css/positioned-overflow-scroll.html	2013-01-10 19:22:11 UTC (rev 139343)
+++ trunk/LayoutTests/fast/css/positioned-overflow-scroll.html	2013-01-10 19:22:49 UTC (rev 139344)
@@ -1,5 +1,3 @@
-<html>
-<head>
 <style>
 div {
   overflow:scroll;
@@ -13,8 +11,24 @@
   height:100px;
 }
 </style>
-</head>
+
 <body>
-<div style="left:20px"><span class="box"></span></div>
-<div style="display: -webkit-box; left:140px"><span class="box"></span></div>
+Test that scrollbar width is added to the intrinsic width of different display types.
+<div style="top: 100px" data-expected-width=100 data-expected-height=100><span class="box"></span></div>
+<div style="display: -webkit-box; top:100px; left: 150px;" data-expected-width=100 data-expected-height=100><span class="box"></span></div>
 
+<script src=""
+<script>
+var dummy = document.createElement('h1');
+dummy.style.overflow = 'scroll';
+document.body.appendChild(dummy);
+var scrollbarWidth = dummy.offsetWidth - dummy.clientWidth;
+document.body.removeChild(dummy);
+
+Array.prototype.forEach.call(document.querySelectorAll('div'), function(node) {
+    node.setAttribute('data-expected-width', 100 + scrollbarWidth);
+    node.setAttribute('data-expected-height', 100 + scrollbarWidth);
+});
+checkLayout('body');
+</script>
+</body>

Deleted: trunk/LayoutTests/platform/chromium/fast/css/positioned-overflow-scroll-expected.txt (139343 => 139344)


--- trunk/LayoutTests/platform/chromium/fast/css/positioned-overflow-scroll-expected.txt	2013-01-10 19:22:11 UTC (rev 139343)
+++ trunk/LayoutTests/platform/chromium/fast/css/positioned-overflow-scroll-expected.txt	2013-01-10 19:22:49 UTC (rev 139344)
@@ -1,11 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
-layer at (20,8) size 115x115 clip at (20,8) size 100x100
-  RenderBlock (positioned) {DIV} at (20,8) size 115x115
-    RenderBlock {SPAN} at (0,0) size 100x100 [bgcolor=#008000]
-layer at (140,8) size 115x115 clip at (140,8) size 100x100
-  RenderDeprecatedFlexibleBox (positioned) {DIV} at (140,8) size 115x115
-    RenderBlock {SPAN} at (0,0) size 100x100 [bgcolor=#008000]

Deleted: trunk/LayoutTests/platform/chromium-android/fast/css/positioned-overflow-scroll-expected.png


(Binary files differ)

Deleted: trunk/LayoutTests/platform/chromium-android/fast/css/positioned-overflow-scroll-expected.txt (139343 => 139344)


--- trunk/LayoutTests/platform/chromium-android/fast/css/positioned-overflow-scroll-expected.txt	2013-01-10 19:22:11 UTC (rev 139343)
+++ trunk/LayoutTests/platform/chromium-android/fast/css/positioned-overflow-scroll-expected.txt	2013-01-10 19:22:49 UTC (rev 139344)
@@ -1,11 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
-layer at (20,8) size 100x100
-  RenderBlock (positioned) {DIV} at (20,8) size 100x100
-    RenderBlock {SPAN} at (0,0) size 100x100 [bgcolor=#008000]
-layer at (140,8) size 100x100
-  RenderDeprecatedFlexibleBox (positioned) {DIV} at (140,8) size 100x100
-    RenderBlock {SPAN} at (0,0) size 100x100 [bgcolor=#008000]

Deleted: trunk/LayoutTests/platform/chromium-linux/fast/css/positioned-overflow-scroll-expected.png


(Binary files differ)

Deleted: trunk/LayoutTests/platform/chromium-mac/fast/css/positioned-overflow-scroll-expected.png


(Binary files differ)

Deleted: trunk/LayoutTests/platform/chromium-mac-lion/fast/css/positioned-overflow-scroll-expected.png


(Binary files differ)

Deleted: trunk/LayoutTests/platform/chromium-mac-snowleopard/fast/css/positioned-overflow-scroll-expected.png


(Binary files differ)

Deleted: trunk/LayoutTests/platform/chromium-win/fast/css/positioned-overflow-scroll-expected.png


(Binary files differ)

Deleted: trunk/LayoutTests/platform/efl/fast/css/positioned-overflow-scroll-expected.png


(Binary files differ)

Deleted: trunk/LayoutTests/platform/efl/fast/css/positioned-overflow-scroll-expected.txt (139343 => 139344)


--- trunk/LayoutTests/platform/efl/fast/css/positioned-overflow-scroll-expected.txt	2013-01-10 19:22:11 UTC (rev 139343)
+++ trunk/LayoutTests/platform/efl/fast/css/positioned-overflow-scroll-expected.txt	2013-01-10 19:22:49 UTC (rev 139344)
@@ -1,11 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
-layer at (20,8) size 115x115 clip at (20,8) size 100x100
-  RenderBlock (positioned) {DIV} at (20,8) size 115x115
-    RenderBlock {SPAN} at (0,0) size 100x100 [bgcolor=#008000]
-layer at (140,8) size 115x115 clip at (140,8) size 100x100
-  RenderDeprecatedFlexibleBox (positioned) {DIV} at (140,8) size 115x115
-    RenderBlock {SPAN} at (0,0) size 100x100 [bgcolor=#008000]

Deleted: trunk/LayoutTests/platform/gtk/fast/css/positioned-overflow-scroll-expected.png


(Binary files differ)

Deleted: trunk/LayoutTests/platform/gtk/fast/css/positioned-overflow-scroll-expected.txt (139343 => 139344)


--- trunk/LayoutTests/platform/gtk/fast/css/positioned-overflow-scroll-expected.txt	2013-01-10 19:22:11 UTC (rev 139343)
+++ trunk/LayoutTests/platform/gtk/fast/css/positioned-overflow-scroll-expected.txt	2013-01-10 19:22:49 UTC (rev 139344)
@@ -1,11 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
-layer at (20,8) size 115x115 clip at (20,8) size 100x100
-  RenderBlock (positioned) {DIV} at (20,8) size 115x115
-    RenderBlock {SPAN} at (0,0) size 100x100 [bgcolor=#008000]
-layer at (140,8) size 115x115 clip at (140,8) size 100x100
-  RenderDeprecatedFlexibleBox (positioned) {DIV} at (140,8) size 115x115
-    RenderBlock {SPAN} at (0,0) size 100x100 [bgcolor=#008000]

Deleted: trunk/LayoutTests/platform/mac/fast/css/positioned-overflow-scroll-expected.png


(Binary files differ)

Deleted: trunk/LayoutTests/platform/mac/fast/css/positioned-overflow-scroll-expected.txt (139343 => 139344)


--- trunk/LayoutTests/platform/mac/fast/css/positioned-overflow-scroll-expected.txt	2013-01-10 19:22:11 UTC (rev 139343)
+++ trunk/LayoutTests/platform/mac/fast/css/positioned-overflow-scroll-expected.txt	2013-01-10 19:22:49 UTC (rev 139344)
@@ -1,11 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
-layer at (20,8) size 115x115 clip at (20,8) size 100x100
-  RenderBlock (positioned) {DIV} at (20,8) size 115x115
-    RenderBlock {SPAN} at (0,0) size 100x100 [bgcolor=#008000]
-layer at (140,8) size 115x115 clip at (140,8) size 100x100
-  RenderDeprecatedFlexibleBox (positioned) {DIV} at (140,8) size 115x115
-    RenderBlock {SPAN} at (0,0) size 100x100 [bgcolor=#008000]

Deleted: trunk/LayoutTests/platform/qt/fast/css/positioned-overflow-scroll-expected.png


(Binary files differ)

Deleted: trunk/LayoutTests/platform/qt/fast/css/positioned-overflow-scroll-expected.txt (139343 => 139344)


--- trunk/LayoutTests/platform/qt/fast/css/positioned-overflow-scroll-expected.txt	2013-01-10 19:22:11 UTC (rev 139343)
+++ trunk/LayoutTests/platform/qt/fast/css/positioned-overflow-scroll-expected.txt	2013-01-10 19:22:49 UTC (rev 139344)
@@ -1,11 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
-layer at (20,8) size 115x115 clip at (20,8) size 100x100
-  RenderBlock (positioned) {DIV} at (20,8) size 115x115
-    RenderBlock {SPAN} at (0,0) size 100x100 [bgcolor=#008000]
-layer at (140,8) size 115x115 clip at (140,8) size 100x100
-  RenderDeprecatedFlexibleBox (positioned) {DIV} at (140,8) size 115x115
-    RenderBlock {SPAN} at (0,0) size 100x100 [bgcolor=#008000]

Modified: trunk/LayoutTests/resources/check-layout.js (139343 => 139344)


--- trunk/LayoutTests/resources/check-layout.js	2013-01-10 19:22:11 UTC (rev 139343)
+++ trunk/LayoutTests/resources/check-layout.js	2013-01-10 19:22:49 UTC (rev 139344)
@@ -5,6 +5,11 @@
 
 function insertAfter(nodeToAdd, referenceNode)
 {
+    if (referenceNode == document.body) {
+        document.body.appendChild(nodeToAdd);
+        return;
+    }
+
     if (referenceNode.nextSibling)
         referenceNode.parentNode.insertBefore(nodeToAdd, referenceNode.nextSibling);
     else
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to