Title: [94779] trunk
Revision
94779
Author
fsam...@chromium.org
Date
2011-09-08 12:20:27 -0700 (Thu, 08 Sep 2011)

Log Message

Fixed Layout Mode should be adjustable from layoutTestController for testing on Chromium platforms
https://bugs.webkit.org/show_bug.cgi?id=67723

Reviewed by Adam Barth.

Tools:

* DumpRenderTree/chromium/EventSender.h:
* DumpRenderTree/chromium/LayoutTestController.cpp:
(LayoutTestController::LayoutTestController):
(LayoutTestController::enableFixedLayoutMode):
(LayoutTestController::setFixedLayoutSize):
* DumpRenderTree/chromium/LayoutTestController.h:

LayoutTests:

* platform/chromium/fast/repaint/fixed-layout-360x240-expected.png: Added.
* platform/chromium/fast/repaint/fixed-layout-360x240-expected.txt: Added.
* platform/chromium/fast/repaint/fixed-layout-360x240.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (94778 => 94779)


--- trunk/LayoutTests/ChangeLog	2011-09-08 19:18:43 UTC (rev 94778)
+++ trunk/LayoutTests/ChangeLog	2011-09-08 19:20:27 UTC (rev 94779)
@@ -1,3 +1,14 @@
+2011-09-08  Fady Samuel  <fsam...@chromium.org>
+
+        Fixed Layout Mode should be adjustable from layoutTestController for testing on Chromium platforms
+        https://bugs.webkit.org/show_bug.cgi?id=67723
+
+        Reviewed by Adam Barth.
+
+        * platform/chromium/fast/repaint/fixed-layout-360x240-expected.png: Added.
+        * platform/chromium/fast/repaint/fixed-layout-360x240-expected.txt: Added.
+        * platform/chromium/fast/repaint/fixed-layout-360x240.html: Added.
+
 2011-04-19  Eric Seidel  <e...@webkit.org>
 
         Reviewed by Ryosuke Niwa.

Added: trunk/LayoutTests/platform/chromium/fast/repaint/fixed-layout-360x240-expected.png (0 => 94779)


