Merge from Chromium at DEPS revision r207203

This commit was generated by merge_to_master.py.

Change-Id: Ia8a6c2a997232c94108d8937f8c2556f42be1c37
diff --git a/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp b/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp
index b1e9c08..ccc2cb6 100644
--- a/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp
+++ b/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp
@@ -106,8 +106,8 @@
                     ],
                     'dependencies': [
                         '<(DEPTH)/base/base.gyp:base',
-                        '<(DEPTH)/build/temp_gyp/googleurl.gyp:googleurl',
                         '<(DEPTH)/skia/skia.gyp:skia',
+                        '<(DEPTH)/url/url.gyp:url_lib',
                         '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
                     ],
                     'direct_dependent_settings': {
@@ -116,7 +116,7 @@
                         ],
                     },
                     'export_dependent_settings': [
-                        '<(DEPTH)/build/temp_gyp/googleurl.gyp:googleurl',
+                        '<(DEPTH)/url/url.gyp:url_lib',
                         '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
                     ],
                     'msvs_settings': {
@@ -150,6 +150,46 @@
             'msvs_disabled_warnings': [ 4267, ],
         },
         {
+            # FIXME: This is only used by webkit_unit_tests now, move it to WebKitUnitTests.gyp.
+            'target_name': 'DumpRenderTree_resources',
+            'type': 'none',
+            'dependencies': [
+                '<(DEPTH)/net/net.gyp:net_resources',
+                '<(DEPTH)/ui/ui.gyp:ui_resources',
+                '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_resources',
+                '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_strings',
+            ],
+            'actions': [{
+                'action_name': 'repack_local',
+                'variables': {
+                    'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py',
+                    'pak_inputs': [
+                        '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
+                        '<(SHARED_INTERMEDIATE_DIR)/ui/gfx/gfx_resources.pak',
+                        '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak',
+                        '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.pak',
+                        '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak',
+                ]},
+                'inputs': [
+                    '<(repack_path)',
+                    '<@(pak_inputs)',
+                ],
+                'outputs': [
+                    '<(PRODUCT_DIR)/DumpRenderTree.pak',
+                ],
+                'action': ['python', '<(repack_path)', '<@(_outputs)', '<@(pak_inputs)'],
+            }],
+            'conditions': [
+                ['OS=="mac"', {
+                    'all_dependent_settings': {
+                        'mac_bundle_resources': [
+                            '<(PRODUCT_DIR)/DumpRenderTree.pak',
+                        ],
+                    },
+                }],
+            ]
+        },
+        {
             'target_name': 'TestRunner_resources',
             'type': 'none',
             'dependencies': [
@@ -227,176 +267,6 @@
             ],
         },
         {
-            'target_name': 'DumpRenderTree',
-            'type': 'executable',
-            'mac_bundle': 1,
-            'dependencies': [
-                'TestRunner',
-                'DumpRenderTree_resources',
-                '../../../public/blink.gyp:blink',
-                '<(source_dir)/devtools/devtools.gyp:devtools_frontend_resources',
-                '<(source_dir)/wtf/wtf.gyp:wtf',
-                '<(DEPTH)/base/base.gyp:test_support_base',
-                '<(DEPTH)/build/temp_gyp/googleurl.gyp:googleurl',
-                '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
-                '<(DEPTH)/third_party/mesa/mesa.gyp:osmesa',
-                '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
-                '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_support',
-            ],
-            'include_dirs': [
-                '<(DEPTH)',
-                '<(source_dir)/WebKit/chromium/public',
-                '<(tools_dir)/DumpRenderTree',
-            ],
-            'defines': [
-                # Technically not a unit test but require functions available only to
-                # unit tests.
-                'UNIT_TEST',
-            ],
-            'sources': [
-                '<@(drt_files)',
-            ],
-            'conditions': [
-                ['OS=="mac" or OS=="win" or toolkit_uses_gtk==1', {
-                    # These platforms have their own implementations of
-                    # checkLayoutTestSystemDependencies() and openStartupDialog().
-                    'sources/': [
-                        ['exclude', 'TestShellStub\\.cpp$'],
-                    ],
-                }],
-                ['OS=="win"', {
-                    'dependencies': [
-                        '<(DEPTH)/third_party/angle/src/build_angle.gyp:libEGL',
-                        '<(DEPTH)/third_party/angle/src/build_angle.gyp:libGLESv2',
-                    ],
-                    'resource_include_dirs': ['<(SHARED_INTERMEDIATE_DIR)/webkit'],
-                    'sources': [
-                        # FIXME: We should just use the resources in the .pak file.
-                        '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.rc',
-                        '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.rc',
-                        '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.rc',
-                        '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.rc',
-                    ],
-                    'configurations': {
-                        'Debug_Base': {
-                            'msvs_settings': {
-                                'VCLinkerTool': {
-                                    'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
-                                },
-                            },
-                        },
-                    },
-                },{ # OS!="win"
-                    'sources/': [
-                        ['exclude', 'Win\\.cpp$'],
-                    ],
-                }],
-                ['OS=="mac"', {
-                    'dependencies': [
-                        '<(source_dir)/WebKit/chromium/WebKit.gyp:copy_mesa',
-                    ],
-                },{ # OS!="mac"
-                    'sources/': [
-                        # .mm is already excluded by common.gypi
-                        ['exclude', 'Mac\\.cpp$'],
-                    ],
-                }],
-                ['os_posix!=1 or OS=="mac"', {
-                    'sources/': [
-                        ['exclude', 'Posix\\.cpp$'],
-                    ],
-                }],
-                ['use_x11 == 1', {
-                    'dependencies': [
-                        '<(DEPTH)/build/linux/system.gyp:fontconfig',
-                    ],
-                    'variables': {
-                        # FIXME: Enable warnings on other platforms.
-                        'chromium_code': 1,
-                    },
-                    'conditions': [
-                        ['linux_use_tcmalloc == 1', {
-                            'dependencies': [
-                                '<(DEPTH)/base/allocator/allocator.gyp:allocator',
-                            ],
-                        }],
-                    ],
-                },{ # use_x11 != 1
-                    'sources/': [
-                        ['exclude', 'X11\\.cpp$'],
-                    ]
-                }],
-                ['toolkit_uses_gtk == 1', {
-                    'defines': [
-                        'WTF_USE_GTK=1',
-                    ],
-                    'dependencies': [
-                        '<(DEPTH)/build/linux/system.gyp:gtk',
-                    ],
-                    'include_dirs': [
-                        '<(source_dir)/WebKit/chromium/public/gtk',
-                    ],
-                }],
-                ['OS=="android"', {
-                    'type': 'shared_library',
-                    'dependencies': [
-                        '<(DEPTH)/base/base.gyp:test_support_base',
-                        '<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
-                        '<(DEPTH)/tools/android/forwarder/forwarder.gyp:forwarder',
-                        '<(DEPTH)/tools/android/md5sum/md5sum.gyp:md5sum',
-                    ],
-                }, { # OS!="android"
-                    'sources/': [
-                        ['exclude', 'Android\\.cpp$'],
-                    ],
-                }],
-                ['use_custom_freetype==1', {
-                   'dependencies': [
-                       '<(DEPTH)/third_party/freetype2/freetype2.gyp:freetype2',
-                   ],
-                }],
-            ],
-        },
-        {
-            'target_name': 'DumpRenderTree_resources',
-            'type': 'none',
-            'dependencies': [
-                '<(DEPTH)/net/net.gyp:net_resources',
-                '<(DEPTH)/ui/ui.gyp:ui_resources',
-                '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_resources',
-                '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_strings',
-            ],
-            'actions': [{
-                'action_name': 'repack_local',
-                'variables': {
-                    'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py',
-                    'pak_inputs': [
-                        '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
-                        '<(SHARED_INTERMEDIATE_DIR)/ui/gfx/gfx_resources.pak',
-                        '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak',
-                        '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.pak',
-                        '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak',
-                ]},
-                'inputs': [
-                    '<(repack_path)',
-                    '<@(pak_inputs)',
-                ],
-                'outputs': [
-                    '<(PRODUCT_DIR)/DumpRenderTree.pak',
-                ],
-                'action': ['python', '<(repack_path)', '<@(_outputs)', '<@(pak_inputs)'],
-            }],
-            'conditions': [
-                ['OS=="mac"', {
-                    'all_dependent_settings': {
-                        'mac_bundle_resources': [
-                            '<(PRODUCT_DIR)/DumpRenderTree.pak',
-                        ],
-                    },
-                }],
-            ]
-        },
-        {
             'target_name': 'TestNetscapePlugIn',
             'type': 'loadable_module',
             'sources': [ '<@(test_plugin_files)' ],
@@ -501,24 +371,6 @@
                 'cflags_cc': ['-Wno-c++0x-compat'],
             },
         }],
