From 357d280a25a978a2ea0c1b89f6a7c7f385630b98 Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Fri, 23 Jul 2010 16:18:58 +0100 Subject: [PATCH] Merge WebKit at r63859 : Implement layoutTestController.dumpAsText(boolean) in DumpRenderTree. See http://trac.webkit.org/changeset/63730 Change-Id: Iced14a89a2a71557529a7a5e32c9eab04b370742 --- .../android/dumprendertree/CallbackProxy.java | 8 +++- .../dumprendertree/LayoutTestController.java | 48 +++++++++---------- .../dumprendertree/TestShellActivity.java | 7 ++- 3 files changed, 36 insertions(+), 27 deletions(-) diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/CallbackProxy.java b/tests/DumpRenderTree/src/com/android/dumprendertree/CallbackProxy.java index a5870f8dfae56..b62db513c185f 100644 --- a/tests/DumpRenderTree/src/com/android/dumprendertree/CallbackProxy.java +++ b/tests/DumpRenderTree/src/com/android/dumprendertree/CallbackProxy.java @@ -177,7 +177,7 @@ public class CallbackProxy extends Handler implements EventSender, LayoutTestCon break; case LAYOUT_DUMP_TEXT: - mLayoutTestController.dumpAsText(); + mLayoutTestController.dumpAsText(msg.arg1 == 1); break; case LAYOUT_DUMP_CHILD_FRAMES_TEXT: @@ -387,7 +387,11 @@ public class CallbackProxy extends Handler implements EventSender, LayoutTestCon } public void dumpAsText() { - obtainMessage(LAYOUT_DUMP_TEXT).sendToTarget(); + obtainMessage(LAYOUT_DUMP_TEXT, 0).sendToTarget(); + } + + public void dumpAsText(boolean enablePixelTests) { + obtainMessage(LAYOUT_DUMP_TEXT, enablePixelTests ? 1 : 0).sendToTarget(); } public void dumpChildFramesAsText() { diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestController.java b/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestController.java index 83460bdb99630..15288b5ce7250 100644 --- a/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestController.java +++ b/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestController.java @@ -18,30 +18,30 @@ package com.android.dumprendertree; public interface LayoutTestController { - public void dumpAsText(); - public void dumpChildFramesAsText(); - public void waitUntilDone(); - public void notifyDone(); - - // Force a redraw of the page - public void display(); - // Used with pixel dumps of content - public void testRepaint(); - - // If the page title changes, add the information to the output. - public void dumpTitleChanges(); - public void dumpBackForwardList(); - public void dumpChildFrameScrollPositions(); - public void dumpEditingCallbacks(); - - // Show/Hide window for window.onBlur() testing - public void setWindowIsKey(boolean b); - // Mac function, used to disable events going to the window - public void setMainFrameIsFirstResponder(boolean b); - - public void dumpSelectionRect(); - - // invalidate and draw one line at a time of the web view. + public void dumpAsText(boolean enablePixelTests); + public void dumpChildFramesAsText(); + public void waitUntilDone(); + public void notifyDone(); + + // Force a redraw of the page + public void display(); + // Used with pixel dumps of content + public void testRepaint(); + + // If the page title changes, add the information to the output. + public void dumpTitleChanges(); + public void dumpBackForwardList(); + public void dumpChildFrameScrollPositions(); + public void dumpEditingCallbacks(); + + // Show/Hide window for window.onBlur() testing + public void setWindowIsKey(boolean b); + // Mac function, used to disable events going to the window + public void setMainFrameIsFirstResponder(boolean b); + + public void dumpSelectionRect(); + + // invalidate and draw one line at a time of the web view. public void repaintSweepHorizontally(); // History testing functions diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java b/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java index bf66faef98e7e..ef96813c5c871 100644 --- a/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java +++ b/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java @@ -342,7 +342,12 @@ public class TestShellActivity extends Activity implements LayoutTestController // ....................................... // LayoutTestController Functions - public void dumpAsText() { + public void dumpAsText(boolean enablePixelTests) { + // Added after webkit update to r63859. See trac.webkit.org/changeset/63730. + if (enablePixelTests) { + Log.v(LOGTAG, "dumpAsText(enablePixelTests == true) not implemented on Android!"); + } + mDumpDataType = DumpDataType.DUMP_AS_TEXT; mDumpTopFrameAsText = true; if (mWebView != null) {