--- trunk/LayoutTests/platform/chromium/fast/repaint/fixed-layout-360x240-expected.png	                        (rev 0)
+++ trunk/LayoutTests/platform/chromium/fast/repaint/fixed-layout-360x240-expected.png	2011-09-08 19:20:27 UTC (rev 94779)
@@ -0,0 +1,6 @@
+\x89PNG
+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\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88	,\x80\xD8@^
+\xA9\xF3Ŗ*IEND\xAEB`\x82
\ No newline at end of file

Added: trunk/LayoutTests/platform/chromium/fast/repaint/fixed-layout-360x240-expected.txt (0 => 94779)


--- trunk/LayoutTests/platform/chromium/fast/repaint/fixed-layout-360x240-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/chromium/fast/repaint/fixed-layout-360x240-expected.txt	2011-09-08 19:20:27 UTC (rev 94779)
@@ -0,0 +1,5 @@
+layer at (0,0) size 360x240
+  RenderView at (0,0) size 360x240
+layer at (0,0) size 360x240
+  RenderBlock {HTML} at (0,0) size 360x240
+    RenderBody {BODY} at (8,8) size 344x224 [bgcolor=#008000]

Added: trunk/LayoutTests/platform/chromium/fast/repaint/fixed-layout-360x240.html (0 => 94779)


--- trunk/LayoutTests/platform/chromium/fast/repaint/fixed-layout-360x240.html	                        (rev 0)
+++ trunk/LayoutTests/platform/chromium/fast/repaint/fixed-layout-360x240.html	2011-09-08 19:20:27 UTC (rev 94779)
@@ -0,0 +1,14 @@
+<html>
+<head>
+<script type="text/_javascript_">
+    function layoutTest()
+    {
+        if (window.layoutTestController) {
+            window.layoutTestController.enableFixedLayoutMode(true);
+            window.layoutTestController.setFixedLayoutSize(360, 240);
+        }
+    }
+</script>
+</head>
+  <body bgcolor='green' _onload_='layoutTest();'></body>
+</html>

Modified: trunk/Tools/ChangeLog (94778 => 94779)


--- trunk/Tools/ChangeLog	2011-09-08 19:18:43 UTC (rev 94778)
+++ trunk/Tools/ChangeLog	2011-09-08 19:20:27 UTC (rev 94779)
@@ -1,3 +1,17 @@
+2011-09-08  Fady Samuel  <fsam...@chromium.org>
+
+        Fixed Layout Mode should be adjustable from layoutTestController for testing on Chromium platforms
+        https://bugs.webkit.org/show_bug.cgi?id=67723
+
+        Reviewed by Adam Barth.
+
+        * DumpRenderTree/chromium/EventSender.h:
+        * DumpRenderTree/chromium/LayoutTestController.cpp:
+        (LayoutTestController::LayoutTestController):
+        (LayoutTestController::enableFixedLayoutMode):
+        (LayoutTestController::setFixedLayoutSize):
+        * DumpRenderTree/chromium/LayoutTestController.h:
+
 2011-09-07  Matthew Delaney  <mdela...@apple.com>
 
         Add standalone script that filters the output of build-webkit to be more human-readable

Modified: trunk/Tools/DumpRenderTree/chromium/EventSender.h (94778 => 94779)


--- trunk/Tools/DumpRenderTree/chromium/EventSender.h	2011-09-08 19:18:43 UTC (rev 94778)
+++ trunk/Tools/DumpRenderTree/chromium/EventSender.h	2011-09-08 19:20:27 UTC (rev 94779)
@@ -72,11 +72,13 @@
     void leapForward(const CppArgumentList&, CppVariant*);
     void keyDown(const CppArgumentList&, CppVariant*);
     void dispatchMessage(const CppArgumentList&, CppVariant*);
+    // FIXME: These aren't really events. They should be moved to layout controller.
     void textZoomIn(const CppArgumentList&, CppVariant*);
     void textZoomOut(const CppArgumentList&, CppVariant*);
     void zoomPageIn(const CppArgumentList&, CppVariant*);
     void zoomPageOut(const CppArgumentList&, CppVariant*);
     void scalePageBy(const CppArgumentList&, CppVariant*);
+
     void mouseScrollBy(const CppArgumentList&, CppVariant*);
     void continuousMouseScrollBy(const CppArgumentList&, CppVariant*);
     void scheduleAsynchronousClick(const CppArgumentList&, CppVariant*);

Modified: trunk/Tools/DumpRenderTree/chromium/LayoutTestController.cpp (94778 => 94779)


--- trunk/Tools/DumpRenderTree/chromium/LayoutTestController.cpp	2011-09-08 19:18:43 UTC (rev 94778)
+++ trunk/Tools/DumpRenderTree/chromium/LayoutTestController.cpp	2011-09-08 19:20:27 UTC (rev 94779)
@@ -224,6 +224,8 @@
     bindMethod("observeStorageTrackerNotifications", &LayoutTestController::observeStorageTrackerNotifications);
     bindMethod("syncLocalStorage", &LayoutTestController::syncLocalStorage);
     bindMethod("setShouldStayOnPageAfterHandlingBeforeUnload", &LayoutTestController::setShouldStayOnPageAfterHandlingBeforeUnload);
+    bindMethod("enableFixedLayoutMode", &LayoutTestController::enableFixedLayoutMode);
+    bindMethod("setFixedLayoutSize", &LayoutTestController::setFixedLayoutSize);
     
     // The fallback method is called when an unknown method is invoked.
     bindFallbackMethod(&LayoutTestController::fallbackMethod);
@@ -1857,6 +1859,25 @@
     result->setNull();
 }
 
+void LayoutTestController::enableFixedLayoutMode(const CppArgumentList& arguments, CppVariant* result)
+{
+    if (arguments.size() <  1 || !arguments[0].isBool())
+        return;
+    bool enableFixedLayout = arguments[0].toBoolean();
+    m_shell->webView()->enableFixedLayoutMode(enableFixedLayout);
+    result->setNull();
+}
+
+void LayoutTestController::setFixedLayoutSize(const CppArgumentList& arguments, CppVariant* result)
+{
+    if (arguments.size() <  2 || !arguments[0].isNumber() || !arguments[1].isNumber())
+        return;
+    int width = arguments[0].toInt32();
+    int height = arguments[1].toInt32();
+    m_shell->webView()->setFixedLayoutSize(WebSize(width, height));
+    result->setNull();
+}
+
 void LayoutTestController::setPluginsEnabled(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isBool()) {

Modified: trunk/Tools/DumpRenderTree/chromium/LayoutTestController.h (94778 => 94779)


--- trunk/Tools/DumpRenderTree/chromium/LayoutTestController.h	2011-09-08 19:18:43 UTC (rev 94778)
+++ trunk/Tools/DumpRenderTree/chromium/LayoutTestController.h	2011-09-08 19:20:27 UTC (rev 94779)
@@ -404,6 +404,9 @@
 
     void setShouldStayOnPageAfterHandlingBeforeUnload(const CppArgumentList&, CppVariant*);
 
+    void enableFixedLayoutMode(const CppArgumentList&, CppVariant*);
+    void setFixedLayoutSize(const CppArgumentList&, CppVariant*);
+
 public:
     // The following methods are not exposed to _javascript_.
     void setWorkQueueFrozen(bool frozen) { m_workQueue.setFrozen(frozen); }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to