-        ['OS=="android"', {
-            # Wrap libDumpRenderTree.so into an android apk for execution.
-            'targets': [{
-                'target_name': 'DumpRenderTree_apk',
-                'type': 'none',
-                'dependencies': [
-                    '<(DEPTH)/base/base.gyp:base_java',
-                    '<(DEPTH)/media/media.gyp:media_java',
-                    '<(DEPTH)/net/net.gyp:net_java',
-                    'DumpRenderTree',
-                ],
-                'variables': {
-                    'test_suite_name': 'DumpRenderTree',
-                    'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)DumpRenderTree<(SHARED_LIB_SUFFIX)',
-                },
-                'includes': [ '../../../../../build/apk_test.gypi' ],
-            }],
-        }],
         ['clang==1', {
             'target_defaults': {
                 # FIXME: Add -Wglobal-constructors after fixing existing bugs.
diff --git a/Tools/DumpRenderTree/DumpRenderTree.gypi b/Tools/DumpRenderTree/DumpRenderTree.gypi
index f22c858..ec7292c 100644
--- a/Tools/DumpRenderTree/DumpRenderTree.gypi
+++ b/Tools/DumpRenderTree/DumpRenderTree.gypi
@@ -1,34 +1,5 @@
 {
     'variables': {
-        'drt_files': [
-            'DumpRenderTree.h',
-            'DumpRenderTreeCommon.cpp',
-            'chromium/DRTDevToolsAgent.cpp',
-            'chromium/DRTDevToolsAgent.h',
-            'chromium/DRTDevToolsClient.cpp',
-            'chromium/DRTDevToolsClient.h',
-            'chromium/DumpRenderTree.cpp',
-            'chromium/MockPlatform.cpp',
-            'chromium/MockPlatform.h',
-            'chromium/MockWebPrerenderingSupport.cpp',
-            'chromium/MockWebPrerenderingSupport.h',
-            'chromium/Task.h',
-            'chromium/Task.cpp',
-            'chromium/TestEventPrinter.h',
-            'chromium/TestEventPrinter.cpp',
-            'chromium/TestNavigationController.cpp',
-            'chromium/TestNavigationController.h',
-            'chromium/TestShell.cpp',
-            'chromium/TestShell.h',
-            'chromium/TestShellAndroid.cpp',
-            'chromium/TestShellMac.mm',
-            'chromium/TestShellPosix.cpp',
-            'chromium/TestShellStub.cpp',
-            'chromium/TestShellWin.cpp',
-            'chromium/TestShellX11.cpp',
-            'chromium/WebViewHost.cpp',
-            'chromium/WebViewHost.h',
-        ],
         'test_runner_files': [
             'chromium/TestRunner/public/WebTestDelegate.h',
             'chromium/TestRunner/public/WebPreferences.h',
@@ -71,6 +42,8 @@
             'chromium/TestRunner/src/MockWebSpeechInputController.h',
             'chromium/TestRunner/src/MockWebSpeechRecognizer.cpp',
             'chromium/TestRunner/src/MockWebSpeechRecognizer.h',
+            'chromium/TestRunner/src/MockWebValidationMessageClient.cpp',
+            'chromium/TestRunner/src/MockWebValidationMessageClient.h',
             'chromium/TestRunner/src/NotificationPresenter.h',
             'chromium/TestRunner/src/NotificationPresenter.cpp',
             'chromium/TestRunner/src/SpellCheckClient.cpp',
diff --git a/Tools/DumpRenderTree/DumpRenderTree.h b/Tools/DumpRenderTree/DumpRenderTree.h
deleted file mode 100644
index 8cc13ca..0000000
--- a/Tools/DumpRenderTree/DumpRenderTree.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer. 
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution. 
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef DumpRenderTree_h
-#define DumpRenderTree_h
-
-// FIXME: Remove this when all platforms are using config.h
-#ifndef Config_H
-#include <wtf/Platform.h>
-#endif
-
-#include <string>
-#include <wtf/RefPtr.h>
-
-#if !OS(OPENBSD)
-std::wstring urlSuitableForTestResult(const std::wstring& url);
-#endif
-
-class TestRunner;
-
-extern volatile bool done;
-
-// FIXME: This is a bad abstraction.  We should insted pass this to other controller objects which need access to it.
-extern RefPtr<TestRunner> gTestRunner;
-
-void dump();
-void displayWebView();
-
-struct TestCommand {
-    TestCommand() : shouldDumpPixels(false), timeout(30000) { }
-
-    std::string pathOrURL;
-    bool shouldDumpPixels;
-    std::string expectedPixelHash;
-    int timeout; // in ms
-};
-
-TestCommand parseInputLine(const std::string&);
-
-#endif // DumpRenderTree_h
diff --git a/Tools/DumpRenderTree/DumpRenderTreeCommon.cpp b/Tools/DumpRenderTree/DumpRenderTreeCommon.cpp
deleted file mode 100644
index 3cb97eb..0000000
--- a/Tools/DumpRenderTree/DumpRenderTreeCommon.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-#include "config.h"
-#include "DumpRenderTree.h"
-
-#include <algorithm>
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string>
-
-class CommandTokenizer {
-public:
-    explicit CommandTokenizer(const std::string& input)
-        : m_input(input)
-        , m_posNextSeparator(0)
-    {
-        pump();
-    }
-
-    bool hasNext() const;
-    std::string next();
-
-private:
-    void pump();
-    static const char kSeparator = '\'';
-    const std::string& m_input;
-    std::string m_next;
-    size_t m_posNextSeparator;
-};
-
-void CommandTokenizer::pump()
-{
-    if (m_posNextSeparator == std::string::npos || m_posNextSeparator == m_input.size()) {
-        m_next = std::string();
-        return;
-    }
-    size_t start = m_posNextSeparator ? m_posNextSeparator + 1 : 0;
-    m_posNextSeparator = m_input.find(kSeparator, start);
-    size_t size = m_posNextSeparator == std::string::npos ? std::string::npos : m_posNextSeparator - start;
-    m_next = std::string(m_input, start, size);
-}
-
-std::string CommandTokenizer::next()
-{
-    ASSERT(hasNext());
-
-    std::string oldNext = m_next;
-    pump();
-    return oldNext;
-}
-
-bool CommandTokenizer::hasNext() const
-{
-    return !m_next.empty();
-}
-
-NO_RETURN static void die(const std::string& inputLine)
-{
-    fprintf(stderr, "Unexpected input line: %s\n", inputLine.c_str());
-    exit(1);
-}
-
-TestCommand parseInputLine(const std::string& inputLine)
-{
-    TestCommand result;
-    CommandTokenizer tokenizer(inputLine);
-    if (!tokenizer.hasNext())
-        die(inputLine);
-
-    std::string arg = tokenizer.next();
-    result.pathOrURL = arg;
-    while (tokenizer.hasNext()) {
-        arg = tokenizer.next();
-        if (arg == std::string("--timeout")) {
-            std::string timeoutToken = tokenizer.next();
-            result.timeout = atoi(timeoutToken.c_str());
-        } else if (arg == std::string("-p") || arg == std::string("--pixel-test")) {
-            result.shouldDumpPixels = true;
-            if (tokenizer.hasNext())
-                result.expectedPixelHash = tokenizer.next();
-        } else
-            die(inputLine);
-    }
-
-    return result;
-}
diff --git a/Tools/DumpRenderTree/chromium/DEPS b/Tools/DumpRenderTree/chromium/DEPS
index 4cf2544..36eb5dc 100644
--- a/Tools/DumpRenderTree/chromium/DEPS
+++ b/Tools/DumpRenderTree/chromium/DEPS
@@ -1,3 +1,4 @@
 include_rules = [
     "+public/platform",
+    "+public/web",
 ]
diff --git a/Tools/DumpRenderTree/chromium/DRTDevToolsAgent.cpp b/Tools/DumpRenderTree/chromium/DRTDevToolsAgent.cpp
deleted file mode 100644
index 0d1ac7e..0000000
--- a/Tools/DumpRenderTree/chromium/DRTDevToolsAgent.cpp
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "DRTDevToolsAgent.h"
-
-#include "DRTDevToolsClient.h"
-
-#include "Task.h"
-#include "WebDevToolsAgent.h"
-#include "WebView.h"
-#include "webkit/support/webkit_support.h"
-#include "public/platform/WebCString.h"
-
-using namespace WebKit;
-using namespace WebTestRunner;
-
-DRTDevToolsAgent::DRTDevToolsAgent()
-    : m_drtDevToolsClient(0)
-    , m_webView(0)
-{
-    static int devToolsAgentCounter = 0;
-
-    m_routingID = ++devToolsAgentCounter;
-}
-
-void DRTDevToolsAgent::reset()
-{
-    m_taskList.revokeAll();
-}
-
-void DRTDevToolsAgent::setWebView(WebView* webView)
-{
-    m_webView = webView;
-}
-
-void DRTDevToolsAgent::sendMessageToInspectorFrontend(const WebString& data)
-{
-    if (m_drtDevToolsClient)
-         m_drtDevToolsClient->asyncCall(data);
-}
-
-void DRTDevToolsAgent::runtimePropertyChanged(const WebString& name, const WebString& value)
-{
-    // FIXME: Implement.
-}
-
-WebDevToolsAgentClient::WebKitClientMessageLoop* DRTDevToolsAgent::createClientMessageLoop()
-{
-    return webkit_support::CreateDevToolsMessageLoop();
-}
-
-void DRTDevToolsAgent::asyncCall(const WebString& args)
-{
-    postTask(new AsyncCallTask(this, args));
-}
-
-void DRTDevToolsAgent::call(const WebString& args)
-{
-    WebDevToolsAgent* agent = webDevToolsAgent();
-    if (agent)
-        agent->dispatchOnInspectorBackend(args);
-}
-
-WebDevToolsAgent* DRTDevToolsAgent::webDevToolsAgent()
-{
-    if (!m_webView)
-        return 0;
-    return m_webView->devToolsAgent();
-}
-
-void DRTDevToolsAgent::attach(DRTDevToolsClient* client)
-{
-    ASSERT(!m_drtDevToolsClient);
-    m_drtDevToolsClient = client;
-    WebDevToolsAgent* agent = webDevToolsAgent();
-    if (agent)
-        agent->attach();
-}
-
-void DRTDevToolsAgent::detach()
-{
-    ASSERT(m_drtDevToolsClient);
-    WebDevToolsAgent* agent = webDevToolsAgent();
-    if (agent)
-        agent->detach();
-    m_drtDevToolsClient = 0;
-}
-
-bool DRTDevToolsAgent::evaluateInWebInspector(long callID, const std::string& script)
-{
-    WebDevToolsAgent* agent = webDevToolsAgent();
-    if (!agent)
-        return false;
-    agent->evaluateInWebInspector(callID, WebString::fromUTF8(script));
-    return true;
-}
diff --git a/Tools/DumpRenderTree/chromium/DRTDevToolsAgent.h b/Tools/DumpRenderTree/chromium/DRTDevToolsAgent.h
deleted file mode 100644
index b97c29d..0000000
--- a/Tools/DumpRenderTree/chromium/DRTDevToolsAgent.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef DRTDevToolsAgent_h
-#define DRTDevToolsAgent_h
-
-#include "WebDevToolsAgentClient.h"
-#include "WebTask.h"
-#include "public/platform/WebString.h"
-#include <wtf/HashMap.h>
-#include <wtf/Noncopyable.h>
-
-namespace WebKit {
-
-class WebCString;
-class WebDevToolsAgent;
-class WebView;
-struct WebDevToolsMessageData;
-
-} // namespace WebKit
-
-class DRTDevToolsClient;
-
-class DRTDevToolsAgent : public WebKit::WebDevToolsAgentClient {
-    WTF_MAKE_NONCOPYABLE(DRTDevToolsAgent);
-public:
-    DRTDevToolsAgent();
-    virtual ~DRTDevToolsAgent() { }
-    void reset();
-
-    void setWebView(WebKit::WebView*);
-
-    // WebDevToolsAgentClient implementation.
-    virtual void sendMessageToInspectorFrontend(const WebKit::WebString&);
-    virtual int hostIdentifier() { return m_routingID; }
-    virtual void runtimePropertyChanged(const WebKit::WebString& name, const WebKit::WebString& value);
-    virtual WebKitClientMessageLoop* createClientMessageLoop();
-
-    void asyncCall(const WebKit::WebString& args);
-
-    void attach(DRTDevToolsClient*);
-    void detach();
-
-    bool evaluateInWebInspector(long callID, const std::string& script);
-    WebTestRunner::WebTaskList* taskList() { return &m_taskList; }
-
-private:
-    void call(const WebKit::WebString& args);
-    WebKit::WebDevToolsAgent* webDevToolsAgent();
-
-    class AsyncCallTask: public WebTestRunner::WebMethodTask<DRTDevToolsAgent> {
-    public:
-        AsyncCallTask(DRTDevToolsAgent* object, const WebKit::WebString& args)
-            : WebTestRunner::WebMethodTask<DRTDevToolsAgent>(object), m_args(args) { }
-        virtual void runIfValid() { m_object->call(m_args); }
-
-    private:
-        WebKit::WebString m_args;
-    };
-
-    WebTestRunner::WebTaskList m_taskList;
-    DRTDevToolsClient* m_drtDevToolsClient;
-    int m_routingID;
-    WebKit::WebView* m_webView;
-};
-
-#endif // DRTDevToolsAgent_h
diff --git a/Tools/DumpRenderTree/chromium/DRTDevToolsClient.cpp b/Tools/DumpRenderTree/chromium/DRTDevToolsClient.cpp
deleted file mode 100644
index f458afe..0000000
--- a/Tools/DumpRenderTree/chromium/DRTDevToolsClient.cpp
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "DRTDevToolsClient.h"
-
-#include "DRTDevToolsAgent.h"
-#include "Task.h"
-#include "WebDevToolsAgent.h"
-#include "WebDevToolsFrontend.h"
-#include "WebFrame.h"
-#include "WebScriptSource.h"
-#include "WebView.h"
-#include "webkit/support/webkit_support.h"
-#include <wtf/PassOwnPtr.h>
-
-using namespace WebKit;
-using namespace WebTestRunner;
-
-DRTDevToolsClient::DRTDevToolsClient(DRTDevToolsAgent* agent, WebView* webView)
-    : m_webView(webView)
-    , m_drtDevToolsAgent(agent)
-{
-    m_webDevToolsFrontend = adoptPtr(WebDevToolsFrontend::create(m_webView, this, WebString::fromUTF8("en-US")));
-    m_drtDevToolsAgent->attach(this);
-}
-
-DRTDevToolsClient::~DRTDevToolsClient()
-{
-    // There is a chance that the page will be destroyed at detach step of
-    // m_drtDevToolsAgent and we should clean pending requests a bit earlier.
-    m_taskList.revokeAll();
-    if (m_drtDevToolsAgent)
-        m_drtDevToolsAgent->detach();
-}
-
-void DRTDevToolsClient::reset()
-{
-    m_taskList.revokeAll();
-}
-
-void DRTDevToolsClient::sendMessageToBackend(const WebString& data)
-{
-    if (m_drtDevToolsAgent)
-        m_drtDevToolsAgent->asyncCall(data);
-}
-
-void DRTDevToolsClient::activateWindow()
-{
-    // Not implemented.
-}
-
-void DRTDevToolsClient::closeWindow()
-{
-    // Not implemented.
-}
-
-void DRTDevToolsClient::dockWindow()
-{
-    // Not implemented.
-}
-
-void DRTDevToolsClient::undockWindow()
-{
-    // Not implemented.
-}
-
-bool DRTDevToolsClient::isUnderTest()
-{
-    return true;
-}
-
-void DRTDevToolsClient::asyncCall(const WebString& args)
-{
-    postTask(new AsyncCallTask(this, args));
-}
-
-void DRTDevToolsClient::call(const WebString& args)
-{
-    m_webDevToolsFrontend->dispatchOnInspectorFrontend(args);
-}
diff --git a/Tools/DumpRenderTree/chromium/DRTDevToolsClient.h b/Tools/DumpRenderTree/chromium/DRTDevToolsClient.h
deleted file mode 100644
index bb5f278..0000000
--- a/Tools/DumpRenderTree/chromium/DRTDevToolsClient.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef DRTDevToolsClient_h
-#define DRTDevToolsClient_h
-
-#include "WebDevToolsFrontendClient.h"
-#include "WebTask.h"
-#include "public/platform/WebString.h"
-#include <wtf/Noncopyable.h>
-#include <wtf/OwnPtr.h>
-namespace WebKit {
-
-class WebDevToolsFrontend;
-struct WebDevToolsMessageData;
-class WebView;
-
-} // namespace WebKit
-
-class DRTDevToolsAgent;
-
-class DRTDevToolsClient : public WebKit::WebDevToolsFrontendClient {
-    WTF_MAKE_NONCOPYABLE(DRTDevToolsClient);
-public:
-    DRTDevToolsClient(DRTDevToolsAgent*, WebKit::WebView*);
-    virtual ~DRTDevToolsClient();
-    void reset();
-
-    // WebDevToolsFrontendClient implementation
-    virtual void sendMessageToBackend(const WebKit::WebString&);
-
-    virtual void activateWindow();
-    virtual void closeWindow();
-    virtual void dockWindow();
-    virtual void undockWindow();
-    virtual bool isUnderTest();
-
-    void asyncCall(const WebKit::WebString& args);
-
-    void allMessagesProcessed();
-    WebTestRunner::WebTaskList* taskList() { return &m_taskList; }
-
- private:
-    void call(const WebKit::WebString& args);
-    class AsyncCallTask: public WebTestRunner::WebMethodTask<DRTDevToolsClient> {
-    public:
-        AsyncCallTask(DRTDevToolsClient* object, const WebKit::WebString& args)
-            : WebTestRunner::WebMethodTask<DRTDevToolsClient>(object), m_args(args) { }
-        virtual void runIfValid() { m_object->call(m_args); }
-
-    private:
-        WebKit::WebString m_args;
-    };
-
-    WebTestRunner::WebTaskList m_taskList;
-    WebKit::WebView* m_webView;
-    DRTDevToolsAgent* m_drtDevToolsAgent;
-    WTF::OwnPtr<WebKit::WebDevToolsFrontend> m_webDevToolsFrontend;
-};
-
-#endif // DRTDevToolsClient_h
diff --git a/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp b/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp
deleted file mode 100644
index 7b448fb..0000000
--- a/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp
+++ /dev/null
@@ -1,280 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "DumpRenderTree.h"
-
-#include "MockPlatform.h"
-#include "TestShell.h"
-#include "webkit/support/webkit_support.h"
-#include "public/platform/WebCompositorSupport.h"
-#include <v8/include/v8-testing.h>
-#include <v8/include/v8.h>
-#include <wtf/OwnPtr.h>
-#include <wtf/Vector.h>
-
-using namespace std;
-
-static const char optionComplexText[] = "--complex-text";
-static const char optionDumpPixels[] = "--pixel-tests";
-static const char optionDumpPixelsShortForm[] = "-p";
-static const char optionNotree[] = "--notree";
-static const char optionThreaded[] = "--threaded";
-static const char optionDebugRenderTree[] = "--debug-render-tree";
-static const char optionDebugLayerTree[] = "--debug-layer-tree";
-
-static const char optionAllowExternalPages[] = "--allow-external-pages";
-static const char optionStartupDialog[] = "--testshell-startup-dialog";
-static const char optionCheckLayoutTestSystemDeps[] = "--check-layout-test-sys-deps";
-
-static const char optionHardwareAcceleratedGL[] = "--enable-hardware-gpu";
-static const char optionEnableSoftwareCompositing[] = "--enable-software-compositing";
-static const char optionEnableThreadedCompositing[] = "--enable-threaded-compositing";
-static const char optionForceCompositingMode[] = "--force-compositing-mode";
-static const char optionEnableAccelerated2DCanvas[] = "--enable-accelerated-2d-canvas";
-static const char optionEnableAcceleratedCompositingForVideo[] = "--enable-accelerated-video";
-static const char optionEnableAcceleratedFixedPosition[] = "--enable-accelerated-fixed-position";
-static const char optionEnableAcceleratedOverflowScroll[] = "--enable-accelerated-overflow-scroll";
-static const char optionEnableAcceleratedTransition[] = "--enable-accelerated-transition";
-static const char optionEnablePerTilePainting[] = "--enable-per-tile-painting";
-static const char optionEnableDeferredImageDecoding[] = "--enable-deferred-image-decoding";
-static const char optionDisableThreadedHTMLParser[] = "--disable-threaded-html-parser";
-
-static const char optionStressOpt[] = "--stress-opt";
-static const char optionStressDeopt[] = "--stress-deopt";
-static const char optionJavaScriptFlags[] = "--js-flags=";
-static const char optionEncodeBinary[] = "--encode-binary";
-static const char optionNoTimeout[] = "--no-timeout";
-static const char optionWebCoreLogChannels[] = "--webcore-log-channels=";
-
-class WebKitSupportTestEnvironment {
-public:
-    WebKitSupportTestEnvironment()
-    {
-        m_mockPlatform = MockPlatform::create();
-        webkit_support::SetUpTestEnvironment(m_mockPlatform.get());
-    }
-    ~WebKitSupportTestEnvironment()
-    {
-        webkit_support::TearDownTestEnvironment();
-    }
-
-    MockPlatform* mockPlatform() { return m_mockPlatform.get(); }
-
-private:
-    OwnPtr<MockPlatform> m_mockPlatform;
-};
-
-static void runTest(TestShell& shell, TestParams& params, const string& inputLine, const bool forceDumpPixels)
-{
-    int oldTimeoutMsec = shell.layoutTestTimeout();
-    TestCommand command = parseInputLine(inputLine);
-    params.testUrl = webkit_support::CreateURLForPathOrURL(command.pathOrURL);
-    params.pixelHash = command.shouldDumpPixels;
-    webkit_support::SetCurrentDirectoryForFileURL(params.testUrl);
-    v8::V8::SetFlagsFromString(shell.javaScriptFlags().c_str(), shell.javaScriptFlags().length());
-    if (shell.stressOpt() || shell.stressDeopt()) {
-      if (shell.stressOpt())
-        v8::Testing::SetStressRunType(v8::Testing::kStressTypeOpt);
-      else
-        v8::Testing::SetStressRunType(v8::Testing::kStressTypeDeopt);
-      for (int i = 0; i < v8::Testing::GetStressRuns(); i++) {
-          v8::Testing::PrepareStressRun(i);
-          bool isLastLoad = (i == (v8::Testing::GetStressRuns() - 1));
-          shell.setDumpWhenFinished(isLastLoad);
-          shell.resetTestController();
-          shell.runFileTest(params, command.shouldDumpPixels || forceDumpPixels);
-      }
-    } else {
-      shell.resetTestController();
-      shell.runFileTest(params, command.shouldDumpPixels || forceDumpPixels);
-    }
-    shell.setLayoutTestTimeout(oldTimeoutMsec);
-}
-
-int main(int argc, char* argv[])
-{
-    WebKitSupportTestEnvironment testEnvironment;
-    platformInit(&argc, &argv);
-
-    TestParams params;
-    Vector<string> tests;
-    bool serverMode = false;
-    bool dumpAllPixels = false;
-    bool allowExternalPages = false;
-    bool startupDialog = false;
-    bool acceleratedCompositingForVideoEnabled = false;
-    bool acceleratedCompositingForFixedPositionEnabled = false;
-    bool acceleratedCompositingForOverflowScrollEnabled = false;
-    bool acceleratedCompositingForTransitionEnabled = false;
-    bool softwareCompositingEnabled = false;
-    bool threadedCompositingEnabled = false;
-    bool forceCompositingMode = false;
-    bool threadedHTMLParser = true;
-    bool accelerated2DCanvasEnabled = false;
-    bool perTilePaintingEnabled = false;
-    bool deferredImageDecodingEnabled = false;
-    bool stressOpt = false;
-    bool stressDeopt = false;
-    bool hardwareAcceleratedGL = false;
-    string javaScriptFlags;
-    bool encodeBinary = false;
-    bool noTimeout = false;
-    for (int i = 1; i < argc; ++i) {
-        string argument(argv[i]);
-        if (argument == "-")
-            serverMode = true;
-        else if (argument == optionDumpPixels || argument == optionDumpPixelsShortForm)
-            dumpAllPixels = true;
-        else if (argument == optionNotree)
-            params.dumpTree = false;
-        else if (argument == optionDebugRenderTree)
-            params.debugRenderTree = true;
-        else if (argument == optionDebugLayerTree)
-            params.debugLayerTree = true;
-        else if (argument == optionAllowExternalPages)
-            allowExternalPages = true;
-        else if (argument == optionStartupDialog)
-            startupDialog = true;
-        else if (argument == optionCheckLayoutTestSystemDeps)
-            return checkLayoutTestSystemDependencies() ? EXIT_SUCCESS : EXIT_FAILURE;
-        else if (argument == optionHardwareAcceleratedGL)
-            hardwareAcceleratedGL = true;
-        else if (argument == optionEnableAcceleratedCompositingForVideo)
-            acceleratedCompositingForVideoEnabled = true;
-        else if (argument == optionEnableAcceleratedFixedPosition)
-            acceleratedCompositingForFixedPositionEnabled = true;
-        else if (argument == optionEnableAcceleratedOverflowScroll)
-            acceleratedCompositingForOverflowScrollEnabled = true;
-        else if (argument == optionEnableAcceleratedTransition)
-            acceleratedCompositingForTransitionEnabled = true;
-        else if (argument == optionEnableSoftwareCompositing)
-            softwareCompositingEnabled = true;
-        else if (argument == optionEnableThreadedCompositing)
-            threadedCompositingEnabled = true;
-        else if (argument == optionForceCompositingMode)
-            forceCompositingMode = true;
-        else if (argument == optionDisableThreadedHTMLParser)
-            threadedHTMLParser = false;
-        else if (argument == optionEnableAccelerated2DCanvas)
-            accelerated2DCanvasEnabled = true;
-        else if (argument == optionEnablePerTilePainting)
-            perTilePaintingEnabled = true;
-        else if (argument == optionEnableDeferredImageDecoding)
-            deferredImageDecodingEnabled = true;
-        else if (argument == optionStressOpt)
-            stressOpt = true;
-        else if (argument == optionStressDeopt)
-            stressDeopt = true;
-        else if (!argument.find(optionJavaScriptFlags))
-            javaScriptFlags = argument.substr(strlen(optionJavaScriptFlags));
-        else if (argument == optionEncodeBinary)
-            encodeBinary = true;
-        else if (argument == optionNoTimeout)
-            noTimeout = true;
-        else if (!argument.find(optionWebCoreLogChannels)) {
-            string channels = argument.substr(strlen(optionWebCoreLogChannels));
-            webkit_support::EnableWebCoreLogChannels(channels);
-        } else if (argument.size() && argument[0] == '-')
-            fprintf(stderr, "Unknown option: %s\n", argv[i]);
-        else
-            tests.append(argument);
-    }
-    if (stressOpt && stressDeopt) {
-        fprintf(stderr, "--stress-opt and --stress-deopt are mutually exclusive.\n");
-        return EXIT_FAILURE;
-    }
-
-    webkit_support::SetUpGLBindings(hardwareAcceleratedGL ? webkit_support::GL_BINDING_DEFAULT : webkit_support::GL_BINDING_SOFTWARE_RENDERER);
-
-    if (startupDialog)
-        openStartupDialog();
-
-    { // Explicit scope for the TestShell instance.
-        TestShell shell;
-        shell.setAllowExternalPages(allowExternalPages);
-        shell.setAcceleratedCompositingForVideoEnabled(acceleratedCompositingForVideoEnabled);
-        shell.setAcceleratedCompositingForFixedPositionEnabled(acceleratedCompositingForFixedPositionEnabled);
-        shell.setAcceleratedCompositingForOverflowScrollEnabled(acceleratedCompositingForOverflowScrollEnabled);
-        shell.setAcceleratedCompositingForTransitionEnabled(acceleratedCompositingForTransitionEnabled);
-        shell.setSoftwareCompositingEnabled(softwareCompositingEnabled);
-        shell.setThreadedCompositingEnabled(threadedCompositingEnabled);
-        shell.setForceCompositingMode(forceCompositingMode);
-        shell.setThreadedHTMLParser(threadedHTMLParser);
-        shell.setAccelerated2dCanvasEnabled(accelerated2DCanvasEnabled);
-        shell.setPerTilePaintingEnabled(perTilePaintingEnabled);
-        shell.setDeferredImageDecodingEnabled(deferredImageDecodingEnabled);
-        shell.setJavaScriptFlags(javaScriptFlags);
-        shell.setStressOpt(stressOpt);
-        shell.setStressDeopt(stressDeopt);
-        shell.setEncodeBinary(encodeBinary);
-        if (noTimeout) {
-            // 0x20000000ms is big enough for the purpose to avoid timeout in debugging.
-            shell.setLayoutTestTimeout(0x20000000);
-        }
-        shell.initialize(testEnvironment.mockPlatform());
-        if (serverMode && !tests.size()) {
-#if OS(ANDROID)
-            // Send a signal to host to indicate DRT is ready to process commands.
-            puts("#READY");
-            fflush(stdout);
-#endif
-            params.printSeparators = true;
-            char testString[2048]; // 2048 is the same as the sizes of other platforms.
-            while (fgets(testString, sizeof(testString), stdin)) {
-                char* newLinePosition = strchr(testString, '\n');
-                if (newLinePosition)
-                    *newLinePosition = '\0';
-                if (testString[0] == '\0')
-                    continue;
-                // Explicitly quit on platforms where EOF is not reliable.
-                if (!strcmp(testString, "QUIT"))
-                    break;
-                runTest(shell, params, testString, dumpAllPixels);
-            }
-        } else if (!tests.size())
-            puts("#EOF");
-        else {
-            params.printSeparators = tests.size() > 1;
-            for (unsigned i = 0; i < tests.size(); i++)
-                runTest(shell, params, tests[i], dumpAllPixels);
-        }
-
-        shell.callJSGC();
-        shell.callJSGC();
-
-        // When we finish the last test, cleanup the DRTTestRunner.
-        // It may have references to not-yet-cleaned up windows. By cleaning up
-        // here we help purify reports.
-        shell.resetTestController();
-    }
-
-    return EXIT_SUCCESS;
-}
diff --git a/Tools/DumpRenderTree/chromium/MockPlatform.cpp b/Tools/DumpRenderTree/chromium/MockPlatform.cpp
deleted file mode 100644
index 2d9cffc..0000000
--- a/Tools/DumpRenderTree/chromium/MockPlatform.cpp
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "MockPlatform.h"
-
-#include "WebTestInterfaces.h"
-#include "public/platform/WebMediaStreamCenter.h"
-#include <wtf/Assertions.h>
-#include <wtf/PassOwnPtr.h>
-
-using namespace WebKit;
-using namespace WebTestRunner;
-
-PassOwnPtr<MockPlatform> MockPlatform::create()
-{
-    return adoptPtr(new MockPlatform());
-}
-
-MockPlatform::MockPlatform()
-{
-}
-
-MockPlatform::~MockPlatform()
-{
-}
-
-void MockPlatform::setInterfaces(WebTestInterfaces* interfaces)
-{
-    m_interfaces = interfaces;
-}
-
-void MockPlatform::cryptographicallyRandomValues(unsigned char*, size_t)
-{
-    CRASH();
-}
-
-WebMediaStreamCenter* MockPlatform::createMediaStreamCenter(WebMediaStreamCenterClient* client)
-{
-    ASSERT(m_interfaces);
-
-    if (!m_mockMediaStreamCenter)
-        m_mockMediaStreamCenter = adoptPtr(m_interfaces->createMediaStreamCenter(client));
-
-    return m_mockMediaStreamCenter.get();
-}
-
-WebRTCPeerConnectionHandler* MockPlatform::createRTCPeerConnectionHandler(WebRTCPeerConnectionHandlerClient* client)
-{
-    ASSERT(m_interfaces);
-
-    return m_interfaces->createWebRTCPeerConnectionHandler(client);
-}
diff --git a/Tools/DumpRenderTree/chromium/MockPlatform.h b/Tools/DumpRenderTree/chromium/MockPlatform.h
deleted file mode 100644
index cf9d1cc..0000000
--- a/Tools/DumpRenderTree/chromium/MockPlatform.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef MockPlatform_h
-#define MockPlatform_h
-
-#include "public/platform/Platform.h"
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
-
-namespace WebTestRunner {
-class WebTestInterfaces;
-}
-
-class MockPlatform : public WebKit::Platform {
-public:
-    static PassOwnPtr<MockPlatform> create();
-    ~MockPlatform();
-
-    void setInterfaces(WebTestRunner::WebTestInterfaces*);
-    virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t length) OVERRIDE;
-
-    virtual WebKit::WebMediaStreamCenter* createMediaStreamCenter(WebKit::WebMediaStreamCenterClient*) OVERRIDE;
-    virtual WebKit::WebRTCPeerConnectionHandler* createRTCPeerConnectionHandler(WebKit::WebRTCPeerConnectionHandlerClient*) OVERRIDE;
-
-private:
-    MockPlatform();
-
-    WebTestRunner::WebTestInterfaces* m_interfaces;
-
-    OwnPtr<WebKit::WebMediaStreamCenter> m_mockMediaStreamCenter;
-};
-
-#endif // MockPlatform_h
diff --git a/Tools/DumpRenderTree/chromium/MockWebPrerenderingSupport.cpp b/Tools/DumpRenderTree/chromium/MockWebPrerenderingSupport.cpp
deleted file mode 100644
index d667d88..0000000
--- a/Tools/DumpRenderTree/chromium/MockWebPrerenderingSupport.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "MockWebPrerenderingSupport.h"
-
-#include <wtf/Assertions.h>
-
-MockWebPrerenderingSupport::MockWebPrerenderingSupport()
-{
-    ASSERT(!current());
-    initialize(this);
-}
-
-MockWebPrerenderingSupport::~MockWebPrerenderingSupport()
-{
-    ASSERT(current() == this);
-    shutdown();
-}
-
-void MockWebPrerenderingSupport::add(const WebKit::WebPrerender&)
-{
-}
-
-void MockWebPrerenderingSupport::cancel(const WebKit::WebPrerender&)
-{
-}
-
-void MockWebPrerenderingSupport::abandon(const WebKit::WebPrerender&)
-{
-}
diff --git a/Tools/DumpRenderTree/chromium/MockWebPrerenderingSupport.h b/Tools/DumpRenderTree/chromium/MockWebPrerenderingSupport.h
deleted file mode 100644
index f16f09d..0000000
--- a/Tools/DumpRenderTree/chromium/MockWebPrerenderingSupport.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef MockWebPrerenderingSupport_h
-#define MockWebPrerenderingSupport_h
-
-#include "public/platform/WebPrerenderingSupport.h"
-
-class MockWebPrerenderingSupport : public WebKit::WebPrerenderingSupport {
-public:
-    MockWebPrerenderingSupport();
-    virtual ~MockWebPrerenderingSupport();
-
-private:
-    void add(const WebKit::WebPrerender&) OVERRIDE;
-    void cancel(const WebKit::WebPrerender&) OVERRIDE;
-    void abandon(const WebKit::WebPrerender&) OVERRIDE;
-};
-
-#endif // MockWebPrerenderingSupport_h
diff --git a/Tools/DumpRenderTree/chromium/TestEventPrinter.cpp b/Tools/DumpRenderTree/chromium/TestEventPrinter.cpp
deleted file mode 100644
index aa2bf83..0000000
--- a/Tools/DumpRenderTree/chromium/TestEventPrinter.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "TestEventPrinter.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <wtf/Assertions.h>
-#include <wtf/text/Base64.h>
-
-TestEventPrinter::TestEventPrinter()
-    : m_encodeBinary(false)
-{
-}
-
-TestEventPrinter::~TestEventPrinter()
-{
-}
-
-// ----------------------------------------------------------------
-
-void TestEventPrinter::handleTestHeader(const char*) const
-{
-}
-
-void TestEventPrinter::handleTimedOut() const
-{
-    fprintf(stderr, "FAIL: Timed out waiting for notifyDone to be called\n");
-    fprintf(stdout, "FAIL: Timed out waiting for notifyDone to be called\n");
-}
-
-void TestEventPrinter::handleTextHeader() const
-{
-    printf("Content-Type: text/plain\n");
-}
-
-void TestEventPrinter::handleTextFooter() const
-{
-    printf("#EOF\n");
-}
-
-void TestEventPrinter::handleAudio(const void* audioData, size_t audioSize) const
-{
-    printf("Content-Type: audio/wav\n");
-    handleBinary(audioData, audioSize);
-}
-
-void TestEventPrinter::handleAudioFooter() const
-{
-    printf("#EOF\n");
-    fprintf(stderr, "#EOF\n");
-}
-
-void TestEventPrinter::handleImage(const char* actualHash, const char* expectedHash, const void* imageData, size_t imageSize) const
-{
-    ASSERT(actualHash);
-    printf("\nActualHash: %s\n", actualHash);
-    if (expectedHash && expectedHash[0])
-        printf("\nExpectedHash: %s\n", expectedHash);
-    if (imageData && imageSize) {
-        printf("Content-Type: image/png\n");
-        handleBinary(imageData, imageSize);
-    }
-}
-
-void TestEventPrinter::handleTestFooter(bool) const
-{
-    printf("#EOF\n");
-    fprintf(stderr, "#EOF\n");
-}
-
-void TestEventPrinter::handleBinary(const void* data, size_t size) const
-{
-    Vector<char> base64;
-    if (m_encodeBinary) {
-        base64Encode(static_cast<const char*>(data), size, base64, Base64InsertLFs);
-        data = base64.data();
-        size = base64.size();
-        printf("Content-Transfer-Encoding: base64\n");
-    }
-    // Printf formatting for size_t on 32-bit, 64-bit, and on Windows is hard so just cast to an int.
-    printf("Content-Length: %d\n", static_cast<int>(size));
-    if (fwrite(data, 1, size, stdout) != size) {
-        fprintf(stderr, "Short write to stdout.\n");
-        exit(1);
-    }
-}
diff --git a/Tools/DumpRenderTree/chromium/TestEventPrinter.h b/Tools/DumpRenderTree/chromium/TestEventPrinter.h
deleted file mode 100644
index c1a7e2d..0000000
--- a/Tools/DumpRenderTree/chromium/TestEventPrinter.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TestEventPrinter_h
-#define TestEventPrinter_h
-
-#include <wtf/PassOwnPtr.h>
-
-class TestEventPrinter {
-public:
-    TestEventPrinter();
-    ~TestEventPrinter();
-    void handleTestHeader(const char* url) const;
-    void handleTimedOut() const;
-    void handleTextHeader() const;
-    void handleTextFooter() const;
-    void handleAudio(const void* audioData, size_t audioSize) const;
-    void handleAudioFooter() const;
-    void handleImage(const char* actualHash, const char* expectedHash, const void* imageData, size_t imageSize) const;
-    void handleTestFooter(bool dumpedAnything) const;
-
-    // Set if binary output data should be encoded in base64. Default is off.
-    void setEncodeBinary(bool encodeBinary) { m_encodeBinary = encodeBinary; }
-
-private:
-    void handleBinary(const void* data, size_t) const;
-
-    bool m_encodeBinary;
-};
-
-#endif // TestEventPrinter_h
diff --git a/Tools/DumpRenderTree/chromium/TestNavigationController.cpp b/Tools/DumpRenderTree/chromium/TestNavigationController.cpp
deleted file mode 100644
index ad6fcff..0000000
--- a/Tools/DumpRenderTree/chromium/TestNavigationController.cpp
+++ /dev/null
@@ -1,277 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "TestNavigationController.h"
-
-#include "TestShell.h"
-#include <wtf/Assertions.h>
-
-using namespace WebKit;
-using namespace std;
-
-// ----------------------------------------------------------------------------
-// TestNavigationEntry
-
-PassRefPtr<TestNavigationEntry> TestNavigationEntry::create()
-{
-    return adoptRef(new TestNavigationEntry);
-}
-
-PassRefPtr<TestNavigationEntry> TestNavigationEntry::create(
-    int pageID, const WebURL& url, const WebString& title, const WebString& targetFrame)
-{
-    return adoptRef(new TestNavigationEntry(pageID, url, title, targetFrame));
-}
-
-TestNavigationEntry::TestNavigationEntry()
-    : m_pageID(-1) { }
-
-TestNavigationEntry::TestNavigationEntry(
-    int pageID, const WebURL& url, const WebString& title, const WebString& targetFrame)
-    : m_pageID(pageID)
-    , m_url(url)
-    , m_title(title)
-    , m_targetFrame(targetFrame) { }
-
-TestNavigationEntry::~TestNavigationEntry() { }
-
-void TestNavigationEntry::setContentState(const WebHistoryItem& state)
-{
-    m_state = state;
-}
-
-// ----------------------------------------------------------------------------
-// TestNavigationController
-
-TestNavigationController::TestNavigationController(NavigationHost* host)
-    : m_pendingEntry(0)
-    , m_lastCommittedEntryIndex(-1)
-    , m_pendingEntryIndex(-1)
-    , m_host(host)
-    , m_maxPageID(-1) { }
-
-TestNavigationController::~TestNavigationController()
-{
-    discardPendingEntry();
-}
-
-void TestNavigationController::reset()
-{
-    m_entries.clear();
-    discardPendingEntry();
-
-    m_lastCommittedEntryIndex = -1;
-}
-
-void TestNavigationController::reload()
-{
-    // Base the navigation on where we are now...
-    int currentIndex = currentEntryIndex();
-
-    // If we are no where, then we can't reload.
-    // FIXME: We should add a CanReload method.
-    if (currentIndex == -1)
-        return;
-
-    discardPendingEntry();
-
-    m_pendingEntryIndex = currentIndex;
-    navigateToPendingEntry(true);
-}
-
-void TestNavigationController::goToOffset(int offset)
-{
-    int index = m_lastCommittedEntryIndex + offset;
-    if (index < 0 || index >= entryCount())
-        return;
-
-    goToIndex(index);
-}
-
-void TestNavigationController::goToIndex(int index)
-{
-    ASSERT(index >= 0);
-    ASSERT(index < static_cast<int>(m_entries.size()));
-
-    discardPendingEntry();
-
-    m_pendingEntryIndex = index;
-    navigateToPendingEntry(false);
-}
-
-void TestNavigationController::loadEntry(TestNavigationEntry* entry)
-{
-    // When navigating to a new page, we don't know for sure if we will actually
-    // end up leaving the current page. The new page load could for example
-    // result in a download or a 'no content' response (e.g., a mailto: URL).
-    discardPendingEntry();
-    m_pendingEntry = entry;
-    navigateToPendingEntry(false);
-}
-
-
-TestNavigationEntry* TestNavigationController::lastCommittedEntry() const
-{
-    if (m_lastCommittedEntryIndex == -1)
-        return 0;
-    return m_entries[m_lastCommittedEntryIndex].get();
-}
-
-TestNavigationEntry* TestNavigationController::activeEntry() const
-{
-    TestNavigationEntry* entry = m_pendingEntry.get();
-    if (!entry)
-        entry = lastCommittedEntry();
-    return entry;
-}
-
-int TestNavigationController::currentEntryIndex() const
-{
-    if (m_pendingEntryIndex != -1)
-        return m_pendingEntryIndex;
-    return m_lastCommittedEntryIndex;
-}
-
-
-TestNavigationEntry* TestNavigationController::entryAtIndex(int index) const
-{
-    if (index < 0 || index >= entryCount())
-        return 0;
-    return m_entries[index].get();
-}
-
-TestNavigationEntry* TestNavigationController::entryWithPageID(int32_t pageID) const
-{
-    int index = entryIndexWithPageID(pageID);
-    return (index != -1) ? m_entries[index].get() : 0;
-}
-
-void TestNavigationController::didNavigateToEntry(TestNavigationEntry* entry)
-{
-    // If the entry is that of a page with PageID larger than any this Tab has
-    // seen before, then consider it a new navigation.
-    if (entry->pageID() > maxPageID()) {
-        insertEntry(entry);
-        return;
-    }
-
-    // Otherwise, we just need to update an existing entry with matching PageID.
-    // If the existing entry corresponds to the entry which is pending, then we
-    // must update the current entry index accordingly. When navigating to the
-    // same URL, a new PageID is not created.
-
-    int existingEntryIndex = entryIndexWithPageID(entry->pageID());
-    TestNavigationEntry* existingEntry = (existingEntryIndex != -1) ?
-        m_entries[existingEntryIndex].get() : 0;
-    if (!existingEntry) {
-        // No existing entry, then simply ignore this navigation!
-    } else if (existingEntry == m_pendingEntry.get()) {
-        // The given entry might provide a new URL... e.g., navigating back to a
-        // page in session history could have resulted in a new client redirect.
-        existingEntry->setURL(entry->URL());
-        existingEntry->setContentState(entry->contentState());
-        m_lastCommittedEntryIndex = m_pendingEntryIndex;
-        m_pendingEntryIndex = -1;
-        m_pendingEntry.clear();
-    } else if (m_pendingEntry && m_pendingEntry->pageID() == -1
-               && GURL(m_pendingEntry->URL()) == GURL(existingEntry->URL().spec())) {
-        // Not a new navigation
-        discardPendingEntry();
-    } else {
-        // The given entry might provide a new URL... e.g., navigating to a page
-        // might result in a client redirect, which should override the URL of the
-        // existing entry.
-        existingEntry->setURL(entry->URL());
-        existingEntry->setContentState(entry->contentState());
-
-        // The navigation could have been issued by the renderer, so be sure that
-        // we update our current index.
-        m_lastCommittedEntryIndex = existingEntryIndex;
-    }
-
-    updateMaxPageID();
-}
-
-void TestNavigationController::discardPendingEntry()
-{
-    m_pendingEntry.clear();
-    m_pendingEntryIndex = -1;
-}
-
-void TestNavigationController::insertEntry(TestNavigationEntry* entry)
-{
-    discardPendingEntry();
-
-    // Prune any entry which are in front of the current entry
-    int currentSize = static_cast<int>(m_entries.size());
-    if (currentSize > 0) {
-        while (m_lastCommittedEntryIndex < (currentSize - 1)) {
-            m_entries.removeLast();
-            currentSize--;
-        }
-    }
-
-    m_entries.append(RefPtr<TestNavigationEntry>(entry));
-    m_lastCommittedEntryIndex = static_cast<int>(m_entries.size()) - 1;
-    updateMaxPageID();
-}
-
-int TestNavigationController::entryIndexWithPageID(int32 pageID) const
-{
-    for (int i = static_cast<int>(m_entries.size()) - 1; i >= 0; --i) {
-        if (m_entries[i]->pageID() == pageID)
-            return i;
-    }
-    return -1;
-}
-
-void TestNavigationController::navigateToPendingEntry(bool reload)
-{
-    // For session history navigations only the pending_entry_index_ is set.
-    if (!m_pendingEntry) {
-        ASSERT(m_pendingEntryIndex != -1);
-        m_pendingEntry = m_entries[m_pendingEntryIndex];
-    }
-
-    if (m_host->navigate(*m_pendingEntry.get(), reload)) {
-        // Note: this is redundant if navigation completed synchronously because
-        // DidNavigateToEntry call this as well.
-        updateMaxPageID();
-    } else
-        discardPendingEntry();
-}
-
-void TestNavigationController::updateMaxPageID()
-{
-    TestNavigationEntry* entry = activeEntry();
-    if (entry)
-        m_maxPageID = max(m_maxPageID, entry->pageID());
-}
diff --git a/Tools/DumpRenderTree/chromium/TestNavigationController.h b/Tools/DumpRenderTree/chromium/TestNavigationController.h
deleted file mode 100644
index 88aa600..0000000
--- a/Tools/DumpRenderTree/chromium/TestNavigationController.h
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TestNavigationController_h
-#define TestNavigationController_h
-
-#include "WebDataSource.h"
-#include "WebHistoryItem.h"
-#include "webkit/support/webkit_support.h"
-#include "public/platform/WebString.h"
-#include "public/platform/WebURL.h"
-#include <string>
-#include <wtf/RefCounted.h>
-#include <wtf/RefPtr.h>
-#include <wtf/Vector.h>
-
-// Associated with browser-initated navigations to hold tracking data.
-class TestShellExtraData : public WebKit::WebDataSource::ExtraData {
-public:
-    TestShellExtraData(int32_t pendingPageID)
-        : pendingPageID(pendingPageID)
-        , requestCommitted(false) { }
-
-    // Contains the page_id for this navigation or -1 if there is none yet.
-    int32_t pendingPageID;
-
-    // True if we have already processed the "DidCommitLoad" event for this
-    // request. Used by session history.
-    bool requestCommitted;
-};
-
-// Stores one back/forward navigation state for the test shell.
-class TestNavigationEntry: public RefCounted<TestNavigationEntry> {
-public:
-    static PassRefPtr<TestNavigationEntry> create();
-    static PassRefPtr<TestNavigationEntry> create(
-        int pageID,
-        const WebKit::WebURL&,
-        const WebKit::WebString& title,
-        const WebKit::WebString& targetFrame);
-
-    // Virtual to allow test_shell to extend the class.
-    virtual ~TestNavigationEntry();
-
-    // Set / Get the URI
-    void setURL(const WebKit::WebURL& url) { m_url = url; }
-    const WebKit::WebURL& URL() const { return m_url; }
-
-    // Set / Get the title
-    void setTitle(const WebKit::WebString& title) { m_title = title; }
-    const WebKit::WebString& title() const { return m_title; }
-
-    // Set / Get a state.
-    void setContentState(const WebKit::WebHistoryItem&);
-    const WebKit::WebHistoryItem& contentState() const { return m_state; }
-
-    // Get the page id corresponding to the tab's state.
-    void setPageID(int pageID) { m_pageID = pageID; }
-    int32_t pageID() const { return m_pageID; }
-
-    const WebKit::WebString& targetFrame() const { return m_targetFrame; }
-
-private:
-    TestNavigationEntry();
-    TestNavigationEntry(int pageID,
-                        const WebKit::WebURL&,
-                        const WebKit::WebString& title,
-                        const WebKit::WebString& targetFrame);
-
-    // Describes the current page that the tab represents. This is not relevant
-    // for all tab contents types.
-    int32_t m_pageID;
-
-    WebKit::WebURL m_url;
-    WebKit::WebString m_title;
-    WebKit::WebHistoryItem m_state;
-    WebKit::WebString m_targetFrame;
-};
-
-class NavigationHost {
-public:
-    virtual bool navigate(const TestNavigationEntry&, bool reload) = 0;
-};
-
-// Test shell's NavigationController. The goal is to be as close to the Chrome
-// version as possible.
-class TestNavigationController {
-    WTF_MAKE_NONCOPYABLE(TestNavigationController);
-public:
-    TestNavigationController(NavigationHost*);
-    ~TestNavigationController();
-
-    void reset();
-
-    // Causes the controller to reload the current (or pending) entry.
-    void reload();
-
-    // Causes the controller to go to the specified offset from current. Does
-    // nothing if out of bounds.
-    void goToOffset(int);
-
-    // Causes the controller to go to the specified index.
-    void goToIndex(int);
-
-    // Causes the controller to load the specified entry.
-    // NOTE: Do not pass an entry that the controller already owns!
-    void loadEntry(TestNavigationEntry*);
-
-    // Returns the last committed entry, which may be null if there are no
-    // committed entries.
-    TestNavigationEntry* lastCommittedEntry() const;
-
-    // Returns the number of entries in the NavigationControllerBase, excluding
-    // the pending entry if there is one.
-    int entryCount() const { return static_cast<int>(m_entries.size()); }
-
-    // Returns the active entry, which is the pending entry if a navigation is in
-    // progress or the last committed entry otherwise. NOTE: This can be 0!!
-    //
-    // If you are trying to get the current state of the NavigationControllerBase,
-    // this is the method you will typically want to call.
-    TestNavigationEntry* activeEntry() const;
-
-    // Returns the index from which we would go back/forward or reload. This is
-    // the m_lastCommittedEntryIndex if m_pendingEntryIndex is -1. Otherwise,
-    // it is the m_pendingEntryIndex.
-    int currentEntryIndex() const;
-
-    // Returns the entry at the specified index. Returns 0 if out of bounds.
-    TestNavigationEntry* entryAtIndex(int) const;
-
-    // Return the entry with the corresponding type and page ID, or 0 if
-    // not found.
-    TestNavigationEntry* entryWithPageID(int32_t) const;
-
-    // Returns the index of the last committed entry.
-    int lastCommittedEntryIndex() const { return m_lastCommittedEntryIndex; }
-
-    // Used to inform us of a navigation being committed for a tab. Any entry
-    // located forward to the current entry will be deleted. The new entry
-    // becomes the current entry.
-    void didNavigateToEntry(TestNavigationEntry*);
-
-    // Used to inform us to discard its pending entry.
-    void discardPendingEntry();
-
-private:
-    // Inserts an entry after the current position, removing all entries after it.
-    // The new entry will become the active one.
-    void insertEntry(TestNavigationEntry*);
-
-    int maxPageID() const { return m_maxPageID; }
-    void navigateToPendingEntry(bool reload);
-
-    // Return the index of the entry with the corresponding type and page ID,
-    // or -1 if not found.
-    int entryIndexWithPageID(int32_t) const;
-
-    // Updates the max page ID with that of the given entry, if is larger.
-    void updateMaxPageID();
-
-    // List of NavigationEntry for this tab
-    typedef Vector<RefPtr<TestNavigationEntry> > NavigationEntryList;
-    typedef NavigationEntryList::iterator NavigationEntryListIterator;
-    NavigationEntryList m_entries;
-
-    // An entry we haven't gotten a response for yet. This will be discarded
-    // when we navigate again. It's used only so we know what the currently
-    // displayed tab is.
-    RefPtr<TestNavigationEntry> m_pendingEntry;
-
-    // currently visible entry
-    int m_lastCommittedEntryIndex;
-
-    // index of pending entry if it is in entries_, or -1 if pending_entry_ is a
-    // new entry (created by LoadURL).
-    int m_pendingEntryIndex;
-
-    NavigationHost* m_host;
-    int m_maxPageID;
-};
-
-#endif // TestNavigationController_h
-
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/public/WebPreferences.h b/Tools/DumpRenderTree/chromium/TestRunner/public/WebPreferences.h
index 8431642..2dbed40 100644
--- a/Tools/DumpRenderTree/chromium/TestRunner/public/WebPreferences.h
+++ b/Tools/DumpRenderTree/chromium/TestRunner/public/WebPreferences.h
@@ -31,10 +31,10 @@
 #ifndef WebPreferences_h
 #define WebPreferences_h
 
-#include "WebKit/chromium/public/WebSettings.h"
 #include "WebTestCommon.h"
 #include "public/platform/WebString.h"
 #include "public/platform/WebURL.h"
+#include "public/web/WebSettings.h"
 
 namespace WebKit {
 class WebView;
@@ -43,19 +43,8 @@
 namespace WebTestRunner {
 
 struct WEBTESTRUNNER_EXPORT WebPreferences {
-    WebKit::WebString standardFontFamily;
-    WebKit::WebString fixedFontFamily;
-    WebKit::WebString serifFontFamily;
-    WebKit::WebString sansSerifFontFamily;
-    WebKit::WebString cursiveFontFamily;
-    WebKit::WebString fantasyFontFamily;
-
     int defaultFontSize;
-    int defaultFixedFontSize;
     int minimumFontSize;
-    int minimumLogicalFontSize;
-    int minimumAccelerated2dCanvasSize;
-
     bool DOMPasteAllowed;
     bool XSSAuditorEnabled;
     bool allowDisplayOfInsecureContent;
@@ -65,7 +54,6 @@
     WebKit::WebString defaultTextEncodingName;
     bool experimentalWebGLEnabled;
     bool experimentalCSSRegionsEnabled;
-    bool experimentalCSSExclusionsEnabled;
     bool experimentalCSSGridLayoutEnabled;
     bool javaEnabled;
     bool javaScriptCanAccessClipboard;
@@ -73,39 +61,20 @@
     bool supportsMultipleWindows;
     bool javaScriptEnabled;
     bool loadsImagesAutomatically;
-    bool localStorageEnabled;
     bool offlineWebApplicationCacheEnabled;
     bool pluginsEnabled;
-    bool shrinksStandaloneImagesToFit;
-    bool textAreasAreResizable;
     WebKit::WebURL userStyleSheetLocation;
-    bool webSecurityEnabled;
     bool allowUniversalAccessFromFileURLs;
     WebKit::WebSettings::EditingBehavior editingBehavior;
     bool tabsToLinks;
     bool hyperlinkAuditingEnabled;
     bool caretBrowsingEnabled;
-    bool acceleratedCompositingForVideoEnabled;
-    bool acceleratedCompositingForFixedPositionEnabled;
-    bool acceleratedCompositingForOverflowScrollEnabled;
-    bool acceleratedCompositingForTransitionEnabled;
-    bool acceleratedCompositingEnabled;
-    bool forceCompositingMode;
-    bool threadedHTMLParser;
-    bool accelerated2dCanvasEnabled;
-    bool perTilePaintingEnabled;
-    bool acceleratedAnimationEnabled;
-    bool deferredImageDecodingEnabled;
-    bool mediaPlaybackRequiresUserGesture;
-    bool mockScrollbarsEnabled;
     bool cssCustomFilterEnabled;
     bool shouldRespectImageOrientation;
     bool asynchronousSpellCheckingEnabled;
-    bool touchDragDropEnabled;
 
     WebPreferences() { reset(); }
     void reset();
-    void applyTo(WebKit::WebView*);
 };
 
 }
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h b/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h
index c3d2a3b..048868a 100644
--- a/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h
+++ b/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h
@@ -31,20 +31,21 @@
 #ifndef WebTestProxy_h
 #define WebTestProxy_h
 
-#include "WebKit/chromium/public/WebAccessibilityNotification.h"
-#include "WebKit/chromium/public/WebDOMMessageEvent.h"
-#include "WebKit/chromium/public/WebDragOperation.h"
-#include "WebKit/chromium/public/WebEditingAction.h"
-#include "WebKit/chromium/public/WebIconURL.h"
-#include "WebKit/chromium/public/WebNavigationPolicy.h"
-#include "WebKit/chromium/public/WebNavigationType.h"
-#include "WebKit/chromium/public/WebSecurityOrigin.h"
-#include "WebKit/chromium/public/WebTextAffinity.h"
-#include "WebKit/chromium/public/WebTextDirection.h"
+#include "WebTask.h"
 #include "WebTestCommon.h"
 #include "public/platform/WebRect.h"
 #include "public/platform/WebURLError.h"
 #include "public/platform/WebURLRequest.h"
+#include "public/web/WebAccessibilityNotification.h"
+#include "public/web/WebDOMMessageEvent.h"
+#include "public/web/WebDragOperation.h"
+#include "public/web/WebEditingAction.h"
+#include "public/web/WebIconURL.h"
+#include "public/web/WebNavigationPolicy.h"
+#include "public/web/WebNavigationType.h"
+#include "public/web/WebSecurityOrigin.h"
+#include "public/web/WebTextAffinity.h"
+#include "public/web/WebTextDirection.h"
 #include <map>
 #include <memory>
 #include <string>
@@ -77,6 +78,7 @@
 class WebURL;
 class WebURLResponse;
 class WebUserMediaClient;
+class WebValidationMessageClient;
 class WebView;
 class WebWidget;
 struct WebConsoleMessage;
@@ -94,6 +96,7 @@
 
 class MockWebSpeechInputController;
 class MockWebSpeechRecognizer;
+class MockWebValidationMessageClient;
 class SpellCheckClient;
 class TestInterfaces;
 class WebTestDelegate;
@@ -110,6 +113,7 @@
     void reset();
 
     WebKit::WebSpellCheckClient *spellCheckClient() const;
+    WebKit::WebValidationMessageClient* validationMessageClient();
     WebKit::WebColorChooser* createColorChooser(WebKit::WebColorChooserClient*, const WebKit::WebColor&);
 
     std::string captureTree(bool debugRenderTree);
@@ -135,6 +139,8 @@
     MockWebSpeechRecognizer* speechRecognizerMock();
 #endif
 
+    WebTaskList* taskList() { return &m_taskList; }
+
 protected:
     WebTestProxyBase();
     ~WebTestProxyBase();
@@ -218,6 +224,8 @@
     void paintPagesWithBoundaries();
     SkCanvas* canvas();
     void displayRepaintMask();
+    void invalidateAll();
+    void animateNow();
 
     WebKit::WebWidget* webWidget();
     WebKit::WebView* webView();
@@ -226,6 +234,8 @@
     WebTestDelegate* m_delegate;
     WebKit::WebWidget* m_webWidget;
 
+    WebTaskList m_taskList;
+
     std::auto_ptr<SpellCheckClient> m_spellcheck;
     std::auto_ptr<WebUserMediaClientMock> m_userMediaClient;
 
@@ -233,6 +243,7 @@
     std::auto_ptr<SkCanvas> m_canvas;
     WebKit::WebRect m_paintRect;
     bool m_isPainting;
+    bool m_animateScheduled;
     std::map<unsigned, std::string> m_resourceIdentifierMap;
     std::map<unsigned, WebKit::WebURLRequest> m_requestMap;
 
@@ -243,6 +254,7 @@
     std::auto_ptr<WebKit::WebDeviceOrientationClientMock> m_deviceOrientationClient;
     std::auto_ptr<MockWebSpeechRecognizer> m_speechRecognizer;
     std::auto_ptr<MockWebSpeechInputController> m_speechInputController;
+    std::auto_ptr<MockWebValidationMessageClient> m_validationMessageClient;
 
 private:
     WebTestProxyBase(WebTestProxyBase&);
@@ -265,22 +277,18 @@
     virtual void didInvalidateRect(const WebKit::WebRect& rect)
     {
         WebTestProxyBase::didInvalidateRect(rect);
-        Base::didInvalidateRect(rect);
     }
     virtual void didScrollRect(int dx, int dy, const WebKit::WebRect& clipRect)
     {
         WebTestProxyBase::didScrollRect(dx, dy, clipRect);
-        Base::didScrollRect(dx, dy, clipRect);
     }
     virtual void scheduleComposite()
     {
         WebTestProxyBase::scheduleComposite();
-        Base::scheduleComposite();
     }
     virtual void scheduleAnimation()
     {
         WebTestProxyBase::scheduleAnimation();
-        Base::scheduleAnimation();
     }
     virtual void setWindowRect(const WebKit::WebRect& rect)
     {
diff --git a/Tools/DumpRenderTree/chromium/Task.cpp b/Tools/DumpRenderTree/chromium/TestRunner/src/MockWebValidationMessageClient.cpp
similarity index 61%
rename from Tools/DumpRenderTree/chromium/Task.cpp
rename to Tools/DumpRenderTree/chromium/TestRunner/src/MockWebValidationMessageClient.cpp
index a859b40..7897885 100644
--- a/Tools/DumpRenderTree/chromium/Task.cpp
+++ b/Tools/DumpRenderTree/chromium/TestRunner/src/MockWebValidationMessageClient.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Google Inc. All rights reserved.
+ * Copyright (C) 2013 Google Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -29,51 +29,41 @@
  */
 
 #include "config.h"
-#include "Task.h"
+#include "MockWebValidationMessageClient.h"
 
-#include "WebKit.h"
-#include "WebTask.h"
-#include "webkit/support/webkit_support.h"
-#include "public/platform/Platform.h"
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
+#include "WebTestDelegate.h"
+#include "public/platform/WebCString.h"
+#include "public/platform/WebString.h"
 
 using namespace WebKit;
-using namespace WebTestRunner;
 
-namespace {
+namespace WebTestRunner {
 
-void invokeTask(void* context)
+MockWebValidationMessageClient::MockWebValidationMessageClient()
+    : m_delegate(0)
 {
-    WebTask* task = static_cast<WebTask*>(context);
-    task->run();
-    delete task;
 }
 
-class TaskWrapper : public webkit_support::TaskAdaptor {
-public:
-    explicit TaskWrapper(WebTask* task)
-        : m_task(adoptPtr(task))
-    {
-    }
-    virtual ~TaskWrapper() { }
-    virtual void Run()
-    {
-        m_task->run();
-    }
-
-private:
-    OwnPtr<WebTask> m_task;
-};
-
+MockWebValidationMessageClient::~MockWebValidationMessageClient()
+{
 }
 
-void postTask(WebTask* task)
+void MockWebValidationMessageClient::setDelegate(WebTestDelegate* delegate)
 {
-    Platform::current()->callOnMainThread(invokeTask, static_cast<void*>(task));
+    m_delegate = delegate;
 }
 
-void postDelayedTask(WebTask* task, long long ms)
+void MockWebValidationMessageClient::showValidationMessage(const WebRect&, const WebString& message, const WebString& subMessage, WebTextDirection)
 {
-    webkit_support::PostDelayedTask(new TaskWrapper(task), ms);
+    m_delegate->printMessage(std::string("ValidationMessageClient: main-message=") + std::string(message.utf8()) + " sub-message=" + std::string(subMessage.utf8()) + "\n");
+}
+
+void MockWebValidationMessageClient::hideValidationMessage()
+{
+}
+
+void MockWebValidationMessageClient::moveValidationMessage(const WebRect&)
+{
+}
+
 }
diff --git a/Tools/DumpRenderTree/chromium/Task.h b/Tools/DumpRenderTree/chromium/TestRunner/src/MockWebValidationMessageClient.h
similarity index 65%
rename from Tools/DumpRenderTree/chromium/Task.h
rename to Tools/DumpRenderTree/chromium/TestRunner/src/MockWebValidationMessageClient.h
index c8755a8..36c5216 100644
--- a/Tools/DumpRenderTree/chromium/Task.h
+++ b/Tools/DumpRenderTree/chromium/TestRunner/src/MockWebValidationMessageClient.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Google Inc. All rights reserved.
+ * Copyright (C) 2013 Google Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -28,14 +28,29 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef Task_h
-#define Task_h
+#ifndef MockWebValidationMessageClient_h
+#define MockWebValidationMessageClient_h
+
+#include "TestCommon.h"
+#include "public/web/WebValidationMessageClient.h"
 
 namespace WebTestRunner {
-class WebTask;
+
+class WebTestDelegate;
+
+class MockWebValidationMessageClient : public WebKit::WebValidationMessageClient {
+public:
+    MockWebValidationMessageClient();
+    virtual ~MockWebValidationMessageClient();
+    void setDelegate(WebTestDelegate*);
+
+private:
+    virtual void showValidationMessage(const WebKit::WebRect&, const WebKit::WebString&, const WebKit::WebString&, WebKit::WebTextDirection) OVERRIDE;
+    virtual void hideValidationMessage() OVERRIDE;
+    virtual void moveValidationMessage(const WebKit::WebRect&) OVERRIDE;
+
+    WebTestDelegate* m_delegate;
+};
+
 }
-
-void postTask(WebTestRunner::WebTask*);
-void postDelayedTask(WebTestRunner::WebTask*, long long ms);
-
-#endif // Task_h
+#endif
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/NotificationPresenter.cpp b/Tools/DumpRenderTree/chromium/TestRunner/src/NotificationPresenter.cpp
index 8890290..b029e92 100644
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/NotificationPresenter.cpp
+++ b/Tools/DumpRenderTree/chromium/TestRunner/src/NotificationPresenter.cpp
@@ -38,10 +38,10 @@
 #include "WebNotificationPermissionCallback.h"
 #include "WebSecurityOrigin.h"
 #include "WebTestDelegate.h"
-#include "googleurl/src/gurl.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebString.h"
 #include "public/platform/WebURL.h"
+#include <url/gurl.h>
 
 using namespace WebKit;
 using namespace std;
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h b/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h
index 1556ec3..8e12e6f 100644
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h
+++ b/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h
@@ -73,6 +73,7 @@
     WebTaskList* taskList() { return &m_taskList; }
 
     void setTestIsRunning(bool);
+    bool testIsRunning() const { return m_testIsRunning; }
 
     // WebTestRunner implementation.
     virtual bool shouldGeneratePixelResults() OVERRIDE;
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/TextInputController.cpp b/Tools/DumpRenderTree/chromium/TestRunner/src/TextInputController.cpp
index 49c6bdc..e20537e 100644
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/TextInputController.cpp
+++ b/Tools/DumpRenderTree/chromium/TestRunner/src/TextInputController.cpp
@@ -49,20 +49,14 @@
 
 TextInputController::TextInputController()
 {
-    bindMethod("attributedSubstringFromRange", &TextInputController::attributedSubstringFromRange);
-    bindMethod("characterIndexForPoint", &TextInputController::characterIndexForPoint);
-    bindMethod("conversationIdentifier", &TextInputController::conversationIdentifier);
     bindMethod("doCommand", &TextInputController::doCommand);
     bindMethod("firstRectForCharacterRange", &TextInputController::firstRectForCharacterRange);
     bindMethod("hasMarkedText", &TextInputController::hasMarkedText);
     bindMethod("insertText", &TextInputController::insertText);
-    bindMethod("makeAttributedString", &TextInputController::makeAttributedString);
     bindMethod("markedRange", &TextInputController::markedRange);
     bindMethod("selectedRange", &TextInputController::selectedRange);
     bindMethod("setMarkedText", &TextInputController::setMarkedText);
-    bindMethod("substringFromRange", &TextInputController::substringFromRange);
     bindMethod("unmarkText", &TextInputController::unmarkText);
-    bindMethod("validAttributesForMarkedText", &TextInputController::validAttributesForMarkedText);
     bindMethod("setComposition", &TextInputController::setComposition);
 }
 
@@ -120,24 +114,6 @@
     result->set(mainFrame->hasMarkedText());
 }
 
-void TextInputController::conversationIdentifier(const CppArgumentList&, CppVariant* result)
-{
-    // FIXME: Implement this.
-    result->setNull();
-}
-
-void TextInputController::substringFromRange(const CppArgumentList&, CppVariant* result)
-{
-    // FIXME: Implement this.
-    result->setNull();
-}
-
-void TextInputController::attributedSubstringFromRange(const CppArgumentList&, CppVariant* result)
-{
-    // FIXME: Implement this.
-    result->setNull();
-}
-
 void TextInputController::markedRange(const CppArgumentList&, CppVariant* result)
 {
     result->setNull();
@@ -191,30 +167,6 @@
     result->set(WebBindings::makeIntArray(intArray));
 }
 
-void TextInputController::characterIndexForPoint(const CppArgumentList&, CppVariant* result)
-{
-    // FIXME: Implement this.
-    result->setNull();
-}
-
-void TextInputController::validAttributesForMarkedText(const CppArgumentList&, CppVariant* result)
-{
-    result->setNull();
-
-    WebFrame* mainFrame = m_webView->mainFrame();
-    if (!mainFrame)
-        return;
-
-    result->set("NSUnderline,NSUnderlineColor,NSMarkedClauseSegment,"
-                "NSTextInputReplacementRangeAttributeName");
-}
-
-void TextInputController::makeAttributedString(const CppArgumentList&, CppVariant* result)
-{
-    // FIXME: Implement this.
-    result->setNull();
-}
-
 void TextInputController::setComposition(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/TextInputController.h b/Tools/DumpRenderTree/chromium/TestRunner/src/TextInputController.h
index 286d833..864d0ed 100644
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/TextInputController.h
+++ b/Tools/DumpRenderTree/chromium/TestRunner/src/TextInputController.h
@@ -54,15 +54,9 @@
     void setMarkedText(const CppArgumentList&, CppVariant*);
     void unmarkText(const CppArgumentList&, CppVariant*);
     void hasMarkedText(const CppArgumentList&, CppVariant*);
-    void conversationIdentifier(const CppArgumentList&, CppVariant*);
-    void substringFromRange(const CppArgumentList&, CppVariant*);
-    void attributedSubstringFromRange(const CppArgumentList&, CppVariant*);
     void markedRange(const CppArgumentList&, CppVariant*);
     void selectedRange(const CppArgumentList&, CppVariant*);
     void firstRectForCharacterRange(const CppArgumentList&, CppVariant*);
-    void characterIndexForPoint(const CppArgumentList&, CppVariant*);
-    void validAttributesForMarkedText(const CppArgumentList&, CppVariant*);
-    void makeAttributedString(const CppArgumentList&, CppVariant*);
     void setComposition(const CppArgumentList&, CppVariant*);
 
 private:
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/WebPreferences.cpp b/Tools/DumpRenderTree/chromium/TestRunner/src/WebPreferences.cpp
index 0d95e4a..2947834 100644
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/WebPreferences.cpp
+++ b/Tools/DumpRenderTree/chromium/TestRunner/src/WebPreferences.cpp
@@ -31,49 +31,14 @@
 #include "config.h"
 #include "WebPreferences.h"
 
-#include "WebRuntimeFeatures.h"
-#include "WebView.h"
-
 using namespace WebKit;
 
 namespace WebTestRunner {
 
 void WebPreferences::reset()
 {
-#ifdef __APPLE__
-    cursiveFontFamily = WebString::fromUTF8("Apple Chancery");
-    fantasyFontFamily = WebString::fromUTF8("Papyrus");
-    WebString serif = WebString::fromUTF8("Times");
-#else
-    // These two fonts are picked from the intersection of
-    // Win XP font list and Vista font list :
-    //   http://www.microsoft.com/typography/fonts/winxp.htm
-    //   http://blogs.msdn.com/michkap/archive/2006/04/04/567881.aspx
-    // Some of them are installed only with CJK and complex script
-    // support enabled on Windows XP and are out of consideration here.
-    // (although we enabled both on our buildbots.)
-    // They (especially Impact for fantasy) are not typical cursive
-    // and fantasy fonts, but it should not matter for layout tests
-    // as long as they're available.
-    cursiveFontFamily = WebString::fromUTF8("Comic Sans MS");
-    fantasyFontFamily = WebString::fromUTF8("Impact");
-    // NOTE: case matters here, this must be 'times new roman', else
-    // some layout tests fail.
-    WebString serif = WebString::fromUTF8("times new roman");
-#endif
-    serifFontFamily = serif;
-    standardFontFamily = serif;
-    fixedFontFamily = WebString::fromUTF8("Courier");
-    sansSerifFontFamily = WebString::fromUTF8("Helvetica");
-
     defaultFontSize = 16;
-    defaultFixedFontSize = 13;
     minimumFontSize = 0;
-    minimumLogicalFontSize = 9;
-    // Do not disable acceleration for 2d canvas based on size.
-    // This makes having test expectations consistent.
-    minimumAccelerated2dCanvasSize = 0;
-
     DOMPasteAllowed = true;
     XSSAuditorEnabled = false;
     allowDisplayOfInsecureContent = true;
@@ -82,22 +47,17 @@
     authorAndUserStylesEnabled = true;
     defaultTextEncodingName = WebString::fromUTF8("ISO-8859-1");
     experimentalWebGLEnabled = false;
-    experimentalCSSExclusionsEnabled = true;
     experimentalCSSRegionsEnabled = true;
-    experimentalCSSGridLayoutEnabled = false;
+    experimentalCSSGridLayoutEnabled = true;
     javaEnabled = false;
     javaScriptCanAccessClipboard = true;
     javaScriptCanOpenWindowsAutomatically = true;
     supportsMultipleWindows = true;
     javaScriptEnabled = true;
     loadsImagesAutomatically = true;
-    localStorageEnabled = true;
     offlineWebApplicationCacheEnabled = true;
     pluginsEnabled = true;
-    shrinksStandaloneImagesToFit = false;
-    textAreasAreResizable = true;
     userStyleSheetLocation = WebURL();
-    webSecurityEnabled = true;
     caretBrowsingEnabled = false;
 
     // Allow those layout tests running as local files, i.e. under
@@ -112,111 +72,9 @@
 
     tabsToLinks = false;
     hyperlinkAuditingEnabled = false;
-    acceleratedCompositingForVideoEnabled = false;
-    acceleratedCompositingForFixedPositionEnabled = false;
-    acceleratedCompositingForOverflowScrollEnabled = false;
-    acceleratedCompositingForTransitionEnabled = false;
-    acceleratedCompositingEnabled = false;
-    accelerated2dCanvasEnabled = false;
-    forceCompositingMode = false;
-    threadedHTMLParser = true;
-    perTilePaintingEnabled = false;
-    deferredImageDecodingEnabled = false;
-    mediaPlaybackRequiresUserGesture = false;
-    mockScrollbarsEnabled = false;
     cssCustomFilterEnabled = false;
     shouldRespectImageOrientation = false;
     asynchronousSpellCheckingEnabled = false;
 }
 
-void WebPreferences::applyTo(WebView* webView)
-{
-    WebSettings* settings = webView->settings();
-    settings->setStandardFontFamily(standardFontFamily);
-    settings->setFixedFontFamily(fixedFontFamily);
-    settings->setSerifFontFamily(serifFontFamily);
-    settings->setSansSerifFontFamily(sansSerifFontFamily);
-    settings->setCursiveFontFamily(cursiveFontFamily);
-    settings->setFantasyFontFamily(fantasyFontFamily);
-
-    settings->setDefaultFontSize(defaultFontSize);
-    settings->setDefaultFixedFontSize(defaultFixedFontSize);
-    settings->setMinimumFontSize(minimumFontSize);
-    settings->setMinimumLogicalFontSize(minimumLogicalFontSize);
-    settings->setMinimumAccelerated2dCanvasSize(minimumAccelerated2dCanvasSize);
-
-    settings->setDOMPasteAllowed(DOMPasteAllowed);
-    settings->setXSSAuditorEnabled(XSSAuditorEnabled);
-    settings->setAllowDisplayOfInsecureContent(allowDisplayOfInsecureContent);
-    settings->setAllowFileAccessFromFileURLs(allowFileAccessFromFileURLs);
-    settings->setAllowRunningOfInsecureContent(allowRunningOfInsecureContent);
-    settings->setAuthorAndUserStylesEnabled(authorAndUserStylesEnabled);
-    settings->setDefaultTextEncodingName(defaultTextEncodingName);
-    settings->setExperimentalWebGLEnabled(experimentalWebGLEnabled);
-    WebRuntimeFeatures::enableCSSRegions(experimentalCSSRegionsEnabled);
-    WebRuntimeFeatures::enableCSSExclusions(experimentalCSSExclusionsEnabled);
-    settings->setExperimentalCSSGridLayoutEnabled(experimentalCSSGridLayoutEnabled);
-    settings->setExperimentalCSSCustomFilterEnabled(cssCustomFilterEnabled);
-    settings->setJavaEnabled(javaEnabled);
-    settings->setJavaScriptCanAccessClipboard(javaScriptCanAccessClipboard);
-    settings->setJavaScriptCanOpenWindowsAutomatically(javaScriptCanOpenWindowsAutomatically);
-    settings->setSupportsMultipleWindows(supportsMultipleWindows);
-    settings->setJavaScriptEnabled(javaScriptEnabled);
-    settings->setLoadsImagesAutomatically(loadsImagesAutomatically);
-    settings->setLocalStorageEnabled(localStorageEnabled);
-    settings->setOfflineWebApplicationCacheEnabled(offlineWebApplicationCacheEnabled);
-    settings->setPluginsEnabled(pluginsEnabled);
-    settings->setShrinksStandaloneImagesToFit(shrinksStandaloneImagesToFit);
-    settings->setTextAreasAreResizable(textAreasAreResizable);
-    settings->setUserStyleSheetLocation(userStyleSheetLocation);
-    settings->setWebSecurityEnabled(webSecurityEnabled);
-    settings->setAllowUniversalAccessFromFileURLs(allowUniversalAccessFromFileURLs);
-    settings->setEditingBehavior(editingBehavior);
-    settings->setHyperlinkAuditingEnabled(hyperlinkAuditingEnabled);
-    // LayoutTests were written with Safari Mac in mind which does not allow
-    // tabbing to links by default.
-    webView->setTabsToLinks(tabsToLinks);
-    settings->setCaretBrowsingEnabled(caretBrowsingEnabled);
-    settings->setAcceleratedCompositingEnabled(acceleratedCompositingEnabled);
-    settings->setAcceleratedCompositingForVideoEnabled(acceleratedCompositingForVideoEnabled);
-    settings->setAcceleratedCompositingForFixedPositionEnabled(acceleratedCompositingForFixedPositionEnabled);
-    settings->setAcceleratedCompositingForOverflowScrollEnabled(acceleratedCompositingForOverflowScrollEnabled);
-    settings->setAcceleratedCompositingForTransitionEnabled(acceleratedCompositingForTransitionEnabled);
-    settings->setFixedPositionCreatesStackingContext(acceleratedCompositingForFixedPositionEnabled);
-    settings->setForceCompositingMode(forceCompositingMode);
-    settings->setThreadedHTMLParser(threadedHTMLParser);
-    settings->setAccelerated2dCanvasEnabled(accelerated2dCanvasEnabled);
-    settings->setPerTilePaintingEnabled(perTilePaintingEnabled);
-    settings->setDeferredImageDecodingEnabled(deferredImageDecodingEnabled);
-    settings->setMediaPlaybackRequiresUserGesture(mediaPlaybackRequiresUserGesture);
-    settings->setMockScrollbarsEnabled(mockScrollbarsEnabled);
-    settings->setShouldRespectImageOrientation(shouldRespectImageOrientation);
-    settings->setAsynchronousSpellCheckingEnabled(asynchronousSpellCheckingEnabled);
-
-    // Fixed values.
-    settings->setTouchDragDropEnabled(false);
-    settings->setTouchEditingEnabled(false);
-    settings->setTextDirectionSubmenuInclusionBehaviorNeverIncluded();
-    settings->setDownloadableBinaryFontsEnabled(true);
-    settings->setAllowScriptsToCloseWindows(false);
-    settings->setNeedsSiteSpecificQuirks(true);
-    settings->setEditableLinkBehaviorNeverLive();
-    settings->setEnableScrollAnimator(false);
-    settings->setFontRenderingModeNormal();
-    settings->setTextDirectionSubmenuInclusionBehaviorNeverIncluded();
-    settings->setUsesEncodingDetector(false);
-    settings->setImagesEnabled(true);
-    // Enable fullscreen so the fullscreen layout tests can run.
-    settings->setFullScreenEnabled(true);
-    settings->setValidationMessageTimerMagnification(-1);
-    settings->setVisualWordMovementEnabled(false);
-    settings->setPasswordEchoEnabled(false);
-    settings->setSmartInsertDeleteEnabled(true);
-#ifdef WIN32
-    settings->setSelectTrailingWhitespaceEnabled(true);
-#else
-    settings->setSelectTrailingWhitespaceEnabled(false);
-#endif
-}
-
 }
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp b/Tools/DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp
index 60cf3a0..040277c 100644
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp
+++ b/Tools/DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp
@@ -36,6 +36,7 @@
 #include "MockColorChooser.h"
 #include "MockWebSpeechInputController.h"
 #include "MockWebSpeechRecognizer.h"
+#include "MockWebValidationMessageClient.h"
 #include "SpellCheckClient.h"
 #include "TestCommon.h"
 #include "TestInterfaces.h"
@@ -78,6 +79,20 @@
 
 namespace {
 
+class HostMethodTask : public WebMethodTask<WebTestProxyBase> {
+public:
+    typedef void (WebTestProxyBase::*CallbackMethodType)();
+    HostMethodTask(WebTestProxyBase* object, CallbackMethodType callback)
+        : WebMethodTask<WebTestProxyBase>(object)
+        , m_callback(callback)
+    { }
+
+    virtual void runIfValid() { (m_object->*m_callback)(); }
+
+private:
+    CallbackMethodType m_callback;
+};
+
 void printNodeDescription(WebTestDelegate* delegate, const WebNode& node, int exception)
 {
     if (exception) {
@@ -442,6 +457,7 @@
     , m_webWidget(0)
     , m_spellcheck(new SpellCheckClient)
     , m_chooserCount(0)
+    , m_validationMessageClient(new MockWebValidationMessageClient())
 {
     reset();
 }
@@ -461,6 +477,7 @@
 {
     m_delegate = delegate;
     m_spellcheck->setDelegate(delegate);
+    m_validationMessageClient->setDelegate(delegate);
 #if ENABLE_INPUT_SPEECH
     if (m_speechInputController.get())
         m_speechInputController->setDelegate(delegate);
@@ -491,6 +508,7 @@
     m_paintRect = WebRect();
     m_canvas.reset();
     m_isPainting = false;
+    m_animateScheduled = false;
     m_resourceIdentifierMap.clear();
     m_logConsoleOutput = true;
     if (m_geolocationClient.get())
@@ -506,6 +524,11 @@
     return m_spellcheck.get();
 }
 
+WebValidationMessageClient* WebTestProxyBase::validationMessageClient()
+{
+    return m_validationMessageClient.get();
+}
+
 WebColorChooser* WebTestProxyBase::createColorChooser(WebColorChooserClient* client, const WebKit::WebColor& color)
 {
     // This instance is deleted by WebCore::ColorInputType
@@ -750,30 +773,49 @@
     didInvalidateRect(clipRect);
 }
 
-void WebTestProxyBase::scheduleComposite()
+void WebTestProxyBase::invalidateAll()
 {
     m_paintRect = WebRect(0, 0, INT_MAX, INT_MAX);
 }
 
+void WebTestProxyBase::scheduleComposite()
+{
+    invalidateAll();
+}
+
 void WebTestProxyBase::scheduleAnimation()
 {
-    scheduleComposite();
+    if (!m_testInterfaces->testRunner()->testIsRunning())
+        return;
+
+    if (!m_animateScheduled) {
+        m_animateScheduled = true;
+        m_delegate->postDelayedTask(new HostMethodTask(this, &WebTestProxyBase::animateNow), 1);
+    }
+}
+
+void WebTestProxyBase::animateNow()
+{
+    if (m_animateScheduled) {
+        m_animateScheduled = false;
+        webWidget()->animate(0.0);
+    }
 }
 
 void WebTestProxyBase::show(WebNavigationPolicy)
 {
-    scheduleComposite();
+    invalidateAll();
 }
 
 void WebTestProxyBase::setWindowRect(const WebRect& rect)
 {
-    scheduleComposite();
+    invalidateAll();
     discardBackingStore();
 }
 
 void WebTestProxyBase::didAutoResize(const WebSize&)
 {
-    scheduleComposite();
+    invalidateAll();
 }
 
 void WebTestProxyBase::postAccessibilityNotification(const WebKit::WebAccessibilityObject& obj, WebKit::WebAccessibilityNotification notification)
diff --git a/Tools/DumpRenderTree/chromium/TestShell.cpp b/Tools/DumpRenderTree/chromium/TestShell.cpp
deleted file mode 100644
index b711f34..0000000
--- a/Tools/DumpRenderTree/chromium/TestShell.cpp
+++ /dev/null
@@ -1,563 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "TestShell.h"
-
-#include "DRTDevToolsAgent.h"
-#include "DRTDevToolsClient.h"
-#include "MockPlatform.h"
-#include "MockWebPrerenderingSupport.h"
-#include "WebArrayBufferView.h"
-#include "WebDataSource.h"
-#include "WebDocument.h"
-#include "WebElement.h"
-#include "WebFrame.h"
-#include "WebHistoryItem.h"
-#include "WebTestingSupport.h"
-#include "WebSettings.h"
-#include "WebTestProxy.h"
-#include "WebTestRunner.h"
-#include "WebView.h"
-#include "WebViewHost.h"
-#include "skia/ext/platform_canvas.h"
-#include "webkit/support/webkit_support.h"
-#include "webkit/support/webkit_support_gfx.h"
-#include "public/platform/Platform.h"
-#include "public/platform/WebCompositorSupport.h"
-#include "public/platform/WebPoint.h"
-#include "public/platform/WebSize.h"
-#include "public/platform/WebString.h"
-#include "public/platform/WebThread.h"
-#include "public/platform/WebURLRequest.h"
-#include "public/platform/WebURLResponse.h"
-#include <algorithm>
-#include <cctype>
-#include <vector>
-#include <wtf/MD5.h>
-#include <wtf/OwnArrayPtr.h>
-
-
-using namespace WebKit;
-using namespace WebTestRunner;
-using namespace std;
-
-// Content area size for newly created windows.
-static const int testWindowWidth = 800;
-static const int testWindowHeight = 600;
-
-// The W3C SVG layout tests use a different size than the other layout tests.
-static const int SVGTestWindowWidth = 480;
-static const int SVGTestWindowHeight = 360;
-
-static const char layoutTestsPattern[] = "/LayoutTests/";
-static const string::size_type layoutTestsPatternSize = sizeof(layoutTestsPattern) - 1;
-static const char fileUrlPattern[] = "file:/";
-static const char fileTestPrefix[] = "(file test):";
-static const char dataUrlPattern[] = "data:";
-static const string::size_type dataUrlPatternSize = sizeof(dataUrlPattern) - 1;
-
-// FIXME: Move this to a common place so that it can be shared with
-// WebCore::TransparencyWin::makeLayerOpaque().
-static void makeCanvasOpaque(SkCanvas* canvas)
-{
-    const SkBitmap& bitmap = canvas->getTopDevice()->accessBitmap(true);
-    ASSERT(bitmap.config() == SkBitmap::kARGB_8888_Config);
-
-    SkAutoLockPixels lock(bitmap);
-    for (int y = 0; y < bitmap.height(); y++) {
-        uint32_t* row = bitmap.getAddr32(0, y);
-        for (int x = 0; x < bitmap.width(); x++)
-            row[x] |= 0xFF000000; // Set alpha bits to 1.
-    }
-}
-
-TestShell::TestShell()
-    : m_testIsPending(false)
-    , m_testIsPreparing(false)
-    , m_focusedWidget(0)
-    , m_devTools(0)
-    , m_dumpPixelsForCurrentTest(false)
-    , m_allowExternalPages(false)
-    , m_acceleratedCompositingForVideoEnabled(false)
-    , m_acceleratedCompositingForFixedPositionEnabled(false)
-    , m_acceleratedCompositingForOverflowScrollEnabled(false)
-    , m_acceleratedCompositingForTransitionEnabled(false)
-    , m_softwareCompositingEnabled(false)
-    , m_threadedCompositingEnabled(false)
-    , m_forceCompositingMode(false)
-    , m_threadedHTMLParser(true)
-    , m_accelerated2dCanvasEnabled(false)
-    , m_perTilePaintingEnabled(false)
-    , m_deferredImageDecodingEnabled(false)
-    , m_stressOpt(false)
-    , m_stressDeopt(false)
-    , m_dumpWhenFinished(true)
-    , m_isDisplayingModalDialog(false)
-{
-    // 30 second is the same as the value in Mac DRT.
-    // If we use a value smaller than the timeout value of
-    // (new-)run-webkit-tests, (new-)run-webkit-tests misunderstands that a
-    // timed-out DRT process was crashed.
-    m_timeout = 30 * 1000;
-}
-
-void TestShell::initialize(MockPlatform* platformSupport)
-{
-    m_testInterfaces = adoptPtr(new WebTestInterfaces());
-    platformSupport->setInterfaces(m_testInterfaces.get());
-    m_devToolsTestInterfaces = adoptPtr(new WebTestInterfaces());
-    m_prerenderingSupport = adoptPtr(new MockWebPrerenderingSupport());
-#if !defined(USE_DEFAULT_RENDER_THEME) && (OS(WINDOWS) || OS(DARWIN))
-    // Set theme engine.
-    webkit_support::SetThemeEngine(m_testInterfaces->themeEngine());
-#endif
-
-    if (m_threadedCompositingEnabled)
-        m_webCompositorThread = adoptPtr(WebKit::Platform::current()->createThread("Compositor"));
-    webkit_support::SetThreadedCompositorEnabled(m_threadedCompositingEnabled);
-
-    createMainWindow();
-}
-
-void TestShell::createMainWindow()
-{
-    m_drtDevToolsAgent = adoptPtr(new DRTDevToolsAgent);
-    m_webViewHost = adoptPtr(createNewWindow(WebURL(), m_drtDevToolsAgent.get(), m_testInterfaces.get()));
-    m_webView = m_webViewHost->webView();
-    m_testInterfaces->setDelegate(m_webViewHost.get());
-    m_testInterfaces->setWebView(m_webView, m_webViewHost->proxy());
-    m_drtDevToolsAgent->setWebView(m_webView);
-}
-
-TestShell::~TestShell()
-{
-    if (m_webViewHost)
-        m_webViewHost->shutdown();
-    m_testInterfaces->setDelegate(0);
-    m_testInterfaces->setWebView(0, 0);
-    m_devToolsTestInterfaces->setDelegate(0);
-    m_devToolsTestInterfaces->setWebView(0, 0);
-    m_drtDevToolsAgent->setWebView(0);
-}
-
-void TestShell::createDRTDevToolsClient(DRTDevToolsAgent* agent)
-{
-    m_drtDevToolsClient = adoptPtr(new DRTDevToolsClient(agent, m_devTools->webView()));
-}
-
-void TestShell::showDevTools()
-{
-    if (!m_devTools) {
-        WebURL url = webkit_support::GetDevToolsPathAsURL();
-        if (!url.isValid()) {
-            ASSERT(false);
-            return;
-        }
-        m_devTools = createNewWindow(url, 0, m_devToolsTestInterfaces.get());
-        m_devTools->webView()->settings()->setMemoryInfoEnabled(true);
-        m_devTools->proxy()->setLogConsoleOutput(false);
-        m_devToolsTestInterfaces->setDelegate(m_devTools);
-        m_devToolsTestInterfaces->setWebView(m_devTools->webView(), m_devTools->proxy());
-        ASSERT(m_devTools);
-        createDRTDevToolsClient(m_drtDevToolsAgent.get());
-    }
-    m_devTools->show(WebKit::WebNavigationPolicyNewWindow);
-}
-
-void TestShell::closeDevTools()
-{
-    if (m_devTools) {
-        m_devTools->webView()->settings()->setMemoryInfoEnabled(false);
-        m_drtDevToolsAgent->reset();
-        m_drtDevToolsClient.clear();
-        m_devToolsTestInterfaces->setDelegate(0);
-        m_devToolsTestInterfaces->setWebView(0, 0);
-        closeWindow(m_devTools);
-        m_devTools = 0;
-    }
-}
-
-void TestShell::resetWebSettings(WebView& webView)
-{
-    m_prefs.reset();
-    m_prefs.acceleratedCompositingEnabled = true;
-    m_prefs.acceleratedCompositingForVideoEnabled = m_acceleratedCompositingForVideoEnabled;
-    m_prefs.acceleratedCompositingForFixedPositionEnabled = m_acceleratedCompositingForFixedPositionEnabled;
-    m_prefs.acceleratedCompositingForOverflowScrollEnabled = m_acceleratedCompositingForOverflowScrollEnabled;
-    m_prefs.acceleratedCompositingForTransitionEnabled = m_acceleratedCompositingForTransitionEnabled;
-    m_prefs.forceCompositingMode = m_forceCompositingMode;
-    m_prefs.accelerated2dCanvasEnabled = m_accelerated2dCanvasEnabled;
-    m_prefs.perTilePaintingEnabled = m_perTilePaintingEnabled;
-    m_prefs.deferredImageDecodingEnabled = m_deferredImageDecodingEnabled;
-    m_prefs.threadedHTMLParser = m_threadedHTMLParser;
-    m_prefs.applyTo(&webView);
-}
-
-void TestShell::runFileTest(const TestParams& params, bool shouldDumpPixels)
-{
-    ASSERT(params.testUrl.isValid());
-    m_dumpPixelsForCurrentTest = shouldDumpPixels;
-    m_testIsPreparing = true;
-    m_testInterfaces->setTestIsRunning(true);
-    m_params = params;
-    string testUrl = m_params.testUrl.spec();
-    m_testInterfaces->configureForTestWithURL(m_params.testUrl, shouldDumpPixels);
-
-    if (testUrl.find("compositing/") != string::npos || testUrl.find("compositing\\") != string::npos) {
-        if (!m_softwareCompositingEnabled)
-            m_prefs.accelerated2dCanvasEnabled = true;
-        m_prefs.acceleratedCompositingForVideoEnabled = true;
-        m_prefs.mockScrollbarsEnabled = true;
-        m_prefs.applyTo(m_webView);
-    }
-
-    if (m_dumpWhenFinished)
-        m_printer.handleTestHeader(testUrl.c_str());
-    loadURL(m_params.testUrl);
-
-    if (m_devTools)
-        this->setFocus(m_devTools->webView(), true);
-
-    m_testIsPreparing = false;
-    waitTestFinished();
-}
-
-static inline bool isSVGTestURL(const WebURL& url)
-{
-    return url.isValid() && string(url.spec()).find("W3C-SVG-1.1") != string::npos;
-}
-
-void TestShell::resizeWindowForTest(WebViewHost* window, const WebURL& url)
-{
-    int width, height;
-    if (isSVGTestURL(url)) {
-        width = SVGTestWindowWidth;
-        height = SVGTestWindowHeight;
-    } else {
-        width = testWindowWidth;
-        height = testWindowHeight;
-    }
-    window->setWindowRect(WebRect(WebViewHost::screenUnavailableBorder, WebViewHost::screenUnavailableBorder, width + virtualWindowBorder * 2, height + virtualWindowBorder * 2));
-}
-
-void TestShell::resetTestController()
-{
-    resetWebSettings(*webView());
-    m_testInterfaces->resetAll();
-    m_devToolsTestInterfaces->resetAll();
-    m_webViewHost->reset();
-    m_drtDevToolsAgent->reset();
-    if (m_drtDevToolsClient)
-        m_drtDevToolsClient->reset();
-    webView()->setPageScaleFactor(1, WebPoint(0, 0));
-    webView()->enableFixedLayoutMode(false);
-    webView()->setFixedLayoutSize(WebSize(0, 0));
-    webView()->mainFrame()->clearOpener();
-    WebTestingSupport::resetInternalsObject(webView()->mainFrame());
-}
-
-void TestShell::loadURL(const WebURL& url)
-{
-    m_webViewHost->loadURLForFrame(url, string());
-}
-
-void TestShell::reload()
-{
-    m_webViewHost->navigationController()->reload();
-}
-
-void TestShell::goToOffset(int offset)
-{
-     m_webViewHost->navigationController()->goToOffset(offset);
-}
-
-int TestShell::navigationEntryCount() const
-{
-    return m_webViewHost->navigationController()->entryCount();
-}
-
-void TestShell::callJSGC()
-{
-    m_webView->mainFrame()->collectGarbage();
-}
-
-void TestShell::setFocus(WebWidget* widget, bool enable)
-{
-    // Simulate the effects of InteractiveSetFocus(), which includes calling
-    // both setFocus() and setIsActive().
-    if (enable) {
-        if (m_focusedWidget != widget) {
-            if (m_focusedWidget)
-                m_focusedWidget->setFocus(false);
-            webView()->setIsActive(enable);
-            widget->setFocus(enable);
-            m_focusedWidget = widget;
-        }
-    } else {
-        if (m_focusedWidget == widget) {
-            widget->setFocus(enable);
-            webView()->setIsActive(enable);
-            m_focusedWidget = 0;
-        }
-    }
-}
-
-void TestShell::testFinished(WebViewHost* host)
-{
-    if (host == m_devTools)
-        return;
-
-    if (!m_testIsPending)
-        return;
-    m_testIsPending = false;
-    m_testInterfaces->setTestIsRunning(false);
-    if (m_dumpWhenFinished)
-        dump();
-    webkit_support::QuitMessageLoop();
-}
-
-void TestShell::testTimedOut()
-{
-    m_printer.handleTimedOut();
-    testFinished(webViewHost());
-}
-
-void TestShell::dump()
-{
-    // Dump the requested representation.
-    WebFrame* frame = m_webView->mainFrame();
-    if (!frame)
-        return;
-    bool shouldDumpAsAudio = m_testInterfaces->testRunner()->shouldDumpAsAudio();
-    bool shouldGeneratePixelResults = m_testInterfaces->testRunner()->shouldGeneratePixelResults();
-    bool dumpedAnything = false;
-
-    if (shouldDumpAsAudio) {
-        const WebKit::WebArrayBufferView* webArrayBufferView = m_testInterfaces->testRunner()->audioData();
-        m_printer.handleAudio(webArrayBufferView->baseAddress(), webArrayBufferView->byteLength());
-        m_printer.handleAudioFooter();
-        m_printer.handleTestFooter(true);
-
-        fflush(stdout);
-        fflush(stderr);
-        return;
-    }
-
-    if (m_params.dumpTree) {
-        dumpedAnything = true;
-        m_printer.handleTextHeader();
-        string dataUtf8 = m_webViewHost->proxy()->captureTree(m_params.debugRenderTree);
-        if (fwrite(dataUtf8.c_str(), 1, dataUtf8.size(), stdout) != dataUtf8.size())
-            FATAL("Short write to stdout, disk full?\n");
-    }
-    if (dumpedAnything && m_params.printSeparators)
-        m_printer.handleTextFooter();
-
-    if (m_dumpPixelsForCurrentTest && shouldGeneratePixelResults) {
-        // Image output: we write the image data to the file given on the
-        // command line (for the dump pixels argument), and the MD5 sum to
-        // stdout.
-        dumpedAnything = true;
-        dumpImage(m_webViewHost->proxy()->capturePixels());
-    }
-    m_printer.handleTestFooter(dumpedAnything);
-    fflush(stdout);
-    fflush(stderr);
-}
-
-void TestShell::dumpImage(SkCanvas* canvas) const
-{
-    // Fix the alpha. The expected PNGs on Mac have an alpha channel, so we want
-    // to keep it. On Windows, the alpha channel is wrong since text/form control
-    // drawing may have erased it in a few places. So on Windows we force it to
-    // opaque and also don't write the alpha channel for the reference. Linux
-    // doesn't have the wrong alpha like Windows, but we match Windows.
-#if OS(DARWIN)
-    bool discardTransparency = false;
-#else
-    bool discardTransparency = true;
-    makeCanvasOpaque(canvas);
-#endif
-
-    const SkBitmap& sourceBitmap = canvas->getTopDevice()->accessBitmap(false);
-    SkAutoLockPixels sourceBitmapLock(sourceBitmap);
-
-    // Compute MD5 sum.
-    MD5 digester;
-    Vector<uint8_t, 16> digestValue;
-#if OS(ANDROID)
-    // On Android, pixel layout is RGBA (see third_party/skia/include/core/SkColorPriv.h);
-    // however, other Chrome platforms use BGRA (see skia/config/SkUserConfig.h).
-    // To match the checksum of other Chrome platforms, we need to reorder the layout of pixels.
-    // NOTE: The following code assumes we use SkBitmap::kARGB_8888_Config,
-    // which has been checked in device.makeOpaque() (see above).
-    const uint8_t* rawPixels = reinterpret_cast<const uint8_t*>(sourceBitmap.getPixels());
-    size_t bitmapSize = sourceBitmap.getSize();
-    OwnArrayPtr<uint8_t> reorderedPixels = adoptArrayPtr(new uint8_t[bitmapSize]);
-    for (size_t i = 0; i < bitmapSize; i += 4) {
-        reorderedPixels[i] = rawPixels[i + 2]; // R
-        reorderedPixels[i + 1] = rawPixels[i + 1]; // G
-        reorderedPixels[i + 2] = rawPixels[i]; // B
-        reorderedPixels[i + 3] = rawPixels[i + 3]; // A
-    }
-    digester.addBytes(reorderedPixels.get(), bitmapSize);
-    reorderedPixels.clear();
-#else
-    digester.addBytes(reinterpret_cast<const uint8_t*>(sourceBitmap.getPixels()), sourceBitmap.getSize());
-#endif
-    digester.checksum(digestValue);
-    string md5hash;
-    md5hash.reserve(16 * 2);
-    for (unsigned i = 0; i < 16; ++i) {
-        char hex[3];
-        // Use "x", not "X". The string must be lowercased.
-        sprintf(hex, "%02x", digestValue[i]);
-        md5hash.append(hex);
-    }
-
-    // Only encode and dump the png if the hashes don't match. Encoding the
-    // image is really expensive.
-    if (md5hash.compare(m_params.pixelHash)) {
-        std::vector<unsigned char> png;
-#if OS(ANDROID)
-        webkit_support::EncodeRGBAPNGWithChecksum(reinterpret_cast<const unsigned char*>(sourceBitmap.getPixels()), sourceBitmap.width(),
-            sourceBitmap.height(), static_cast<int>(sourceBitmap.rowBytes()), discardTransparency, md5hash, &png);
-#else
-        webkit_support::EncodeBGRAPNGWithChecksum(reinterpret_cast<const unsigned char*>(sourceBitmap.getPixels()), sourceBitmap.width(),
-            sourceBitmap.height(), static_cast<int>(sourceBitmap.rowBytes()), discardTransparency, md5hash, &png);
-#endif
-
-        m_printer.handleImage(md5hash.c_str(), m_params.pixelHash.c_str(), &png[0], png.size());
-    } else
-        m_printer.handleImage(md5hash.c_str(), m_params.pixelHash.c_str(), 0, 0);
-}
-
-void TestShell::bindJSObjectsToWindow(WebFrame* frame)
-{
-    WebTestingSupport::injectInternalsObject(frame);
-    if (m_devTools && m_devTools->webView() == frame->view())
-        m_devToolsTestInterfaces->bindTo(frame);
-    else
-        m_testInterfaces->bindTo(frame);
-}
-
-WebViewHost* TestShell::createNewWindow(const WebKit::WebURL& url)
-{
-    return createNewWindow(url, 0, m_testInterfaces.get());
-}
-
-WebViewHost* TestShell::createNewWindow(const WebKit::WebURL& url, DRTDevToolsAgent* devToolsAgent, WebTestInterfaces *testInterfaces)
-{
-    WebTestProxy<WebViewHost, TestShell*>* host = new WebTestProxy<WebViewHost, TestShell*>(this);
-    host->setInterfaces(testInterfaces);
-    if (m_webViewHost)
-        host->setDelegate(m_webViewHost.get());
-    else
-        host->setDelegate(host);
-    host->setProxy(host);
-    WebView* view = WebView::create(host);
-    view->setPermissionClient(testInterfaces->testRunner()->webPermissions());
-    view->setDevToolsAgentClient(devToolsAgent);
-    host->setWebWidget(view);
-    m_prefs.applyTo(view);
-    view->initializeMainFrame(host);
-    m_windowList.append(host);
-    host->loadURLForFrame(url, string());
-    return host;
-}
-
-void TestShell::closeWindow(WebViewHost* window)
-{
-    size_t i = m_windowList.find(window);
-    if (i == notFound) {
-        ASSERT_NOT_REACHED();
-        return;
-    }
-    m_windowList.remove(i);
-    WebWidget* focusedWidget = m_focusedWidget;
-    if (window->webWidget() == m_focusedWidget)
-        focusedWidget = 0;
-
-    window->shutdown();
-    delete window;
-    // We set the focused widget after deleting the web view host because it
-    // can change the focus.
-    m_focusedWidget = focusedWidget;
-    if (m_focusedWidget) {
-        webView()->setIsActive(true);
-        m_focusedWidget->setFocus(true);
-    }
-}
-
-void TestShell::closeRemainingWindows()
-{
-    // Just close devTools window manually because we have custom deinitialization code for it.
-    closeDevTools();
-
-    // Iterate through the window list and close everything except the main
-    // window. We don't want to delete elements as we're iterating, so we copy
-    // to a temp vector first.
-    Vector<WebViewHost*> windowsToDelete;
-    for (unsigned i = 0; i < m_windowList.size(); ++i) {
-        if (m_windowList[i] != webViewHost())
-            windowsToDelete.append(m_windowList[i]);
-    }
-    ASSERT(windowsToDelete.size() + 1 == m_windowList.size());
-    for (unsigned i = 0; i < windowsToDelete.size(); ++i)
-        closeWindow(windowsToDelete[i]);
-    ASSERT(m_windowList.size() == 1);
-}
-
-int TestShell::windowCount()
-{
-    return m_windowList.size();
-}
-
-void TestShell::captureHistoryForWindow(size_t windowIndex, WebVector<WebHistoryItem>* history, size_t* currentEntryIndex)
-{
-    ASSERT(history);
-    ASSERT(currentEntryIndex);
-    if (windowIndex >= m_windowList.size())
-        return;
-    TestNavigationController& navigationController = *m_windowList[windowIndex]->navigationController();
-    size_t entryCount = navigationController.entryCount();
-    WebVector<WebHistoryItem> result(entryCount);
-    *currentEntryIndex = navigationController.lastCommittedEntryIndex();
-    for (size_t index = 0; index < entryCount; ++index) {
-        WebHistoryItem historyItem = navigationController.entryAtIndex(index)->contentState();
-        if (historyItem.isNull()) {
-            historyItem.initialize();
-            historyItem.setURLString(navigationController.entryAtIndex(index)->URL().spec().utf16());
-        }
-        result[index] = historyItem;
-    }
-    history->swap(result);
-}
diff --git a/Tools/DumpRenderTree/chromium/TestShell.h b/Tools/DumpRenderTree/chromium/TestShell.h
deleted file mode 100644
index 2263624..0000000
--- a/Tools/DumpRenderTree/chromium/TestShell.h
+++ /dev/null
@@ -1,243 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TestShell_h
-#define TestShell_h
-
-#include "TestEventPrinter.h"
-#include "WebPreferences.h"
-#include "WebTestInterfaces.h"
-#include "WebViewHost.h"
-#include <string>
-#include <wtf/OwnPtr.h>
-#include <wtf/Vector.h>
-
-// TestShell is a container of global variables and has bridge functions between
-// various objects. Only one instance is created in one DRT process.
-
-namespace WebKit {
-class WebDevToolsAgentClient;
-class WebFrame;
-class WebThread;
-class WebView;
-class WebThemeEngine;
-class WebURL;
-}
-
-class DRTDevToolsAgent;
-class DRTDevToolsCallArgs;
-class DRTDevToolsClient;
-class MockWebPrerenderingSupport;
-class MockPlatform;
-
-struct TestParams {
-    bool dumpTree;
-    bool debugRenderTree;
-    bool debugLayerTree;
-    bool printSeparators;
-    WebKit::WebURL testUrl;
-    std::string pixelHash;
-
-    TestParams()
-        : dumpTree(true)
-        , debugRenderTree(false)
-        , debugLayerTree(false)
-        , printSeparators(false) { }
-};
-
-class TestShell {
-public:
-    TestShell();
-    ~TestShell();
-
-    void initialize(MockPlatform*);
-
-    // The main WebView.
-    WebKit::WebView* webView() const { return m_webView; }
-    // Returns the host for the main WebView.
-    WebViewHost* webViewHost() const { return m_webViewHost.get(); }
-    WebTestRunner::WebTestRunner* testRunner() const { return m_testInterfaces->testRunner(); }
-    const TestEventPrinter* printer() const { return &m_printer; }
-
-    WebTestRunner::WebPreferences* preferences() { return &m_prefs; }
-    void applyPreferences() { m_prefs.applyTo(m_webView); }
-
-    void bindJSObjectsToWindow(WebKit::WebFrame*);
-    void runFileTest(const TestParams&, bool shouldDumpPixelTests);
-    void callJSGC();
-    void resetTestController();
-    void waitTestFinished();
-
-    // Operations to the main window.
-    void loadURL(const WebKit::WebURL&);
-    void reload();
-    void goToOffset(int offset);
-    int navigationEntryCount() const;
-
-    void setFocus(WebKit::WebWidget*, bool enable);
-
-    // Called by the DRTTestRunner to signal test completion.
-    void testFinished(WebViewHost*);
-    // Called by DRTTestRunner when a test hits the timeout, but does not
-    // cause a hang. We can avoid killing TestShell in this case and still dump
-    // the test results.
-    void testTimedOut();
-
-    bool allowExternalPages() const { return m_allowExternalPages; }
-    void setAllowExternalPages(bool allowExternalPages) { m_allowExternalPages = allowExternalPages; }
-
-    void setAcceleratedCompositingForVideoEnabled(bool enabled) { m_acceleratedCompositingForVideoEnabled = enabled; }
-    void setAcceleratedCompositingForFixedPositionEnabled(bool enabled) { m_acceleratedCompositingForFixedPositionEnabled = enabled; }
-    void setAcceleratedCompositingForOverflowScrollEnabled(bool enabled) { m_acceleratedCompositingForOverflowScrollEnabled = enabled; }
-    void setAcceleratedCompositingForTransitionEnabled(bool enabled) { m_acceleratedCompositingForTransitionEnabled = enabled; }
-    bool softwareCompositingEnabled() { return m_softwareCompositingEnabled; }
-    void setSoftwareCompositingEnabled(bool enabled) { m_softwareCompositingEnabled = enabled; }
-    void setThreadedCompositingEnabled(bool enabled) { m_threadedCompositingEnabled = enabled; }
-    void setForceCompositingMode(bool enabled) { m_forceCompositingMode = enabled; }
-    void setThreadedHTMLParser(bool enabled) { m_threadedHTMLParser = enabled; }
-    void setAccelerated2dCanvasEnabled(bool enabled) { m_accelerated2dCanvasEnabled = enabled; }
-    void setPerTilePaintingEnabled(bool enabled) { m_perTilePaintingEnabled = enabled; }
-    void setDeferredImageDecodingEnabled(bool enabled) { m_deferredImageDecodingEnabled = enabled; }
-#if defined(OS_WIN)
-    // Access to the finished event. Used by the static WatchDog thread.
-    HANDLE finishedEvent() { return m_finishedEvent; }
-#endif
-
-    // Get the timeout for running a test in milliseconds.
-    int layoutTestTimeout() { return m_timeout; }
-    int layoutTestTimeoutForWatchDog() { return layoutTestTimeout() + 1000; }
-    void setLayoutTestTimeout(int timeout) { m_timeout = timeout; }
-
-    // V8 JavaScript stress test options.
-    int stressOpt() { return m_stressOpt; }
-    void setStressOpt(bool stressOpt) { m_stressOpt = stressOpt; }
-    int stressDeopt() { return m_stressDeopt; }
-    void setStressDeopt(int stressDeopt) { m_stressDeopt = stressDeopt; }
-
-    // The JavaScript flags specified as a strings.
-    std::string javaScriptFlags() { return m_javaScriptFlags; }
-    void setJavaScriptFlags(std::string javaScriptFlags) { m_javaScriptFlags = javaScriptFlags; }
-
-    // Set whether to dump when the loaded page has finished processing. This is used with multiple load
-    // testing where we only want to have the output from the last load.
-    void setDumpWhenFinished(bool dumpWhenFinished) { m_dumpWhenFinished = dumpWhenFinished; }
-
-    void setIsDisplayingModalDialog(bool isDisplayingModalDialog) { m_isDisplayingModalDialog = isDisplayingModalDialog; }
-    bool isDisplayingModalDialog() const { return m_isDisplayingModalDialog; }
-
-    // Set whether the binary data output should be encoded in base64 text.
-    void setEncodeBinary(bool encodeBinary) { m_printer.setEncodeBinary(encodeBinary); }
-
-    WebViewHost* createNewWindow(const WebKit::WebURL&);
-    void closeWindow(WebViewHost*);
-    void closeRemainingWindows();
-    int windowCount();
-    void captureHistoryForWindow(size_t windowIndex, WebKit::WebVector<WebKit::WebHistoryItem>*, size_t* currentEntryIndex);
-    static void resizeWindowForTest(WebViewHost*, const WebKit::WebURL&);
-
-    void showDevTools();
-    void closeDevTools();
-
-    DRTDevToolsAgent* drtDevToolsAgent() { return m_drtDevToolsAgent.get(); }
-    DRTDevToolsClient* drtDevToolsClient() { return m_drtDevToolsClient.get(); }
-    WebViewHost* devToolsWebView() { return m_devTools; }
-
-    static const int virtualWindowBorder = 3;
-
-    typedef Vector<WebViewHost*> WindowList;
-    WindowList windowList() const { return m_windowList; }
-
-    WebKit::WebThread* webCompositorThread() const { return m_webCompositorThread.get(); }
-
-private:
-    WebViewHost* createNewWindow(const WebKit::WebURL&, DRTDevToolsAgent*, WebTestRunner::WebTestInterfaces*);
-    void createMainWindow();
-    void createDRTDevToolsClient(DRTDevToolsAgent*);
-
-    void resetWebSettings(WebKit::WebView&);
-    void dump();
-    std::string dumpAllBackForwardLists();
-    void dumpImage(SkCanvas*) const;
-
-    bool m_testIsPending;
-    bool m_testIsPreparing;
-    WebKit::WebView* m_webView;
-    WebKit::WebWidget* m_focusedWidget;
-    WebViewHost* m_devTools;
-
-    // Be careful of the destruction order of the following objects.
-    TestEventPrinter m_printer;
-    OwnPtr<DRTDevToolsAgent> m_drtDevToolsAgent;
-    OwnPtr<DRTDevToolsClient> m_drtDevToolsClient;
-    OwnPtr<WebTestRunner::WebTestInterfaces> m_testInterfaces;
-    OwnPtr<WebTestRunner::WebTestInterfaces> m_devToolsTestInterfaces;
-    // It's important that this thread is destroyed after the WebViewHost.
-    OwnPtr<WebKit::WebThread> m_webCompositorThread;
-    OwnPtr<WebViewHost> m_webViewHost;
-    OwnPtr<MockWebPrerenderingSupport> m_prerenderingSupport;
-
-    TestParams m_params;
-    bool m_dumpPixelsForCurrentTest;
-    int m_timeout; // timeout value in millisecond
-    bool m_allowExternalPages;
-    bool m_acceleratedCompositingForVideoEnabled;
-    bool m_acceleratedCompositingForFixedPositionEnabled;
-    bool m_acceleratedCompositingForOverflowScrollEnabled;
-    bool m_acceleratedCompositingForTransitionEnabled;
-    bool m_softwareCompositingEnabled;
-    bool m_threadedCompositingEnabled;
-    bool m_forceCompositingMode;
-    bool m_threadedHTMLParser;
-    bool m_accelerated2dCanvasEnabled;
-    bool m_perTilePaintingEnabled;
-    bool m_deferredImageDecodingEnabled;
-    WebTestRunner::WebPreferences m_prefs;
-    bool m_stressOpt;
-    bool m_stressDeopt;
-    std::string m_javaScriptFlags;
-    bool m_dumpWhenFinished;
-    bool m_isDisplayingModalDialog;
-
-
-    // List of all windows in this process.
-    // The main window should be put into windowList[0].
-    WindowList m_windowList;
-
-#if defined(OS_WIN)
-    // Used by the watchdog to know when it's finished.
-    HANDLE m_finishedEvent;
-#endif
-};
-
-void platformInit(int*, char***);
-void openStartupDialog();
-bool checkLayoutTestSystemDependencies();
-
-#endif // TestShell_h
diff --git a/Tools/DumpRenderTree/chromium/TestShellAndroid.cpp b/Tools/DumpRenderTree/chromium/TestShellAndroid.cpp
deleted file mode 100644
index 1a327bb..0000000
--- a/Tools/DumpRenderTree/chromium/TestShellAndroid.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "TestShell.h"
-
-#include "linux/WebFontRendering.h"
-#include "third_party/skia/include/ports/SkTypeface_android.h"
-
-namespace {
-
-// Must be same as DEVICE_DRT_DIR in Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py.
-#define DEVICE_DRT_DIR "/data/local/tmp/drt/"
-
-const char fontMainConfigFile[] = DEVICE_DRT_DIR "android_main_fonts.xml";
-const char fontFallbackConfigFile[] = DEVICE_DRT_DIR "android_fallback_fonts.xml";
-const char fontsDir[] = DEVICE_DRT_DIR "fonts/";
-
-} // namespace
-
-void platformInit(int* argc, char*** argv)
-{
-    // Initialize skia with customized font config files.
-    SkUseTestFontConfigFile(fontMainConfigFile, fontFallbackConfigFile, fontsDir);
-
-    // Disable auto hint and use normal hinting in layout test mode to produce the same font metrics as chromium-linux.
-    WebKit::WebFontRendering::setAutoHint(false);
-    WebKit::WebFontRendering::setHinting(SkPaint::kNormal_Hinting);
-}
diff --git a/Tools/DumpRenderTree/chromium/TestShellMac.mm b/Tools/DumpRenderTree/chromium/TestShellMac.mm
deleted file mode 100644
index 53ede56..0000000
--- a/Tools/DumpRenderTree/chromium/TestShellMac.mm
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#include "TestShell.h"
-#include "webkit/support/webkit_support.h"
-#import <AppKit/AppKit.h>
-
-// A class to be the target/selector of the "watchdog" thread that ensures
-// pages timeout if they take too long and tells the test harness via stdout.
-@interface WatchDogTarget : NSObject {
-@private
-    NSTimeInterval _timeout;
-}
-// |timeout| is in seconds
-- (id)initWithTimeout:(NSTimeInterval)timeout;
-// serves as the "run" method of a NSThread.
-- (void)run:(id)sender;
-@end
-
-@implementation WatchDogTarget
-
-- (id)initWithTimeout:(NSTimeInterval)timeout
-{
-    if ((self = [super init]))
-        _timeout = timeout;
-    return self;
-}
-
-- (void)run:(id)ignore
-{
-    NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
-
-    // check for debugger, just bail if so. We don't want the timeouts hitting
-    // when we're trying to track down an issue.
-    if (webkit_support::BeingDebugged())
-        return;
-
-    NSThread* currentThread = [NSThread currentThread];
-
-    // Wait to be cancelled. If we are that means the test finished. If it hasn't,
-    // then we need to tell the layout script we timed out and start again.
-    NSDate* limitDate = [NSDate dateWithTimeIntervalSinceNow:_timeout];
-    while ([(NSDate*)[NSDate date] compare:limitDate] == NSOrderedAscending &&
-           ![currentThread isCancelled]) {
-        // sleep for a small increment then check again
-        NSDate* incrementDate = [NSDate dateWithTimeIntervalSinceNow:1.0];
-        [NSThread sleepUntilDate:incrementDate];
-    }
-    if (![currentThread isCancelled]) {
-        // Print a warning to be caught by the layout-test script.
-        // Note: the layout test driver may or may not recognize
-        // this as a timeout.
-        puts("#TEST_TIMED_OUT\n");
-        puts("#EOF\n");
-        fflush(stdout);
-        exit(0);
-    }
-
-    [pool release];
-}
-
-@end
-
-void TestShell::waitTestFinished()
-{
-    ASSERT(!m_testIsPending);
-
-    m_testIsPending = true;
-
-    // Create a watchdog thread which just sets a timer and
-    // kills the process if it times out.  This catches really
-    // bad hangs where the shell isn't coming back to the
-    // message loop.  If the watchdog is what catches a
-    // timeout, it can't do anything except terminate the test
-    // shell, which is unfortunate.
-    // Windows multiplies by 2.5, but that causes us to run for far, far too
-    // long. We use the passed value and let the scripts flag override
-    // the value as needed.
-    NSTimeInterval timeoutSeconds = layoutTestTimeoutForWatchDog() / 1000;
-    WatchDogTarget* watchdog = [[[WatchDogTarget alloc]
-                                    initWithTimeout:timeoutSeconds] autorelease];
-    NSThread* thread = [[NSThread alloc] initWithTarget:watchdog
-                                         selector:@selector(run:)
-                                         object:nil];
-    [thread start];
-
-    // TestFinished() will post a quit message to break this loop when the page
-    // finishes loading.
-    while (m_testIsPending)
-        webkit_support::RunMessageLoop();
-
-    // Tell the watchdog that we're finished. No point waiting to re-join, it'll
-    // die on its own.
-    [thread cancel];
-    [thread release];
-}
-
-void platformInit(int*, char***)
-{
-}
-
-void openStartupDialog()
-{
-    // FIXME: This code doesn't work. Need NSApplication event loop?
-    NSAlert* alert = [[[NSAlert alloc] init] autorelease];
-    alert.messageText = @"Attach to me?";
-    alert.informativeText = @"This would probably be a good time to attach your debugger.";
-    [alert addButtonWithTitle:@"OK"];
-    [alert runModal];
-}
-
-bool checkLayoutTestSystemDependencies()
-{
-    return true;
-}
-
diff --git a/Tools/DumpRenderTree/chromium/TestShellPosix.cpp b/Tools/DumpRenderTree/chromium/TestShellPosix.cpp
deleted file mode 100644
index a6d8a54..0000000
--- a/Tools/DumpRenderTree/chromium/TestShellPosix.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "TestShell.h"
-
-#include "webkit/support/webkit_support.h"
-
-#include <signal.h>
-#include <unistd.h>
-
-static void AlarmHandler(int)
-{
-    // If the alarm alarmed, kill the process since we have a really bad hang.
-    puts("\n#TEST_TIMED_OUT\n");
-    puts("#EOF\n");
-    fflush(stdout);
-    exit(0);
-}
-
-void TestShell::waitTestFinished()
-{
-    ASSERT(!m_testIsPending);
-    m_testIsPending = true;
-
-    // Install an alarm signal handler that will kill us if we time out.
-    struct sigaction alarmAction;
-    alarmAction.sa_handler = AlarmHandler;
-    sigemptyset(&alarmAction.sa_mask);
-    alarmAction.sa_flags = 0;
-
-    struct sigaction oldAction;
-    sigaction(SIGALRM, &alarmAction, &oldAction);
-    alarm(layoutTestTimeoutForWatchDog() / 1000);
-
-    // TestFinished() will post a quit message to break this loop when the page
-    // finishes loading.
-    while (m_testIsPending)
-        webkit_support::RunMessageLoop();
-
-    // Remove the alarm.
-    alarm(0);
-    sigaction(SIGALRM, &oldAction, 0);
-}
diff --git a/Tools/DumpRenderTree/chromium/TestShellStub.cpp b/Tools/DumpRenderTree/chromium/TestShellStub.cpp
deleted file mode 100644
index 6c34f84..0000000
--- a/Tools/DumpRenderTree/chromium/TestShellStub.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-#include "config.h"
-
-#include "TestShell.h"
-
-bool checkLayoutTestSystemDependencies()
-{
-    return true;
-}
-
-void openStartupDialog()
-{
-    // FIXME: Not implemented.
-}
-
diff --git a/Tools/DumpRenderTree/chromium/TestShellWin.cpp b/Tools/DumpRenderTree/chromium/TestShellWin.cpp
deleted file mode 100644
index f494f5d..0000000
--- a/Tools/DumpRenderTree/chromium/TestShellWin.cpp
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "TestShell.h"
-
-#include "webkit/support/webkit_support.h"
-#include <fcntl.h>
-#include <io.h>
-#include <list>
-#include <process.h>
-#include <shlwapi.h>
-#include <string>
-#include <sys/stat.h>
-#include <windows.h>
-
-#define SIZEOF_STRUCT_WITH_SPECIFIED_LAST_MEMBER(structName, member) \
-    offsetof(structName, member) + \
-    (sizeof static_cast<structName*>(0)->member)
-#define NONCLIENTMETRICS_SIZE_PRE_VISTA \
-    SIZEOF_STRUCT_WITH_SPECIFIED_LAST_MEMBER(NONCLIENTMETRICS, lfMessageFont)
-
-// Thread main to run for the thread which just tests for timeout.
-unsigned int __stdcall watchDogThread(void* arg)
-{
-    // If we're debugging a layout test, don't timeout.
-    if (::IsDebuggerPresent())
-        return 0;
-
-    TestShell* shell = static_cast<TestShell*>(arg);
-    // FIXME: Do we need user-specified time settings as with the original
-    // Chromium implementation?
-    DWORD timeout = static_cast<DWORD>(shell->layoutTestTimeoutForWatchDog());
-    DWORD rv = WaitForSingleObject(shell->finishedEvent(), timeout);
-    if (rv == WAIT_TIMEOUT) {
-        // Print a warning to be caught by the layout-test script.
-        // Note: the layout test driver may or may not recognize
-        // this as a timeout.
-        puts("\n#TEST_TIMED_OUT\n");
-        puts("#EOF\n");
-        fflush(stdout);
-        TerminateProcess(GetCurrentProcess(), 0);
-    }
-    // Finished normally.
-    return 0;
-}
-
-void TestShell::waitTestFinished()
-{
-    ASSERT(!m_testIsPending);
-
-    m_testIsPending = true;
-
-    // Create a watchdog thread which just sets a timer and
-    // kills the process if it times out. This catches really
-    // bad hangs where the shell isn't coming back to the
-    // message loop. If the watchdog is what catches a
-    // timeout, it can't do anything except terminate the test
-    // shell, which is unfortunate.
-    m_finishedEvent = CreateEvent(0, TRUE, FALSE, 0);
-    ASSERT(m_finishedEvent);
-
-    HANDLE threadHandle = reinterpret_cast<HANDLE>(_beginthreadex(
-                                                       0,
-                                                       0,
-                                                       &watchDogThread,
-                                                       this,
-                                                       0,
-                                                       0));
-    ASSERT(threadHandle);
-
-    // TestFinished() will post a quit message to break this loop when the page
-    // finishes loading.
-    while (m_testIsPending)
-        webkit_support::RunMessageLoop();
-
-    // Tell the watchdog that we are finished.
-    SetEvent(m_finishedEvent);
-
-    // Wait to join the watchdog thread.  (up to 1s, then quit)
-    WaitForSingleObject(threadHandle, 1000);
-}
-
-void platformInit(int*, char***)
-{
-    // Set stdout/stderr binary mode.
-    _setmode(_fileno(stdout), _O_BINARY);
-    _setmode(_fileno(stderr), _O_BINARY);
-
-    // Load Ahem font.
-    // AHEM____.TTF is copied to the directory of DumpRenderTree.exe by WebKit.gyp.
-    WCHAR path[_MAX_PATH];
-    if (!::GetModuleFileName(0, path, _MAX_PATH)) {
-        fprintf(stderr, "Can't get the module path.\n");
-        exit(1);
-    }
-    ::PathRemoveFileSpec(path);
-    wcscat_s(path, _MAX_PATH, L"/AHEM____.TTF");
-    struct _stat ahemStat;
-    if (_wstat(path, &ahemStat) == -1) {
-        fprintf(stderr, "Can't access: '%S'\n", path);
-        exit(1);
-    }
-
-    FILE* fp = _wfopen(path, L"rb");
-    if (!fp) {
-        _wperror(path);
-        exit(1);
-    }
-    size_t size = ahemStat.st_size;
-    char* fontBuffer = new char[size];
-    if (fread(fontBuffer, 1, size, fp) != size) {
-        fprintf(stderr, "Can't read the font: '%S'\n", path);
-        fclose(fp);
-        exit(1);
-    }
-    fclose(fp);
-    DWORD numFonts = 1;
-    HANDLE fontHandle = ::AddFontMemResourceEx(fontBuffer, size, 0, &numFonts);
-    delete[] fontBuffer; // OS owns a copy of the buffer.
-    if (!fontHandle) {
-        fprintf(stderr, "Failed to register Ahem font: '%S'\n", path);
-        exit(1);
-    }
-    // We don't need to release the font explicitly.
-}
-
-void openStartupDialog()
-{
-    ::MessageBox(0, L"Attach to me?", L"DumpRenderTree", MB_OK);
-}
-
-bool checkLayoutTestSystemDependencies()
-{
-    // This metric will be 17 when font size is "Normal".
-    // The size of drop-down menus depends on it.
-    int verticalScrollSize = ::GetSystemMetrics(SM_CXVSCROLL);
-    int requiredVScrollSize = 17;
-    std::list<std::string> errors;
-    if (verticalScrollSize != requiredVScrollSize)
-        errors.push_back("Must use normal size fonts (96 dpi).");
-
-    // ClearType must be disabled, because the rendering is unpredictable.
-    BOOL fontSmoothingEnabled;
-    ::SystemParametersInfo(SPI_GETFONTSMOOTHING, 0, &fontSmoothingEnabled, 0);
-    int fontSmoothingType;
-    ::SystemParametersInfo(SPI_GETFONTSMOOTHINGTYPE, 0, &fontSmoothingType, 0);
-    if (fontSmoothingEnabled && (fontSmoothingType == FE_FONTSMOOTHINGCLEARTYPE))
-        errors.push_back("ClearType must be disabled.");
-
-    // Check that we're using the default system fonts.
-    OSVERSIONINFO versionInfo = {0};
-    versionInfo.dwOSVersionInfoSize = sizeof(versionInfo);
-    ::GetVersionEx(&versionInfo);
-    const bool isVistaOrLater = (versionInfo.dwMajorVersion >= 6);
-    NONCLIENTMETRICS metrics = {0};
-    metrics.cbSize = isVistaOrLater ? sizeof(NONCLIENTMETRICS) : NONCLIENTMETRICS_SIZE_PRE_VISTA;
-    const bool success = !!::SystemParametersInfo(SPI_GETNONCLIENTMETRICS, metrics.cbSize, &metrics, 0);
-    ASSERT(success);
-    LOGFONTW* systemFonts[] =
-        {&metrics.lfStatusFont, &metrics.lfMenuFont, &metrics.lfSmCaptionFont};
-    const wchar_t* const requiredFont = isVistaOrLater ? L"Segoe UI" : L"Tahoma";
-    const int requiredFontSize = isVistaOrLater ? -12 : -11;
-    for (size_t i = 0; i < arraysize(systemFonts); ++i) {
-        if (systemFonts[i]->lfHeight != requiredFontSize || wcscmp(requiredFont, systemFonts[i]->lfFaceName)) {
-            errors.push_back(isVistaOrLater ? "Must use either the Aero or Basic theme." : "Must use the default XP theme (Luna).");
-            break;
-        }
-    }
-
-    if (!errors.empty()) {
-        fprintf(stderr, "%s",
-                "##################################################################\n"
-                "## Layout test system dependencies check failed.\n"
-                "##\n");
-        for (std::list<std::string>::iterator it = errors.begin(); it != errors.end(); ++it)
-            fprintf(stderr, "## %s\n", it->c_str());
-        fprintf(stderr, "%s",
-                "##\n"
-                "##################################################################\n");
-    }
-    return errors.empty();
-}
diff --git a/Tools/DumpRenderTree/chromium/TestShellX11.cpp b/Tools/DumpRenderTree/chromium/TestShellX11.cpp
deleted file mode 100644
index 93aaf49..0000000
--- a/Tools/DumpRenderTree/chromium/TestShellX11.cpp
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "TestShell.h"
-
-#include <fontconfig/fontconfig.h>
-#include <unistd.h>
-
-#if USE(GTK)
-#include <gtk/gtk.h>
-
-void openStartupDialog()
-{
-    GtkWidget* dialog = gtk_message_dialog_new(
-        0, GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, "Attach to me?");
-    gtk_window_set_title(GTK_WINDOW(dialog), "DumpRenderTree");
-    gtk_dialog_run(GTK_DIALOG(dialog)); // Runs a nested message loop.
-    gtk_widget_destroy(dialog);
-}
-
-bool checkLayoutTestSystemDependencies()
-{
-    return true;
-}
-#endif // USE(GTK)
-
-static bool checkAndLoadFontFile(FcConfig* fontcfg, const char* path1, const char* path2)
-{
-    const char* font = path1;
-    if (access(font, R_OK) < 0) {
-        font = path2;
-        if (access(font, R_OK) < 0) {
-            fprintf(stderr, "You are missing %s or %s. Without this, some layout tests may fail. "
-                            "See http://code.google.com/p/chromium/wiki/LayoutTestsLinux "
-                            "for more.\n", path1, path2);
-            return false;
-        }
-    }
-    if (!FcConfigAppFontAddFile(fontcfg, (FcChar8 *) font)) {
-        fprintf(stderr, "Failed to load font %s\n", font);
-        return false;
-    }
-    return true;
-}
-
-static void setupFontconfig()
-{
-    // We wish to make the layout tests reproducable with respect to fonts. Skia
-    // uses fontconfig to resolve font family names from WebKit into actual font
-    // files found on the current system. This means that fonts vary based on the
-    // system and also on the fontconfig configuration.
-    //
-    // To avoid this we initialise fontconfig here and install a configuration
-    // which only knows about a few, select, fonts.
-
-    // We have fontconfig parse a config file from our resources file. This
-    // sets a number of aliases ("sans"->"Arial" etc), but doesn't include any
-    // font directories.
-    FcInit();
-
-    char drtPath[PATH_MAX + 1];
-    int drtPathSize = readlink("/proc/self/exe", drtPath, PATH_MAX);
-    if (drtPathSize < 0 || drtPathSize > PATH_MAX) {
-        fputs("Unable to resolve /proc/self/exe.", stderr);
-        exit(1);
-    }
-    drtPath[drtPathSize] = 0;
-    std::string drtDirPath(drtPath);
-    size_t lastPathPos = drtDirPath.rfind("/");
-    ASSERT(lastPathPos != std::string::npos);
-    drtDirPath.erase(lastPathPos + 1);
-
-    FcConfig* fontcfg = FcConfigCreate();
-    std::string fontconfigPath = drtDirPath + "fonts.conf";
-    if (!FcConfigParseAndLoad(fontcfg, reinterpret_cast<const FcChar8*>(fontconfigPath.c_str()), true)) {
-        fputs("Failed to parse fontconfig config file\n", stderr);
-        exit(1);
-    }
-
-    // This is the list of fonts that fontconfig will know about. It
-    // will try its best to match based only on the fonts here in. The
-    // paths are where these fonts are found on our Ubuntu boxes.
-    static const char *const fonts[] = {
-        "/usr/share/fonts/truetype/kochi/kochi-gothic.ttf",
-        "/usr/share/fonts/truetype/kochi/kochi-mincho.ttf",
-        "/usr/share/fonts/truetype/msttcorefonts/Arial.ttf",
-        "/usr/share/fonts/truetype/msttcorefonts/Arial_Bold.ttf",
-        "/usr/share/fonts/truetype/msttcorefonts/Arial_Bold_Italic.ttf",
-        "/usr/share/fonts/truetype/msttcorefonts/Arial_Italic.ttf",
-        "/usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS.ttf",
-        "/usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS_Bold.ttf",
-        "/usr/share/fonts/truetype/msttcorefonts/Courier_New.ttf",
-        "/usr/share/fonts/truetype/msttcorefonts/Courier_New_Bold.ttf",
-        "/usr/share/fonts/truetype/msttcorefonts/Courier_New_Bold_Italic.ttf",
-        "/usr/share/fonts/truetype/msttcorefonts/Courier_New_Italic.ttf",
-        "/usr/share/fonts/truetype/msttcorefonts/Georgia.ttf",
-        "/usr/share/fonts/truetype/msttcorefonts/Georgia_Bold.ttf",
-        "/usr/share/fonts/truetype/msttcorefonts/Georgia_Bold_Italic.ttf",
-        "/usr/share/fonts/truetype/msttcorefonts/Georgia_Italic.ttf",
-        "/usr/share/fonts/truetype/msttcorefonts/Impact.ttf",
-        "/usr/share/fonts/truetype/msttcorefonts/Trebuchet_MS.ttf",
-        "/usr/share/fonts/truetype/msttcorefonts/Trebuchet_MS_Bold.ttf",
-        "/usr/share/fonts/truetype/msttcorefonts/Trebuchet_MS_Bold_Italic.ttf",
-        "/usr/share/fonts/truetype/msttcorefonts/Trebuchet_MS_Italic.ttf",
-        "/usr/share/fonts/truetype/msttcorefonts/Times_New_Roman.ttf",
-        "/usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Bold.ttf",
-        "/usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Bold_Italic.ttf",
-        "/usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Italic.ttf",
-        "/usr/share/fonts/truetype/msttcorefonts/Verdana.ttf",
-        "/usr/share/fonts/truetype/msttcorefonts/Verdana_Bold.ttf",
-        "/usr/share/fonts/truetype/msttcorefonts/Verdana_Bold_Italic.ttf",
-        "/usr/share/fonts/truetype/msttcorefonts/Verdana_Italic.ttf",
-        // The DejaVuSans font is used by the css2.1 tests.
-        "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf",
-        "/usr/share/fonts/truetype/ttf-indic-fonts-core/lohit_hi.ttf",
-        "/usr/share/fonts/truetype/ttf-indic-fonts-core/lohit_ta.ttf",
-        "/usr/share/fonts/truetype/ttf-indic-fonts-core/MuktiNarrow.ttf",
-    };
-    for (size_t i = 0; i < arraysize(fonts); ++i) {
-        if (access(fonts[i], R_OK)) {
-            fprintf(stderr, "You are missing %s. Try re-running build/install-build-deps.sh. Also see "
-                            "http://code.google.com/p/chromium/wiki/LayoutTestsLinux",
-                            fonts[i]);
-            exit(1);
-        }
-        if (!FcConfigAppFontAddFile(fontcfg, (FcChar8 *) fonts[i])) {
-            fprintf(stderr, "Failed to load font %s\n", fonts[i]);
-            exit(1);
-        }
-    }
-
-    if (!checkAndLoadFontFile(fontcfg, "/usr/share/fonts/truetype/thai/Garuda.ttf",
-                              "/usr/share/fonts/truetype/tlwg/Garuda.ttf"))
-        exit(1);
-
-    // We special case these fonts because they're only needed in a
-    // few layout tests.
-    checkAndLoadFontFile(fontcfg, "/usr/share/fonts/truetype/ttf-indic-fonts-core/lohit_pa.ttf", 
-                         "/usr/share/fonts/truetype/ttf-punjabi-fonts/lohit_pa.ttf");
-
-    // Also load the layout-test-specific "Ahem" font.
-    std::string ahemPath = drtDirPath + "AHEM____.TTF";
-    if (!FcConfigAppFontAddFile(fontcfg, reinterpret_cast<const FcChar8*>(ahemPath.c_str()))) {
-        fprintf(stderr, "Failed to load font %s\n", ahemPath.c_str());
-        exit(1);
-    }
-
-    if (!FcConfigSetCurrent(fontcfg)) {
-        fputs("Failed to set the default font configuration\n", stderr);
-        exit(1);
-    }
-}
-
-void platformInit(int* argc, char*** argv)
-{
-    // FIXME: It's better call gtk_init() only when we run plugin tests.
-    // See http://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/633ea167cde196ca#
-#if USE(GTK)
-    gtk_init(argc, argv);
-#endif
-
-    setupFontconfig();
-}
diff --git a/Tools/DumpRenderTree/chromium/WebViewHost.cpp b/Tools/DumpRenderTree/chromium/WebViewHost.cpp
deleted file mode 100644
index 5255605..0000000
--- a/Tools/DumpRenderTree/chromium/WebViewHost.cpp
+++ /dev/null
@@ -1,1007 +0,0 @@
-/*
- * Copyright (C) 2010, 2011, 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "WebViewHost.h"
-
-#include "DRTDevToolsAgent.h"
-#include "Task.h"
-#include "TestNavigationController.h"
-#include "TestShell.h"
-#include "WebCachedURLRequest.h"
-#include "WebConsoleMessage.h"
-#include "WebContextMenuData.h"
-#include "WebDOMMessageEvent.h"
-#include "WebDataSource.h"
-#include "WebDocument.h"
-#include "WebElement.h"
-#include "WebFrame.h"
-#include "WebHistoryItem.h"
-#include "WebKit.h"
-#include "WebNode.h"
-#include "WebPluginParams.h"
-#include "WebPopupMenu.h"
-#include "WebPopupType.h"
-#include "WebPrintParams.h"
-#include "WebRange.h"
-#include "WebScreenInfo.h"
-#include "WebSerializedScriptValue.h"
-#include "WebUserGestureIndicator.h"
-#include "WebView.h"
-#include "WebWindowFeatures.h"
-#include "webkit/support/test_media_stream_client.h"
-#include "webkit/support/webkit_support.h"
-#include <cctype>
-#include <clocale>
-#include "public/platform/WebCString.h"
-#include "public/platform/WebCompositorOutputSurface.h"
-#include "public/platform/WebCompositorSupport.h"
-#include "public/platform/WebDragData.h"
-#include "public/platform/WebRect.h"
-#include "public/platform/WebSize.h"
-#include "public/platform/WebStorageNamespace.h"
-#include "public/platform/WebThread.h"
-#include "public/platform/WebURLRequest.h"
-#include "public/platform/WebURLResponse.h"
-
-#include <wtf/Assertions.h>
-#include <wtf/OwnArrayPtr.h>
-#include <wtf/PassOwnPtr.h>
-#include <wtf/Vector.h>
-
-using namespace WebCore;
-using namespace WebKit;
-using namespace WebTestRunner;
-using namespace std;
-
-static const int screenWidth = 1920;
-static const int screenHeight = 1080;
-
-const int WebViewHost::screenUnavailableBorder = 8;
-
-static int nextPageID = 1;
-
-// WebViewClient -------------------------------------------------------------
-
-WebView* WebViewHost::createView(WebFrame* creator, const WebURLRequest&, const WebWindowFeatures&, const WebString&, WebNavigationPolicy)
-{
-    WebUserGestureIndicator::consumeUserGesture();
-    return m_shell->createNewWindow(WebURL())->webView();
-}
-
-WebWidget* WebViewHost::createPopupMenu(WebPopupType type)
-{
-    switch (type) {
-    case WebKit::WebPopupTypeNone:
-    case WebKit::WebPopupTypePage:
-    case WebKit::WebPopupTypeHelperPlugin:
-        break;
-    case WebKit::WebPopupTypeSelect:
-    case WebKit::WebPopupTypeSuggestion:
-        m_popupmenus.append(WebPopupMenu::create(0));
-        return m_popupmenus.last();
-    }
-    return 0;
-}
-
-WebWidget* WebViewHost::createPopupMenu(const WebPopupMenuInfo&)
-{
-    // Do not use this method. It's been replaced by createExternalPopupMenu.
-    ASSERT_NOT_REACHED();
-    return 0;
-}
-
-WebStorageNamespace* WebViewHost::createSessionStorageNamespace(unsigned quota)
-{
-    return webkit_support::CreateSessionStorageNamespace(quota);
-}
-
-void WebViewHost::didAddMessageToConsole(const WebConsoleMessage& message, const WebString& sourceName, unsigned sourceLine)
-{
-}
-
-void WebViewHost::didStartLoading()
-{
-}
-
-void WebViewHost::didStopLoading()
-{
-}
-
-bool WebViewHost::shouldBeginEditing(const WebRange& range)
-{
-    return true;
-}
-
-bool WebViewHost::shouldEndEditing(const WebRange& range)
-{
-    return true;
-}
-
-bool WebViewHost::shouldInsertNode(const WebNode& node, const WebRange& range, WebEditingAction action)
-{
-    return true;
-}
-
-bool WebViewHost::shouldInsertText(const WebString& text, const WebRange& range, WebEditingAction action)
-{
-    return true;
-}
-
-bool WebViewHost::shouldChangeSelectedRange(
-    const WebRange& fromRange, const WebRange& toRange, WebTextAffinity affinity, bool stillSelecting)
-{
-    return true;
-}
-
-bool WebViewHost::shouldDeleteRange(const WebRange& range)
-{
-    return true;
-}
-
-bool WebViewHost::shouldApplyStyle(const WebString& style, const WebRange& range)
-{
-    return true;
-}
-
-bool WebViewHost::handleCurrentKeyboardEvent()
-{
-    if (m_editCommandName.empty())
-        return false;
-    WebFrame* frame = webView()->focusedFrame();
-    if (!frame)
-        return false;
-
-    return frame->executeCommand(WebString::fromUTF8(m_editCommandName), WebString::fromUTF8(m_editCommandValue));
-}
-
-// WebKit::WebPrerendererClient
-
-void WebViewHost::willAddPrerender(WebKit::WebPrerender*)
-{
-}
-
-
-void WebViewHost::runModalAlertDialog(WebFrame*, const WebString& message)
-{
-}
-
-bool WebViewHost::runModalConfirmDialog(WebFrame*, const WebString& message)
-{
-    return true;
-}
-
-bool WebViewHost::runModalPromptDialog(WebFrame* frame, const WebString& message,
-                                       const WebString& defaultValue, WebString*)
-{
-    return true;
-}
-
-void WebViewHost::showContextMenu(WebFrame*, const WebContextMenuData& contextMenuData)
-{
-}
-
-void WebViewHost::didUpdateLayout()
-{
-#if OS(DARWIN)
-    static bool queryingPreferredSize = false;
-    if (queryingPreferredSize)
-        return;
-
-    queryingPreferredSize = true;
-    // Query preferred width to emulate the same functionality in Chromium:
-    // see RenderView::CheckPreferredSize (src/content/renderer/render_view.cc)
-    // and TabContentsViewMac::RenderViewCreated (src/chrome/browser/tab_contents/tab_contents_view_mac.mm)
-    webView()->contentsPreferredMinimumSize();
-    queryingPreferredSize = false;
-#endif
-}
-
-void WebViewHost::navigateBackForwardSoon(int offset)
-{
-    navigationController()->goToOffset(offset);
-}
-
-int WebViewHost::historyBackListCount()
-{
-    return navigationController()->lastCommittedEntryIndex();
-}
-
-int WebViewHost::historyForwardListCount()
-{
-    int currentIndex =navigationController()->lastCommittedEntryIndex();
-    return navigationController()->entryCount() - currentIndex - 1;
-}
-
-// WebWidgetClient -----------------------------------------------------------
-
-void WebViewHost::didAutoResize(const WebSize& newSize)
-{
-    // Purposely don't include the virtualWindowBorder in this case so that
-    // window.inner[Width|Height] is the same as window.outer[Width|Height]
-    setWindowRect(WebRect(0, 0, newSize.width, newSize.height));
-}
-
-class WebViewHostDRTLayerTreeViewClient : public webkit_support::DRTLayerTreeViewClient {
-public:
-    explicit WebViewHostDRTLayerTreeViewClient(WebViewHost* host)
-        : m_host(host) { }
-    virtual ~WebViewHostDRTLayerTreeViewClient() { }
-
-    virtual void Layout() { m_host->webView()->layout(); }
-    virtual void ScheduleComposite() { m_host->proxy()->scheduleComposite(); }
-
-private:
-    WebViewHost* m_host;
-};
-
-void WebViewHost::initializeLayerTreeView()
-{
-    m_layerTreeViewClient = adoptPtr(new WebViewHostDRTLayerTreeViewClient(this));
-    if (m_shell->softwareCompositingEnabled()) {
-        m_layerTreeView = adoptPtr(webkit_support::CreateLayerTreeView(
-            webkit_support::SOFTWARE_CONTEXT,
-            m_layerTreeViewClient.get(),
-            m_shell->webCompositorThread()));
-    } else {
-        m_layerTreeView = adoptPtr(webkit_support::CreateLayerTreeView(
-            webkit_support::MESA_CONTEXT,
-            m_layerTreeViewClient.get(),
-            m_shell->webCompositorThread()));
-    }
-
-    ASSERT(m_layerTreeView);
-    updateViewportSize();
-    m_layerTreeView->setSurfaceReady();
-}
-
-WebLayerTreeView* WebViewHost::layerTreeView()
-{
-    return m_layerTreeView.get();
-}
-
-void WebViewHost::scheduleAnimation()
-{
-    if (m_finished) {
-        return;
-    }
-    if (!m_animateScheduled) {
-        m_animateScheduled = true;
-        postDelayedTask(new HostMethodTask(this, &WebViewHost::animateNow), 1);
-    }
-}
-
-void WebViewHost::animateNow()
-{
-    if (m_animateScheduled) {
-        m_animateScheduled = false;
-        webView()->animate(0.0);
-    }
-}
-
-void WebViewHost::didFocus()
-{
-}
-
-void WebViewHost::didBlur()
-{
-}
-
-WebScreenInfo WebViewHost::screenInfo()
-{
-    // We don't need to set actual values.
-    WebScreenInfo info;
-    info.depth = 24;
-    info.depthPerComponent = 8;
-    info.isMonochrome = false;
-    info.rect = WebRect(0, 0, screenWidth, screenHeight);
-    // Use values different from info.rect for testing.
-    info.availableRect = WebRect(screenUnavailableBorder, screenUnavailableBorder,
-                                 screenWidth - screenUnavailableBorder * 2,
-                                 screenHeight - screenUnavailableBorder * 2);
-    return info;
-}
-
-void WebViewHost::show(WebNavigationPolicy)
-{
-    m_hasWindow = true;
-}
-
-
-
-void WebViewHost::closeWidget()
-{
-    m_hasWindow = false;
-    m_shell->closeWindow(this);
-    // No more code here, we should be deleted at this point.
-}
-
-void WebViewHost::closeWidgetSoon()
-{
-    postDelayedTask(new HostMethodTask(this, &WebViewHost::closeWidget), 0);
-}
-
-void WebViewHost::didChangeCursor(const WebCursorInfo& cursorInfo)
-{
-    if (!hasWindow())
-        return;
-    m_currentCursor = cursorInfo;
-}
-
-WebRect WebViewHost::windowRect()
-{
-    return m_windowRect;
-}
-
-void WebViewHost::setWindowRect(const WebRect& rect)
-{
-    m_windowRect = rect;
-    const int border2 = TestShell::virtualWindowBorder * 2;
-    if (m_windowRect.width <= border2)
-        m_windowRect.width = 1 + border2;
-    if (m_windowRect.height <= border2)
-        m_windowRect.height = 1 + border2;
-    int width = m_windowRect.width - border2;
-    int height = m_windowRect.height - border2;
-    webWidget()->resize(WebSize(width, height));
-    updateViewportSize();
-}
-
-WebRect WebViewHost::rootWindowRect()
-{
-    return windowRect();
-}
-
-WebRect WebViewHost::windowResizerRect()
-{
-    // Not necessary.
-    return WebRect();
-}
-
-void WebViewHost::runModal()
-{
-    if (m_shell->isDisplayingModalDialog()) {
-        // DumpRenderTree doesn't support real modal dialogs, so a test shouldn't try to start two modal dialogs at the same time.
-        ASSERT_NOT_REACHED();
-        return;
-    }
-    // This WebViewHost might get deleted before RunMessageLoop() returns, so keep a copy of the m_shell member variable around.
-    ASSERT(m_shell->webViewHost() != this);
-    TestShell* shell = m_shell;
-    shell->setIsDisplayingModalDialog(true);
-    bool oldState = webkit_support::MessageLoopNestableTasksAllowed();
-    webkit_support::MessageLoopSetNestableTasksAllowed(true);
-    m_inModalLoop = true;
-    webkit_support::RunMessageLoop();
-    webkit_support::MessageLoopSetNestableTasksAllowed(oldState);
-    shell->setIsDisplayingModalDialog(false);
-}
-
-bool WebViewHost::enterFullScreen()
-{
-    postDelayedTask(new HostMethodTask(this, &WebViewHost::enterFullScreenNow), 0);
-    return true;
-}
-
-void WebViewHost::exitFullScreen()
-{
-    postDelayedTask(new HostMethodTask(this, &WebViewHost::exitFullScreenNow), 0);
-}
-
-// WebFrameClient ------------------------------------------------------------
-
-WebPlugin* WebViewHost::createPlugin(WebFrame* frame, const WebPluginParams& params)
-{
-    return webkit_support::CreateWebPlugin(frame, params);
-}
-
-WebApplicationCacheHost* WebViewHost::createApplicationCacheHost(WebFrame* frame, WebApplicationCacheHostClient* client)
-{
-    return webkit_support::CreateApplicationCacheHost(frame, client);
-}
-
-void WebViewHost::loadURLExternally(WebFrame* frame, const WebURLRequest& request, WebNavigationPolicy policy)
-{
-    loadURLExternally(frame, request, policy, WebString());
-}
-
-void WebViewHost::loadURLExternally(WebFrame*, const WebURLRequest& request, WebNavigationPolicy policy, const WebString& downloadName)
-{
-    ASSERT(policy !=  WebKit::WebNavigationPolicyCurrentTab);
-    WebViewHost* another = m_shell->createNewWindow(request.url());
-    if (another)
-        another->show(policy);
-}
-
-WebNavigationPolicy WebViewHost::decidePolicyForNavigation(
-    WebFrame*, const WebURLRequest&, WebNavigationType, WebNavigationPolicy defaultPolicy, bool)
-{
-    return defaultPolicy;
-}
-
-WebURLError WebViewHost::cancelledError(WebFrame*, const WebURLRequest& request)
-{
-    return webkit_support::CreateCancelledError(request);
-}
-
-void WebViewHost::unableToImplementPolicyWithError(WebFrame* frame, const WebURLError& error)
-{
-}
-
-void WebViewHost::didCreateDataSource(WebFrame*, WebDataSource* ds)
-{
-    ds->setExtraData(m_pendingExtraData.leakPtr());
-}
-
-void WebViewHost::didCommitProvisionalLoad(WebFrame* frame, bool isNewNavigation)
-{
-    updateForCommittedLoad(frame, isNewNavigation);
-}
-
-void WebViewHost::didClearWindowObject(WebFrame* frame)
-{
-    m_shell->bindJSObjectsToWindow(frame);
-}
-
-void WebViewHost::didReceiveTitle(WebFrame* frame, const WebString& title, WebTextDirection direction)
-{
-    setPageTitle(title);
-}
-
-void WebViewHost::didChangeIcon(WebFrame* , WebIconURL::Type)
-{
-}
-
-void WebViewHost::didNavigateWithinPage(WebFrame* frame, bool isNewNavigation)
-{
-    frame->dataSource()->setExtraData(m_pendingExtraData.leakPtr());
-
-    updateForCommittedLoad(frame, isNewNavigation);
-}
-
-void WebViewHost::willSendRequest(WebFrame* frame, unsigned, WebURLRequest& request, const WebURLResponse&)
-{
-    if (request.url().isEmpty())
-        return;
-
-    request.setExtraData(webkit_support::CreateWebURLRequestExtraData(frame->document().referrerPolicy()));
-}
-
-void WebViewHost::openFileSystem(WebFrame* frame, WebFileSystemType type, long long size, bool create, WebFileSystemCallbacks* callbacks)
-{
-    webkit_support::OpenFileSystem(frame, type, size, create, callbacks);
-}
-
-void WebViewHost::deleteFileSystem(WebKit::WebFrame* frame, WebKit::WebFileSystemType type, WebKit::WebFileSystemCallbacks* callbacks)
-{
-    webkit_support::DeleteFileSystem(frame, type, callbacks);
-}
-
-bool WebViewHost::willCheckAndDispatchMessageEvent(WebFrame* sourceFrame, WebFrame* targetFrame, WebSecurityOrigin target, WebDOMMessageEvent event)
-{
-    return false;
-}
-
-// WebTestDelegate ------------------------------------------------------------
-
-void WebViewHost::setEditCommand(const string& name, const string& value)
-{
-    m_editCommandName = name;
-    m_editCommandValue = value;
-}
-
-void WebViewHost::clearEditCommand()
-{
-    m_editCommandName.clear();
-    m_editCommandValue.clear();
-}
-
-void WebViewHost::setGamepadData(const WebGamepads& pads)
-{
-    webkit_support::SetGamepadData(pads);
-}
-
-void WebViewHost::printMessage(const std::string& message)
-{
-    printf("%s", message.c_str());
-}
-
-void WebViewHost::postTask(WebTask* task)
-{
-    ::postTask(task);
-}
-
-void WebViewHost::postDelayedTask(WebTask* task, long long ms)
-{
-    ::postDelayedTask(task, ms);
-}
-
-WebString WebViewHost::registerIsolatedFileSystem(const WebVector<WebString>& absoluteFilenames)
-{
-    return webkit_support::RegisterIsolatedFileSystem(absoluteFilenames);
-}
-
-long long WebViewHost::getCurrentTimeInMillisecond()
-{
-    return webkit_support::GetCurrentTimeInMillisecond();
-}
-
-WebKit::WebString WebViewHost::getAbsoluteWebStringFromUTF8Path(const std::string& path)
-{
-    return webkit_support::GetAbsoluteWebStringFromUTF8Path(path);
-}
-
-WebURL WebViewHost::localFileToDataURL(const WebKit::WebURL& url)
-{
-    return webkit_support::LocalFileToDataURL(url);
-}
-
-WebURL WebViewHost::rewriteLayoutTestsURL(const std::string& url)
-{
-    return webkit_support::RewriteLayoutTestsURL(url);
-}
-
-WebPreferences* WebViewHost::preferences()
-{
-    return m_shell->preferences();
-}
-
-void WebViewHost::applyPreferences()
-{
-    m_shell->applyPreferences();
-}
-
-std::string WebViewHost::makeURLErrorDescription(const WebKit::WebURLError& error)
-{
-    return webkit_support::MakeURLErrorDescription(error);
-}
-
-void WebViewHost::showDevTools()
-{
-    m_shell->showDevTools();
-}
-
-void WebViewHost::closeDevTools()
-{
-    m_shell->closeDevTools();
-}
-
-void WebViewHost::evaluateInWebInspector(long callID, const std::string& script)
-{
-    m_shell->drtDevToolsAgent()->evaluateInWebInspector(callID, script);
-}
-
-void WebViewHost::clearAllDatabases()
-{
-    webkit_support::ClearAllDatabases();
-}
-
-void WebViewHost::setDatabaseQuota(int quota)
-{
-    webkit_support::SetDatabaseQuota(quota);
-}
-
-void WebViewHost::setDeviceScaleFactor(float deviceScaleFactor)
-{
-    webView()->setDeviceScaleFactor(deviceScaleFactor);
-    updateViewportSize();
-}
-
-void WebViewHost::setFocus(WebTestProxyBase* proxy, bool focused)
-{
-    for (size_t i = 0; i < m_shell->windowList().size(); ++i) {
-        if (m_shell->windowList()[i]->proxy() == proxy)
-            m_shell->setFocus(m_shell->windowList()[i]->webWidget(), focused);
-    }
-}
-
-void WebViewHost::setAcceptAllCookies(bool acceptCookies)
-{
-    webkit_support::SetAcceptAllCookies(acceptCookies);
-}
-
-string WebViewHost::pathToLocalResource(const string& url)
-{
-#if OS(WINDOWS)
-    if (!url.find("/tmp/")) {
-        // We want a temp file.
-        const unsigned tempPrefixLength = 5;
-        size_t bufferSize = MAX_PATH;
-        OwnArrayPtr<WCHAR> tempPath = adoptArrayPtr(new WCHAR[bufferSize]);
-        DWORD tempLength = ::GetTempPathW(bufferSize, tempPath.get());
-        if (tempLength + url.length() - tempPrefixLength + 1 > bufferSize) {
-            bufferSize = tempLength + url.length() - tempPrefixLength + 1;
-            tempPath = adoptArrayPtr(new WCHAR[bufferSize]);
-            tempLength = GetTempPathW(bufferSize, tempPath.get());
-            ASSERT(tempLength < bufferSize);
-        }
-        string resultPath(WebString(tempPath.get(), tempLength).utf8());
-        resultPath.append(url.substr(tempPrefixLength));
-        return resultPath;
-    }
-#endif
-
-    // Some layout tests use file://// which we resolve as a UNC path. Normalize
-    // them to just file:///.
-    string lowerUrl = url;
-    string result = url;
-    transform(lowerUrl.begin(), lowerUrl.end(), lowerUrl.begin(), ::tolower);
-    while (!lowerUrl.find("file:////")) {
-        result = result.substr(0, 8) + result.substr(9);
-        lowerUrl = lowerUrl.substr(0, 8) + lowerUrl.substr(9);
-    }
-    return webkit_support::RewriteLayoutTestsURL(result).spec();
-}
-
-void WebViewHost::setLocale(const std::string& locale)
-{
-    setlocale(LC_ALL, locale.c_str());
-}
-
-void WebViewHost::testFinished()
-{
-    m_finished = true;
-    m_shell->testFinished(this);
-}
-
-void WebViewHost::closeRemainingWindows()
-{
-    m_shell->closeRemainingWindows();
-}
-
-int WebViewHost::navigationEntryCount()
-{
-    return m_shell->navigationEntryCount();
-}
-
-void WebViewHost::goToOffset(int offset)
-{
-    m_shell->goToOffset(offset);
-}
-
-void WebViewHost::reload()
-{
-    m_shell->reload();
-}
-
-void WebViewHost::loadURLForFrame(const WebURL& url, const string& frameName)
-{
-    if (!url.isValid())
-        return;
-    TestShell::resizeWindowForTest(this, url);
-    navigationController()->loadEntry(TestNavigationEntry::create(-1, url, WebString(), WebString::fromUTF8(frameName)).get());
-}
-
-bool WebViewHost::allowExternalPages()
-{
-    return m_shell->allowExternalPages();
-}
-
-void WebViewHost::captureHistoryForWindow(WebTestProxyBase* proxy, WebVector<WebHistoryItem>* history, size_t* currentEntryIndex)
-{
-    for (size_t i = 0; i < m_shell->windowList().size(); ++i) {
-        if (m_shell->windowList()[i]->proxy() == proxy)
-            m_shell->captureHistoryForWindow(i, history, currentEntryIndex);
-    }
-}
-
-WebMediaPlayer* WebViewHost::createWebMediaPlayer(WebFrame* frame, const WebURL& url, WebMediaPlayerClient* client)
-{
-    return webkit_support::CreateMediaPlayer(frame, url, client,
-        testMediaStreamClient()
-        );
-}
-
-// Public functions -----------------------------------------------------------
-
-WebViewHost::WebViewHost(TestShell* shell)
-    : m_shell(shell)
-    , m_proxy(0)
-    , m_webWidget(0)
-    , m_shutdownWasInvoked(false)
-{
-    reset();
-}
-
-WebViewHost::~WebViewHost()
-{
-    ASSERT(m_shutdownWasInvoked);
-    if (m_inModalLoop)
-        webkit_support::QuitMessageLoop();
-}
-
-void WebViewHost::shutdown()
-{
-    ASSERT(!m_shutdownWasInvoked);
-
-    // DevTools frontend page is supposed to be navigated only once and
-    // loading another URL in that Page is an error.
-    if (m_shell->devToolsWebView() != this) {
-        // Navigate to an empty page to fire all the destruction logic for the
-        // current page.
-        loadURLForFrame(GURL("about:blank"), string());
-    }
-
-    for (Vector<WebKit::WebWidget*>::iterator it = m_popupmenus.begin();
-         it < m_popupmenus.end(); ++it)
-        (*it)->close();
-
-    webWidget()->willCloseLayerTreeView();
-    m_layerTreeView.clear();
-    webWidget()->close();
-    m_webWidget = 0;
-    m_shutdownWasInvoked = true;
-}
-
-void WebViewHost::setWebWidget(WebKit::WebWidget* widget)
-{
-    m_webWidget = widget;
-    m_proxy->setWidget(widget);
-    webView()->setSpellCheckClient(proxy()->spellCheckClient());
-    webView()->setPrerendererClient(this);
-}
-
-WebView* WebViewHost::webView() const
-{
-    ASSERT(m_webWidget);
-    // DRT does not support popup widgets. So m_webWidget is always a WebView.
-    return static_cast<WebView*>(m_webWidget);
-}
-
-WebWidget* WebViewHost::webWidget() const
-{
-    ASSERT(m_webWidget);
-    return m_webWidget;
-}
-
-WebTestProxyBase* WebViewHost::proxy() const
-{
-    ASSERT(m_proxy);
-    return m_proxy;
-}
-
-void WebViewHost::setProxy(WebTestProxyBase* proxy)
-{
-    ASSERT(!m_proxy);
-    ASSERT(proxy);
-    m_proxy = proxy;
-}
-
-void WebViewHost::reset()
-{
-    m_pageId = -1;
-    m_lastPageIdUpdated = -1;
-    m_hasWindow = false;
-    m_inModalLoop = false;
-    m_animateScheduled = false;
-    m_finished = false;
-
-    m_navigationController = adoptPtr(new TestNavigationController(this));
-
-    m_pendingExtraData.clear();
-    m_editCommandName.clear();
-    m_editCommandValue.clear();
-
-    m_currentCursor = WebCursorInfo();
-    m_windowRect = WebRect();
-    // m_proxy is not set when reset() is invoked from the constructor.
-    if (m_proxy)
-        proxy()->reset();
-
-    if (m_webWidget) {
-        webView()->mainFrame()->setName(WebString());
-    }
-}
-
-void WebViewHost::setClientWindowRect(const WebKit::WebRect& rect)
-{
-    setWindowRect(rect);
-}
-
-void WebViewHost::enableAutoResizeMode(const WebSize& minSize, const WebSize& maxSize)
-{
-    webView()->enableAutoResizeMode(minSize, maxSize);
-}
-
-void WebViewHost::disableAutoResizeMode(const WebKit::WebSize& newSize)
-{
-    if (!newSize.isEmpty())
-        setWindowRect(WebRect(0, 0, newSize.width, newSize.height));
-    webView()->disableAutoResizeMode();
-    if (!newSize.isEmpty())
-        webView()->resize(newSize);
-}
-
-bool WebViewHost::navigate(const TestNavigationEntry& entry, bool reload)
-{
-    // Get the right target frame for the entry.
-    WebFrame* frame = webView()->mainFrame();
-    if (!entry.targetFrame().isEmpty())
-        frame = webView()->findFrameByName(entry.targetFrame());
-
-    // TODO(mpcomplete): should we clear the target frame, or should
-    // back/forward navigations maintain the target frame?
-
-    // A navigation resulting from loading a javascript URL should not be
-    // treated as a browser initiated event. Instead, we want it to look as if
-    // the page initiated any load resulting from JS execution.
-    if (!GURL(entry.URL()).SchemeIs("javascript"))
-        setPendingExtraData(adoptPtr(new TestShellExtraData(entry.pageID())));
-
-    // If we are reloading, then WebKit will use the state of the current page.
-    // Otherwise, we give it the state to navigate to.
-    if (reload) {
-        frame->reload(false);
-    } else if (!entry.contentState().isNull()) {
-        ASSERT(entry.pageID() != -1);
-        frame->loadHistoryItem(entry.contentState());
-    } else {
-        ASSERT(entry.pageID() == -1);
-        frame->loadRequest(WebURLRequest(entry.URL()));
-    }
-
-    // In case LoadRequest failed before DidCreateDataSource was called.
-    setPendingExtraData(nullptr);
-
-    // Restore focus to the main frame prior to loading new request.
-    // This makes sure that we don't have a focused iframe. Otherwise, that
-    // iframe would keep focus when the SetFocus called immediately after
-    // LoadRequest, thus making some tests fail (see http://b/issue?id=845337
-    // for more details).
-    webView()->setFocusedFrame(frame);
-    m_shell->setFocus(webView(), true);
-
-    return true;
-}
-
-// Private functions ----------------------------------------------------------
-
-void WebViewHost::updateForCommittedLoad(WebFrame* frame, bool isNewNavigation)
-{
-    // Code duplicated from RenderView::DidCommitLoadForFrame.
-    TestShellExtraData* extraData = static_cast<TestShellExtraData*>(frame->dataSource()->extraData());
-    const WebURL& url = frame->dataSource()->request().url();
-    bool nonBlankPageAfterReset = m_pageId == -1 && !url.isEmpty() && strcmp(url.spec().data(), "about:blank");
-
-    if (isNewNavigation || nonBlankPageAfterReset) {
-        // New navigation.
-        updateSessionHistory(frame);
-        m_pageId = nextPageID++;
-    } else if (extraData && extraData->pendingPageID != -1 && !extraData->requestCommitted) {
-        // This is a successful session history navigation!
-        updateSessionHistory(frame);
-        m_pageId = extraData->pendingPageID;
-    }
-
-    // Don't update session history multiple times.
-    if (extraData)
-        extraData->requestCommitted = true;
-
-    updateURL(frame);
-}
-
-void WebViewHost::updateURL(WebFrame* frame)
-{
-    WebDataSource* ds = frame->dataSource();
-    ASSERT(ds);
-    const WebURLRequest& request = ds->request();
-    RefPtr<TestNavigationEntry> entry(TestNavigationEntry::create());
-
-    // The referrer will be empty on https->http transitions. It
-    // would be nice if we could get the real referrer from somewhere.
-    entry->setPageID(m_pageId);
-    if (ds->hasUnreachableURL())
-        entry->setURL(ds->unreachableURL());
-    else
-        entry->setURL(request.url());
-
-    const WebHistoryItem& historyItem = frame->currentHistoryItem();
-    if (!historyItem.isNull())
-        entry->setContentState(historyItem);
-
-    navigationController()->didNavigateToEntry(entry.get());
-    m_lastPageIdUpdated = max(m_lastPageIdUpdated, m_pageId);
-}
-
-void WebViewHost::updateSessionHistory(WebFrame* frame)
-{
-    // If we have a valid page ID at this point, then it corresponds to the page
-    // we are navigating away from. Otherwise, this is the first navigation, so
-    // there is no past session history to record.
-    if (m_pageId == -1)
-        return;
-
-    TestNavigationEntry* entry = navigationController()->entryWithPageID(m_pageId);
-    if (!entry)
-        return;
-
-    const WebHistoryItem& historyItem = webView()->mainFrame()->previousHistoryItem();
-    if (historyItem.isNull())
-        return;
-
-    entry->setContentState(historyItem);
-}
-
-void WebViewHost::updateViewportSize()
-{
-    if (!m_layerTreeView)
-        return;
-
-    WebSize deviceViewportSize(webWidget()->size().width * webView()->deviceScaleFactor(),
-        webWidget()->size().height * webView()->deviceScaleFactor());
-    m_layerTreeView->setViewportSize(webWidget()->size(), deviceViewportSize);
-}
-
-void WebViewHost::printFrameDescription(WebFrame* webframe)
-{
-    string name8 = webframe->uniqueName().utf8();
-    if (webframe == webView()->mainFrame()) {
-        if (!name8.length()) {
-            fputs("main frame", stdout);
-            return;
-        }
-        printf("main frame \"%s\"", name8.c_str());
-        return;
-    }
-    if (!name8.length()) {
-        fputs("frame (anonymous)", stdout);
-        return;
-    }
-    printf("frame \"%s\"", name8.c_str());
-}
-
-void WebViewHost::setPendingExtraData(PassOwnPtr<TestShellExtraData> extraData)
-{
-    m_pendingExtraData = extraData;
-}
-
-void WebViewHost::setPageTitle(const WebString&)
-{
-    // Nothing to do in layout test.
-}
-
-void WebViewHost::enterFullScreenNow()
-{
-    webView()->willEnterFullScreen();
-    webView()->didEnterFullScreen();
-}
-
-void WebViewHost::exitFullScreenNow()
-{
-    webView()->willExitFullScreen();
-    webView()->didExitFullScreen();
-}
-
-webkit_support::TestMediaStreamClient* WebViewHost::testMediaStreamClient()
-{
-    if (!m_testMediaStreamClient.get())
-        m_testMediaStreamClient = adoptPtr(new webkit_support::TestMediaStreamClient());
-    return m_testMediaStreamClient.get();
-}
diff --git a/Tools/DumpRenderTree/chromium/WebViewHost.h b/Tools/DumpRenderTree/chromium/WebViewHost.h
deleted file mode 100644
index 47e8861..0000000
--- a/Tools/DumpRenderTree/chromium/WebViewHost.h
+++ /dev/null
@@ -1,288 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WebViewHost_h
-#define WebViewHost_h
-
-#include "TestNavigationController.h"
-#include "WebCursorInfo.h"
-#include "WebFrameClient.h"
-#include "WebPrerendererClient.h"
-#include "WebTask.h"
-#include "WebTestDelegate.h"
-#include "WebTestProxy.h"
-#include "WebViewClient.h"
-#include "public/platform/WebFileSystemType.h"
-#include <wtf/HashMap.h>
-#include <wtf/HashSet.h>
-#include <wtf/Vector.h>
-#include <wtf/text/WTFString.h>
-
-class SkCanvas;
-class TestShell;
-
-namespace WebKit {
-class WebFrame;
-class WebSerializedScriptValue;
-class WebSharedWorkerClient;
-class WebURL;
-struct WebRect;
-struct WebURLError;
-struct WebWindowFeatures;
-}
-
-namespace webkit_support {
-class DRTLayerTreeViewClient;
-class MediaStreamUtil;
-class TestMediaStreamClient;
-}
-
-namespace WebTestRunner {
-class WebTestRunner;
-}
-
-class WebViewHost : public WebKit::WebViewClient, public WebKit::WebFrameClient, public NavigationHost, public WebKit::WebPrerendererClient, public WebTestRunner::WebTestDelegate {
- public:
-    WebViewHost(TestShell*);
-    virtual ~WebViewHost();
-    void shutdown();
-    void setWebWidget(WebKit::WebWidget*);
-    WebKit::WebView* webView() const;
-    WebKit::WebWidget* webWidget() const;
-    WebTestRunner::WebTestProxyBase* proxy() const;
-    void setProxy(WebTestRunner::WebTestProxyBase*);
-    void reset();
-    void setPendingExtraData(PassOwnPtr<TestShellExtraData>);
-
-    TestNavigationController* navigationController() { return m_navigationController.get(); }
-
-    void closeWidget();
-
-    // WebTestDelegate.
-    virtual void setEditCommand(const std::string& name, const std::string& value) OVERRIDE;
-    virtual void clearEditCommand() OVERRIDE;
-    virtual void setGamepadData(const WebKit::WebGamepads&) OVERRIDE;
-    virtual void printMessage(const std::string& message) OVERRIDE;
-    virtual void postTask(WebTestRunner::WebTask*) OVERRIDE;
-    virtual void postDelayedTask(WebTestRunner::WebTask*, long long ms) OVERRIDE;
-    virtual WebKit::WebString registerIsolatedFileSystem(const WebKit::WebVector<WebKit::WebString>& absoluteFilenames) OVERRIDE;
-    virtual long long getCurrentTimeInMillisecond() OVERRIDE;
-    virtual WebKit::WebString getAbsoluteWebStringFromUTF8Path(const std::string& path) OVERRIDE;
-    virtual WebKit::WebURL localFileToDataURL(const WebKit::WebURL&) OVERRIDE;
-    virtual WebKit::WebURL rewriteLayoutTestsURL(const std::string&) OVERRIDE;
-    virtual WebTestRunner::WebPreferences* preferences() OVERRIDE;
-    virtual void applyPreferences() OVERRIDE;
-    virtual std::string makeURLErrorDescription(const WebKit::WebURLError&) OVERRIDE;
-    virtual void setClientWindowRect(const WebKit::WebRect&) OVERRIDE;
-    virtual void enableAutoResizeMode(const WebKit::WebSize&, const WebKit::WebSize&) OVERRIDE;
-    virtual void disableAutoResizeMode(const WebKit::WebSize&) OVERRIDE;
-    virtual void showDevTools() OVERRIDE;
-    virtual void closeDevTools() OVERRIDE;
-    virtual void evaluateInWebInspector(long, const std::string&) OVERRIDE;
-    virtual void clearAllDatabases() OVERRIDE;
-    virtual void setDatabaseQuota(int) OVERRIDE;
-    virtual void setDeviceScaleFactor(float) OVERRIDE;
-    virtual void setFocus(WebTestRunner::WebTestProxyBase*, bool) OVERRIDE;
-    virtual void setAcceptAllCookies(bool) OVERRIDE;
-    virtual std::string pathToLocalResource(const std::string& url) OVERRIDE;
-    virtual void setLocale(const std::string&) OVERRIDE;
-    virtual void testFinished() OVERRIDE;
-    virtual void closeRemainingWindows() OVERRIDE;
-    virtual int navigationEntryCount() OVERRIDE;
-    virtual void goToOffset(int) OVERRIDE;
-    virtual void reload() OVERRIDE;
-    virtual void loadURLForFrame(const WebKit::WebURL&, const std::string& frameName) OVERRIDE;
-    virtual bool allowExternalPages() OVERRIDE;
-    virtual void captureHistoryForWindow(WebTestRunner::WebTestProxyBase*, WebKit::WebVector<WebKit::WebHistoryItem>*, size_t* currentEntryIndex) OVERRIDE;
-    virtual WebKit::WebMediaPlayer* createWebMediaPlayer(WebKit::WebFrame*, const WebKit::WebURL&, WebKit::WebMediaPlayerClient*) OVERRIDE;
-
-    // NavigationHost
-    virtual bool navigate(const TestNavigationEntry&, bool reload);
-
-    // WebKit::WebPrerendererClient
-    virtual void willAddPrerender(WebKit::WebPrerender*) OVERRIDE;
-
-    // WebKit::WebViewClient
-    virtual WebKit::WebView* createView(WebKit::WebFrame*, const WebKit::WebURLRequest&, const WebKit::WebWindowFeatures&, const WebKit::WebString&, WebKit::WebNavigationPolicy);
-    virtual WebKit::WebWidget* createPopupMenu(WebKit::WebPopupType);
-    virtual WebKit::WebWidget* createPopupMenu(const WebKit::WebPopupMenuInfo&);
-    virtual WebKit::WebStorageNamespace* createSessionStorageNamespace(unsigned quota);
-
-    virtual void didAddMessageToConsole(const WebKit::WebConsoleMessage&, const WebKit::WebString& sourceName, unsigned sourceLine);
-    virtual void didStartLoading();
-    virtual void didStopLoading();
-    virtual bool shouldBeginEditing(const WebKit::WebRange&);
-    virtual bool shouldEndEditing(const WebKit::WebRange&);
-    virtual bool shouldInsertNode(const WebKit::WebNode&, const WebKit::WebRange&, WebKit::WebEditingAction);
-    virtual bool shouldInsertText(const WebKit::WebString&, const WebKit::WebRange&, WebKit::WebEditingAction);
-    virtual bool shouldChangeSelectedRange(const WebKit::WebRange& from, const WebKit::WebRange& to, WebKit::WebTextAffinity, bool stillSelecting);
-    virtual bool shouldDeleteRange(const WebKit::WebRange&);
-    virtual bool shouldApplyStyle(const WebKit::WebString& style, const WebKit::WebRange&);
-    virtual bool handleCurrentKeyboardEvent();
-    virtual void runModalAlertDialog(WebKit::WebFrame*, const WebKit::WebString&);
-    virtual bool runModalConfirmDialog(WebKit::WebFrame*, const WebKit::WebString&);
-    virtual bool runModalPromptDialog(WebKit::WebFrame*, const WebKit::WebString& message, const WebKit::WebString& defaultValue, WebKit::WebString* actualValue);
-    virtual void showContextMenu(WebKit::WebFrame*, const WebKit::WebContextMenuData&);
-    virtual void didUpdateLayout();
-    virtual void navigateBackForwardSoon(int offset);
-    virtual int historyBackListCount();
-    virtual int historyForwardListCount();
-
-    // WebKit::WebWidgetClient
-    virtual void didAutoResize(const WebKit::WebSize& newSize);
-    virtual void initializeLayerTreeView();
-    virtual WebKit::WebLayerTreeView* layerTreeView();
-    virtual void scheduleAnimation();
-    virtual void didFocus();
-    virtual void didBlur();
-    virtual void didChangeCursor(const WebKit::WebCursorInfo&);
-    virtual void closeWidgetSoon();
-    virtual void show(WebKit::WebNavigationPolicy);
-    virtual void runModal();
-    virtual bool enterFullScreen();
-    virtual void exitFullScreen();
-    virtual WebKit::WebRect windowRect();
-    virtual void setWindowRect(const WebKit::WebRect&);
-    virtual WebKit::WebRect rootWindowRect();
-    virtual WebKit::WebRect windowResizerRect();
-    virtual WebKit::WebScreenInfo screenInfo();
-
-    // WebKit::WebFrameClient
-    virtual WebKit::WebPlugin* createPlugin(WebKit::WebFrame*, const WebKit::WebPluginParams&);
-    virtual WebKit::WebApplicationCacheHost* createApplicationCacheHost(WebKit::WebFrame*, WebKit::WebApplicationCacheHostClient*);
-    virtual void loadURLExternally(WebKit::WebFrame*, const WebKit::WebURLRequest&, WebKit::WebNavigationPolicy);
-    virtual void loadURLExternally(WebKit::WebFrame*, const WebKit::WebURLRequest&, WebKit::WebNavigationPolicy, const WebKit::WebString& downloadName);
-    virtual WebKit::WebNavigationPolicy decidePolicyForNavigation(
-        WebKit::WebFrame*, const WebKit::WebURLRequest&,
-        WebKit::WebNavigationType, WebKit::WebNavigationPolicy, bool isRedirect);
-    virtual WebKit::WebURLError cancelledError(WebKit::WebFrame*, const WebKit::WebURLRequest&);
-    virtual void unableToImplementPolicyWithError(WebKit::WebFrame*, const WebKit::WebURLError&);
-    virtual void didCreateDataSource(WebKit::WebFrame*, WebKit::WebDataSource*);
-    virtual void didCommitProvisionalLoad(WebKit::WebFrame*, bool isNewNavigation);
-    virtual void didClearWindowObject(WebKit::WebFrame*);
-    virtual void didReceiveTitle(WebKit::WebFrame*, const WebKit::WebString&, WebKit::WebTextDirection);
-    virtual void didChangeIcon(WebKit::WebFrame* , WebKit::WebIconURL::Type);
-    virtual void didNavigateWithinPage(WebKit::WebFrame*, bool isNewNavigation);
-    virtual void willSendRequest(WebKit::WebFrame*, unsigned identifier, WebKit::WebURLRequest&, const WebKit::WebURLResponse&);
-    virtual void openFileSystem(WebKit::WebFrame*, WebKit::WebFileSystemType, long long size, bool create, WebKit::WebFileSystemCallbacks*);
-    virtual void deleteFileSystem(WebKit::WebFrame*, WebKit::WebFileSystemType, WebKit::WebFileSystemCallbacks*);
-    virtual bool willCheckAndDispatchMessageEvent(
-        WebKit::WebFrame* sourceFrame, WebKit::WebFrame* targetFrame, 
-        WebKit::WebSecurityOrigin target, WebKit::WebDOMMessageEvent);
-
-    // Pending task list, Note taht the method is referred from WebMethodTask class.
-    WebTestRunner::WebTaskList* taskList() { return &m_taskList; }
-
-    // Exposed for WebTestProxy.
-    void scheduleComposite() { }
-
-    static const int screenUnavailableBorder;
-
-private:
-
-    class HostMethodTask : public WebTestRunner::WebMethodTask<WebViewHost> {
-    public:
-        typedef void (WebViewHost::*CallbackMethodType)();
-        HostMethodTask(WebViewHost* object, CallbackMethodType callback)
-            : WebTestRunner::WebMethodTask<WebViewHost>(object)
-            , m_callback(callback)
-        { }
-
-        virtual void runIfValid() { (m_object->*m_callback)(); }
-
-    private:
-        CallbackMethodType m_callback;
-    };
-
-    // Called the title of the page changes.
-    // Can be used to update the title of the window.
-    void setPageTitle(const WebKit::WebString&);
-
-    void animateNow();
-    void enterFullScreenNow();
-    void exitFullScreenNow();
-
-    void updateForCommittedLoad(WebKit::WebFrame*, bool isNewNavigation);
-    void updateURL(WebKit::WebFrame*);
-    void updateSessionHistory(WebKit::WebFrame*);
-
-    // Dumping a frame to the console.
-    void printFrameDescription(WebKit::WebFrame*);
-
-    bool hasWindow() const { return m_hasWindow; }
-
-    void updateViewportSize();
-
-    webkit_support::TestMediaStreamClient* testMediaStreamClient();
-
-    // Non-owning pointer. The WebViewHost instance is owned by this TestShell instance.
-    TestShell* m_shell;
-
-    // Non-owning pointer. This class needs to be wrapped in a WebTestProxy. This is the pointer to the WebTestProxyBase.
-    WebTestRunner::WebTestProxyBase* m_proxy;
-
-    // This delegate works for the following widget.
-    WebKit::WebWidget* m_webWidget;
-
-    // For tracking session history. See RenderView.
-    int m_pageId;
-    int m_lastPageIdUpdated;
-
-    OwnPtr<TestShellExtraData> m_pendingExtraData;
-
-    WebKit::WebCursorInfo m_currentCursor;
-
-    bool m_hasWindow;
-    bool m_inModalLoop;
-
-    bool m_shutdownWasInvoked;
-    bool m_animateScheduled;
-    bool m_finished;
-
-    WebKit::WebRect m_windowRect;
-
-    // Edit command associated to the current keyboard event.
-    std::string m_editCommandName;
-    std::string m_editCommandValue;
-
-    OwnPtr<WebKit::WebContextMenuData> m_lastContextMenuData;
-
-    OwnPtr<webkit_support::TestMediaStreamClient> m_testMediaStreamClient;
-
-    OwnPtr<TestNavigationController> m_navigationController;
-
-    WebTestRunner::WebTaskList m_taskList;
-    Vector<WebKit::WebWidget*> m_popupmenus;
-
-    OwnPtr<webkit_support::DRTLayerTreeViewClient> m_layerTreeViewClient;
-    OwnPtr<WebKit::WebLayerTreeView> m_layerTreeView;
-};
-
-#endif // WebViewHost_h
diff --git a/Tools/DumpRenderTree/chromium/config.h b/Tools/DumpRenderTree/chromium/config.h
deleted file mode 100644
index 04502d3..0000000
--- a/Tools/DumpRenderTree/chromium/config.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef config_h
-#define config_h
-
-#include <wtf/Platform.h>
-
-#if OS(WINDOWS) && !COMPILER(GCC)
-// Allow 'this' to be used in base member initializer list.
-#pragma warning(disable : 4355)
-#endif
-
-#endif // config_h
diff --git a/Tools/GardeningServer/scripts/results_unittests.js b/Tools/GardeningServer/scripts/results_unittests.js
index 09e4bb0..5d33cb9 100644
--- a/Tools/GardeningServer/scripts/results_unittests.js
+++ b/Tools/GardeningServer/scripts/results_unittests.js
@@ -77,7 +77,6 @@
     "has_pretty_patch": false,
     "fixable": 1233,
     "num_flaky":1,
-    "uses_expectations_file": true,
     "has_wdiff": true,
     "blink_revision": "90430"
 };
diff --git a/Tools/GardeningServer/scripts/rollbot.js b/Tools/GardeningServer/scripts/rollbot.js
index bbcdbaf..7937b7f 100644
--- a/Tools/GardeningServer/scripts/rollbot.js
+++ b/Tools/GardeningServer/scripts/rollbot.js
@@ -49,7 +49,8 @@
 }
 
 function isRollbotStopped(issue) {
-    return issue['messages'].some(function(message) { message['text'].match(/STOP/); })
+    // Ignore the first message as it always contains "STOP"
+    return issue.messages.slice(1).some(function(message) { return message.text.match(/STOP/); });
 }
 
 rollbot.fetchCurrentRoll = function(callback) {
@@ -72,4 +73,7 @@
     });
 };
 
+// Exposed for unittesting.
+rollbot._isRollbotStopped = isRollbotStopped;
+
 })();
diff --git a/Tools/GardeningServer/scripts/rollbot_unittests.js b/Tools/GardeningServer/scripts/rollbot_unittests.js
index 059ab63..7ce62fd 100644
--- a/Tools/GardeningServer/scripts/rollbot_unittests.js
+++ b/Tools/GardeningServer/scripts/rollbot_unittests.js
@@ -45,7 +45,7 @@
             "eseidel@chromium.org",
             "chromium-reviews@chromium.org",
           ],
-          "text": "This roll was automatically created by the Blink AutoRollBot (crbug.com\/242461).\n",
+          "text": "This roll was automatically created by the Blink AutoRollBot (crbug.com\/242461).\nInclude STOP in this message, but should be ignored.",
           "disapproval": false,
           "date": "2013-06-03 18:14:34.033780",
           "approval": false
@@ -90,6 +90,70 @@
   ]
 };
 
+var kStoppedIssue = {
+  "description": "Blink roll 152079:152080\n\nhttp:\/\/build.chromium.org\/f\/chromium\/perf\/dashboard\/ui\/changelog_blink.html?url=\/trunk&range=152080:152080&mode=html\nTBR=\nBUG=",
+  "cc": [
+    "chromium-reviews@chromium.org",
+    "none (channel is sheriff)@chromium.org"
+  ],
+  "reviewers": [
+    "ilevy@chromium.org"
+  ],
+  "messages": [
+    {
+      "sender": "eseidel@chromium.org",
+      "recipients": [
+        "eseidel@chromium.org",
+        "chromium-reviews@chromium.org",
+      ],
+      "text": "This string has STOP in it, but should be ignored as the first message.",
+      "date": "2013-06-09 06:47:35.825820",
+    },
+    {
+      "sender": "commit-bot@chromium.org",
+      "recipients": [
+        "eseidel@chromium.org",
+        "chromium-reviews@chromium.org",
+      ],
+      "text": "CQ is trying da patch. Follow status at\nhttps:\/\/chromium-status.appspot.com\/cq\/eseidel@chromium.org\/16606004\/1",
+      "date": "2013-06-09 06:47:45.529170",
+    },
+    {
+      "sender": "ilevy@chromium.org",
+      "recipients": [
+        "eseidel@chromium.org",
+        "ilevy@chromium.org",
+        "chromium-reviews@chromium.org",
+      ],
+      "text": "STOP",
+      "date": "2013-06-09 07:59:48.280360",
+    },
+    {
+      "sender": "eseidel@chromium.org",
+      "recipients": [
+        "eseidel@chromium.org",
+        "ilevy@chromium.org",
+        "chromium-reviews@chromium.org",
+      ],
+      "text": "Rollbot was stopped by the presence of \"STOP\" in an earlier comment on this issue.\n",
+      "date": "2013-06-10 19:35:44.710470",
+    }
+  ],
+  "owner_email": "eseidel@chromium.org",
+  "private": false,
+  "base_url": "https:\/\/chromium.googlesource.com\/chromium\/src.git@master",
+  "owner": "eseidel",
+  "subject": "Blink roll 152079:152080",
+  "created": "2013-06-09 06:47:31.518010",
+  "patchsets": [
+    1
+  ],
+  "modified": "2013-06-10 19:56:59.618710",
+  "closed": true,
+  "commit": false,
+  "issue": 16606004
+};
+
 test("fetchCurrentRoll", 6, function() {
     var simulator = new NetworkSimulator();
     simulator.get = function(url, callback)
@@ -110,4 +174,8 @@
     });
 });
 
+test("_isRollbotStopped", 1, function() {
+    equals(true, rollbot._isRollbotStopped(kStoppedIssue));
+});
+
 })();
diff --git a/Tools/GardeningServer/scripts/ui.js b/Tools/GardeningServer/scripts/ui.js
index 9690728..5cde93f 100644
--- a/Tools/GardeningServer/scripts/ui.js
+++ b/Tools/GardeningServer/scripts/ui.js
@@ -47,12 +47,12 @@
 ui.urlForFlakinessDashboard = function(opt_testNameList)
 {
     var testsParameter = opt_testNameList ? opt_testNameList.join(',') : '';
-    return 'http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=' + encodeURIComponent(testsParameter) + '&group=' + encodeURIComponent('@ToT - chromium.org');
+    return 'http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=' + encodeURIComponent(testsParameter);
 }
 
 ui.urlForEmbeddedFlakinessDashboard = function(opt_testNameList)
 {
-    return ui.urlForFlakinessDashboard(opt_testNameList) + '&showChrome=false&group=' + encodeURIComponent('@ToT - chromium.org');
+    return ui.urlForFlakinessDashboard(opt_testNameList) + '&showChrome=false';
 }
 
 ui.rolloutReasonForTestNameList = function(testNameList)
diff --git a/Tools/GardeningServer/scripts/ui/notifications_unittests.js b/Tools/GardeningServer/scripts/ui/notifications_unittests.js
index 9c5c2e7..18934cc 100644
--- a/Tools/GardeningServer/scripts/ui/notifications_unittests.js
+++ b/Tools/GardeningServer/scripts/ui/notifications_unittests.js
@@ -79,7 +79,7 @@
 test('FailingTestGroup', 2, function() {
     var failingTest = new ui.notifications.FailingTestGroup('test', ['test.html']);
     equal(failingTest.tagName, 'LI');
-    equal(failingTest.innerHTML, '<a href="http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=test.html&amp;group=%40ToT%20-%20chromium.org" target="_blank">test</a>');
+    equal(failingTest.innerHTML, '<a href="http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=test.html" target="_blank">test</a>');
 });
 
 test('SuspiciousCommit', 2, function() {
@@ -130,7 +130,7 @@
         '<div class="what">' +
             '<div class="problem">' +
                 '<ul class="effects">' +
-                    '<li><a href="http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=test&amp;group=%40ToT%20-%20chromium.org" target="_blank">test</a></li>' +
+                    '<li><a href="http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=test" target="_blank">test</a></li>' +
                 '</ul>' +
                 '<ul class="actions">' +
                     '<li><button class="action default" title="Examine these failures in detail.">Examine</button></li>' +
@@ -153,7 +153,7 @@
         '<div class="what">' +
             '<div class="problem">' +
                 '<ul class="effects">' +
-                    '<li><a href="http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=test&amp;group=%40ToT%20-%20chromium.org" target="_blank">test</a></li>' +
+                    '<li><a href="http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=test" target="_blank">test</a></li>' +
                 '</ul>' +
                 '<ul class="actions">' +
                     '<li><button class="action default" title="Examine these failures in detail.">Examine</button></li>' +
@@ -178,7 +178,7 @@
         '<div class="what">' +
             '<div class="problem">' +
                 '<ul class="effects">' +
-                    '<li><a href="http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=test&amp;group=%40ToT%20-%20chromium.org" target="_blank">test</a></li>' +
+                    '<li><a href="http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=test" target="_blank">test</a></li>' +
                 '</ul>' +
                 '<ul class="actions">' +
                     '<li><button class="action default" title="Examine these failures in detail.">Examine</button></li>' +
@@ -218,8 +218,8 @@
         '<div class="what">' +
             '<div class="problem">' +
                 '<ul class="effects">' +
-                    '<li><a href="http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=foo&amp;group=%40ToT%20-%20chromium.org" target="_blank">foo</a></li>' +
-                    '<li><a href="http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=test&amp;group=%40ToT%20-%20chromium.org" target="_blank">test</a></li>' +
+                    '<li><a href="http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=foo" target="_blank">foo</a></li>' +
+                    '<li><a href="http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=test" target="_blank">test</a></li>' +
                 '</ul>' +
                 '<ul class="actions">' +
                     '<li><button class="action default" title="Examine these failures in detail.">Examine</button></li>' +
@@ -263,8 +263,8 @@
         '<div class="what">' +
             '<div class="problem">' +
                 '<ul class="effects">' +
-                    '<li><a href="http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=foo&amp;group=%40ToT%20-%20chromium.org" target="_blank">foo</a></li>' +
-                    '<li><a href="http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=test&amp;group=%40ToT%20-%20chromium.org" target="_blank">test</a></li>' +
+                    '<li><a href="http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=foo" target="_blank">foo</a></li>' +
+                    '<li><a href="http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=test" target="_blank">test</a></li>' +
                 '</ul>' +
                 '<ul class="actions">' +
                     '<li><button class="action default" title="Examine these failures in detail.">Examine</button></li>' +
@@ -304,8 +304,8 @@
         '<div class="what">' +
             '<div class="problem">' +
                 '<ul class="effects">' +
-                    '<li><a href="http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=path%2Fto%2Ftest1.html%2Cpath%2Fto%2Ftest2.html%2Cpath%2Fto%2Ftest3.html%2Cpath%2Fto%2Ftest4.html&amp;group=%40ToT%20-%20chromium.org" target="_blank">path/to (4 tests)</a></li>' +
-                    '<li><a href="http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=path%2Fanother%2Ftest.html&amp;group=%40ToT%20-%20chromium.org" target="_blank">path/another/test.html</a></li>' +
+                    '<li><a href="http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=path%2Fto%2Ftest1.html%2Cpath%2Fto%2Ftest2.html%2Cpath%2Fto%2Ftest3.html%2Cpath%2Fto%2Ftest4.html" target="_blank">path/to (4 tests)</a></li>' +
+                    '<li><a href="http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=path%2Fanother%2Ftest.html" target="_blank">path/another/test.html</a></li>' +
                 '</ul>' +
                 '<ul class="actions">' +
                     '<li><button class="action default" title="Examine these failures in detail.">Examine</button></li>' +
diff --git a/Tools/Scripts/webkitpy/bindings/main.py b/Tools/Scripts/webkitpy/bindings/main.py
index bb76f5b..6fb00e6 100644
--- a/Tools/Scripts/webkitpy/bindings/main.py
+++ b/Tools/Scripts/webkitpy/bindings/main.py
@@ -42,6 +42,7 @@
         cmd = ['perl', '-w',
                '-Ibindings/scripts',
                '-Icore/scripts',
+               '-I../../JSON/out/lib/perl5',
                'bindings/scripts/generate-bindings.pl',
                # idl include directories (path relative to generate-bindings.pl)
                '--include', '.',
diff --git a/Tools/Scripts/webkitpy/common/checkout/checkout_unittest.py b/Tools/Scripts/webkitpy/common/checkout/checkout_unittest.py
index 9536016..6963dd2 100644
--- a/Tools/Scripts/webkitpy/common/checkout/checkout_unittest.py
+++ b/Tools/Scripts/webkitpy/common/checkout/checkout_unittest.py
@@ -36,6 +36,7 @@
 from .changelog import ChangeLogEntry
 from .scm import CommitMessage, SCMDetector
 from .scm.scm_mock import MockSCM
+from webkitpy.common.webkit_finder import WebKitFinder
 from webkitpy.common.system.executive import Executive, ScriptError
 from webkitpy.common.system.filesystem import FileSystem  # FIXME: This should not be needed.
 from webkitpy.common.system.filesystem_mock import MockFileSystem
@@ -102,6 +103,7 @@
         self.temp_dir = str(self.filesystem.mkdtemp(suffix="changelogs"))
         self.old_cwd = self.filesystem.getcwd()
         self.filesystem.chdir(self.temp_dir)
+        self.webkit_base = WebKitFinder(self.filesystem).webkit_base()
 
         # Trick commit-log-editor into thinking we're in a Subversion working copy so it won't
         # complain about not being able to figure out what SCM is in use.
@@ -130,7 +132,7 @@
             return executive.run_command(*args, **kwargs)
 
         detector = SCMDetector(self.filesystem, executive)
-        real_scm = detector.detect_scm_system(self.old_cwd)
+        real_scm = detector.detect_scm_system(self.webkit_base)
 
         mock_scm = MockSCM()
         mock_scm.run = mock_run
diff --git a/Tools/Scripts/webkitpy/common/net/resultsjsonparser_unittest.py b/Tools/Scripts/webkitpy/common/net/resultsjsonparser_unittest.py
index aaeb5dc..d5bba66 100644
--- a/Tools/Scripts/webkitpy/common/net/resultsjsonparser_unittest.py
+++ b/Tools/Scripts/webkitpy/common/net/resultsjsonparser_unittest.py
@@ -80,7 +80,6 @@
     "has_pretty_patch": false,
     "fixable": 1220,
     "num_flaky": 0,
-    "uses_expectations_file": true,
     "has_wdiff": false
 });"""
 
diff --git a/Tools/Scripts/webkitpy/common/prettypatch.py b/Tools/Scripts/webkitpy/common/prettypatch.py
index ffadea6..46ab4f2 100644
--- a/Tools/Scripts/webkitpy/common/prettypatch.py
+++ b/Tools/Scripts/webkitpy/common/prettypatch.py
@@ -31,10 +31,8 @@
 
 
 class PrettyPatch(object):
-    # FIXME: PrettyPatch should not require checkout_root.
-    def __init__(self, executive, checkout_root):
+    def __init__(self, executive):
         self._executive = executive
-        self._checkout_root = checkout_root
 
     def pretty_diff_file(self, diff):
         # Diffs can contain multiple text files of different encodings
@@ -52,9 +50,8 @@
         if not diff:
             return ""
 
-        pretty_patch_path = os.path.join(self._checkout_root,
-                                         "Tools", "Scripts", "webkitruby",
-                                         "PrettyPatch")
+        pretty_patch_path = os.path.join(os.path.dirname(__file__), '..', '..',
+                                         'webkitruby', 'PrettyPatch')
         prettify_path = os.path.join(pretty_patch_path, "prettify.rb")
         args = [
             "ruby",
diff --git a/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py b/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
index 58c07b0..7cb3e25 100644
--- a/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
+++ b/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
@@ -234,18 +234,17 @@
         summarized_failing_results = test_run_results.summarize_results(self._port, self._expectations, initial_results, retry_results, enabled_pixel_tests_in_retry, only_include_failing=True)
         self._printer.print_results(end_time - start_time, initial_results, summarized_failing_results)
 
+        exit_code = self._port.exit_code_from_summarized_results(summarized_failing_results)
         if not self._options.dry_run:
             self._write_json_files(summarized_full_results, summarized_failing_results, initial_results)
             self._upload_json_files()
 
             results_path = self._filesystem.join(self._results_directory, "results.html")
             self._copy_results_html_file(results_path)
-            if self._options.show_results and (initial_results.unexpected_results_by_name or
-                                               (self._options.full_results_html and initial_results.total_failures)):
+            if self._options.show_results and (exit_code or (self._options.full_results_html and initial_results.total_failures)):
                 self._port.show_results_html_file(results_path)
 
-        return test_run_results.RunDetails(self._port.exit_code_from_summarized_results(summarized_failing_results),
-                                           summarized_full_results, summarized_failing_results, initial_results, retry_results, enabled_pixel_tests_in_retry)
+        return test_run_results.RunDetails(exit_code, summarized_full_results, summarized_failing_results, initial_results, retry_results, enabled_pixel_tests_in_retry)
 
     def _run_tests(self, tests_to_run, tests_to_skip, repeat_each, iterations, num_workers, retrying):
         needs_http = self._port.requires_http_server() or any(self._is_http_test(test) for test in tests_to_run)
diff --git a/Tools/Scripts/webkitpy/layout_tests/models/test_configuration.py b/Tools/Scripts/webkitpy/layout_tests/models/test_configuration.py
index 5e0cd04..49b36e4 100644
--- a/Tools/Scripts/webkitpy/layout_tests/models/test_configuration.py
+++ b/Tools/Scripts/webkitpy/layout_tests/models/test_configuration.py
@@ -284,7 +284,7 @@
 
 
         # 4) Substitute specifier subsets that match macros witin each set:
-        #   (xp, vista, win7, release) -> (win, release)
+        #   (xp, win7, release) -> (win, release)
         self.collapse_macros(self._configuration_macros, specifiers_list)
 
         macro_keys = set(self._configuration_macros.keys())
diff --git a/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py b/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
index 3d9e3cf..f3acf04 100644
--- a/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
+++ b/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
@@ -220,7 +220,7 @@
     # FIXME: Update the original modifiers and remove this once the old syntax is gone.
     _configuration_tokens_list = [
         'Mac', 'SnowLeopard', 'Lion', 'MountainLion',
-        'Win', 'XP', 'Vista', 'Win7',
+        'Win', 'XP', 'Win7',
         'Linux',
         'Android',
         'Release',
diff --git a/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py b/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py
index 5c5972f..ccfa341 100644
--- a/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py
@@ -361,7 +361,6 @@
 
     def test_config_modifiers(self):
         self.assert_tokenize_exp('[ Mac ] foo.html', modifiers=['MAC', 'SKIP'], expectations=['PASS'])
-        self.assert_tokenize_exp('[ Mac Vista ] foo.html', modifiers=['MAC', 'VISTA', 'SKIP'], expectations=['PASS'])
         self.assert_tokenize_exp('[ Mac ] foo.html [ Failure ] ', modifiers=['MAC'], expectations=['FAIL'])
 
     def test_unknown_config(self):
@@ -504,7 +503,7 @@
 
         actual_expectations = expectations.remove_configuration_from_test('failures/expected/foo.html', test_config)
 
-        self.assertEqual("""Bug(x) [ Linux Vista Win7 Release ] failures/expected/foo.html [ Failure ]
+        self.assertEqual("""Bug(x) [ Linux Win7 Release ] failures/expected/foo.html [ Failure ]
 Bug(y) [ Win Mac Debug ] failures/expected/foo.html [ Crash ]
 """, actual_expectations)
 
@@ -521,7 +520,6 @@
         expectations = TestExpectations(test_port)
 
         actual_expectations = expectations.remove_configuration_from_test('failures/expected/foo.html', test_config)
-        actual_expectations = expectations.remove_configuration_from_test('failures/expected/foo.html', host.port_factory.get('test-win-vista', None).test_configuration())
         actual_expectations = expectations.remove_configuration_from_test('failures/expected/foo.html', host.port_factory.get('test-win-win7', None).test_configuration())
 
         self.assertEqual("""Bug(y) [ Win Debug ] failures/expected/foo.html [ Crash ]
@@ -540,7 +538,6 @@
         expectations = TestExpectations(test_port)
 
         actual_expectations = expectations.remove_configuration_from_test('failures/expected/foo.html', test_config)
-        actual_expectations = expectations.remove_configuration_from_test('failures/expected/foo.html', host.port_factory.get('test-win-vista', None).test_configuration())
         actual_expectations = expectations.remove_configuration_from_test('failures/expected/foo.html', host.port_factory.get('test-win-win7', None).test_configuration())
 
         self.assertEqual("""Bug(x) [ Win Debug ] failures/expected/foo.html [ Failure Timeout ]
diff --git a/Tools/Scripts/webkitpy/layout_tests/models/test_run_results.py b/Tools/Scripts/webkitpy/layout_tests/models/test_run_results.py
index 5d78c60..7d54d2a 100644
--- a/Tools/Scripts/webkitpy/layout_tests/models/test_run_results.py
+++ b/Tools/Scripts/webkitpy/layout_tests/models/test_run_results.py
@@ -258,8 +258,6 @@
     # FIXME: Remove this. It is redundant with results['num_failures_by_type'].
     results['num_missing'] = num_missing
     results['num_regressions'] = num_regressions
-    # FIXME: This is always true for Blink. We should remove this and update the code in Layouts/fast/harness/results.html that uses this.
-    results['uses_expectations_file'] = port_obj.uses_test_expectations_file()
     results['interrupted'] = initial_results.interrupted  # Does results.html have enough information to compute this itself? (by checking total number of results vs. total number of tests?)
     results['layout_tests_dir'] = port_obj.layout_tests_dir()
     results['has_wdiff'] = port_obj.wdiff_available()
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py
index 786f2c7..0b56ba2 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py
@@ -186,7 +186,7 @@
     def command_line_file(self):
         return '/data/local/tmp/content-shell-command-line'
     def additional_command_line_flags(self):
-        return []
+        return ['--dump-render-tree']
     def device_directory(self):
         return DEVICE_SOURCE_ROOT_DIR + 'content_shell/'
 
@@ -211,6 +211,11 @@
     def pull(self, device_path, host_path, ignore_error=False):
         return self.run(['pull', device_path, host_path], ignore_error=ignore_error)
 
+    def mkdir(self, device_path, chmod=None):
+        self.run(['shell', 'mkdir', '-p', device_path])
+        if chmod:
+            self.run(['shell', 'chmod', chmod, device_path])
+
     def restart_as_root(self):
         output = self.run(['root'])
         if 'adbd is already running as root' in output:
@@ -354,9 +359,11 @@
 
     def additional_drt_flag(self):
         # Chromium for Android always uses the hardware GPU path.
-        return ['--encode-binary', '--enable-hardware-gpu',
-                '--force-compositing-mode',
-                '--enable-accelerated-fixed-position']
+        flags = ['--encode-binary', '--enable-hardware-gpu',
+                 '--force-compositing-mode',
+                 '--enable-accelerated-fixed-position']
+        flags += self._driver_details.additional_command_line_flags()
+        return flags
 
     def default_timeout_ms(self):
         # Android platform has less computing power than desktop platforms.
@@ -708,15 +715,14 @@
 
         # Required by webkit_support::GetWebKitRootDirFilePath().
         # Other directories will be created automatically by adb push.
-        self._android_commands.run(['shell', 'mkdir', '-p', DEVICE_SOURCE_ROOT_DIR + 'chrome'])
+        self._android_commands.mkdir(DEVICE_SOURCE_ROOT_DIR + 'chrome')
 
-        # Allow the test driver to get full read and write access to the directory.
-        # The native code needs the permission to write temporary files and create pipes here.
-        self._android_commands.run(['shell', 'mkdir', '-p', self._driver_details.device_directory()])
-        self._android_commands.run(['shell', 'chmod', '777', self._driver_details.device_directory()])
+        # Allow the test driver to get full read and write access to the directory on the device,
+        # as well as for the FIFOs. We'll need a world writable directory.
+        self._android_commands.mkdir(self._driver_details.device_directory(), chmod='777')
+        self._android_commands.mkdir(self._driver_details.device_fifo_directory(), chmod='777')
 
-        # Delete the disk cache if any to ensure a clean test run.
-        # This is like what's done in ChromiumPort.setup_test_run but on the device.
+        # Make sure that the disk cache on the device resets to a clean state.
         self._android_commands.run(['shell', 'rm', '-r', self._driver_details.device_cache_directory()])
 
     def _log_error(self, message):
@@ -837,7 +843,7 @@
         return self._android_commands.adb_command() + ['shell']
 
     def _android_driver_cmd_line(self, pixel_tests, per_test_args):
-        return driver.Driver.cmd_line(self, pixel_tests, per_test_args) + self._driver_details.additional_command_line_flags()
+        return driver.Driver.cmd_line(self, pixel_tests, per_test_args)
 
     @staticmethod
     def _loop_with_timeout(condition, timeout_secs):
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/test.py b/Tools/Scripts/webkitpy/layout_tests/port/test.py
index 0c9e946..68922e8 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/test.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/test.py
@@ -351,7 +351,7 @@
     ALL_BASELINE_VARIANTS = (
         'test-linux-x86_64',
         'test-mac-snowleopard', 'test-mac-leopard',
-        'test-win-vista', 'test-win-win7', 'test-win-xp',
+        'test-win-win7', 'test-win-xp',
     )
 
     @classmethod
@@ -376,7 +376,6 @@
         version_map = {
             'test-win-xp': 'xp',
             'test-win-win7': 'win7',
-            'test-win-vista': 'vista',
             'test-mac-leopard': 'leopard',
             'test-mac-snowleopard': 'snowleopard',
             'test-linux-x86_64': 'lucid',
@@ -399,8 +398,7 @@
             'test-mac-snowleopard': ['test-mac-snowleopard'],
             'test-mac-leopard': ['test-mac-leopard', 'test-mac-snowleopard'],
             'test-win-win7': ['test-win-win7'],
-            'test-win-vista': ['test-win-vista', 'test-win-win7'],
-            'test-win-xp': ['test-win-xp', 'test-win-vista', 'test-win-win7'],
+            'test-win-xp': ['test-win-xp', 'test-win-win7'],
             'test-linux-x86_64': ['test-linux-x86_64', 'test-win-win7'],
         }
         return [self._webkit_baseline_path(d) for d in search_paths[self.name()]]
@@ -517,7 +515,6 @@
         return (('leopard', 'x86'),
                 ('snowleopard', 'x86'),
                 ('xp', 'x86'),
-                ('vista', 'x86'),
                 ('win7', 'x86'),
                 ('lucid', 'x86'),
                 ('lucid', 'x86_64'))
@@ -527,7 +524,7 @@
 
     def configuration_specifier_macros(self):
         """To avoid surprises when introducing new macros, these are intentionally fixed in time."""
-        return {'mac': ['leopard', 'snowleopard'], 'win': ['xp', 'vista', 'win7'], 'linux': ['lucid']}
+        return {'mac': ['leopard', 'snowleopard'], 'win': ['xp', 'win7'], 'linux': ['lucid']}
 
     def all_baseline_variants(self):
         return self.ALL_BASELINE_VARIANTS
diff --git a/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py b/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py
index b6affa5..bcc593d 100644
--- a/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py
@@ -280,9 +280,10 @@
                 ['--child-processes', '2', '--force', 'failures/expected/exception.html', 'passes/text.html'], tests_included=True, shared_port=False)
 
     def test_full_results_html(self):
-        # FIXME: verify html?
-        details, _, _ = logging_run(['--full-results-html'])
+        host = MockHost()
+        details, _, _ = logging_run(['--full-results-html'], host=host)
         self.assertEqual(details.exit_code, 0)
+        self.assertEqual(len(host.user.opened_urls), 1)
 
     def test_hung_thread(self):
         details, err, _ = logging_run(['--run-singly', '--time-out-ms=50', 'failures/expected/hang.html'], tests_included=True)
@@ -641,6 +642,7 @@
         self.assertTrue('Retrying' in err.getvalue())
         self.assertTrue(host.filesystem.exists('/tmp/layout-test-results/failures/flaky/text-actual.txt'))
         self.assertFalse(host.filesystem.exists('/tmp/layout-test-results/retries/failures/flaky/text-actual.txt'))
+        self.assertEqual(len(host.user.opened_urls), 0)
 
         # Now we test that --clobber-old-results does remove the old entries and the old retries,
         # and that we don't retry again.
@@ -651,6 +653,7 @@
         self.assertTrue('flaky/text.html' in err.getvalue())
         self.assertTrue(host.filesystem.exists('/tmp/layout-test-results/failures/flaky/text-actual.txt'))
         self.assertFalse(host.filesystem.exists('retries'))
+        self.assertEqual(len(host.user.opened_urls), 1)
 
     def test_retrying_chrashed_tests(self):
         host = MockHost()
diff --git a/Tools/Scripts/webkitpy/tool/commands/queries_unittest.py b/Tools/Scripts/webkitpy/tool/commands/queries_unittest.py
index 2947e4a..407872e 100644
--- a/Tools/Scripts/webkitpy/tool/commands/queries_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/commands/queries_unittest.py
@@ -183,11 +183,7 @@
 
     def test_multiple(self):
         self.run_test(['failures/expected/text.html', 'failures/expected/image.html'],
-                      ('// For test-win-vista\n'
-                       'failures/expected/image.html [ ImageOnlyFailure ]\n'
-                       'failures/expected/text.html [ Failure ]\n'
-                       '\n'
-                       '// For test-win-win7\n'
+                      ('// For test-win-win7\n'
                        'failures/expected/image.html [ ImageOnlyFailure ]\n'
                        'failures/expected/text.html [ Failure ]\n'
                        '\n'
@@ -267,11 +263,7 @@
         command.execute(MockOptions(all=False, include_virtual_tests=False, csv=False, platform='test-win-*'), ['passes/text.html'], self.tool)
         stdout, _, _ = self.restore_output()
         self.assertMultiLineEqual(stdout,
-                          ('// For test-win-vista\n'
-                           'passes/text-expected.png\n'
-                           'passes/text-expected.txt\n'
-                           '\n'
-                           '// For test-win-win7\n'
+                          ('// For test-win-win7\n'
                            'passes/text-expected.png\n'
                            'passes/text-expected.txt\n'
                            '\n'
diff --git a/Tools/Scripts/webkitpy/tool/commands/rebaseline.py b/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
index 6a283f8..fdff81e 100644
--- a/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
+++ b/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
@@ -116,14 +116,19 @@
                 pass
         return immediate_predecessors_in_fallback
 
+    def _port_for_primary_baseline(self, baseline):
+        for port in [self._tool.port_factory.get(port_name) for port_name in self._tool.port_factory.all_port_names()]:
+            if self._tool.filesystem.basename(port.baseline_version_dir()) == baseline:
+                return port
+        raise Exception("Failed to find port for primary baseline %s." % baseline)
+
     def _copy_existing_baseline(self, move_overwritten_baselines_to, test_name, suffix):
         old_baselines = []
         new_baselines = []
 
         # Need to gather all the baseline paths before modifying the filesystem since
         # the modifications can affect the results of port.expected_filename.
-        for platform in move_overwritten_baselines_to:
-            port = self._tool.port_factory.get(platform)
+        for port in [self._port_for_primary_baseline(baseline) for baseline in move_overwritten_baselines_to]:
             old_baseline = port.expected_filename(test_name, "." + suffix)
             if not self._tool.filesystem.exists(old_baseline):
                 _log.debug("No existing baseline for %s." % test_name)
diff --git a/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py b/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
index 8c2fbb6..7c1320d 100644
--- a/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
@@ -207,7 +207,6 @@
             builders._exact_matches = {
                 "MOCK Leopard": {"port_name": "test-mac-leopard", "specifiers": set(["mock-specifier"])},
                 "MOCK Linux": {"port_name": "test-linux-x86_64", "specifiers": set(["mock-specifier"])},
-                "MOCK Vista": {"port_name": "test-win-vista", "specifiers": set(["mock-specifier"])},
                 "MOCK Win7": {"port_name": "test-win-win7", "specifiers": set(["mock-specifier"])},
             }
 
@@ -222,7 +221,6 @@
             builders._exact_matches = old_exact_matches
 
         self.assertMultiLineEqual(self._read(self.tool.filesystem.join(port.layout_tests_dir(), 'platform/test-linux-x86_64/failures/expected/image-expected.txt')), 'original win7 result')
-        self.assertMultiLineEqual(self._read(self.tool.filesystem.join(port.layout_tests_dir(), 'platform/test-win-vista/failures/expected/image-expected.txt')), 'original win7 result')
         self.assertFalse(self.tool.filesystem.exists(self.tool.filesystem.join(port.layout_tests_dir(), 'platform/chromium-mac-leopard/userscripts/another-test-expected.txt')))
         self.assertMultiLineEqual(out, '{"add": [], "remove-lines": [{"test": "failures/expected/image.html", "builder": "MOCK Win7"}]}\n')
 
@@ -232,7 +230,6 @@
         # FIXME: it's confusing that this is the test- port, and not the regular win port. Really all of the tests should be using the test ports.
         port = self.tool.port_factory.get('test-win-win7')
         self._write(port._filesystem.join(port.layout_tests_dir(), 'platform/test-win-win7/failures/expected/image-expected.txt'), 'original win7 result')
-        self._write(port._filesystem.join(port.layout_tests_dir(), 'platform/test-win-vista/failures/expected/image-expected.txt'), 'original vista result')
 
         old_exact_matches = builders._exact_matches
         oc = OutputCapture()
@@ -240,7 +237,6 @@
             builders._exact_matches = {
                 "MOCK Leopard": {"port_name": "test-mac-leopard", "specifiers": set(["mock-specifier"])},
                 "MOCK Linux": {"port_name": "test-linux-x86_64", "specifiers": set(["mock-specifier"])},
-                "MOCK Vista": {"port_name": "test-win-vista", "specifiers": set(["mock-specifier"])},
                 "MOCK Win7": {"port_name": "test-win-win7", "specifiers": set(["mock-specifier"])},
             }
 
@@ -255,7 +251,6 @@
             builders._exact_matches = old_exact_matches
 
         self.assertMultiLineEqual(self._read(self.tool.filesystem.join(port.layout_tests_dir(), 'platform/test-linux-x86_64/failures/expected/image-expected.txt')), 'original win7 result')
-        self.assertMultiLineEqual(self._read(self.tool.filesystem.join(port.layout_tests_dir(), 'platform/test-win-vista/failures/expected/image-expected.txt')), 'original vista result')
         self.assertMultiLineEqual(self._read(self.tool.filesystem.join(port.layout_tests_dir(), 'platform/test-win-win7/failures/expected/image-expected.txt')), 'MOCK Web result, convert 404 to None=True')
         self.assertFalse(self.tool.filesystem.exists(self.tool.filesystem.join(port.layout_tests_dir(), 'platform/chromium-mac-leopard/userscripts/another-test-expected.txt')))
         self.assertMultiLineEqual(out, '{"add": [], "remove-lines": [{"test": "failures/expected/image.html", "builder": "MOCK Win7"}]}\n')
@@ -264,18 +259,18 @@
         self.tool.executive = MockExecutive2()
 
         # FIXME: it's confusing that this is the test- port, and not the regular win port. Really all of the tests should be using the test ports.
-        port = self.tool.port_factory.get('test-win-vista')
-        self._write(port._filesystem.join(port.layout_tests_dir(), 'platform/test-win-vista/failures/expected/image-expected.txt'), 'original vista result')
+        port = self.tool.port_factory.get('test-win-win7')
+        self._write(port._filesystem.join(port.layout_tests_dir(), 'platform/test-win-win7/failures/expected/image-expected.txt'), 'original win7 result')
 
         old_exact_matches = builders._exact_matches
         oc = OutputCapture()
         try:
             builders._exact_matches = {
                 "MOCK XP": {"port_name": "test-win-xp"},
-                "MOCK Vista": {"port_name": "test-win-vista"},
+                "MOCK Win7": {"port_name": "test-win-win7"},
             }
 
-            options = MockOptions(optimize=True, builder="MOCK Vista", suffixes="txt",
+            options = MockOptions(optimize=True, builder="MOCK Win7", suffixes="txt",
                 move_overwritten_baselines_to=None, verbose=True, test="failures/expected/image.html",
                 results_directory=None)
 
@@ -285,9 +280,9 @@
             out, _, _ = oc.restore_output()
             builders._exact_matches = old_exact_matches
 
-        self.assertMultiLineEqual(self._read(self.tool.filesystem.join(port.layout_tests_dir(), 'platform/test-win-vista/failures/expected/image-expected.txt')), 'MOCK Web result, convert 404 to None=True')
+        self.assertMultiLineEqual(self._read(self.tool.filesystem.join(port.layout_tests_dir(), 'platform/test-win-win7/failures/expected/image-expected.txt')), 'MOCK Web result, convert 404 to None=True')
         self.assertFalse(self.tool.filesystem.exists(self.tool.filesystem.join(port.layout_tests_dir(), 'platform/test-win-xp/failures/expected/image-expected.txt')))
-        self.assertMultiLineEqual(out, '{"add": [], "remove-lines": [{"test": "failures/expected/image.html", "builder": "MOCK Vista"}]}\n')
+        self.assertMultiLineEqual(out, '{"add": [], "remove-lines": [{"test": "failures/expected/image.html", "builder": "MOCK Win7"}]}\n')
 
 
 class TestRebaselineJson(_BaseTestCase):
diff --git a/Tools/Scripts/webkitpy/tool/steps/confirmdiff.py b/Tools/Scripts/webkitpy/tool/steps/confirmdiff.py
index 86c8a2c..301dc8b 100644
--- a/Tools/Scripts/webkitpy/tool/steps/confirmdiff.py
+++ b/Tools/Scripts/webkitpy/tool/steps/confirmdiff.py
@@ -50,8 +50,7 @@
             return None
 
         try:
-            pretty_patch = PrettyPatch(self._tool.executive,
-                                       self._tool.scm().checkout_root)
+            pretty_patch = PrettyPatch(self._tool.executive)
             pretty_diff_file = pretty_patch.pretty_diff_file(diff)
             url = "file://%s" % urllib.quote(pretty_diff_file.name)
             self._tool.user.open_url(url)
diff --git a/Tools/Scripts/webkitpy/w3c/test_converter.py b/Tools/Scripts/webkitpy/w3c/test_converter.py
index 1b029b8..e23405c 100644
--- a/Tools/Scripts/webkitpy/w3c/test_converter.py
+++ b/Tools/Scripts/webkitpy/w3c/test_converter.py
@@ -31,6 +31,7 @@
 import re
 
 from webkitpy.common.host import Host
+from webkitpy.common.webkit_finder import WebKitFinder
 from webkitpy.thirdparty.BeautifulSoup import BeautifulSoup, Tag
 
 
@@ -42,8 +43,7 @@
     def __init__(self):
         self._host = Host()
         self._filesystem = self._host.filesystem
-        self._host.initialize_scm()
-        self._webkit_root = self._host.scm().checkout_root
+        self._webkit_root = WebKitFinder(self._filesystem).webkit_base()
 
         # These settings might vary between WebKit and Blink
         self._css_property_file = self.path_from_webkit_root('Source', 'core', 'css', 'CSSPropertyNames.in')
diff --git a/Tools/TestResultServer/app.yaml b/Tools/TestResultServer/app.yaml
index cac2232..e63a017 100644
--- a/Tools/TestResultServer/app.yaml
+++ b/Tools/TestResultServer/app.yaml
@@ -9,6 +9,10 @@
   static_files: robots.txt
   upload: robots.txt
 
+- url: /favicon.ico
+  static_files: favicon.ico
+  upload: favicon.ico
+
 - url: /stylesheets
   static_dir: stylesheets
 
diff --git a/Tools/TestResultServer/favicon.ico b/Tools/TestResultServer/favicon.ico
new file mode 100644
index 0000000..1d0cfed
--- /dev/null
+++ b/Tools/TestResultServer/favicon.ico
Binary files differ
diff --git a/Tools/TestResultServer/handlers/menu.py b/Tools/TestResultServer/handlers/menu.py
index 7b5403a..8c780df 100644
--- a/Tools/TestResultServer/handlers/menu.py
+++ b/Tools/TestResultServer/handlers/menu.py
@@ -32,6 +32,7 @@
 from google.appengine.ext.webapp import template
 
 dashboards = [
+    ["Overview", "/dashboards/overview.html"],
     ["Results", "/dashboards/flakiness_dashboard.html"],
     ["Timeline", "/dashboards/timeline_explorer.html"],
     ["Treemap", "/dashboards/treemap.html"],
diff --git a/Tools/TestResultServer/model/jsonresults_unittest.py b/Tools/TestResultServer/model/jsonresults_unittest.py
index c9b167d..db8f9d7 100755
--- a/Tools/TestResultServer/model/jsonresults_unittest.py
+++ b/Tools/TestResultServer/model/jsonresults_unittest.py
@@ -99,7 +99,6 @@
     "build_number": "3",
     "interrupted": false,
     "num_missing": 0,
-    "uses_expectations_file": true,
     "layout_tests_dir": "\/tmp\/cr\/src\/third_party\/WebKit\/LayoutTests",
     "version": 3,
     "builder_name": "Webkit",
diff --git a/Tools/TestResultServer/static-dashboards/flakiness_dashboard.css b/Tools/TestResultServer/static-dashboards/flakiness_dashboard.css
index 063addf..5498dbe 100644
--- a/Tools/TestResultServer/static-dashboards/flakiness_dashboard.css
+++ b/Tools/TestResultServer/static-dashboards/flakiness_dashboard.css
@@ -48,24 +48,17 @@
     white-space: nowrap;
 }
 .forms {
-    display: -webkit-box;
-    -webkit-box-align: baseline;
-}
-.forms > * {
-    display: block;
+    display: -webkit-flex;
+    -webkit-align-items: baseline;
 }
 .forms span {
     padding: 0px 3px;
 }
-#tests-form {
-    display: -webkit-box;
-    -webkit-box-align: baseline;
-    -webkit-box-flex: 1;
-}
-#tests-form > * {
-    display: block;
-}
 #tests-input {
-    display: -webkit-box;
-    -webkit-box-flex: 1;
+    -webkit-flex: 1 auto;
+    overflow: hidden;
+    resize: none;
+    height: 1em;
+    border: 2px inset;
+    white-space: nowrap;
 }
diff --git a/Tools/TestResultServer/static-dashboards/flakiness_dashboard.js b/Tools/TestResultServer/static-dashboards/flakiness_dashboard.js
index 082ddf2..c944b4c 100644
--- a/Tools/TestResultServer/static-dashboards/flakiness_dashboard.js
+++ b/Tools/TestResultServer/static-dashboards/flakiness_dashboard.js
@@ -40,7 +40,6 @@
 var RELEASE_TIMEOUT = 6;
 var DEBUG_TIMEOUT = 12;
 var SLOW_MULTIPLIER = 5;
-var CHUNK_SIZE = 25;
 
 // FIXME: Figure out how to make this not be hard-coded.
 // Probably just include in the results.json files and get it from there.
@@ -339,6 +338,14 @@
 function individualTestsForSubstringList()
 {
     var testList = substringList();
+    // If listing a lot of tests, assume you've passed in an explicit list of tests
+    // instead of patterns to match against. The matching code below is super slow.
+    //
+    // Also, when showChrome is false, we're embedding the dashboard elsewhere and
+    // an explicit test list is passed in. In that case, we don't want
+    // a search for compositing/foo.html to also show virtual/softwarecompositing/foo.html.
+    if (testList.length > 10 || !g_history.dashboardSpecificState.showChrome)
+        return testList;
 
     // Put the tests into an object first and then move them into an array
     // as a way of deduping.
@@ -367,6 +374,7 @@
     var testsArray = [];
     for (var test in testsMap)
         testsArray.push(test);
+
     return testsArray;
 }
 
@@ -1145,14 +1153,16 @@
 function appendExpectations()
 {
     var expectations = g_history.dashboardSpecificState.showExpectations ? document.getElementsByClassName('expectations') : [];
-    // Loading expectations is *very* slow. Use a large timeout to avoid
-    // totally hanging the renderer.
-    performChunkedAction(expectations, function(chunk) {
-        for (var i = 0, len = chunk.length; i < len; i++)
-            loadExpectations(chunk[i]);
-        postHeightChangedMessage();
-
-    }, hideLoadingUI, 10000);
+    g_chunkedActionState = {
+        items: expectations,
+        index: 0
+    }
+    performChunkedAction(function(expectation) {
+            loadExpectations(expectation);
+            postHeightChangedMessage();
+        },
+        hideLoadingUI,
+        expectations);
 }
 
 function hideLoadingUI()
@@ -1168,47 +1178,52 @@
     console.log('Number of tests: ' + tests.length);
     if (g_history.dashboardSpecificState.showChrome)
         appendHTML(htmlForNavBar());
-    performChunkedAction(tests, function(chunk) {
-        appendHTML(htmlForIndividualTests(chunk));
-    }, appendExpectations, 500);
+    performChunkedAction(function(test) {
+            appendHTML(htmlForIndividualTest(test));
+        },
+        appendExpectations,
+        tests);
     if (g_history.dashboardSpecificState.showChrome) {
         $('tests-input').value = g_history.dashboardSpecificState.tests;
         $('result-input').value = g_history.dashboardSpecificState.result;
     }
 }
 
-function performChunkedAction(tests, handleChunk, onComplete, timeout, opt_index) {
+var g_chunkedActionRequestId;
+function performChunkedAction(action, onComplete, items, opt_index) {
+    if (g_chunkedActionRequestId)
+        cancelAnimationFrame(g_chunkedActionRequestId);
+
     var index = opt_index || 0;
-    setTimeout(function() {
-        var chunk = Array.prototype.slice.call(tests, index * CHUNK_SIZE, (index + 1) * CHUNK_SIZE);
-        if (chunk.length) {
-            handleChunk(chunk);
-            performChunkedAction(tests, handleChunk, onComplete, timeout, ++index);
-        } else
+    g_chunkedActionRequestId = requestAnimationFrame(function() {
+        if (index < items.length) {
+            action(items[index]);
+            performChunkedAction(action, onComplete, items, ++index);
+        } else {
             onComplete();
-    // No need for a timeout on the first chunked action.
-    }, index ? timeout : 0);
+        }
+    });
 }
 
-function htmlForIndividualTests(tests)
+function htmlForIndividualTest(test)
 {
-    var testsHTML = [];
-    for (var i = 0; i < tests.length; i++) {
-        var test = tests[i];
-        var testNameHtml = '';
-        if (g_history.dashboardSpecificState.showChrome || tests.length > 1) {
-            if (g_history.isLayoutTestResults()) {
-                var suite = lookupVirtualTestSuite(test);
-                var base = suite ? baseTest(test, suite) : test;
-                var versionControlUrl = TEST_URL_BASE_PATH_FOR_BROWSING + base;
-                testNameHtml += '<h2>' + linkHTMLToOpenWindow(versionControlUrl, test) + '</h2>';
-            } else
-                testNameHtml += '<h2>' + test + '</h2>';
-        }
-
-        testsHTML.push(testNameHtml + htmlForIndividualTestOnAllBuildersWithResultsLinks(test));
+    var testNameHtml = '';
+    if (g_history.dashboardSpecificState.showChrome) {
+        if (g_history.isLayoutTestResults()) {
+            var suite = lookupVirtualTestSuite(test);
+            var base = suite ? baseTest(test, suite) : test;
+            var versionControlUrl = TEST_URL_BASE_PATH_FOR_BROWSING + base;
+            testNameHtml += '<h2>' + linkHTMLToOpenWindow(versionControlUrl, test) + '</h2>';
+        } else
+            testNameHtml += '<h2>' + test + '</h2>';
     }
-    return testsHTML.join('<hr>');
+
+    return testNameHtml + htmlForIndividualTestOnAllBuildersWithResultsLinks(test);
+}
+
+function setTestsParameter(input)
+{
+    g_history.setQueryParameter('tests', input.value);
 }
 
 function htmlForNavBar()
@@ -1219,13 +1234,13 @@
         'onsubmit="g_history.setQueryParameter(\'result\', result.value);' +
         'return false;">Show all tests with result: ' +
         '<input name=result placeholder="e.g. CRASH" id=result-input>' +
-        '</form><form id=tests-form ' +
-        'onsubmit="g_history.setQueryParameter(\'tests\', tests.value);' +
-        'return false;"><span>Show tests on all platforms: </span>' +
-        '<input name=tests ' +
+        '</form><span>Show tests on all platforms: </span>' +
+        // Use a textarea to avoid the 32k limit on the length of inputs.
+        '<textarea name=tests ' +
         'placeholder="Comma or space-separated list of tests or partial ' +
         'paths to show test results across all builders, e.g., ' +
-        'foo/bar.html,foo/baz,domstorage" id=tests-input></form>' +
+        'foo/bar.html,foo/baz,domstorage" id=tests-input onchange="setTestsParameter(this)" ' +
+        'onkeydown="if (event.keyCode == 13) { setTestsParameter(this); return false; }"></textarea>' +
         '<span class=link onclick="showLegend()">Show legend [type ?]</span></div>';
     return html;
 }
diff --git a/Tools/TestResultServer/static-dashboards/flakiness_dashboard_unittests.js b/Tools/TestResultServer/static-dashboards/flakiness_dashboard_unittests.js
index ac4d334..eb41772 100644
--- a/Tools/TestResultServer/static-dashboards/flakiness_dashboard_unittests.js
+++ b/Tools/TestResultServer/static-dashboards/flakiness_dashboard_unittests.js
@@ -166,34 +166,35 @@
         '</div>');
 });
 
-test('htmlForIndividualTests', 4, function() {
+test('individualTestsForSubstringList', 2, function() {
+    var builderName = 'WebKit Linux';
+    g_resultsByBuilder[builderName] = {
+        buildNumbers: [2, 1],
+        blinkRevision: [1234, 1233],
+        failure_map: FAILURE_MAP,
+        tests: {
+            'foo/one.html': { results: [1, 'F'], times: [1, 0] },
+            'virtual/foo/one.html': { results: [1, 'F'], times: [1, 0] },
+        }
+    };
+
+    g_history.dashboardSpecificState.showChrome = true;
+    var testToMatch = 'foo/one.html';
+    g_history.dashboardSpecificState.tests = testToMatch;
+    deepEqual(individualTestsForSubstringList(), [testToMatch, 'virtual/foo/one.html']);
+
+    g_history.dashboardSpecificState.showChrome = false;
+    deepEqual(individualTestsForSubstringList(), [testToMatch]);
+});
+
+test('htmlForIndividualTest', 2, function() {
     var historyInstance = resetGlobals();
     builders.loadBuildersList('@ToT Blink', 'layout-tests');
-    var test1 = 'foo/nonexistant.html';
-    var test2 = 'bar/nonexistant.html';
+    var test = 'foo/nonexistant.html';
 
     historyInstance.dashboardSpecificState.showChrome = false;
 
-    var tests = [test1, test2];
-    equal(htmlForIndividualTests(tests),
-        '<h2><a href="' + TEST_URL_BASE_PATH_FOR_BROWSING + 'foo/nonexistant.html" target="_blank">foo/nonexistant.html</a></h2>' +
-        htmlForIndividualTestOnAllBuilders(test1) +
-        '<div class=expectations test=foo/nonexistant.html>' +
-            '<div><span class=link onclick=\"g_history.setQueryParameter(\'showExpectations\', true)\">Show results</span> | ' +
-            '<span class=link onclick=\"g_history.setQueryParameter(\'showLargeExpectations\', true)\">Show large thumbnails</span> | ' +
-            '<b>Only shows actual results/diffs from the most recent *failure* on each bot.</b></div>' +
-        '</div>' +
-        '<hr>' +
-        '<h2><a href="' + TEST_URL_BASE_PATH_FOR_BROWSING + 'bar/nonexistant.html" target="_blank">bar/nonexistant.html</a></h2>' +
-        htmlForIndividualTestOnAllBuilders(test2) +
-        '<div class=expectations test=bar/nonexistant.html>' +
-            '<div><span class=link onclick=\"g_history.setQueryParameter(\'showExpectations\', true)\">Show results</span> | ' +
-            '<span class=link onclick=\"g_history.setQueryParameter(\'showLargeExpectations\', true)\">Show large thumbnails</span> | ' +
-            '<b>Only shows actual results/diffs from the most recent *failure* on each bot.</b></div>' +
-        '</div>');
-
-    tests = [test1];
-    equal(htmlForIndividualTests(tests), htmlForIndividualTestOnAllBuilders(test1) +
+    equal(htmlForIndividualTest(test), htmlForIndividualTestOnAllBuilders(test) +
         '<div class=expectations test=foo/nonexistant.html>' +
             '<div><span class=link onclick=\"g_history.setQueryParameter(\'showExpectations\', true)\">Show results</span> | ' +
             '<span class=link onclick=\"g_history.setQueryParameter(\'showLargeExpectations\', true)\">Show large thumbnails</span> | ' +
@@ -202,16 +203,9 @@
 
     historyInstance.dashboardSpecificState.showChrome = true;
 
-    equal(htmlForIndividualTests(tests),
+    equal(htmlForIndividualTest(test),
         '<h2><a href="' + TEST_URL_BASE_PATH_FOR_BROWSING + 'foo/nonexistant.html" target="_blank">foo/nonexistant.html</a></h2>' +
-        htmlForIndividualTestOnAllBuildersWithResultsLinks(test1));
-
-    tests = [test1, test2];
-    equal(htmlForIndividualTests(tests),
-        '<h2><a href="' + TEST_URL_BASE_PATH_FOR_BROWSING + 'foo/nonexistant.html" target="_blank">foo/nonexistant.html</a></h2>' +
-        htmlForIndividualTestOnAllBuildersWithResultsLinks(test1) + '<hr>' +
-        '<h2><a href="' + TEST_URL_BASE_PATH_FOR_BROWSING + 'bar/nonexistant.html" target="_blank">bar/nonexistant.html</a></h2>' +
-        htmlForIndividualTestOnAllBuildersWithResultsLinks(test2));
+        htmlForIndividualTestOnAllBuildersWithResultsLinks(test));
 });
 
 test('linkifyBugs', 4, function() {
diff --git a/Tools/TestResultServer/static-dashboards/history.js b/Tools/TestResultServer/static-dashboards/history.js
index 622b76d..ec18f7f 100644
--- a/Tools/TestResultServer/static-dashboards/history.js
+++ b/Tools/TestResultServer/static-dashboards/history.js
@@ -84,7 +84,8 @@
             errors.show();
             window.location.hash = window.location.hash.replace('master=' + paramsMap.master, '');
         } else {
-            paramsMap.group = builders.masters[paramsMap.master].groups[0];
+            var groupIndex = paramsMap.master == 'ChromiumWebkit' ? 1 : 0;
+            paramsMap.group = builders.masters[paramsMap.master].groups[groupIndex];
             window.location.hash = window.location.hash.replace('master=' + paramsMap.master, 'group=' + encodeURIComponent(paramsMap.group));
             delete paramsMap.master;
         }
diff --git a/Tools/TestResultServer/static-dashboards/timeline_explorer.js b/Tools/TestResultServer/static-dashboards/timeline_explorer.js
index 5756b89..5705dc7 100644
--- a/Tools/TestResultServer/static-dashboards/timeline_explorer.js
+++ b/Tools/TestResultServer/static-dashboards/timeline_explorer.js
@@ -182,14 +182,14 @@
     inspectorNode.style.visibility = 'visible';
 
     if (g_currentBuildIndex != -1)
-        selectBuild(results, builder, g_dygraph, g_currentBuildIndex);
+        selectBuild(resultsForBuilder, builder, g_dygraph, g_currentBuildIndex);
 }
 
 function selectBuild(resultsForBuilder, builder, dygraph, index)
 {
     g_currentBuildIndex = index;
-    updateBuildIndicator(results, dygraph);
-    updateBuildInspector(results, builder, dygraph, index);
+    updateBuildIndicator(resultsForBuilder, dygraph);
+    updateBuildInspector(resultsForBuilder, builder, dygraph, index);
     g_history.setQueryParameter('buildTimestamp', resultsForBuilder[results.TIMESTAMPS][index] * 1000);
 }