Rename LayoutTestController to TestRunner in DumpRenderTree
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Aug 2012 07:36:41 +0000 (07:36 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Aug 2012 07:36:41 +0000 (07:36 +0000)
https://bugs.webkit.org/show_bug.cgi?id=93758

Reviewed by Tony Chang.

Renamed LayoutTestController to TestRunner. For Chromium port, it's renamed to DRTTestRunner
since it already has TestRunner class shared between DumpRenderTree and content_shell.

* DumpRenderTree/DumpRenderTree.h:
* DumpRenderTree/PixelDumpSupport.cpp:
* DumpRenderTree/StorageTrackerDelegate.h:
* DumpRenderTree/StorageTrackerDelegate.mm:
* DumpRenderTree/TestRunner.cpp:
* DumpRenderTree/TestRunner.h:
* DumpRenderTree/blackberry/DumpRenderTree.cpp:
* DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
* DumpRenderTree/chromium/DRTTestRunner.cpp:
* DumpRenderTree/chromium/DRTTestRunner.h:
* DumpRenderTree/chromium/DumpRenderTree.cpp:
* DumpRenderTree/chromium/NotificationPresenter.h:
* DumpRenderTree/chromium/TestShell.cpp:
* DumpRenderTree/chromium/TestShell.h:
* DumpRenderTree/chromium/WebPermissions.cpp:
* DumpRenderTree/chromium/WebPermissions.h:
* DumpRenderTree/chromium/WebViewHost.cpp:
* DumpRenderTree/chromium/WebViewHost.h:
* DumpRenderTree/efl/DumpRenderTree.cpp:
* DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
* DumpRenderTree/efl/DumpRenderTreeView.cpp:
* DumpRenderTree/efl/EditingCallbacks.cpp:
* DumpRenderTree/efl/TestRunnerEfl.cpp:
* DumpRenderTree/gtk/DumpRenderTree.cpp:
* DumpRenderTree/gtk/EditingCallbacks.cpp:
* DumpRenderTree/gtk/TestRunnerGtk.cpp:
* DumpRenderTree/mac/DumpRenderTree.mm:
* DumpRenderTree/mac/DumpRenderTreeWindow.mm:
* DumpRenderTree/mac/EditingDelegate.mm:
* DumpRenderTree/mac/FrameLoadDelegate.mm:
* DumpRenderTree/mac/HistoryDelegate.mm:
* DumpRenderTree/mac/PixelDumpSupportMac.mm:
* DumpRenderTree/mac/PolicyDelegate.h:
* DumpRenderTree/mac/PolicyDelegate.mm:
* DumpRenderTree/mac/ResourceLoadDelegate.mm:
* DumpRenderTree/mac/TestRunnerMac.mm:
* DumpRenderTree/mac/UIDelegate.mm:
* DumpRenderTree/qt/DumpRenderTreeQt.cpp:
* DumpRenderTree/qt/DumpRenderTreeQt.h:
* DumpRenderTree/qt/TestRunnerQt.cpp:
* DumpRenderTree/qt/TestRunnerQt.h:
* DumpRenderTree/win/DRTDesktopNotificationPresenter.cpp:
* DumpRenderTree/win/DumpRenderTree.cpp:
* DumpRenderTree/win/EditingDelegate.cpp:
* DumpRenderTree/win/FrameLoadDelegate.cpp:
* DumpRenderTree/win/HistoryDelegate.cpp:
* DumpRenderTree/win/PolicyDelegate.h:
* DumpRenderTree/win/ResourceLoadDelegate.cpp:
* DumpRenderTree/win/TestRunnerWin.cpp:
* DumpRenderTree/win/UIDelegate.cpp:
* DumpRenderTree/wx/DumpRenderTreeWx.cpp:
* DumpRenderTree/wx/TestRunnerWx.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@125516 268f45cc-cd09-0410-ab3c-d52691b4dbfc

53 files changed:
Tools/ChangeLog
Tools/DumpRenderTree/DumpRenderTree.h
Tools/DumpRenderTree/PixelDumpSupport.cpp
Tools/DumpRenderTree/StorageTrackerDelegate.h
Tools/DumpRenderTree/StorageTrackerDelegate.mm
Tools/DumpRenderTree/TestRunner.cpp
Tools/DumpRenderTree/TestRunner.h
Tools/DumpRenderTree/blackberry/DumpRenderTree.cpp
Tools/DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp
Tools/DumpRenderTree/chromium/DRTTestRunner.cpp
Tools/DumpRenderTree/chromium/DRTTestRunner.h
Tools/DumpRenderTree/chromium/DumpRenderTree.cpp
Tools/DumpRenderTree/chromium/NotificationPresenter.h
Tools/DumpRenderTree/chromium/TestShell.cpp
Tools/DumpRenderTree/chromium/TestShell.h
Tools/DumpRenderTree/chromium/WebPermissions.cpp
Tools/DumpRenderTree/chromium/WebPermissions.h
Tools/DumpRenderTree/chromium/WebViewHost.cpp
Tools/DumpRenderTree/chromium/WebViewHost.h
Tools/DumpRenderTree/efl/DumpRenderTree.cpp
Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp
Tools/DumpRenderTree/efl/DumpRenderTreeView.cpp
Tools/DumpRenderTree/efl/EditingCallbacks.cpp
Tools/DumpRenderTree/efl/TestRunnerEfl.cpp
Tools/DumpRenderTree/gtk/DumpRenderTree.cpp
Tools/DumpRenderTree/gtk/EditingCallbacks.cpp
Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp
Tools/DumpRenderTree/mac/DumpRenderTree.mm
Tools/DumpRenderTree/mac/DumpRenderTreeWindow.mm
Tools/DumpRenderTree/mac/EditingDelegate.mm
Tools/DumpRenderTree/mac/FrameLoadDelegate.mm
Tools/DumpRenderTree/mac/HistoryDelegate.mm
Tools/DumpRenderTree/mac/PixelDumpSupportMac.mm
Tools/DumpRenderTree/mac/PolicyDelegate.h
Tools/DumpRenderTree/mac/PolicyDelegate.mm
Tools/DumpRenderTree/mac/ResourceLoadDelegate.mm
Tools/DumpRenderTree/mac/TestRunnerMac.mm
Tools/DumpRenderTree/mac/UIDelegate.mm
Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
Tools/DumpRenderTree/qt/DumpRenderTreeQt.h
Tools/DumpRenderTree/qt/TestRunnerQt.cpp
Tools/DumpRenderTree/qt/TestRunnerQt.h
Tools/DumpRenderTree/win/DRTDesktopNotificationPresenter.cpp
Tools/DumpRenderTree/win/DumpRenderTree.cpp
Tools/DumpRenderTree/win/EditingDelegate.cpp
Tools/DumpRenderTree/win/FrameLoadDelegate.cpp
Tools/DumpRenderTree/win/HistoryDelegate.cpp
Tools/DumpRenderTree/win/PolicyDelegate.h
Tools/DumpRenderTree/win/ResourceLoadDelegate.cpp
Tools/DumpRenderTree/win/TestRunnerWin.cpp
Tools/DumpRenderTree/win/UIDelegate.cpp
Tools/DumpRenderTree/wx/DumpRenderTreeWx.cpp
Tools/DumpRenderTree/wx/TestRunnerWx.cpp

index 0bd79bc..f5c58e4 100644 (file)
@@ -1,3 +1,66 @@
+2012-08-13  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Rename LayoutTestController to TestRunner in DumpRenderTree
+        https://bugs.webkit.org/show_bug.cgi?id=93758
+
+        Reviewed by Tony Chang.
+
+        Renamed LayoutTestController to TestRunner. For Chromium port, it's renamed to DRTTestRunner
+        since it already has TestRunner class shared between DumpRenderTree and content_shell.
+
+        * DumpRenderTree/DumpRenderTree.h:
+        * DumpRenderTree/PixelDumpSupport.cpp:
+        * DumpRenderTree/StorageTrackerDelegate.h:
+        * DumpRenderTree/StorageTrackerDelegate.mm:
+        * DumpRenderTree/TestRunner.cpp:
+        * DumpRenderTree/TestRunner.h:
+        * DumpRenderTree/blackberry/DumpRenderTree.cpp:
+        * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
+        * DumpRenderTree/chromium/DRTTestRunner.cpp:
+        * DumpRenderTree/chromium/DRTTestRunner.h:
+        * DumpRenderTree/chromium/DumpRenderTree.cpp:
+        * DumpRenderTree/chromium/NotificationPresenter.h:
+        * DumpRenderTree/chromium/TestShell.cpp:
+        * DumpRenderTree/chromium/TestShell.h:
+        * DumpRenderTree/chromium/WebPermissions.cpp:
+        * DumpRenderTree/chromium/WebPermissions.h:
+        * DumpRenderTree/chromium/WebViewHost.cpp:
+        * DumpRenderTree/chromium/WebViewHost.h:
+        * DumpRenderTree/efl/DumpRenderTree.cpp:
+        * DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
+        * DumpRenderTree/efl/DumpRenderTreeView.cpp:
+        * DumpRenderTree/efl/EditingCallbacks.cpp:
+        * DumpRenderTree/efl/TestRunnerEfl.cpp:
+        * DumpRenderTree/gtk/DumpRenderTree.cpp:
+        * DumpRenderTree/gtk/EditingCallbacks.cpp:
+        * DumpRenderTree/gtk/TestRunnerGtk.cpp:
+        * DumpRenderTree/mac/DumpRenderTree.mm:
+        * DumpRenderTree/mac/DumpRenderTreeWindow.mm:
+        * DumpRenderTree/mac/EditingDelegate.mm:
+        * DumpRenderTree/mac/FrameLoadDelegate.mm:
+        * DumpRenderTree/mac/HistoryDelegate.mm:
+        * DumpRenderTree/mac/PixelDumpSupportMac.mm:
+        * DumpRenderTree/mac/PolicyDelegate.h:
+        * DumpRenderTree/mac/PolicyDelegate.mm:
+        * DumpRenderTree/mac/ResourceLoadDelegate.mm:
+        * DumpRenderTree/mac/TestRunnerMac.mm:
+        * DumpRenderTree/mac/UIDelegate.mm:
+        * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+        * DumpRenderTree/qt/DumpRenderTreeQt.h:
+        * DumpRenderTree/qt/TestRunnerQt.cpp:
+        * DumpRenderTree/qt/TestRunnerQt.h:
+        * DumpRenderTree/win/DRTDesktopNotificationPresenter.cpp:
+        * DumpRenderTree/win/DumpRenderTree.cpp:
+        * DumpRenderTree/win/EditingDelegate.cpp:
+        * DumpRenderTree/win/FrameLoadDelegate.cpp:
+        * DumpRenderTree/win/HistoryDelegate.cpp:
+        * DumpRenderTree/win/PolicyDelegate.h:
+        * DumpRenderTree/win/ResourceLoadDelegate.cpp:
+        * DumpRenderTree/win/TestRunnerWin.cpp:
+        * DumpRenderTree/win/UIDelegate.cpp:
+        * DumpRenderTree/wx/DumpRenderTreeWx.cpp:
+        * DumpRenderTree/wx/TestRunnerWx.cpp:
+
 2012-08-14  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
 
         [GTK] String returned by g_path_get_dirname() must be freed
index 18d8cda..4c6a472 100644 (file)
 std::wstring urlSuitableForTestResult(const std::wstring& url);
 #endif
 
-class LayoutTestController;
+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<LayoutTestController> gLayoutTestController;
+extern RefPtr<TestRunner> gTestRunner;
 
 void dump();
 void displayWebView();
index fe027d2..1652911 100644 (file)
@@ -49,11 +49,11 @@ void dumpWebViewAsPixelsAndCompareWithExpected(const std::string& expectedHash)
 {
     RefPtr<BitmapContext> context;
 #if PLATFORM(MAC)
-    if (gLayoutTestController->isPrinting())
+    if (gTestRunner->isPrinting())
         context = createPagedBitmapContext();
     else
 #endif
-        context = createBitmapContextFromWebView(gLayoutTestController->testOnscreen(), gLayoutTestController->testRepaint(), gLayoutTestController->testRepaintSweepHorizontally(), gLayoutTestController->dumpSelectionRect());
+        context = createBitmapContextFromWebView(gTestRunner->testOnscreen(), gTestRunner->testRepaint(), gTestRunner->testRepaintSweepHorizontally(), gTestRunner->dumpSelectionRect());
     ASSERT(context);
     
     // Compute the hash of the bitmap context pixels
index e025a44..73032ef 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-class LayoutTestController;
+class TestRunner;
 
 @interface StorageTrackerDelegate : NSObject {
     unsigned numberOfNotificationsToLog;
-    LayoutTestController* controllerToNotifyDone;
+    TestRunner* controllerToNotifyDone;
 }
 
-- (void)logNotifications:(unsigned)number controller:(LayoutTestController*)controller;
+- (void)logNotifications:(unsigned)number controller:(TestRunner*)controller;
 - (void)originModified:(NSNotification *)notification;
-- (void)setControllerToNotifyDone:(LayoutTestController*)controller;
+- (void)setControllerToNotifyDone:(TestRunner*)controller;
 
 @end
index c4ae131..121fa17 100644 (file)
@@ -43,7 +43,7 @@
     return self;
 }
 
-- (void)logNotifications:(unsigned)number controller:(LayoutTestController*)controller
+- (void)logNotifications:(unsigned)number controller:(TestRunner*)controller
 {
     controllerToNotifyDone = controller;
 
@@ -73,7 +73,7 @@
     [super dealloc];
 }
 
-- (void)setControllerToNotifyDone:(LayoutTestController*)controller
+- (void)setControllerToNotifyDone:(TestRunner*)controller
 {
     controllerToNotifyDone = controller;
 }
index a82ee71..229bf06 100644 (file)
@@ -44,7 +44,7 @@
 #include <wtf/OwnArrayPtr.h>
 #include <wtf/RefPtr.h>
 
-LayoutTestController::LayoutTestController(const std::string& testPathOrURL, const std::string& expectedPixelHash)
+TestRunner::TestRunner(const std::string& testPathOrURL, const std::string& expectedPixelHash)
     : m_disallowIncreaseForApplicationCacheQuota(false)
     , m_dumpApplicationCacheDelegateCallbacks(false)
     , m_dumpAsAudio(false)
@@ -100,37 +100,37 @@ LayoutTestController::LayoutTestController(const std::string& testPathOrURL, con
 {
 }
 
-PassRefPtr<LayoutTestController> LayoutTestController::create(const std::string& testPathOrURL, const std::string& expectedPixelHash)
+PassRefPtr<TestRunner> TestRunner::create(const std::string& testPathOrURL, const std::string& expectedPixelHash)
 {
-    return adoptRef(new LayoutTestController(testPathOrURL, expectedPixelHash));
+    return adoptRef(new TestRunner(testPathOrURL, expectedPixelHash));
 }
 
 // Static Functions
 
 static JSValueRef disallowIncreaseForApplicationCacheQuotaCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setDisallowIncreaseForApplicationCacheQuota(true);
     return JSValueMakeUndefined(context);
 }
 
 static JSValueRef dumpApplicationCacheDelegateCallbacksCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setDumpApplicationCacheDelegateCallbacks(true);
     return JSValueMakeUndefined(context);
 }
 
 static JSValueRef dumpAsPDFCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setDumpAsPDF(true);
     return JSValueMakeUndefined(context);
 }
 
 static JSValueRef dumpAsTextCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setDumpAsText(true);
 
     // Optional paramater, describing whether it's allowed to dump pixel results in dumpAsText mode.
@@ -141,119 +141,119 @@ static JSValueRef dumpAsTextCallback(JSContextRef context, JSObjectRef function,
 
 static JSValueRef dumpBackForwardListCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setDumpBackForwardList(true);
     return JSValueMakeUndefined(context);
 }
 
 static JSValueRef dumpChildFramesAsTextCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setDumpChildFramesAsText(true);
     return JSValueMakeUndefined(context);
 }
 
 static JSValueRef dumpChildFrameScrollPositionsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setDumpChildFrameScrollPositions(true);
     return JSValueMakeUndefined(context);
 }
 
 static JSValueRef dumpDatabaseCallbacksCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setDumpDatabaseCallbacks(true);
     return JSValueMakeUndefined(context);
 }
 
 static JSValueRef dumpDOMAsWebArchiveCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setDumpDOMAsWebArchive(true);
     return JSValueMakeUndefined(context);
 }
 
 static JSValueRef dumpEditingCallbacksCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setDumpEditingCallbacks(true);
     return JSValueMakeUndefined(context);
 }
 
 static JSValueRef dumpFrameLoadCallbacksCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setDumpFrameLoadCallbacks(true);
     return JSValueMakeUndefined(context);
 }
 
 static JSValueRef dumpProgressFinishedCallbackCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setDumpProgressFinishedCallback(true);
     return JSValueMakeUndefined(context);
 }
 
 static JSValueRef dumpUserGestureInFrameLoadCallbacksCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setDumpUserGestureInFrameLoadCallbacks(true);
     return JSValueMakeUndefined(context);
 }
 
 static JSValueRef dumpResourceLoadCallbacksCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setDumpResourceLoadCallbacks(true);
     return JSValueMakeUndefined(context);
 }
 
 static JSValueRef dumpResourceResponseMIMETypesCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setDumpResourceResponseMIMETypes(true);
     return JSValueMakeUndefined(context);
 }
 
 static JSValueRef dumpSelectionRectCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setDumpSelectionRect(true);
     return JSValueMakeUndefined(context);
 }
 
 static JSValueRef dumpSourceAsWebArchiveCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setDumpSourceAsWebArchive(true);
     return JSValueMakeUndefined(context);
 }
 
 static JSValueRef dumpStatusCallbacksCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setDumpStatusCallbacks(true);
     return JSValueMakeUndefined(context);
 }
 
 static JSValueRef dumpTitleChangesCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setDumpTitleChanges(true);
     return JSValueMakeUndefined(context);
 }
 
 static JSValueRef dumpIconChangesCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setDumpIconChanges(true);
     return JSValueMakeUndefined(context);
 }
 
 static JSValueRef dumpWillCacheResponseCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setDumpWillCacheResponse(true);
     return JSValueMakeUndefined(context);
 }
@@ -263,7 +263,7 @@ static JSValueRef pathToLocalResourceCallback(JSContextRef context, JSObjectRef
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     JSRetainPtr<JSStringRef> localPath(Adopt, JSValueToStringCopy(context, arguments[0], exception));
     ASSERT(!*exception);
 
@@ -276,7 +276,7 @@ static JSValueRef pathToLocalResourceCallback(JSContextRef context, JSObjectRef
 
 static JSValueRef removeAllVisitedLinksCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setDumpVisitedLinksCallback(true);
     controller->removeAllVisitedLinks();
     return JSValueMakeUndefined(context);
@@ -284,7 +284,7 @@ static JSValueRef removeAllVisitedLinksCallback(JSContextRef context, JSObjectRe
 
 static JSValueRef repaintSweepHorizontallyCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setTestRepaintSweepHorizontally(true);
     return JSValueMakeUndefined(context);
 }
@@ -294,14 +294,14 @@ static JSValueRef setCallCloseOnWebViewsCallback(JSContextRef context, JSObjectR
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setCallCloseOnWebViews(JSValueToBoolean(context, arguments[0]));
     return JSValueMakeUndefined(context);
 }
 
 static JSValueRef setCanOpenWindowsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setCanOpenWindows(true);
     return JSValueMakeUndefined(context);
 }
@@ -311,7 +311,7 @@ static JSValueRef setCloseRemainingWindowsWhenCompleteCallback(JSContextRef cont
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setCloseRemainingWindowsWhenComplete(JSValueToBoolean(context, arguments[0]));
     return JSValueMakeUndefined(context);
 }
@@ -328,7 +328,7 @@ static JSValueRef setEncodedAudioDataCallback(JSContextRef context, JSObjectRef
     OwnArrayPtr<char> encodedAudioDataBuffer = adoptArrayPtr(new char[maxLength + 1]);
     JSStringGetUTF8CString(encodedAudioData.get(), encodedAudioDataBuffer.get(), maxLength + 1);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setEncodedAudioData(encodedAudioDataBuffer.get());
     controller->setDumpAsAudio(true);
     
@@ -337,14 +337,14 @@ static JSValueRef setEncodedAudioDataCallback(JSContextRef context, JSObjectRef
 
 static JSValueRef testOnscreenCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setTestOnscreen(true);
     return JSValueMakeUndefined(context);
 }
 
 static JSValueRef testRepaintCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setTestRepaint(true);
     return JSValueMakeUndefined(context);
 }
@@ -358,7 +358,7 @@ static JSValueRef addDisallowedURLCallback(JSContextRef context, JSObjectRef fun
     JSRetainPtr<JSStringRef> url(Adopt, JSValueToStringCopy(context, arguments[0], exception));
     ASSERT(!*exception);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->addDisallowedURL(url.get());
 
     return JSValueMakeUndefined(context);
@@ -383,7 +383,7 @@ static JSValueRef addURLToRedirectCallback(JSContextRef context, JSObjectRef fun
     OwnArrayPtr<char> destinationBuffer = adoptArrayPtr(new char[maxLength + 1]);
     JSStringGetUTF8CString(destination.get(), destinationBuffer.get(), maxLength + 1);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->addURLToRedirect(originBuffer.get(), destinationBuffer.get());
 
     return JSValueMakeUndefined(context);
@@ -392,7 +392,7 @@ static JSValueRef addURLToRedirectCallback(JSContextRef context, JSObjectRef fun
 static JSValueRef callShouldCloseOnWebViewCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     // Has mac & windows implementation
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
 
     return JSValueMakeBoolean(context, controller->callShouldCloseOnWebView());
 }
@@ -400,7 +400,7 @@ static JSValueRef callShouldCloseOnWebViewCallback(JSContextRef context, JSObjec
 static JSValueRef clearAllApplicationCachesCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     // Has mac implementation
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->clearAllApplicationCaches();
 
     return JSValueMakeUndefined(context);
@@ -414,7 +414,7 @@ static JSValueRef clearApplicationCacheForOriginCallback(JSContextRef context, J
     JSRetainPtr<JSStringRef> originURL(Adopt, JSValueToStringCopy(context, arguments[0], exception));
     ASSERT(!*exception);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->clearApplicationCacheForOrigin(originURL.get());
     
     return JSValueMakeUndefined(context);
@@ -428,21 +428,21 @@ static JSValueRef applicationCacheDiskUsageForOriginCallback(JSContextRef contex
     JSRetainPtr<JSStringRef> originURL(Adopt, JSValueToStringCopy(context, arguments[0], exception));
     ASSERT(!*exception);
     
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
 
     return JSValueMakeNumber(context, controller->applicationCacheDiskUsageForOrigin(originURL.get()));
 }
 
 static JSValueRef originsWithApplicationCacheCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     return controller->originsWithApplicationCache(context);
 }
 
 static JSValueRef clearAllDatabasesCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     // Has mac & windows implementation
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->clearAllDatabases();
 
     return JSValueMakeUndefined(context);
@@ -450,7 +450,7 @@ static JSValueRef clearAllDatabasesCallback(JSContextRef context, JSObjectRef fu
 
 static JSValueRef syncLocalStorageCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
 
     controller->syncLocalStorage();
 
@@ -459,7 +459,7 @@ static JSValueRef syncLocalStorageCallback(JSContextRef context, JSObjectRef fun
 
 static JSValueRef observeStorageTrackerNotificationsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
 
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
@@ -475,7 +475,7 @@ static JSValueRef observeStorageTrackerNotificationsCallback(JSContextRef contex
 
 static JSValueRef deleteAllLocalStorageCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->deleteAllLocalStorage();
 
     return JSValueMakeUndefined(context);
@@ -483,7 +483,7 @@ static JSValueRef deleteAllLocalStorageCallback(JSContextRef context, JSObjectRe
 
 static JSValueRef deleteLocalStorageForOriginCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
 
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
@@ -498,7 +498,7 @@ static JSValueRef deleteLocalStorageForOriginCallback(JSContextRef context, JSOb
 
 static JSValueRef localStorageDiskUsageForOriginCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
 
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
@@ -511,14 +511,14 @@ static JSValueRef localStorageDiskUsageForOriginCallback(JSContextRef context, J
 
 static JSValueRef originsWithLocalStorageCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     return controller->originsWithLocalStorage(context);
 }
 
 static JSValueRef clearBackForwardListCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     // Has mac & windows implementation
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->clearBackForwardList();
 
     return JSValueMakeUndefined(context);
@@ -527,7 +527,7 @@ static JSValueRef clearBackForwardListCallback(JSContextRef context, JSObjectRef
 static JSValueRef clearPersistentUserStyleSheetCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     // Has mac & windows implementation
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->clearPersistentUserStyleSheet();
 
     return JSValueMakeUndefined(context);
@@ -542,7 +542,7 @@ static JSValueRef decodeHostNameCallback(JSContextRef context, JSObjectRef funct
     JSRetainPtr<JSStringRef> name(Adopt, JSValueToStringCopy(context, arguments[0], exception));
     ASSERT(!*exception);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     JSRetainPtr<JSStringRef> decodedHostName(Adopt, controller->copyDecodedHostName(name.get()));
     return JSValueMakeString(context, decodedHostName.get());
 }
@@ -550,7 +550,7 @@ static JSValueRef decodeHostNameCallback(JSContextRef context, JSObjectRef funct
 static JSValueRef disableImageLoadingCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     // Has mac implementation, needs windows implementation
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->disableImageLoading();
     
     return JSValueMakeUndefined(context);
@@ -559,7 +559,7 @@ static JSValueRef disableImageLoadingCallback(JSContextRef context, JSObjectRef
 static JSValueRef dispatchPendingLoadRequestsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     // Has mac implementation, needs windows implementation
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->dispatchPendingLoadRequests();
     
     return JSValueMakeUndefined(context);
@@ -568,7 +568,7 @@ static JSValueRef dispatchPendingLoadRequestsCallback(JSContextRef context, JSOb
 static JSValueRef displayCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     // Has mac & windows implementation
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->display();
 
     return JSValueMakeUndefined(context);
@@ -577,8 +577,8 @@ static JSValueRef displayCallback(JSContextRef context, JSObjectRef function, JS
 static JSValueRef displayInvalidatedRegionCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     // Has mac & windows implementation
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
-    // LayoutTestController::display() only renders the invalidated region so
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
+    // TestRunner::display() only renders the invalidated region so
     // we can just use that.
     controller->display();
 
@@ -594,7 +594,7 @@ static JSValueRef encodeHostNameCallback(JSContextRef context, JSObjectRef funct
     JSRetainPtr<JSStringRef> name(Adopt, JSValueToStringCopy(context, arguments[0], exception));
     ASSERT(!*exception);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     JSRetainPtr<JSStringRef> encodedHostName(Adopt, controller->copyEncodedHostName(name.get()));
     return JSValueMakeString(context, encodedHostName.get());
 }
@@ -618,7 +618,7 @@ static JSValueRef execCommandCallback(JSContextRef context, JSObjectRef function
         value.adopt(JSStringCreateWithUTF8CString(""));
 
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->execCommand(name.get(), value.get());
 
     return JSValueMakeUndefined(context);
@@ -636,13 +636,13 @@ static JSValueRef findStringCallback(JSContextRef context, JSObjectRef function,
     JSObjectRef options = JSValueToObject(context, arguments[1], exception);
     ASSERT(!*exception);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     return JSValueMakeBoolean(context, controller->findString(context, target.get(), options));
 }
 
 static JSValueRef goBackCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->goBack();
     
     return JSValueMakeUndefined(context);
@@ -654,7 +654,7 @@ static JSValueRef grantDesktopNotificationPermissionCallback(JSContextRef contex
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
 
     controller->grantDesktopNotificationPermission(JSValueToStringCopy(context, arguments[0], NULL));
         
@@ -671,7 +671,7 @@ static JSValueRef isCommandEnabledCallback(JSContextRef context, JSObjectRef fun
     JSRetainPtr<JSStringRef> name(Adopt, JSValueToStringCopy(context, arguments[0], exception));
     ASSERT(!*exception);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
 
     return JSValueMakeBoolean(context, controller->isCommandEnabled(name.get()));
 }
@@ -686,7 +686,7 @@ static JSValueRef overridePreferenceCallback(JSContextRef context, JSObjectRef f
     JSRetainPtr<JSStringRef> value(Adopt, JSValueToStringCopy(context, arguments[1], exception));
     ASSERT(!*exception);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->overridePreference(key.get(), value.get());
 
     return JSValueMakeUndefined(context);
@@ -695,7 +695,7 @@ static JSValueRef overridePreferenceCallback(JSContextRef context, JSObjectRef f
 static JSValueRef keepWebHistoryCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     // Has mac implementation
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->keepWebHistory();
 
     return JSValueMakeUndefined(context);
@@ -707,14 +707,14 @@ static JSValueRef computedStyleIncludingVisitedInfoCallback(JSContextRef context
         return JSValueMakeUndefined(context);
     
     // Has mac implementation
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     return controller->computedStyleIncludingVisitedInfo(context, arguments[0]);
 }
 
 static JSValueRef layerTreeAsTextCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     // Has mac & windows implementation
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     return JSValueMakeString(context, controller->layerTreeAsText().get());
 }
 
@@ -722,15 +722,15 @@ static JSValueRef notifyDoneCallback(JSContextRef context, JSObjectRef function,
 {
     // Has mac & windows implementation
     // May be able to be made platform independant by using shared WorkQueue
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->notifyDone();
     return JSValueMakeUndefined(context);
 }
 
 static bool parsePageParameters(JSContextRef context, int argumentCount, const JSValueRef* arguments, JSValueRef* exception, float& pageWidthInPixels, float& pageHeightInPixels)
 {
-    pageWidthInPixels = LayoutTestController::maxViewWidth;
-    pageHeightInPixels = LayoutTestController::maxViewHeight;
+    pageWidthInPixels = TestRunner::maxViewWidth;
+    pageHeightInPixels = TestRunner::maxViewHeight;
     switch (argumentCount) {
     case 2:
         pageWidthInPixels = static_cast<float>(JSValueToNumber(context, arguments[0], exception));
@@ -828,13 +828,13 @@ static JSValueRef numberOfPagesCallback(JSContextRef context, JSObjectRef functi
     if (!parsePageParameters(context, argumentCount, arguments, exception, pageWidthInPixels, pageHeightInPixels))
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     return JSValueMakeNumber(context, controller->numberOfPages(pageWidthInPixels, pageHeightInPixels));
 }
 
 static JSValueRef numberOfPendingGeolocationPermissionRequestsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     return JSValueMakeNumber(context, controller->numberOfPendingGeolocationPermissionRequests());
 }
 
@@ -845,7 +845,7 @@ static JSValueRef pagePropertyCallback(JSContextRef context, JSObjectRef functio
     if (!parsePagePropertyParameters(context, argumentCount, arguments, exception, propertyName, pageNumber))
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     JSValueRef value = JSValueMakeString(context, controller->pageProperty(propertyName, pageNumber).get());
 
     delete[] propertyName;
@@ -860,7 +860,7 @@ static JSValueRef pageSizeAndMarginsInPixelsCallback(JSContextRef context, JSObj
     if (!parsePageNumberSizeMarings(context, argumentCount, arguments, exception, pageNumber, width, height, marginTop, marginRight, marginBottom, marginLeft))
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     return JSValueMakeString(context, controller->pageSizeAndMarginsInPixels(pageNumber, width, height, marginTop, marginRight, marginBottom, marginLeft).get());
 }
 
@@ -874,7 +874,7 @@ static JSValueRef queueBackNavigationCallback(JSContextRef context, JSObjectRef
     double howFarBackDouble = JSValueToNumber(context, arguments[0], exception);
     ASSERT(!*exception);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->queueBackNavigation(static_cast<int>(howFarBackDouble));
 
     return JSValueMakeUndefined(context);
@@ -890,7 +890,7 @@ static JSValueRef queueForwardNavigationCallback(JSContextRef context, JSObjectR
     double howFarForwardDouble = JSValueToNumber(context, arguments[0], exception);
     ASSERT(!*exception);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->queueForwardNavigation(static_cast<int>(howFarForwardDouble));
 
     return JSValueMakeUndefined(context);
@@ -913,7 +913,7 @@ static JSValueRef queueLoadCallback(JSContextRef context, JSObjectRef function,
     } else
         target.adopt(JSStringCreateWithUTF8CString(""));
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->queueLoad(url.get(), target.get());
 
     return JSValueMakeUndefined(context);
@@ -935,7 +935,7 @@ static JSValueRef queueLoadHTMLStringCallback(JSContextRef context, JSObjectRef
     } else
         baseURL.adopt(JSStringCreateWithUTF8CString(""));
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
 
     if (argumentCount >= 3) {
         JSRetainPtr<JSStringRef> unreachableURL;
@@ -954,7 +954,7 @@ static JSValueRef queueReloadCallback(JSContextRef context, JSObjectRef function
     // Has mac & windows implementation
     // May be able to be made platform independant by using shared WorkQueue
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->queueReload();
 
     return JSValueMakeUndefined(context);
@@ -970,7 +970,7 @@ static JSValueRef queueLoadingScriptCallback(JSContextRef context, JSObjectRef f
     JSRetainPtr<JSStringRef> script(Adopt, JSValueToStringCopy(context, arguments[0], exception));
     ASSERT(!*exception);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->queueLoadingScript(script.get());
 
     return JSValueMakeUndefined(context);
@@ -986,7 +986,7 @@ static JSValueRef queueNonLoadingScriptCallback(JSContextRef context, JSObjectRe
     JSRetainPtr<JSStringRef> script(Adopt, JSValueToStringCopy(context, arguments[0], exception));
     ASSERT(!*exception);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->queueNonLoadingScript(script.get());
 
     return JSValueMakeUndefined(context);
@@ -998,7 +998,7 @@ static JSValueRef setAcceptsEditingCallback(JSContextRef context, JSObjectRef fu
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setAcceptsEditing(JSValueToBoolean(context, arguments[0]));
 
     return JSValueMakeUndefined(context);
@@ -1010,7 +1010,7 @@ static JSValueRef setAlwaysAcceptCookiesCallback(JSContextRef context, JSObjectR
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setAlwaysAcceptCookies(JSValueToBoolean(context, arguments[0]));
 
     return JSValueMakeUndefined(context);
@@ -1022,7 +1022,7 @@ static JSValueRef setAppCacheMaximumSizeCallback(JSContextRef context, JSObjectR
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
 
     double size = JSValueToNumber(context, arguments[0], NULL);
     if (!isnan(size))
@@ -1037,7 +1037,7 @@ static JSValueRef setApplicationCacheOriginQuotaCallback(JSContextRef context, J
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
 
     double size = JSValueToNumber(context, arguments[0], NULL);
     if (!isnan(size))
@@ -1059,7 +1059,7 @@ static JSValueRef setAuthenticationPasswordCallback(JSContextRef context, JSObje
     char* passwordBuffer = new char[maxLength + 1];
     JSStringGetUTF8CString(password.get(), passwordBuffer, maxLength + 1);
     
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setAuthenticationPassword(passwordBuffer);
     delete[] passwordBuffer;
 
@@ -1079,7 +1079,7 @@ static JSValueRef setAuthenticationUsernameCallback(JSContextRef context, JSObje
     char* usernameBuffer = new char[maxLength + 1];
     JSStringGetUTF8CString(username.get(), usernameBuffer, maxLength + 1);
     
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setAuthenticationUsername(usernameBuffer);
     delete[] usernameBuffer;
 
@@ -1092,7 +1092,7 @@ static JSValueRef setAuthorAndUserStylesEnabledCallback(JSContextRef context, JS
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setAuthorAndUserStylesEnabled(JSValueToBoolean(context, arguments[0]));
 
     return JSValueMakeUndefined(context);
@@ -1103,7 +1103,7 @@ static JSValueRef setAutofilledCallback(JSContextRef context, JSObjectRef functi
     if (argumentCount != 2 || !arguments[0])
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setAutofilled(context, arguments[0], JSValueToBoolean(context, arguments[1]));
 
     return JSValueMakeUndefined(context);
@@ -1118,7 +1118,7 @@ static JSValueRef setCacheModelCallback(JSContextRef context, JSObjectRef functi
     int cacheModel = JSValueToNumber(context, arguments[0], exception);
     ASSERT(!*exception);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setCacheModel(cacheModel);
 
     return JSValueMakeUndefined(context);
@@ -1134,7 +1134,7 @@ static JSValueRef setCustomPolicyDelegateCallback(JSContextRef context, JSObject
     if (argumentCount >= 2)
         permissive = JSValueToBoolean(context, arguments[1]);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setCustomPolicyDelegate(JSValueToBoolean(context, arguments[0]), permissive);
 
     return JSValueMakeUndefined(context);
@@ -1146,7 +1146,7 @@ static JSValueRef setDatabaseQuotaCallback(JSContextRef context, JSObjectRef fun
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
 
     double quota = JSValueToNumber(context, arguments[0], NULL);
     if (!isnan(quota))
@@ -1161,7 +1161,7 @@ static JSValueRef setDeferMainResourceDataLoadCallback(JSContextRef context, JSO
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setDeferMainResourceDataLoad(JSValueToBoolean(context, arguments[0]));
 
     return JSValueMakeUndefined(context);
@@ -1172,7 +1172,7 @@ static JSValueRef setDefersLoadingCallback(JSContextRef context, JSObjectRef fun
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setDefersLoading(JSValueToBoolean(context, arguments[0]));
 
     return JSValueMakeUndefined(context);
@@ -1183,7 +1183,7 @@ static JSValueRef setUseDeferredFrameLoadingCallback(JSContextRef context, JSObj
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setUseDeferredFrameLoading(JSValueToBoolean(context, arguments[0]));
 
     return JSValueMakeUndefined(context);
@@ -1195,7 +1195,7 @@ static JSValueRef setDomainRelaxationForbiddenForURLSchemeCallback(JSContextRef
     if (argumentCount < 2)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
 
     bool forbidden = JSValueToBoolean(context, arguments[0]);
     JSRetainPtr<JSStringRef> scheme(Adopt, JSValueToStringCopy(context, arguments[1], 0));
@@ -1219,7 +1219,7 @@ static JSValueRef setMockDeviceOrientationCallback(JSContextRef context, JSObjec
     double gamma = JSValueToNumber(context, arguments[5], exception);
     ASSERT(!*exception);
 
-    LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = reinterpret_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setMockDeviceOrientation(canProvideAlpha, alpha, canProvideBeta, beta, canProvideGamma, gamma);
 
     return JSValueMakeUndefined(context);
@@ -1230,7 +1230,7 @@ static JSValueRef setMockGeolocationPositionCallback(JSContextRef context, JSObj
     if (argumentCount < 3)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = reinterpret_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setMockGeolocationPosition(JSValueToNumber(context, arguments[0], NULL),  // latitude
                                            JSValueToNumber(context, arguments[1], NULL),  // longitude
                                            JSValueToNumber(context, arguments[2], NULL));  // accuracy
@@ -1247,7 +1247,7 @@ static JSValueRef setMockGeolocationErrorCallback(JSContextRef context, JSObject
     JSRetainPtr<JSStringRef> message(Adopt, JSValueToStringCopy(context, arguments[1], exception));
     ASSERT(!*exception);
 
-    LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = reinterpret_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setMockGeolocationError(code, message.get());
 
     return JSValueMakeUndefined(context);
@@ -1266,7 +1266,7 @@ static JSValueRef addMockSpeechInputResultCallback(JSContextRef context, JSObjec
     JSRetainPtr<JSStringRef> language(Adopt, JSValueToStringCopy(context, arguments[2], exception));
     ASSERT(!*exception);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->addMockSpeechInputResult(result.get(), confidence, language.get());
 
     return JSValueMakeUndefined(context);
@@ -1279,7 +1279,7 @@ static JSValueRef setMockSpeechInputDumpRectCallback(JSContextRef context, JSObj
 
     bool dumpRect = JSValueToBoolean(context, arguments[0]);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setMockSpeechInputDumpRect(dumpRect);
 
     return JSValueMakeUndefined(context);
@@ -1291,7 +1291,7 @@ static JSValueRef setNewWindowsCopyBackForwardListCallback(JSContextRef context,
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
     
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setNewWindowsCopyBackForwardList(JSValueToBoolean(context, arguments[0]));
 
     return JSValueMakeUndefined(context);
@@ -1303,7 +1303,7 @@ static JSValueRef setGeolocationPermissionCallback(JSContextRef context, JSObjec
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setGeolocationPermission(JSValueToBoolean(context, arguments[0]));
 
     return JSValueMakeUndefined(context);
@@ -1315,7 +1315,7 @@ static JSValueRef setHandlesAuthenticationChallengesCallback(JSContextRef contex
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setHandlesAuthenticationChallenges(JSValueToBoolean(context, arguments[0]));
 
     return JSValueMakeUndefined(context);
@@ -1326,7 +1326,7 @@ static JSValueRef setPOSIXLocaleCallback(JSContextRef context, JSObjectRef funct
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     JSRetainPtr<JSStringRef> locale(Adopt, JSValueToStringCopy(context, arguments[0], exception));
     ASSERT(!*exception);
     controller->setPOSIXLocale(locale.get());
@@ -1340,7 +1340,7 @@ static JSValueRef setIconDatabaseEnabledCallback(JSContextRef context, JSObjectR
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setIconDatabaseEnabled(JSValueToBoolean(context, arguments[0]));
 
     return JSValueMakeUndefined(context);
@@ -1352,7 +1352,7 @@ static JSValueRef setMainFrameIsFirstResponderCallback(JSContextRef context, JSO
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setMainFrameIsFirstResponder(JSValueToBoolean(context, arguments[0]));
 
     return JSValueMakeUndefined(context);
@@ -1367,7 +1367,7 @@ static JSValueRef setPersistentUserStyleSheetLocationCallback(JSContextRef conte
     JSRetainPtr<JSStringRef> path(Adopt, JSValueToStringCopy(context, arguments[0], exception));
     ASSERT(!*exception);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setPersistentUserStyleSheetLocation(path.get());
 
     return JSValueMakeUndefined(context);
@@ -1379,7 +1379,7 @@ static JSValueRef setPrivateBrowsingEnabledCallback(JSContextRef context, JSObje
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setPrivateBrowsingEnabled(JSValueToBoolean(context, arguments[0]));
 
     return JSValueMakeUndefined(context);
@@ -1391,7 +1391,7 @@ static JSValueRef setJavaScriptCanAccessClipboardCallback(JSContextRef context,
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setJavaScriptCanAccessClipboard(JSValueToBoolean(context, arguments[0]));
 
     return JSValueMakeUndefined(context);
@@ -1403,7 +1403,7 @@ static JSValueRef setXSSAuditorEnabledCallback(JSContextRef context, JSObjectRef
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setXSSAuditorEnabled(JSValueToBoolean(context, arguments[0]));
 
     return JSValueMakeUndefined(context);
@@ -1415,7 +1415,7 @@ static JSValueRef setSpatialNavigationEnabledCallback(JSContextRef context, JSOb
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setSpatialNavigationEnabled(JSValueToBoolean(context, arguments[0]));
 
     return JSValueMakeUndefined(context);
@@ -1423,7 +1423,7 @@ static JSValueRef setSpatialNavigationEnabledCallback(JSContextRef context, JSOb
 
 static JSValueRef setPrintingCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setIsPrinting(true);
     return JSValueMakeUndefined(context);
 }
@@ -1435,7 +1435,7 @@ static JSValueRef setFrameFlatteningEnabledCallback(JSContextRef context, JSObje
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setFrameFlatteningEnabled(JSValueToBoolean(context, arguments[0]));
 
     return JSValueMakeUndefined(context);
@@ -1447,7 +1447,7 @@ static JSValueRef setAllowUniversalAccessFromFileURLsCallback(JSContextRef conte
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setAllowUniversalAccessFromFileURLs(JSValueToBoolean(context, arguments[0]));
 
     return JSValueMakeUndefined(context);
@@ -1459,7 +1459,7 @@ static JSValueRef setAllowFileAccessFromFileURLsCallback(JSContextRef context, J
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setAllowFileAccessFromFileURLs(JSValueToBoolean(context, arguments[0]));
 
     return JSValueMakeUndefined(context);
@@ -1471,7 +1471,7 @@ static JSValueRef setTabKeyCyclesThroughElementsCallback(JSContextRef context, J
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setTabKeyCyclesThroughElements(JSValueToBoolean(context, arguments[0]));
 
     return JSValueMakeUndefined(context);
@@ -1483,7 +1483,7 @@ static JSValueRef setUseDashboardCompatibilityModeCallback(JSContextRef context,
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setUseDashboardCompatibilityMode(JSValueToBoolean(context, arguments[0]));
 
     return JSValueMakeUndefined(context);
@@ -1495,7 +1495,7 @@ static JSValueRef setUserStyleSheetEnabledCallback(JSContextRef context, JSObjec
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setUserStyleSheetEnabled(JSValueToBoolean(context, arguments[0]));
 
     return JSValueMakeUndefined(context);
@@ -1510,7 +1510,7 @@ static JSValueRef setUserStyleSheetLocationCallback(JSContextRef context, JSObje
     JSRetainPtr<JSStringRef> path(Adopt, JSValueToStringCopy(context, arguments[0], exception));
     ASSERT(!*exception);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setUserStyleSheetLocation(path.get());
 
     return JSValueMakeUndefined(context);
@@ -1525,7 +1525,7 @@ static JSValueRef setValueForUserCallback(JSContextRef context, JSObjectRef func
     JSRetainPtr<JSStringRef> value(Adopt, JSValueToStringCopy(context, arguments[1], exception));
     ASSERT(!*exception);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setValueForUser(context, arguments[0], value.get());
 
     return JSValueMakeUndefined(context);
@@ -1540,7 +1540,7 @@ static JSValueRef setViewModeMediaFeatureCallback(JSContextRef context, JSObject
     JSRetainPtr<JSStringRef> mode(Adopt, JSValueToStringCopy(context, arguments[0], exception));
     ASSERT(!*exception);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setViewModeMediaFeature(mode.get());
 
     return JSValueMakeUndefined(context);
@@ -1559,7 +1559,7 @@ static JSValueRef setWillSendRequestClearHeaderCallback(JSContextRef context, JS
     OwnArrayPtr<char> headerBuffer = adoptArrayPtr(new char[maxLength + 1]);
     JSStringGetUTF8CString(header.get(), headerBuffer.get(), maxLength + 1);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setWillSendRequestClearHeader(headerBuffer.get());
 
     return JSValueMakeUndefined(context);
@@ -1571,7 +1571,7 @@ static JSValueRef setWillSendRequestReturnsNullCallback(JSContextRef context, JS
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setWillSendRequestReturnsNull(JSValueToBoolean(context, arguments[0]));
 
     return JSValueMakeUndefined(context);
@@ -1583,7 +1583,7 @@ static JSValueRef setWillSendRequestReturnsNullOnRedirectCallback(JSContextRef c
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setWillSendRequestReturnsNullOnRedirect(JSValueToBoolean(context, arguments[0]));
 
     return JSValueMakeUndefined(context);
@@ -1595,7 +1595,7 @@ static JSValueRef setWindowIsKeyCallback(JSContextRef context, JSObjectRef funct
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setWindowIsKey(JSValueToBoolean(context, arguments[0]));
 
     return JSValueMakeUndefined(context);
@@ -1604,7 +1604,7 @@ static JSValueRef setWindowIsKeyCallback(JSContextRef context, JSObjectRef funct
 static JSValueRef waitUntilDoneCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     // Has mac & windows implementation
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setWaitToDump(true);
 
     return JSValueMakeUndefined(context);
@@ -1613,7 +1613,7 @@ static JSValueRef waitUntilDoneCallback(JSContextRef context, JSObjectRef functi
 static JSValueRef windowCountCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     // Has mac implementation
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     int windows = controller->windowCount();
     return JSValueMakeNumber(context, windows);
 }
@@ -1624,7 +1624,7 @@ static JSValueRef setPopupBlockingEnabledCallback(JSContextRef context, JSObject
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setPopupBlockingEnabled(JSValueToBoolean(context, arguments[0]));
 
     return JSValueMakeUndefined(context);
@@ -1636,7 +1636,7 @@ static JSValueRef setPluginsEnabledCallback(JSContextRef context, JSObjectRef fu
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
     
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setPluginsEnabled(JSValueToBoolean(context, arguments[0]));
     
     return JSValueMakeUndefined(context);
@@ -1655,7 +1655,7 @@ static JSValueRef setPageVisibilityCallback(JSContextRef context, JSObjectRef fu
     char* visibilityBuffer = new char[maxLength + 1];
     JSStringGetUTF8CString(visibility.get(), visibilityBuffer, maxLength + 1);
     
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setPageVisibility(visibilityBuffer);
     delete[] visibilityBuffer;
     
@@ -1664,7 +1664,7 @@ static JSValueRef setPageVisibilityCallback(JSContextRef context, JSObjectRef fu
 
 static JSValueRef resetPageVisibilityCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->resetPageVisibility();
     return JSValueMakeUndefined(context);
 }    
@@ -1674,7 +1674,7 @@ static JSValueRef setSmartInsertDeleteEnabledCallback(JSContextRef context, JSOb
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setSmartInsertDeleteEnabled(JSValueToBoolean(context, arguments[0]));
     return JSValueMakeUndefined(context);
 }
@@ -1684,7 +1684,7 @@ static JSValueRef setAutomaticLinkDetectionEnabledCallback(JSContextRef context,
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setAutomaticLinkDetectionEnabled(JSValueToBoolean(context, arguments[0]));
     return JSValueMakeUndefined(context);
 }
@@ -1694,14 +1694,14 @@ static JSValueRef setSelectTrailingWhitespaceEnabledCallback(JSContextRef contex
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setSelectTrailingWhitespaceEnabled(JSValueToBoolean(context, arguments[0]));
     return JSValueMakeUndefined(context);
 }
 
 static JSValueRef setStopProvisionalFrameLoadsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setStopProvisionalFrameLoads(true);
     return JSValueMakeUndefined(context);
 }
@@ -1711,28 +1711,28 @@ static JSValueRef setAsynchronousSpellCheckingEnabledCallback(JSContextRef conte
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setAsynchronousSpellCheckingEnabled(JSValueToBoolean(context, arguments[0]));
     return JSValueMakeUndefined(context);
 }
 
 static JSValueRef showWebInspectorCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->showWebInspector();
     return JSValueMakeUndefined(context);
 }
 
 static JSValueRef closeWebInspectorCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->closeWebInspector();
     return JSValueMakeUndefined(context);
 }
 
 static JSValueRef evaluateInWebInspectorCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     double callId = JSValueToNumber(context, arguments[0], exception);
     ASSERT(!*exception);
     JSRetainPtr<JSStringRef> script(Adopt, JSValueToStringCopy(context, arguments[1], exception));
@@ -1744,7 +1744,7 @@ static JSValueRef evaluateInWebInspectorCallback(JSContextRef context, JSObjectR
 
 static JSValueRef evaluateScriptInIsolatedWorldCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     double worldID = JSValueToNumber(context, arguments[0], exception);
     ASSERT(!*exception);
     JSRetainPtr<JSStringRef> script(Adopt, JSValueToStringCopy(context, arguments[1], exception));
@@ -1756,7 +1756,7 @@ static JSValueRef evaluateScriptInIsolatedWorldCallback(JSContextRef context, JS
 
 static JSValueRef evaluateScriptInIsolatedWorldAndReturnValueCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     double worldID = JSValueToNumber(context, arguments[0], exception);
     ASSERT(!*exception);
     JSRetainPtr<JSStringRef> script(Adopt, JSValueToStringCopy(context, arguments[1], exception));
@@ -1768,7 +1768,7 @@ static JSValueRef evaluateScriptInIsolatedWorldAndReturnValueCallback(JSContextR
 
 static JSValueRef elementDoesAutoCompleteForElementWithIdCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     JSRetainPtr<JSStringRef> elementId(Adopt, JSValueToStringCopy(context, arguments[0], exception));
     ASSERT(!*exception);
 
@@ -1789,7 +1789,7 @@ static JSValueRef pauseAnimationAtTimeOnElementWithIdCallback(JSContextRef conte
     JSRetainPtr<JSStringRef> elementId(Adopt, JSValueToStringCopy(context, arguments[2], exception));
     ASSERT(!*exception);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     return JSValueMakeBoolean(context, controller->pauseAnimationAtTimeOnElementWithId(animationName.get(), time, elementId.get()));
 }
 
@@ -1805,7 +1805,7 @@ static JSValueRef pauseTransitionAtTimeOnElementWithIdCallback(JSContextRef cont
     JSRetainPtr<JSStringRef> elementId(Adopt, JSValueToStringCopy(context, arguments[2], exception));
     ASSERT(!*exception);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     return JSValueMakeBoolean(context, controller->pauseTransitionAtTimeOnElementWithId(propertyName.get(), time, elementId.get()));
 }
 
@@ -1814,13 +1814,13 @@ static JSValueRef numberOfActiveAnimationsCallback(JSContextRef context, JSObjec
     if (argumentCount != 0)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     return JSValueMakeNumber(context, controller->numberOfActiveAnimations());
 }
 
 static JSValueRef waitForPolicyDelegateCallback(JSContextRef context, JSObjectRef, JSObjectRef thisObject, size_t, const JSValueRef[], JSValueRef*)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->waitForPolicyDelegate();
     return JSValueMakeUndefined(context);
 }
@@ -1838,7 +1838,7 @@ static JSValueRef addOriginAccessWhitelistEntryCallback(JSContextRef context, JS
     ASSERT(!*exception);
     bool allowDestinationSubdomains = JSValueToBoolean(context, arguments[3]);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->addOriginAccessWhitelistEntry(sourceOrigin.get(), destinationProtocol.get(), destinationHost.get(), allowDestinationSubdomains);
     return JSValueMakeUndefined(context);
 }
@@ -1856,7 +1856,7 @@ static JSValueRef removeOriginAccessWhitelistEntryCallback(JSContextRef context,
     ASSERT(!*exception);
     bool allowDestinationSubdomains = JSValueToBoolean(context, arguments[3]);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->removeOriginAccessWhitelistEntry(sourceOrigin.get(), destinationProtocol.get(), destinationHost.get(), allowDestinationSubdomains);
     return JSValueMakeUndefined(context);
 }
@@ -1871,7 +1871,7 @@ static JSValueRef setScrollbarPolicyCallback(JSContextRef context, JSObjectRef,
     JSRetainPtr<JSStringRef> policy(Adopt, JSValueToStringCopy(context, arguments[1], exception));
     ASSERT(!*exception);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setScrollbarPolicy(orientation.get(), policy.get());
     return JSValueMakeUndefined(context);
 }
@@ -1886,7 +1886,7 @@ static JSValueRef addUserScriptCallback(JSContextRef context, JSObjectRef, JSObj
     bool runAtStart = JSValueToBoolean(context, arguments[1]);
     bool allFrames = JSValueToBoolean(context, arguments[2]);
     
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->addUserScript(source.get(), runAtStart, allFrames);
     return JSValueMakeUndefined(context);
 }
@@ -1900,7 +1900,7 @@ static JSValueRef addUserStyleSheetCallback(JSContextRef context, JSObjectRef, J
     ASSERT(!*exception);
     bool allFrames = JSValueToBoolean(context, arguments[1]);
    
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->addUserStyleSheet(source.get(), allFrames);
     return JSValueMakeUndefined(context);
 }
@@ -1911,7 +1911,7 @@ static JSValueRef setShouldPaintBrokenImageCallback(JSContextRef context, JSObje
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setShouldPaintBrokenImage(JSValueToBoolean(context, arguments[0]));
 
     return JSValueMakeUndefined(context);
@@ -1928,14 +1928,14 @@ static JSValueRef apiTestNewWindowDataLoadBaseURLCallback(JSContextRef context,
     JSRetainPtr<JSStringRef> baseURL(Adopt, JSValueToStringCopy(context, arguments[1], exception));
     ASSERT(!*exception);
         
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->apiTestNewWindowDataLoadBaseURL(utf8Data.get(), baseURL.get());
     return JSValueMakeUndefined(context);
 }
 
 static JSValueRef apiTestGoToCurrentBackForwardItemCallback(JSContextRef context, JSObjectRef, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->apiTestGoToCurrentBackForwardItem();
     return JSValueMakeUndefined(context);
 }
@@ -1946,7 +1946,7 @@ static JSValueRef setWebViewEditableCallback(JSContextRef context, JSObjectRef f
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setWebViewEditable(JSValueToBoolean(context, arguments[0]));
 
     return JSValueMakeUndefined(context);
@@ -1961,7 +1961,7 @@ static JSValueRef sendWebIntentResponseCallback(JSContextRef context, JSObjectRe
     } else
         response.adopt(JSStringCreateWithUTF8CString(0));
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->sendWebIntentResponse(response.get());
 
     return JSValueMakeUndefined(context);
@@ -1979,7 +1979,7 @@ static JSValueRef deliverWebIntentCallback(JSContextRef context, JSObjectRef fun
     JSRetainPtr<JSStringRef> data(Adopt, JSValueToStringCopy(context, arguments[2], exception));
     ASSERT(!*exception);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->deliverWebIntent(action.get(), type.get(), data.get());
 
     return JSValueMakeUndefined(context);
@@ -1987,14 +1987,14 @@ static JSValueRef deliverWebIntentCallback(JSContextRef context, JSObjectRef fun
 
 static JSValueRef abortModalCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->abortModal();
     return JSValueMakeUndefined(context);
 }
 
 static JSValueRef markerTextForListItemCallback(JSContextRef context, JSObjectRef, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     if (argumentCount < 1)
         return JSValueMakeUndefined(context);
     return JSValueMakeString(context, controller->markerTextForListItem(context, arguments[0]).get());
@@ -2013,7 +2013,7 @@ static JSValueRef authenticateSessionCallback(JSContextRef context, JSObjectRef,
     JSRetainPtr<JSStringRef> password(Adopt, JSValueToStringCopy(context, arguments[2], exception));
     ASSERT(!*exception);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->authenticateSession(url.get(), username.get(), password.get());
     return JSValueMakeUndefined(context);
 }
@@ -2024,13 +2024,13 @@ static JSValueRef setSerializeHTTPLoadsCallback(JSContextRef context, JSObjectRe
     if (argumentCount == 1)
         serialize = JSValueToBoolean(context, arguments[0]);
 
-    LayoutTestController::setSerializeHTTPLoads(serialize);
+    TestRunner::setSerializeHTTPLoads(serialize);
     return JSValueMakeUndefined(context);
 }
 
 static JSValueRef setShouldStayOnPageAfterHandlingBeforeUnloadCallback(JSContextRef context, JSObjectRef, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     
     if (argumentCount == 1)
         controller->setShouldStayOnPageAfterHandlingBeforeUnload(JSValueToBoolean(context, arguments[0]));
@@ -2040,7 +2040,7 @@ static JSValueRef setShouldStayOnPageAfterHandlingBeforeUnloadCallback(JSContext
 
 static JSValueRef addChromeInputFieldCallback(JSContextRef context, JSObjectRef, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->addChromeInputField();
     // the first argument is a callback that is called once the input field has been added
     if (argumentCount == 1)
@@ -2050,7 +2050,7 @@ static JSValueRef addChromeInputFieldCallback(JSContextRef context, JSObjectRef,
 
 static JSValueRef removeChromeInputFieldCallback(JSContextRef context, JSObjectRef, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->removeChromeInputField();
     // the first argument is a callback that is called once the input field has been added
     if (argumentCount == 1)
@@ -2060,7 +2060,7 @@ static JSValueRef removeChromeInputFieldCallback(JSContextRef context, JSObjectR
 
 static JSValueRef focusWebViewCallback(JSContextRef context, JSObjectRef, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->focusWebView();
     // the first argument is a callback that is called once the input field has been added
     if (argumentCount == 1)
@@ -2076,7 +2076,7 @@ static JSValueRef setBackingScaleFactorCallback(JSContextRef context, JSObjectRe
     double backingScaleFactor = JSValueToNumber(context, arguments[0], exception);
     ASSERT(!*exception);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setBackingScaleFactor(backingScaleFactor);
 
     // The second argument is a callback that is called once the backing scale factor has been set.
@@ -2093,26 +2093,26 @@ static JSValueRef preciseTimeCallback(JSContextRef context, JSObjectRef, JSObjec
 
 static JSValueRef getGlobalFlagCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     return JSValueMakeBoolean(context, controller->globalFlag());
 }
 
 static JSValueRef getWebHistoryItemCountCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     return JSValueMakeNumber(context, controller->webHistoryItemCount());
 }
 
 static JSValueRef getWorkerThreadCountCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     return JSValueMakeNumber(context, controller->workerThreadCount());
 }
 
 #if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(WIN)
 static JSValueRef getPlatformNameCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     JSRetainPtr<JSStringRef> platformName(controller->platformName());
     if (!platformName.get())
         return JSValueMakeUndefined(context);
@@ -2122,28 +2122,28 @@ static JSValueRef getPlatformNameCallback(JSContextRef context, JSObjectRef this
 
 static JSValueRef getTitleTextDirectionCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     JSRetainPtr<JSStringRef> titleDirection(Adopt, JSStringCreateWithUTF8CString(controller->titleTextDirection().c_str()));
     return JSValueMakeString(context, titleDirection.get());
 }
 
 static bool setGlobalFlagCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef value, JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setGlobalFlag(JSValueToBoolean(context, value));
     return true;
 }
 
 static JSValueRef ignoreDesktopNotificationPermissionRequestsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->ignoreDesktopNotificationPermissionRequests();
     return JSValueMakeUndefined(context);
 }
 
 static JSValueRef simulateDesktopNotificationClickCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); 
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject)); 
     JSRetainPtr<JSStringRef> title(Adopt, JSValueToStringCopy(context, arguments[0], exception));
     controller->simulateDesktopNotificationClick(title.get());
     return JSValueMakeUndefined(context);
@@ -2157,7 +2157,7 @@ static JSValueRef setMinimumTimerIntervalCallback(JSContextRef context, JSObject
     double minimum = JSValueToNumber(context, arguments[0], exception);
     ASSERT(!*exception);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setMinimumTimerInterval(minimum);
 
     return JSValueMakeUndefined(context);
@@ -2167,7 +2167,7 @@ static JSValueRef setTextDirectionCallback(JSContextRef context, JSObjectRef fun
 {
     if (argumentCount == 1) {
         JSRetainPtr<JSStringRef> direction(Adopt, JSValueToStringCopy(context, arguments[0], exception));
-        LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+        TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
         controller->setTextDirection(direction.get());
     }
 
@@ -2179,7 +2179,7 @@ static JSValueRef setHasCustomFullScreenBehaviorCallback(JSContextRef context, J
 {
     if (argumentCount == 1) {
         bool hasCustomBehavior = JSValueToBoolean(context, arguments[0]);
-        LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+        TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
         controller->setHasCustomFullScreenBehavior(hasCustomBehavior);
     }
 
@@ -2194,21 +2194,21 @@ static JSValueRef setStorageDatabaseIdleIntervalCallback(JSContextRef context, J
     double interval = JSValueToNumber(context, arguments[0], exception);
     ASSERT(!*exception);
 
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
     controller->setStorageDatabaseIdleInterval(interval);
 
     return JSValueMakeUndefined(context);
 }
 
-static void layoutTestControllerObjectFinalize(JSObjectRef object)
+static void testRunnerObjectFinalize(JSObjectRef object)
 {
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(object));
+    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(object));
     controller->deref();
 }
 
 // Object Creation
 
-void LayoutTestController::makeWindowObject(JSContextRef context, JSObjectRef windowObject, JSValueRef* exception)
+void TestRunner::makeWindowObject(JSContextRef context, JSObjectRef windowObject, JSValueRef* exception)
 {
     JSRetainPtr<JSStringRef> testRunnerStr(Adopt, JSStringCreateWithUTF8CString("testRunner"));
     ref();
@@ -2221,19 +2221,19 @@ void LayoutTestController::makeWindowObject(JSContextRef context, JSObjectRef wi
     JSObjectSetProperty(context, windowObject, testRunnerStr.get(), layoutTestContollerObject, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, exception);
 }
 
-JSClassRef LayoutTestController::getJSClass()
+JSClassRef TestRunner::getJSClass()
 {
-    static JSStaticValue* staticValues = LayoutTestController::staticValues();
-    static JSStaticFunction* staticFunctions = LayoutTestController::staticFunctions();
+    static JSStaticValue* staticValues = TestRunner::staticValues();
+    static JSStaticFunction* staticFunctions = TestRunner::staticFunctions();
     static JSClassDefinition classDefinition = {
-        0, kJSClassAttributeNone, "LayoutTestController", 0, staticValues, staticFunctions,
-        0, layoutTestControllerObjectFinalize, 0, 0, 0, 0, 0, 0, 0, 0, 0
+        0, kJSClassAttributeNone, "TestRunner", 0, staticValues, staticFunctions,
+        0, testRunnerObjectFinalize, 0, 0, 0, 0, 0, 0, 0, 0, 0
     };
 
     return JSClassCreate(&classDefinition);
 }
 
-JSStaticValue* LayoutTestController::staticValues()
+JSStaticValue* TestRunner::staticValues()
 {
     static JSStaticValue staticValues[] = {
         { "globalFlag", getGlobalFlagCallback, setGlobalFlagCallback, kJSPropertyAttributeNone },
@@ -2248,7 +2248,7 @@ JSStaticValue* LayoutTestController::staticValues()
     return staticValues;
 }
 
-JSStaticFunction* LayoutTestController::staticFunctions()
+JSStaticFunction* TestRunner::staticFunctions()
 {
     static JSStaticFunction staticFunctions[] = {
         { "abortModal", abortModalCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
@@ -2423,47 +2423,47 @@ JSStaticFunction* LayoutTestController::staticFunctions()
     return staticFunctions;
 }
 
-void LayoutTestController::queueLoadHTMLString(JSStringRef content, JSStringRef baseURL)
+void TestRunner::queueLoadHTMLString(JSStringRef content, JSStringRef baseURL)
 {
     WorkQueue::shared()->queue(new LoadHTMLStringItem(content, baseURL));
 }
 
-void LayoutTestController::queueLoadAlternateHTMLString(JSStringRef content, JSStringRef baseURL, JSStringRef unreachableURL)
+void TestRunner::queueLoadAlternateHTMLString(JSStringRef content, JSStringRef baseURL, JSStringRef unreachableURL)
 {
     WorkQueue::shared()->queue(new LoadHTMLStringItem(content, baseURL, unreachableURL));
 }
 
-void LayoutTestController::queueBackNavigation(int howFarBack)
+void TestRunner::queueBackNavigation(int howFarBack)
 {
     WorkQueue::shared()->queue(new BackItem(howFarBack));
 }
 
-void LayoutTestController::queueForwardNavigation(int howFarForward)
+void TestRunner::queueForwardNavigation(int howFarForward)
 {
     WorkQueue::shared()->queue(new ForwardItem(howFarForward));
 }
 
-void LayoutTestController::queueLoadingScript(JSStringRef script)
+void TestRunner::queueLoadingScript(JSStringRef script)
 {
     WorkQueue::shared()->queue(new LoadingScriptItem(script));
 }
 
-void LayoutTestController::queueNonLoadingScript(JSStringRef script)
+void TestRunner::queueNonLoadingScript(JSStringRef script)
 {
     WorkQueue::shared()->queue(new NonLoadingScriptItem(script));
 }
 
-void LayoutTestController::queueReload()
+void TestRunner::queueReload()
 {
     WorkQueue::shared()->queue(new ReloadItem);
 }
 
-void LayoutTestController::grantDesktopNotificationPermission(JSStringRef origin)
+void TestRunner::grantDesktopNotificationPermission(JSStringRef origin)
 {
     m_desktopNotificationAllowedOrigins.push_back(JSStringRetain(origin));
 }
 
-bool LayoutTestController::checkDesktopNotificationPermission(JSStringRef origin)
+bool TestRunner::checkDesktopNotificationPermission(JSStringRef origin)
 {
     std::vector<JSStringRef>::iterator i;
     for (i = m_desktopNotificationAllowedOrigins.begin();
@@ -2475,12 +2475,12 @@ bool LayoutTestController::checkDesktopNotificationPermission(JSStringRef origin
     return false;
 }
 
-void LayoutTestController::ignoreDesktopNotificationPermissionRequests()
+void TestRunner::ignoreDesktopNotificationPermissionRequests()
 {
     m_areDesktopNotificationPermissionRequestsIgnored = false;
 }
 
-void LayoutTestController::waitToDumpWatchdogTimerFired()
+void TestRunner::waitToDumpWatchdogTimerFired()
 {
     const char* message = "FAIL: Timed out waiting for notifyDone to be called\n";
     fprintf(stderr, "%s", message);
@@ -2488,33 +2488,33 @@ void LayoutTestController::waitToDumpWatchdogTimerFired()
     notifyDone();
 }
 
-void LayoutTestController::setGeolocationPermissionCommon(bool allow)
+void TestRunner::setGeolocationPermissionCommon(bool allow)
 {
     m_isGeolocationPermissionSet = true;
     m_geolocationPermission = allow;
 }
 
-void LayoutTestController::setPOSIXLocale(JSStringRef locale)
+void TestRunner::setPOSIXLocale(JSStringRef locale)
 {
     char localeBuf[32];
     JSStringGetUTF8CString(locale, localeBuf, sizeof(localeBuf));
     setlocale(LC_ALL, localeBuf);
 }
 
-void LayoutTestController::addURLToRedirect(std::string origin, std::string destination)
+void TestRunner::addURLToRedirect(std::string origin, std::string destination)
 {
     m_URLsToRedirect[origin] = destination;
 }
 
-const std::string& LayoutTestController::redirectionDestinationForURL(std::string origin)
+const std::string& TestRunner::redirectionDestinationForURL(std::string origin)
 {
     return m_URLsToRedirect[origin];
 }
 
-void LayoutTestController::setShouldPaintBrokenImage(bool shouldPaintBrokenImage)
+void TestRunner::setShouldPaintBrokenImage(bool shouldPaintBrokenImage)
 {
     m_shouldPaintBrokenImage = shouldPaintBrokenImage;
 }
 
-const unsigned LayoutTestController::maxViewWidth = 800;
-const unsigned LayoutTestController::maxViewHeight = 600;
+const unsigned TestRunner::maxViewWidth = 800;
+const unsigned TestRunner::maxViewHeight = 600;
index 97a3d52..885b1de 100644 (file)
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 
-class LayoutTestController : public RefCounted<LayoutTestController> {
+class TestRunner : public RefCounted<TestRunner> {
 public:
-    static PassRefPtr<LayoutTestController> create(const std::string& testPathOrURL, const std::string& expectedPixelHash);
-    ~LayoutTestController();
+    static PassRefPtr<TestRunner> create(const std::string& testPathOrURL, const std::string& expectedPixelHash);
+    ~TestRunner();
 
     void makeWindowObject(JSContextRef, JSObjectRef windowObject, JSValueRef* exception);
 
@@ -366,7 +366,7 @@ public:
     void setStorageDatabaseIdleInterval(double);
 
 private:
-    LayoutTestController(const std::string& testPathOrURL, const std::string& expectedPixelHash);
+    TestRunner(const std::string& testPathOrURL, const std::string& expectedPixelHash);
 
     void setGeolocationPermissionCommon(bool allow);
 
@@ -441,4 +441,4 @@ private:
     static JSStaticFunction* staticFunctions();
 };
 
-#endif // LayoutTestController_h
+#endif // TestRunner_h
index 53b3a39..5f1179d 100644 (file)
@@ -72,7 +72,7 @@
 
 volatile bool testDone;
 
-RefPtr<LayoutTestController> gLayoutTestController;
+RefPtr<TestRunner> gTestRunner;
 
 WebCore::Frame* mainFrame = 0;
 WebCore::Frame* topLoadingFrame = 0;
@@ -181,7 +181,7 @@ void DumpRenderTree::runTest(const String& url)
     mainFrame->loader()->stopForUserCancel();
     resetToConsistentStateBeforeTesting();
     if (shouldLogFrameLoadDelegates(url))
-        gLayoutTestController->setDumpFrameLoadCallbacks(true);
+        gTestRunner->setDumpFrameLoadCallbacks(true);
     String stdoutFile = m_resultsDir + *m_currentTest + ".dump";
     String stderrFile = m_resultsDir + *m_currentTest + ".stderr";
 
@@ -241,11 +241,11 @@ void DumpRenderTree::runRemainingTests()
 void DumpRenderTree::resetToConsistentStateBeforeTesting()
 {
     if (isHTTPTest(m_currentTest->utf8().data()))
-        gLayoutTestController = LayoutTestController::create(String(httpPrefixURL + *m_currentTest).utf8().data(), "");
+        gTestRunner = TestRunner::create(String(httpPrefixURL + *m_currentTest).utf8().data(), "");
     else
-        gLayoutTestController = LayoutTestController::create(String(kSDCLayoutTestsURI + *m_currentTest).utf8().data(), "");
+        gTestRunner = TestRunner::create(String(kSDCLayoutTestsURI + *m_currentTest).utf8().data(), "");
 
-    gLayoutTestController->setIconDatabaseEnabled(false);
+    gTestRunner->setIconDatabaseEnabled(false);
 
     DumpRenderTreeSupport::resetGeolocationMock(m_page);
 
@@ -361,7 +361,7 @@ String DumpRenderTree::dumpFramesAsText(WebCore::Frame* frame)
 
     s += documentElement->innerText() + "\n";
 
-    if (gLayoutTestController->dumpChildFramesAsText()) {
+    if (gTestRunner->dumpChildFramesAsText()) {
         WebCore::FrameTree* tree = frame->tree();
         for (WebCore::Frame* child = tree->firstChild(); child; child = child->tree()->nextSibling())
             s += dumpFramesAsText(child);
@@ -488,17 +488,17 @@ void DumpRenderTree::dump()
     String resultMimeType = "text/plain";
     String responseMimeType = mainFrame->loader()->documentLoader()->responseMIMEType();
 
-    bool dumpAsText = gLayoutTestController->dumpAsText() || responseMimeType == "text/plain";
+    bool dumpAsText = gTestRunner->dumpAsText() || responseMimeType == "text/plain";
     String data = dumpAsText ? dumpFramesAsText(mainFrame) : renderTreeDump();
 
-    if (gLayoutTestController->dumpBackForwardList())
+    if (gTestRunner->dumpBackForwardList())
         data += dumpBackForwardListForWebView();
 
     String result = "Content-Type: " + resultMimeType + "\n" + data;
 
     dumpToFile(result);
-    if (m_dumpPixels && !dumpAsText && gLayoutTestController->generatePixelResults())
-        dumpWebViewAsPixelsAndCompareWithExpected(gLayoutTestController->expectedPixelHash());
+    if (m_dumpPixels && !dumpAsText && gTestRunner->generatePixelResults())
+        dumpWebViewAsPixelsAndCompareWithExpected(gTestRunner->expectedPixelHash());
 
     String crashFile = dumpFile + ".crash";
     unlink(crashFile.utf8().data());
@@ -518,7 +518,7 @@ void DumpRenderTree::setWaitToDumpWatchdog(double interval)
 
 void DumpRenderTree::waitToDumpWatchdogTimerFired(WebCore::Timer<DumpRenderTree>*)
 {
-    gLayoutTestController->waitToDumpWatchdogTimerFired();
+    gTestRunner->waitToDumpWatchdogTimerFired();
 }
 
 void DumpRenderTree::processWork(WebCore::Timer<DumpRenderTree>*)
@@ -526,7 +526,7 @@ void DumpRenderTree::processWork(WebCore::Timer<DumpRenderTree>*)
     if (topLoadingFrame)
         return;
 
-    if (WorkQueue::shared()->processWork() && !gLayoutTestController->waitToDump())
+    if (WorkQueue::shared()->processWork() && !gTestRunner->waitToDump())
         dump();
 }
 
@@ -537,7 +537,7 @@ void DumpRenderTree::locationChangeForFrame(WebCore::Frame* frame)
 
     topLoadingFrame = 0;
     WorkQueue::shared()->setFrozen(true); // first complete load freezes the queue
-    if (gLayoutTestController->waitToDump())
+    if (gTestRunner->waitToDump())
         return;
 
     if (WorkQueue::shared()->count())
@@ -549,16 +549,16 @@ void DumpRenderTree::locationChangeForFrame(WebCore::Frame* frame)
 // FrameLoadClient delegates.
 void DumpRenderTree::didStartProvisionalLoadForFrame(WebCore::Frame* frame)
 {
-    if (!testDone && gLayoutTestController->dumpFrameLoadCallbacks())
+    if (!testDone && gTestRunner->dumpFrameLoadCallbacks())
         printf("%s - didStartProvisionalLoadForFrame\n", drtFrameDescription(frame).utf8().data());
 
-    if (!testDone && gLayoutTestController->dumpUserGestureInFrameLoadCallbacks())
+    if (!testDone && gTestRunner->dumpUserGestureInFrameLoadCallbacks())
         printf("Frame with user gesture \"%s\" - in didStartProvisionalLoadForFrame\n", WebCore::ScriptController::processingUserGesture() ? "true" : "false");
 
     if (!topLoadingFrame && !testDone)
         topLoadingFrame = frame;
 
-    if (!testDone && gLayoutTestController->stopProvisionalFrameLoads()) {
+    if (!testDone && gTestRunner->stopProvisionalFrameLoads()) {
         printf("%s - stopping load in didStartProvisionalLoadForFrame callback\n", drtFrameDescription(frame).utf8().data());
         frame->loader()->stopForUserCancel();
     }
@@ -566,15 +566,15 @@ void DumpRenderTree::didStartProvisionalLoadForFrame(WebCore::Frame* frame)
 
 void DumpRenderTree::didCommitLoadForFrame(WebCore::Frame* frame)
 {
-    if (!testDone && gLayoutTestController->dumpFrameLoadCallbacks())
+    if (!testDone && gTestRunner->dumpFrameLoadCallbacks())
         printf("%s - didCommitLoadForFrame\n", drtFrameDescription(frame).utf8().data());
 
-    gLayoutTestController->setWindowIsKey(true);
+    gTestRunner->setWindowIsKey(true);
 }
 
 void DumpRenderTree::didFailProvisionalLoadForFrame(WebCore::Frame* frame)
 {
-    if (!testDone && gLayoutTestController->dumpFrameLoadCallbacks())
+    if (!testDone && gTestRunner->dumpFrameLoadCallbacks())
         printf("%s - didFailProvisionalLoadWithError\n", drtFrameDescription(frame).utf8().data());
 
     locationChangeForFrame(frame);
@@ -582,7 +582,7 @@ void DumpRenderTree::didFailProvisionalLoadForFrame(WebCore::Frame* frame)
 
 void DumpRenderTree::didFailLoadForFrame(WebCore::Frame* frame)
 {
-    if (!testDone && gLayoutTestController->dumpFrameLoadCallbacks())
+    if (!testDone && gTestRunner->dumpFrameLoadCallbacks())
         printf("%s - didFailLoadWithError\n", drtFrameDescription(frame).utf8().data());
 
     locationChangeForFrame(frame);
@@ -590,7 +590,7 @@ void DumpRenderTree::didFailLoadForFrame(WebCore::Frame* frame)
 
 void DumpRenderTree::didFinishLoadForFrame(WebCore::Frame* frame)
 {
-    if (!testDone && gLayoutTestController->dumpFrameLoadCallbacks())
+    if (!testDone && gTestRunner->dumpFrameLoadCallbacks())
         printf("%s - didFinishLoadForFrame\n", drtFrameDescription(frame).utf8().data());
 
     if (frame == topLoadingFrame)
@@ -601,7 +601,7 @@ void DumpRenderTree::didFinishLoadForFrame(WebCore::Frame* frame)
 void DumpRenderTree::didFinishDocumentLoadForFrame(WebCore::Frame* frame)
 {
     if (!testDone) {
-        if (gLayoutTestController->dumpFrameLoadCallbacks())
+        if (gTestRunner->dumpFrameLoadCallbacks())
             printf("%s - didFinishDocumentLoadForFrame\n", drtFrameDescription(frame).utf8().data());
         else {
             unsigned pendingFrameUnloadEvents = frame->domWindow()->pendingUnloadEventListeners();
@@ -615,7 +615,7 @@ void DumpRenderTree::didClearWindowObjectInWorld(WebCore::DOMWrapperWorld*, JSGl
 {
     JSValueRef exception = 0;
 
-    gLayoutTestController->makeWindowObject(context, windowObject, &exception);
+    gTestRunner->makeWindowObject(context, windowObject, &exception);
     ASSERT(!exception);
 
     m_gcController->makeWindowObject(context, windowObject, &exception);
@@ -633,10 +633,10 @@ void DumpRenderTree::didClearWindowObjectInWorld(WebCore::DOMWrapperWorld*, JSGl
 
 void DumpRenderTree::didReceiveTitleForFrame(const String& title, WebCore::Frame* frame)
 {
-    if (!testDone && gLayoutTestController->dumpFrameLoadCallbacks())
+    if (!testDone && gTestRunner->dumpFrameLoadCallbacks())
         printf("%s - didReceiveTitle: %s\n", drtFrameDescription(frame).utf8().data(), title.utf8().data());
 
-    if (gLayoutTestController->dumpTitleChanges())
+    if (gTestRunner->dumpTitleChanges())
         printf("TITLE CHANGED: %s\n", title.utf8().data());
 }
 
@@ -675,13 +675,13 @@ bool DumpRenderTree::runBeforeUnloadConfirmPanel(const String& message)
 
 void DumpRenderTree::setStatusText(const String& status)
 {
-    if (gLayoutTestController->dumpStatusCallbacks())
+    if (gTestRunner->dumpStatusCallbacks())
         printf("UI DELEGATE STATUS CALLBACK: setStatusText:%s\n", status.utf8().data());
 }
 
 void DumpRenderTree::exceededDatabaseQuota(WebCore::SecurityOrigin* origin, const String& name)
 {
-    if (!testDone && gLayoutTestController->dumpDatabaseCallbacks())
+    if (!testDone && gTestRunner->dumpDatabaseCallbacks())
         printf("UI DELEGATE DATABASE CALLBACK: exceededDatabaseQuotaForSecurityOrigin:{%s, %s, %i} database:%s\n", origin->protocol().utf8().data(), origin->host().utf8().data(), origin->port(), name.utf8().data());
 
     WebCore::DatabaseTracker::tracker().setQuota(mainFrame->document()->securityOrigin(), 5 * 1024 * 1024);
@@ -689,7 +689,7 @@ void DumpRenderTree::exceededDatabaseQuota(WebCore::SecurityOrigin* origin, cons
 
 bool DumpRenderTree::allowsOpeningWindow()
 {
-    return gLayoutTestController->canOpenWindows();
+    return gTestRunner->canOpenWindows();
 }
 
 void DumpRenderTree::windowCreated(BlackBerry::WebKit::WebPage* page)
@@ -700,25 +700,25 @@ void DumpRenderTree::windowCreated(BlackBerry::WebKit::WebPage* page)
 // EditorClient delegates.
 void DumpRenderTree::didBeginEditing()
 {
-    if (!testDone && gLayoutTestController->dumpEditingCallbacks())
+    if (!testDone && gTestRunner->dumpEditingCallbacks())
         printf("EDITING DELEGATE: webViewDidBeginEditing:%s\n", "WebViewDidBeginEditingNotification");
 }
 
 void DumpRenderTree::didEndEditing()
 {
-    if (!testDone && gLayoutTestController->dumpEditingCallbacks())
+    if (!testDone && gTestRunner->dumpEditingCallbacks())
         printf("EDITING DELEGATE: webViewDidEndEditing:%s\n", "WebViewDidEndEditingNotification");
 }
 
 void DumpRenderTree::didChange()
 {
-    if (!testDone && gLayoutTestController->dumpEditingCallbacks())
+    if (!testDone && gTestRunner->dumpEditingCallbacks())
         printf("EDITING DELEGATE: webViewDidChange:%s\n", "WebViewDidChangeNotification");
 }
 
 void DumpRenderTree::didChangeSelection()
 {
-    if (!testDone && gLayoutTestController->dumpEditingCallbacks())
+    if (!testDone && gTestRunner->dumpEditingCallbacks())
         printf("EDITING DELEGATE: webViewDidChangeSelection:%s\n", "WebViewDidChangeSelectionNotification");
 }
 
@@ -730,28 +730,28 @@ bool DumpRenderTree::findString(const String& string, WebCore::FindOptions optio
 
 bool DumpRenderTree::shouldBeginEditingInDOMRange(WebCore::Range* range)
 {
-    if (!testDone && gLayoutTestController->dumpEditingCallbacks())
+    if (!testDone && gTestRunner->dumpEditingCallbacks())
         printf("EDITING DELEGATE: shouldBeginEditingInDOMRange:%s\n", drtRangeDescription(range).utf8().data());
     return m_acceptsEditing;
 }
 
 bool DumpRenderTree::shouldEndEditingInDOMRange(WebCore::Range* range)
 {
-    if (!testDone && gLayoutTestController->dumpEditingCallbacks())
+    if (!testDone && gTestRunner->dumpEditingCallbacks())
         printf("EDITING DELEGATE: shouldEndEditingInDOMRange:%s\n", drtRangeDescription(range).utf8().data());
     return m_acceptsEditing;
 }
 
 bool DumpRenderTree::shouldDeleteDOMRange(WebCore::Range* range)
 {
-    if (!testDone && gLayoutTestController->dumpEditingCallbacks())
+    if (!testDone && gTestRunner->dumpEditingCallbacks())
         printf("EDITING DELEGATE: shouldDeleteDOMRange:%s\n", drtRangeDescription(range).utf8().data());
     return m_acceptsEditing;
 }
 
 bool DumpRenderTree::shouldChangeSelectedDOMRangeToDOMRangeAffinityStillSelecting(WebCore::Range* fromRange, WebCore::Range* toRange, int affinity, bool stillSelecting)
 {
-    if (!testDone && gLayoutTestController->dumpEditingCallbacks())
+    if (!testDone && gTestRunner->dumpEditingCallbacks())
         printf("EDITING DELEGATE: shouldChangeSelectedDOMRange:%s toDOMRange:%s affinity:%s stillSelecting:%s\n", drtRangeDescription(fromRange).utf8().data(), drtRangeDescription(toRange).utf8().data(), drtAffinityDescription(static_cast<WebCore::EAffinity>(affinity)).utf8().data(), stillSelecting ? "TRUE" : "FALSE");
     return m_acceptsEditing;
 }
@@ -772,14 +772,14 @@ static const char* insertActionString(WebCore::EditorInsertAction action)
 
 bool DumpRenderTree::shouldInsertNode(WebCore::Node* node, WebCore::Range* range, int action)
 {
-    if (!testDone && gLayoutTestController->dumpEditingCallbacks())
+    if (!testDone && gTestRunner->dumpEditingCallbacks())
         printf("EDITING DELEGATE: shouldInsertNode:%s replacingDOMRange:%s givenAction:%s\n", drtDumpPath(node).utf8().data(), drtRangeDescription(range).utf8().data(), insertActionString((WebCore::EditorInsertAction)action));
     return m_acceptsEditing;
 }
 
 bool DumpRenderTree::shouldInsertText(const String& text, WebCore::Range* range, int action)
 {
-    if (!testDone && gLayoutTestController->dumpEditingCallbacks())
+    if (!testDone && gTestRunner->dumpEditingCallbacks())
         printf("EDITING DELEGATE: shouldInsertText:%s replacingDOMRange:%s givenAction:%s\n", text.utf8().data(), drtRangeDescription(range).utf8().data(), insertActionString((WebCore::EditorInsertAction)action));
     return m_acceptsEditing;
 }
@@ -816,36 +816,36 @@ void DumpRenderTree::didDecidePolicyForNavigationAction(const WebCore::Navigatio
     printf("Policy delegate: attempt to load %s with navigation type '%s'\n", request.url().string().utf8().data(), typeDescription);
     // FIXME: do originating part.
 
-    gLayoutTestController->notifyDone();
+    gTestRunner->notifyDone();
 }
 
 void DumpRenderTree::didDispatchWillPerformClientRedirect()
 {
-    if (!testDone && gLayoutTestController->dumpUserGestureInFrameLoadCallbacks())
+    if (!testDone && gTestRunner->dumpUserGestureInFrameLoadCallbacks())
         printf("Frame with user gesture \"%s\" - in willPerformClientRedirect\n", WebCore::ScriptController::processingUserGesture() ? "true" : "false");
 }
 
 void DumpRenderTree::didHandleOnloadEventsForFrame(WebCore::Frame* frame)
 {
-    if (!testDone && gLayoutTestController->dumpFrameLoadCallbacks())
+    if (!testDone && gTestRunner->dumpFrameLoadCallbacks())
         printf("%s - didHandleOnloadEventsForFrame\n", drtFrameDescription(frame).utf8().data());
 }
 
 void DumpRenderTree::didReceiveResponseForFrame(WebCore::Frame* frame, const WebCore::ResourceResponse& response)
 {
-    if (!testDone && gLayoutTestController->dumpResourceResponseMIMETypes())
+    if (!testDone && gTestRunner->dumpResourceResponseMIMETypes())
         printf("%s has MIME type %s\n", response.url().lastPathComponent().utf8().data(), response.mimeType().utf8().data());
 }
 
 bool DumpRenderTree::didReceiveAuthenticationChallenge(WebCore::Credential& credential)
 {
-    if (!gLayoutTestController->handlesAuthenticationChallenges()) {
+    if (!gTestRunner->handlesAuthenticationChallenges()) {
         credential = WebCore::Credential();
         printf("%s - didReceiveAuthenticationChallenge - Simulating cancelled authentication\n", drtCredentialDescription(credential).utf8().data());
         return false;
     }
-    const char* user = gLayoutTestController->authenticationUsername().c_str();
-    const char* password = gLayoutTestController->authenticationPassword().c_str();
+    const char* user = gTestRunner->authenticationUsername().c_str();
+    const char* password = gTestRunner->authenticationPassword().c_str();
     credential = WebCore::Credential(user, password, WebCore::CredentialPersistenceForSession);
     printf("%s - didReceiveAuthenticationChallenge - Responding with %s:%s\n", drtCredentialDescription(credential).utf8().data(), user, password);
     return true;
index 9d1513e..f6395fb 100644 (file)
 using WebCore::toElement;
 using WebCore::toJS;
 
-LayoutTestController::~LayoutTestController()
+TestRunner::~TestRunner()
 {
 }
 
-void LayoutTestController::addDisallowedURL(JSStringRef url)
+void TestRunner::addDisallowedURL(JSStringRef url)
 {
     UNUSED_PARAM(url);
     notImplemented();
 }
 
-void LayoutTestController::clearAllDatabases()
+void TestRunner::clearAllDatabases()
 {
 #if ENABLE(DATABASE)
     WebCore::DatabaseTracker::tracker().deleteAllDatabases();
 #endif
 }
 
-void LayoutTestController::clearBackForwardList()
+void TestRunner::clearBackForwardList()
 {
     BlackBerry::WebKit::DumpRenderTree::currentInstance()->page()->clearBackForwardList(true);
 }
 
-void LayoutTestController::clearPersistentUserStyleSheet()
+void TestRunner::clearPersistentUserStyleSheet()
 {
     notImplemented();
 }
 
-JSStringRef LayoutTestController::copyDecodedHostName(JSStringRef name)
+JSStringRef TestRunner::copyDecodedHostName(JSStringRef name)
 {
     UNUSED_PARAM(name);
     notImplemented();
     return 0;
 }
 
-JSStringRef LayoutTestController::copyEncodedHostName(JSStringRef name)
+JSStringRef TestRunner::copyEncodedHostName(JSStringRef name)
 {
     UNUSED_PARAM(name);
     notImplemented();
     return 0;
 }
 
-void LayoutTestController::dispatchPendingLoadRequests()
+void TestRunner::dispatchPendingLoadRequests()
 {
     notImplemented();
 }
 
-void LayoutTestController::display()
+void TestRunner::display()
 {
     notImplemented();
 }
@@ -114,7 +114,7 @@ static String jsStringRefToWebCoreString(JSStringRef str)
     return String::fromUTF8(strArr.get());
 }
 
-void LayoutTestController::execCommand(JSStringRef name, JSStringRef value)
+void TestRunner::execCommand(JSStringRef name, JSStringRef value)
 {
     if (!mainFrame)
         return;
@@ -125,7 +125,7 @@ void LayoutTestController::execCommand(JSStringRef name, JSStringRef value)
     mainFrame->editor()->command(nameStr).execute(valueStr);
 }
 
-bool LayoutTestController::isCommandEnabled(JSStringRef name)
+bool TestRunner::isCommandEnabled(JSStringRef name)
 {
     if (!mainFrame)
         return false;
@@ -135,12 +135,12 @@ bool LayoutTestController::isCommandEnabled(JSStringRef name)
     return mainFrame->editor()->command(nameStr).isEnabled();
 }
 
-void LayoutTestController::keepWebHistory()
+void TestRunner::keepWebHistory()
 {
     notImplemented();
 }
 
-void LayoutTestController::notifyDone()
+void TestRunner::notifyDone()
 {
     if (m_waitToDump && (!topLoadingFrame || BlackBerry::WebKit::DumpRenderTree::currentInstance()->loadFinished()) && !WorkQueue::shared()->count())
         dump();
@@ -149,12 +149,12 @@ void LayoutTestController::notifyDone()
     waitForPolicy = false;
 }
 
-JSStringRef LayoutTestController::pathToLocalResource(JSContextRef, JSStringRef url)
+JSStringRef TestRunner::pathToLocalResource(JSContextRef, JSStringRef url)
 {
     return JSStringRetain(url);
 }
 
-void LayoutTestController::queueLoad(JSStringRef url, JSStringRef target)
+void TestRunner::queueLoad(JSStringRef url, JSStringRef target)
 {
     size_t urlArrSize = JSStringGetMaximumUTF8CStringSize(url);
     OwnArrayPtr<char> urlArr = adoptArrayPtr(new char[urlArrSize]);
@@ -167,55 +167,55 @@ void LayoutTestController::queueLoad(JSStringRef url, JSStringRef target)
     WorkQueue::shared()->queue(new LoadItem(absoluteURL.get(), target));
 }
 
-void LayoutTestController::setAcceptsEditing(bool acceptsEditing)
+void TestRunner::setAcceptsEditing(bool acceptsEditing)
 {
     BlackBerry::WebKit::DumpRenderTree::currentInstance()->setAcceptsEditing(acceptsEditing);
 }
 
-void LayoutTestController::setAppCacheMaximumSize(unsigned long long quota)
+void TestRunner::setAppCacheMaximumSize(unsigned long long quota)
 {
     UNUSED_PARAM(quota);
     notImplemented();
 }
 
-void LayoutTestController::setAuthorAndUserStylesEnabled(bool enable)
+void TestRunner::setAuthorAndUserStylesEnabled(bool enable)
 {
     mainFrame->page()->settings()->setAuthorAndUserStylesEnabled(enable);
 }
 
-void LayoutTestController::setCacheModel(int)
+void TestRunner::setCacheModel(int)
 {
     notImplemented();
 }
 
-void LayoutTestController::setCustomPolicyDelegate(bool setDelegate, bool permissive)
+void TestRunner::setCustomPolicyDelegate(bool setDelegate, bool permissive)
 {
     UNUSED_PARAM(setDelegate);
     UNUSED_PARAM(permissive);
     notImplemented();
 }
 
-void LayoutTestController::clearApplicationCacheForOrigin(OpaqueJSString*)
+void TestRunner::clearApplicationCacheForOrigin(OpaqueJSString*)
 {
     // FIXME: Implement to support deleting all application caches for an origin.
     notImplemented();
 }
 
-long long LayoutTestController::localStorageDiskUsageForOrigin(JSStringRef)
+long long TestRunner::localStorageDiskUsageForOrigin(JSStringRef)
 {
     // FIXME: Implement to support getting disk usage in bytes for an origin.
     notImplemented();
     return 0;
 }
 
-JSValueRef LayoutTestController::originsWithApplicationCache(JSContextRef context)
+JSValueRef TestRunner::originsWithApplicationCache(JSContextRef context)
 {
     // FIXME: Implement to get origins that contain application caches.
     notImplemented();
     return JSValueMakeUndefined(context);
 }
 
-void LayoutTestController::setDatabaseQuota(unsigned long long quota)
+void TestRunner::setDatabaseQuota(unsigned long long quota)
 {
     if (!mainFrame)
         return;
@@ -223,57 +223,57 @@ void LayoutTestController::setDatabaseQuota(unsigned long long quota)
     WebCore::DatabaseTracker::tracker().setQuota(mainFrame->document()->securityOrigin(), quota);
 }
 
-void LayoutTestController::setDomainRelaxationForbiddenForURLScheme(bool forbidden, JSStringRef scheme)
+void TestRunner::setDomainRelaxationForbiddenForURLScheme(bool forbidden, JSStringRef scheme)
 {
     WebCore::SchemeRegistry::setDomainRelaxationForbiddenForURLScheme(forbidden, jsStringRefToWebCoreString(scheme));
 }
 
-void LayoutTestController::setIconDatabaseEnabled(bool iconDatabaseEnabled)
+void TestRunner::setIconDatabaseEnabled(bool iconDatabaseEnabled)
 {
     UNUSED_PARAM(iconDatabaseEnabled);
     notImplemented();
 }
 
-void LayoutTestController::setMainFrameIsFirstResponder(bool flag)
+void TestRunner::setMainFrameIsFirstResponder(bool flag)
 {
     UNUSED_PARAM(flag);
     notImplemented();
 }
 
-void LayoutTestController::setPersistentUserStyleSheetLocation(JSStringRef path)
+void TestRunner::setPersistentUserStyleSheetLocation(JSStringRef path)
 {
     UNUSED_PARAM(path);
     notImplemented();
 }
 
-void LayoutTestController::setPopupBlockingEnabled(bool flag)
+void TestRunner::setPopupBlockingEnabled(bool flag)
 {
     BlackBerry::WebKit::DumpRenderTree::currentInstance()->page()->settings()->setJavaScriptOpenWindowsAutomatically(!flag);
 }
 
-void LayoutTestController::setPrivateBrowsingEnabled(bool flag)
+void TestRunner::setPrivateBrowsingEnabled(bool flag)
 {
     UNUSED_PARAM(flag);
     notImplemented();
 }
 
-void LayoutTestController::setXSSAuditorEnabled(bool flag)
+void TestRunner::setXSSAuditorEnabled(bool flag)
 {
     BlackBerry::WebKit::DumpRenderTree::currentInstance()->page()->settings()->setXSSAuditorEnabled(flag);
 }
 
-void LayoutTestController::setSelectTrailingWhitespaceEnabled(bool flag)
+void TestRunner::setSelectTrailingWhitespaceEnabled(bool flag)
 {
     BlackBerry::WebKit::DumpRenderTree::currentInstance()->setSelectTrailingWhitespaceEnabled(flag);
 }
 
-void LayoutTestController::setSmartInsertDeleteEnabled(bool flag)
+void TestRunner::setSmartInsertDeleteEnabled(bool flag)
 {
     UNUSED_PARAM(flag);
     notImplemented();
 }
 
-void LayoutTestController::setTabKeyCyclesThroughElements(bool cycles)
+void TestRunner::setTabKeyCyclesThroughElements(bool cycles)
 {
     if (!mainFrame)
         return;
@@ -281,51 +281,51 @@ void LayoutTestController::setTabKeyCyclesThroughElements(bool cycles)
     mainFrame->page()->setTabKeyCyclesThroughElements(cycles);
 }
 
-void LayoutTestController::setUseDashboardCompatibilityMode(bool flag)
+void TestRunner::setUseDashboardCompatibilityMode(bool flag)
 {
     UNUSED_PARAM(flag);
     notImplemented();
 }
 
-void LayoutTestController::setUserStyleSheetEnabled(bool flag)
+void TestRunner::setUserStyleSheetEnabled(bool flag)
 {
     UNUSED_PARAM(flag);
     notImplemented();
 }
 
-void LayoutTestController::setUserStyleSheetLocation(JSStringRef path)
+void TestRunner::setUserStyleSheetLocation(JSStringRef path)
 {
     String pathStr = jsStringRefToWebCoreString(path);
     BlackBerry::WebKit::DumpRenderTree::currentInstance()->page()->settings()->setUserStyleSheetLocation(pathStr.utf8().data());
 }
 
-void LayoutTestController::waitForPolicyDelegate()
+void TestRunner::waitForPolicyDelegate()
 {
     setWaitToDump(true);
     waitForPolicy = true;
 }
 
-size_t LayoutTestController::webHistoryItemCount()
+size_t TestRunner::webHistoryItemCount()
 {
     SharedArray<BlackBerry::WebKit::WebPage::BackForwardEntry> backForwardList;
     BlackBerry::WebKit::DumpRenderTree::currentInstance()->page()->getBackForwardList(backForwardList);
     return backForwardList.length();
 }
 
-int LayoutTestController::windowCount()
+int TestRunner::windowCount()
 {
     notImplemented();
     return 0;
 }
 
-bool LayoutTestController::elementDoesAutoCompleteForElementWithId(JSStringRef id)
+bool TestRunner::elementDoesAutoCompleteForElementWithId(JSStringRef id)
 {
     UNUSED_PARAM(id);
     notImplemented();
     return false;
 }
 
-JSRetainPtr<JSStringRef> LayoutTestController::pageProperty(const char* propertyName, int pageNumber) const
+JSRetainPtr<JSStringRef> TestRunner::pageProperty(const char* propertyName, int pageNumber) const
 {
     UNUSED_PARAM(propertyName);
     UNUSED_PARAM(pageNumber);
@@ -333,7 +333,7 @@ JSRetainPtr<JSStringRef> LayoutTestController::pageProperty(const char* property
     return 0;
 }
 
-void LayoutTestController::setWaitToDump(bool waitToDump)
+void TestRunner::setWaitToDump(bool waitToDump)
 {
     // Change from 30s to 35s because some test cases in multipart need 30 seconds,
     // refer to http/tests/multipart/resources/multipart-wait-before-boundary.php please.
@@ -343,13 +343,13 @@ void LayoutTestController::setWaitToDump(bool waitToDump)
         BlackBerry::WebKit::DumpRenderTree::currentInstance()->setWaitToDumpWatchdog(kWaitToDumpWatchdogInterval);
 }
 
-void LayoutTestController::setWindowIsKey(bool windowIsKey)
+void TestRunner::setWindowIsKey(bool windowIsKey)
 {
     m_windowIsKey = windowIsKey;
     notImplemented();
 }
 
-bool LayoutTestController::pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, double time, JSStringRef elementId)
+bool TestRunner::pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, double time, JSStringRef elementId)
 {
     if (!mainFrame)
         return false;
@@ -373,7 +373,7 @@ bool LayoutTestController::pauseAnimationAtTimeOnElementWithId(JSStringRef anima
     return animationController->pauseAnimationAtTime(node->renderer(), name.get(), time);
 }
 
-bool LayoutTestController::pauseTransitionAtTimeOnElementWithId(JSStringRef propertyName, double time, JSStringRef elementId)
+bool TestRunner::pauseTransitionAtTimeOnElementWithId(JSStringRef propertyName, double time, JSStringRef elementId)
 {
     if (!mainFrame)
         return false;
@@ -397,7 +397,7 @@ bool LayoutTestController::pauseTransitionAtTimeOnElementWithId(JSStringRef prop
     return animationController->pauseTransitionAtTime(node->renderer(), name.get(), time);
 }
 
-unsigned LayoutTestController::numberOfActiveAnimations() const
+unsigned TestRunner::numberOfActiveAnimations() const
 {
     if (!mainFrame)
         return false;
@@ -409,7 +409,7 @@ unsigned LayoutTestController::numberOfActiveAnimations() const
     return animationController->numberOfActiveAnimations(mainFrame->document());
 }
 
-unsigned int LayoutTestController::workerThreadCount() const
+unsigned int TestRunner::workerThreadCount() const
 {
 #if ENABLE_WORKERS
     return WebCore::WorkerThread::workerThreadCount();
@@ -418,17 +418,17 @@ unsigned int LayoutTestController::workerThreadCount() const
 #endif
 }
 
-void LayoutTestController::removeAllVisitedLinks()
+void TestRunner::removeAllVisitedLinks()
 {
     notImplemented();
 }
 
-void LayoutTestController::disableImageLoading()
+void TestRunner::disableImageLoading()
 {
     BlackBerry::WebKit::DumpRenderTree::currentInstance()->page()->settings()->setLoadsImagesAutomatically(false);
 }
 
-void LayoutTestController::overridePreference(JSStringRef key, JSStringRef value)
+void TestRunner::overridePreference(JSStringRef key, JSStringRef value)
 {
     if (!mainFrame)
         return;
@@ -446,41 +446,41 @@ void LayoutTestController::overridePreference(JSStringRef key, JSStringRef value
         mainFrame->page()->settings()->setHyperlinkAuditingEnabled(valueStr == "true" || valueStr == "1");
 }
 
-void LayoutTestController::setAlwaysAcceptCookies(bool alwaysAcceptCookies)
+void TestRunner::setAlwaysAcceptCookies(bool alwaysAcceptCookies)
 {
     UNUSED_PARAM(alwaysAcceptCookies);
     notImplemented();
 }
 
-void LayoutTestController::setMockGeolocationPosition(double latitude, double longitude, double accuracy)
+void TestRunner::setMockGeolocationPosition(double latitude, double longitude, double accuracy)
 {
     DumpRenderTreeSupport::setMockGeolocationPosition(BlackBerry::WebKit::DumpRenderTree::currentInstance()->page(), latitude, longitude, accuracy);
 }
 
-void LayoutTestController::setMockGeolocationError(int code, JSStringRef message)
+void TestRunner::setMockGeolocationError(int code, JSStringRef message)
 {
     String messageStr = jsStringRefToWebCoreString(message);
     DumpRenderTreeSupport::setMockGeolocationError(BlackBerry::WebKit::DumpRenderTree::currentInstance()->page(), code, messageStr);
 }
 
-void LayoutTestController::showWebInspector()
+void TestRunner::showWebInspector()
 {
     notImplemented();
 }
 
-void LayoutTestController::closeWebInspector()
+void TestRunner::closeWebInspector()
 {
     notImplemented();
 }
 
-void LayoutTestController::evaluateInWebInspector(long callId, JSStringRef script)
+void TestRunner::evaluateInWebInspector(long callId, JSStringRef script)
 {
     UNUSED_PARAM(callId);
     UNUSED_PARAM(script);
     notImplemented();
 }
 
-void LayoutTestController::evaluateScriptInIsolatedWorldAndReturnValue(unsigned worldID, JSObjectRef globalObject, JSStringRef script)
+void TestRunner::evaluateScriptInIsolatedWorldAndReturnValue(unsigned worldID, JSObjectRef globalObject, JSStringRef script)
 {
     UNUSED_PARAM(worldID);
     UNUSED_PARAM(globalObject);
@@ -488,7 +488,7 @@ void LayoutTestController::evaluateScriptInIsolatedWorldAndReturnValue(unsigned
     notImplemented();
 }
 
-void LayoutTestController::evaluateScriptInIsolatedWorld(unsigned worldID, JSObjectRef globalObject, JSStringRef script)
+void TestRunner::evaluateScriptInIsolatedWorld(unsigned worldID, JSObjectRef globalObject, JSStringRef script)
 {
     UNUSED_PARAM(worldID);
     UNUSED_PARAM(globalObject);
@@ -496,7 +496,7 @@ void LayoutTestController::evaluateScriptInIsolatedWorld(unsigned worldID, JSObj
     notImplemented();
 }
 
-void LayoutTestController::addUserScript(JSStringRef source, bool runAtStart, bool allFrames)
+void TestRunner::addUserScript(JSStringRef source, bool runAtStart, bool allFrames)
 {
     UNUSED_PARAM(source);
     UNUSED_PARAM(runAtStart);
@@ -504,55 +504,55 @@ void LayoutTestController::addUserScript(JSStringRef source, bool runAtStart, bo
     notImplemented();
 }
 
-void LayoutTestController::addUserStyleSheet(JSStringRef, bool)
+void TestRunner::addUserStyleSheet(JSStringRef, bool)
 {
     notImplemented();
 }
 
-JSRetainPtr<JSStringRef> LayoutTestController::pageSizeAndMarginsInPixels(int, int, int, int, int, int, int) const
+JSRetainPtr<JSStringRef> TestRunner::pageSizeAndMarginsInPixels(int, int, int, int, int, int, int) const
 {
     notImplemented();
     return 0;
 }
 
-int LayoutTestController::numberOfPages(float, float)
+int TestRunner::numberOfPages(float, float)
 {
     notImplemented();
     return -1;
 }
 
-void LayoutTestController::setScrollbarPolicy(JSStringRef, JSStringRef)
+void TestRunner::setScrollbarPolicy(JSStringRef, JSStringRef)
 {
     notImplemented();
 }
 
-void LayoutTestController::setWebViewEditable(bool)
+void TestRunner::setWebViewEditable(bool)
 {
     notImplemented();
 }
 
-void LayoutTestController::authenticateSession(JSStringRef url, JSStringRef username, JSStringRef password)
+void TestRunner::authenticateSession(JSStringRef url, JSStringRef username, JSStringRef password)
 {
     notImplemented();
 }
 
-bool LayoutTestController::callShouldCloseOnWebView()
+bool TestRunner::callShouldCloseOnWebView()
 {
     notImplemented();
     return false;
 }
 
-void LayoutTestController::setFrameFlatteningEnabled(bool enable)
+void TestRunner::setFrameFlatteningEnabled(bool enable)
 {
     BlackBerry::WebKit::DumpRenderTree::currentInstance()->page()->settings()->setFrameFlatteningEnabled(enable);
 }
 
-void LayoutTestController::setSpatialNavigationEnabled(bool enable)
+void TestRunner::setSpatialNavigationEnabled(bool enable)
 {
     notImplemented();
 }
 
-void LayoutTestController::addOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains)
+void TestRunner::addOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains)
 {
     WebCore::SecurityPolicy::addOriginAccessWhitelistEntry(*WebCore::SecurityOrigin::createFromString(jsStringRefToWebCoreString(sourceOrigin)),
                                                   jsStringRefToWebCoreString(destinationProtocol),
@@ -560,7 +560,7 @@ void LayoutTestController::addOriginAccessWhitelistEntry(JSStringRef sourceOrigi
                                                   allowDestinationSubdomains);
 }
 
-void LayoutTestController::removeOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains)
+void TestRunner::removeOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains)
 {
     WebCore::SecurityPolicy::removeOriginAccessWhitelistEntry(*WebCore::SecurityOrigin::createFromString(jsStringRefToWebCoreString(sourceOrigin)),
                                                      jsStringRefToWebCoreString(destinationProtocol),
@@ -568,7 +568,7 @@ void LayoutTestController::removeOriginAccessWhitelistEntry(JSStringRef sourceOr
                                                      allowDestinationSubdomains);
 }
 
-void LayoutTestController::setAllowFileAccessFromFileURLs(bool enabled)
+void TestRunner::setAllowFileAccessFromFileURLs(bool enabled)
 {
     if (!mainFrame)
         return;
@@ -576,7 +576,7 @@ void LayoutTestController::setAllowFileAccessFromFileURLs(bool enabled)
     mainFrame->page()->settings()->setAllowFileAccessFromFileURLs(enabled);
 }
 
-void LayoutTestController::setAllowUniversalAccessFromFileURLs(bool enabled)
+void TestRunner::setAllowUniversalAccessFromFileURLs(bool enabled)
 {
     if (!mainFrame)
         return;
@@ -584,33 +584,33 @@ void LayoutTestController::setAllowUniversalAccessFromFileURLs(bool enabled)
     mainFrame->page()->settings()->setAllowUniversalAccessFromFileURLs(enabled);
 }
 
-void LayoutTestController::apiTestNewWindowDataLoadBaseURL(JSStringRef utf8Data, JSStringRef baseURL)
+void TestRunner::apiTestNewWindowDataLoadBaseURL(JSStringRef utf8Data, JSStringRef baseURL)
 {
     notImplemented();
 }
 
-void LayoutTestController::apiTestGoToCurrentBackForwardItem()
+void TestRunner::apiTestGoToCurrentBackForwardItem()
 {
     notImplemented();
 }
 
-void LayoutTestController::setJavaScriptCanAccessClipboard(bool flag)
+void TestRunner::setJavaScriptCanAccessClipboard(bool flag)
 {
     BlackBerry::WebKit::DumpRenderTree::currentInstance()->page()->setJavaScriptCanAccessClipboard(flag);
 }
 
-JSValueRef LayoutTestController::computedStyleIncludingVisitedInfo(JSContextRef context, JSValueRef value)
+JSValueRef TestRunner::computedStyleIncludingVisitedInfo(JSContextRef context, JSValueRef value)
 {
     return DumpRenderTreeSupport::computedStyleIncludingVisitedInfo(context, value);
 }
 
-JSRetainPtr<JSStringRef> LayoutTestController::layerTreeAsText() const
+JSRetainPtr<JSStringRef> TestRunner::layerTreeAsText() const
 {
     notImplemented();
     return 0;
 }
 
-JSRetainPtr<JSStringRef> LayoutTestController::markerTextForListItem(JSContextRef context, JSValueRef nodeObject) const
+JSRetainPtr<JSStringRef> TestRunner::markerTextForListItem(JSContextRef context, JSValueRef nodeObject) const
 {
     WebCore::Element* element = toElement(toJS(toJS(context), nodeObject));
     if (!element)
@@ -620,102 +620,102 @@ JSRetainPtr<JSStringRef> LayoutTestController::markerTextForListItem(JSContextRe
     return markerText;
 }
 
-void LayoutTestController::setPluginsEnabled(bool flag)
+void TestRunner::setPluginsEnabled(bool flag)
 {
     notImplemented();
 }
 
-void LayoutTestController::abortModal()
+void TestRunner::abortModal()
 {
     notImplemented();
 }
 
-void LayoutTestController::clearAllApplicationCaches()
+void TestRunner::clearAllApplicationCaches()
 {
     notImplemented();
 }
 
-void LayoutTestController::setApplicationCacheOriginQuota(unsigned long long quota)
+void TestRunner::setApplicationCacheOriginQuota(unsigned long long quota)
 {
     notImplemented();
 }
 
-void LayoutTestController::setMockDeviceOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma)
+void TestRunner::setMockDeviceOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma)
 {
     notImplemented();
 }
 
-void LayoutTestController::addMockSpeechInputResult(JSStringRef result, double confidence, JSStringRef language)
+void TestRunner::addMockSpeechInputResult(JSStringRef result, double confidence, JSStringRef language)
 {
     notImplemented();
 }
 
-void LayoutTestController::setGeolocationPermission(bool allow)
+void TestRunner::setGeolocationPermission(bool allow)
 {
     setGeolocationPermissionCommon(allow);
     DumpRenderTreeSupport::setMockGeolocationPermission(BlackBerry::WebKit::DumpRenderTree::currentInstance()->page(), allow);
 }
 
-void LayoutTestController::setViewModeMediaFeature(const JSStringRef mode)
+void TestRunner::setViewModeMediaFeature(const JSStringRef mode)
 {
     notImplemented();
 }
 
-void LayoutTestController::setSerializeHTTPLoads(bool)
+void TestRunner::setSerializeHTTPLoads(bool)
 {
     // FIXME: Implement if needed for https://bugs.webkit.org/show_bug.cgi?id=50758.
     notImplemented();
 }
 
-void LayoutTestController::setMinimumTimerInterval(double)
+void TestRunner::setMinimumTimerInterval(double)
 {
     notImplemented();
 }
 
-void LayoutTestController::setTextDirection(JSStringRef)
+void TestRunner::setTextDirection(JSStringRef)
 {
     notImplemented();
 }
 
-void LayoutTestController::goBack()
+void TestRunner::goBack()
 {
     // FIXME: implement to enable loader/navigation-while-deferring-loads.html
     notImplemented();
 }
 
-void LayoutTestController::setDefersLoading(bool)
+void TestRunner::setDefersLoading(bool)
 {
     // FIXME: implement to enable loader/navigation-while-deferring-loads.html
     notImplemented();
 }
 
-JSValueRef LayoutTestController::originsWithLocalStorage(JSContextRef context)
+JSValueRef TestRunner::originsWithLocalStorage(JSContextRef context)
 {
     notImplemented();
     return JSValueMakeUndefined(context);
 }
 
-void LayoutTestController::observeStorageTrackerNotifications(unsigned)
+void TestRunner::observeStorageTrackerNotifications(unsigned)
 {
     notImplemented();
 }
 
-void LayoutTestController::syncLocalStorage()
+void TestRunner::syncLocalStorage()
 {
     notImplemented();
 }
 
-void LayoutTestController::deleteAllLocalStorage()
+void TestRunner::deleteAllLocalStorage()
 {
     notImplemented();
 }
 
-void LayoutTestController::setAsynchronousSpellCheckingEnabled(bool)
+void TestRunner::setAsynchronousSpellCheckingEnabled(bool)
 {
     notImplemented();
 }
 
-void LayoutTestController::setAutofilled(JSContextRef context, JSValueRef nodeObject, bool autofilled)
+void TestRunner::setAutofilled(JSContextRef context, JSValueRef nodeObject, bool autofilled)
 {
     JSC::ExecState* exec = toJS(context);
     WebCore::Element* element = toElement(toJS(exec, nodeObject));
@@ -728,12 +728,12 @@ void LayoutTestController::setAutofilled(JSContextRef context, JSValueRef nodeOb
     inputElement->setAutofilled(autofilled);
 }
 
-int LayoutTestController::numberOfPendingGeolocationPermissionRequests()
+int TestRunner::numberOfPendingGeolocationPermissionRequests()
 {
     return DumpRenderTreeSupport::numberOfPendingGeolocationPermissionRequests(BlackBerry::WebKit::DumpRenderTree::currentInstance()->page());
 }
 
-bool LayoutTestController::findString(JSContextRef context, JSStringRef target, JSObjectRef optionsArray)
+bool TestRunner::findString(JSContextRef context, JSStringRef target, JSObjectRef optionsArray)
 {
     WebCore::FindOptions options = 0;
 
@@ -774,12 +774,12 @@ bool LayoutTestController::findString(JSContextRef context, JSStringRef target,
         !(options & WebCore::Backwards), !(options & WebCore::CaseInsensitive), true /* wrap */, true /* highlightAllMatches */);
 }
 
-void LayoutTestController::deleteLocalStorageForOrigin(JSStringRef URL)
+void TestRunner::deleteLocalStorageForOrigin(JSStringRef URL)
 {
     // FIXME: Implement.
 }
 
-void LayoutTestController::setValueForUser(JSContextRef context, JSValueRef nodeObject, JSStringRef value)
+void TestRunner::setValueForUser(JSContextRef context, JSValueRef nodeObject, JSStringRef value)
 {
     JSC::ExecState* exec = toJS(context);
     WebCore::Element* element = toElement(toJS(exec, nodeObject));
@@ -792,57 +792,57 @@ void LayoutTestController::setValueForUser(JSContextRef context, JSValueRef node
     inputElement->setValueForUser(jsStringRefToWebCoreString(value));
 }
 
-long long LayoutTestController::applicationCacheDiskUsageForOrigin(JSStringRef origin)
+long long TestRunner::applicationCacheDiskUsageForOrigin(JSStringRef origin)
 {
     // FIXME: Implement to support getting disk usage by all application caches for an origin.
     return 0;
 }
 
-void LayoutTestController::addChromeInputField()
+void TestRunner::addChromeInputField()
 {
 }
 
-void LayoutTestController::removeChromeInputField()
+void TestRunner::removeChromeInputField()
 {
 }
 
-void LayoutTestController::focusWebView()
+void TestRunner::focusWebView()
 {
 }
 
-void LayoutTestController::setBackingScaleFactor(double)
+void TestRunner::setBackingScaleFactor(double)
 {
 }
 
-void LayoutTestController::setMockSpeechInputDumpRect(bool)
+void TestRunner::setMockSpeechInputDumpRect(bool)
 {
 }
 
-void LayoutTestController::simulateDesktopNotificationClick(JSStringRef title)
+void TestRunner::simulateDesktopNotificationClick(JSStringRef title)
 {
 }
 
-void LayoutTestController::resetPageVisibility()
+void TestRunner::resetPageVisibility()
 {
     notImplemented();
 }
 
-void LayoutTestController::setPageVisibility(const char*)
+void TestRunner::setPageVisibility(const char*)
 {
     notImplemented();
 }
 
-void LayoutTestController::setAutomaticLinkDetectionEnabled(bool)
+void TestRunner::setAutomaticLinkDetectionEnabled(bool)
 {
     notImplemented();
 }
 
-void LayoutTestController::sendWebIntentResponse(JSStringRef)
+void TestRunner::sendWebIntentResponse(JSStringRef)
 {
     notImplemented();
 }
 
-void LayoutTestController::deliverWebIntent(JSStringRef, JSStringRef, JSStringRef)
+void TestRunner::deliverWebIntent(JSStringRef, JSStringRef, JSStringRef)
 {
     notImplemented();
 }
index 5d8e7d6..bbc9f9b 100644 (file)
@@ -94,7 +94,7 @@ public:
     virtual void destroy() { }
 };
 
-LayoutTestController::LayoutTestController(TestShell* shell)
+DRTTestRunner::DRTTestRunner(TestShell* shell)
     : m_shell(shell)
     , m_closeRemainingWindows(false)
     , m_deferMainResourceDataLoad(false)
@@ -107,178 +107,178 @@ LayoutTestController::LayoutTestController(TestShell* shell)
     // Initialize the map that associates methods of this class with the names
     // they will use when called by JavaScript. The actual binding of those
     // names to their methods will be done by calling bindToJavaScript() (defined
-    // by CppBoundClass, the parent to LayoutTestController).
-    bindMethod("addFileToPasteboardOnDrag", &LayoutTestController::addFileToPasteboardOnDrag);
+    // by CppBoundClass, the parent to DRTTestRunner).
+    bindMethod("addFileToPasteboardOnDrag", &DRTTestRunner::addFileToPasteboardOnDrag);
 #if ENABLE(INPUT_SPEECH)
-    bindMethod("addMockSpeechInputResult", &LayoutTestController::addMockSpeechInputResult);
-    bindMethod("setMockSpeechInputDumpRect", &LayoutTestController::setMockSpeechInputDumpRect);
+    bindMethod("addMockSpeechInputResult", &DRTTestRunner::addMockSpeechInputResult);
+    bindMethod("setMockSpeechInputDumpRect", &DRTTestRunner::setMockSpeechInputDumpRect);
 #endif
 #if ENABLE(SCRIPTED_SPEECH)
-    bindMethod("addMockSpeechRecognitionResult", &LayoutTestController::addMockSpeechRecognitionResult);
-    bindMethod("setMockSpeechRecognitionError", &LayoutTestController::setMockSpeechRecognitionError);
-    bindMethod("wasMockSpeechRecognitionAborted", &LayoutTestController::wasMockSpeechRecognitionAborted);
+    bindMethod("addMockSpeechRecognitionResult", &DRTTestRunner::addMockSpeechRecognitionResult);
+    bindMethod("setMockSpeechRecognitionError", &DRTTestRunner::setMockSpeechRecognitionError);
+    bindMethod("wasMockSpeechRecognitionAborted", &DRTTestRunner::wasMockSpeechRecognitionAborted);
 #endif
-    bindMethod("addOriginAccessWhitelistEntry", &LayoutTestController::addOriginAccessWhitelistEntry);
-    bindMethod("addUserScript", &LayoutTestController::addUserScript);
-    bindMethod("addUserStyleSheet", &LayoutTestController::addUserStyleSheet);
-    bindMethod("clearAllDatabases", &LayoutTestController::clearAllDatabases);
-    bindMethod("closeWebInspector", &LayoutTestController::closeWebInspector);
+    bindMethod("addOriginAccessWhitelistEntry", &DRTTestRunner::addOriginAccessWhitelistEntry);
+    bindMethod("addUserScript", &DRTTestRunner::addUserScript);
+    bindMethod("addUserStyleSheet", &DRTTestRunner::addUserStyleSheet);
+    bindMethod("clearAllDatabases", &DRTTestRunner::clearAllDatabases);
+    bindMethod("closeWebInspector", &DRTTestRunner::closeWebInspector);
 #if ENABLE(POINTER_LOCK)
-    bindMethod("didLosePointerLock", &LayoutTestController::didLosePointerLock);
+    bindMethod("didLosePointerLock", &DRTTestRunner::didLosePointerLock);
 #endif
-    bindMethod("disableAutoResizeMode", &LayoutTestController::disableAutoResizeMode);
-    bindMethod("disableImageLoading", &LayoutTestController::disableImageLoading);
-    bindMethod("display", &LayoutTestController::display);
-    bindMethod("displayInvalidatedRegion", &LayoutTestController::displayInvalidatedRegion);
-    bindMethod("dumpAsText", &LayoutTestController::dumpAsText);
-    bindMethod("dumpBackForwardList", &LayoutTestController::dumpBackForwardList);
-    bindMethod("dumpChildFramesAsText", &LayoutTestController::dumpChildFramesAsText);
-    bindMethod("dumpChildFrameScrollPositions", &LayoutTestController::dumpChildFrameScrollPositions);
-    bindMethod("dumpDatabaseCallbacks", &LayoutTestController::dumpDatabaseCallbacks);
-    bindMethod("dumpEditingCallbacks", &LayoutTestController::dumpEditingCallbacks);
-    bindMethod("dumpFrameLoadCallbacks", &LayoutTestController::dumpFrameLoadCallbacks);
-    bindMethod("dumpProgressFinishedCallback", &LayoutTestController::dumpProgressFinishedCallback);
-    bindMethod("dumpUserGestureInFrameLoadCallbacks", &LayoutTestController::dumpUserGestureInFrameLoadCallbacks);
-    bindMethod("dumpResourceLoadCallbacks", &LayoutTestController::dumpResourceLoadCallbacks);
-    bindMethod("dumpResourceResponseMIMETypes", &LayoutTestController::dumpResourceResponseMIMETypes);
-    bindMethod("dumpSelectionRect", &LayoutTestController::dumpSelectionRect);
-    bindMethod("dumpStatusCallbacks", &LayoutTestController::dumpWindowStatusChanges);
-    bindMethod("dumpTitleChanges", &LayoutTestController::dumpTitleChanges);
-    bindMethod("dumpPermissionClientCallbacks", &LayoutTestController::dumpPermissionClientCallbacks);
-    bindMethod("dumpCreateView", &LayoutTestController::dumpCreateView);
-    bindMethod("elementDoesAutoCompleteForElementWithId", &LayoutTestController::elementDoesAutoCompleteForElementWithId);
-    bindMethod("enableAutoResizeMode", &LayoutTestController::enableAutoResizeMode);
-    bindMethod("evaluateInWebInspector", &LayoutTestController::evaluateInWebInspector);
-    bindMethod("evaluateScriptInIsolatedWorld", &LayoutTestController::evaluateScriptInIsolatedWorld);
-    bindMethod("evaluateScriptInIsolatedWorldAndReturnValue", &LayoutTestController::evaluateScriptInIsolatedWorldAndReturnValue);
-    bindMethod("setIsolatedWorldSecurityOrigin", &LayoutTestController::setIsolatedWorldSecurityOrigin);
-    bindMethod("execCommand", &LayoutTestController::execCommand);
-    bindMethod("forceRedSelectionColors", &LayoutTestController::forceRedSelectionColors);
+    bindMethod("disableAutoResizeMode", &DRTTestRunner::disableAutoResizeMode);
+    bindMethod("disableImageLoading", &DRTTestRunner::disableImageLoading);
+    bindMethod("display", &DRTTestRunner::display);
+    bindMethod("displayInvalidatedRegion", &DRTTestRunner::displayInvalidatedRegion);
+    bindMethod("dumpAsText", &DRTTestRunner::dumpAsText);
+    bindMethod("dumpBackForwardList", &DRTTestRunner::dumpBackForwardList);
+    bindMethod("dumpChildFramesAsText", &DRTTestRunner::dumpChildFramesAsText);
+    bindMethod("dumpChildFrameScrollPositions", &DRTTestRunner::dumpChildFrameScrollPositions);
+    bindMethod("dumpDatabaseCallbacks", &DRTTestRunner::dumpDatabaseCallbacks);
+    bindMethod("dumpEditingCallbacks", &DRTTestRunner::dumpEditingCallbacks);
+    bindMethod("dumpFrameLoadCallbacks", &DRTTestRunner::dumpFrameLoadCallbacks);
+    bindMethod("dumpProgressFinishedCallback", &DRTTestRunner::dumpProgressFinishedCallback);
+    bindMethod("dumpUserGestureInFrameLoadCallbacks", &DRTTestRunner::dumpUserGestureInFrameLoadCallbacks);
+    bindMethod("dumpResourceLoadCallbacks", &DRTTestRunner::dumpResourceLoadCallbacks);
+    bindMethod("dumpResourceResponseMIMETypes", &DRTTestRunner::dumpResourceResponseMIMETypes);
+    bindMethod("dumpSelectionRect", &DRTTestRunner::dumpSelectionRect);
+    bindMethod("dumpStatusCallbacks", &DRTTestRunner::dumpWindowStatusChanges);
+    bindMethod("dumpTitleChanges", &DRTTestRunner::dumpTitleChanges);
+    bindMethod("dumpPermissionClientCallbacks", &DRTTestRunner::dumpPermissionClientCallbacks);
+    bindMethod("dumpCreateView", &DRTTestRunner::dumpCreateView);
+    bindMethod("elementDoesAutoCompleteForElementWithId", &DRTTestRunner::elementDoesAutoCompleteForElementWithId);
+    bindMethod("enableAutoResizeMode", &DRTTestRunner::enableAutoResizeMode);
+    bindMethod("evaluateInWebInspector", &DRTTestRunner::evaluateInWebInspector);
+    bindMethod("evaluateScriptInIsolatedWorld", &DRTTestRunner::evaluateScriptInIsolatedWorld);
+    bindMethod("evaluateScriptInIsolatedWorldAndReturnValue", &DRTTestRunner::evaluateScriptInIsolatedWorldAndReturnValue);
+    bindMethod("setIsolatedWorldSecurityOrigin", &DRTTestRunner::setIsolatedWorldSecurityOrigin);
+    bindMethod("execCommand", &DRTTestRunner::execCommand);
+    bindMethod("forceRedSelectionColors", &DRTTestRunner::forceRedSelectionColors);
 #if ENABLE(NOTIFICATIONS)
-    bindMethod("grantDesktopNotificationPermission", &LayoutTestController::grantDesktopNotificationPermission);
+    bindMethod("grantDesktopNotificationPermission", &DRTTestRunner::grantDesktopNotificationPermission);
 #endif
-    bindMethod("findString", &LayoutTestController::findString);
-    bindMethod("isCommandEnabled", &LayoutTestController::isCommandEnabled);
-    bindMethod("hasCustomPageSizeStyle", &LayoutTestController::hasCustomPageSizeStyle);
-    bindMethod("layerTreeAsText", &LayoutTestController::layerTreeAsText);
-    bindMethod("loseCompositorContext", &LayoutTestController::loseCompositorContext);
-    bindMethod("markerTextForListItem", &LayoutTestController::markerTextForListItem);
-    bindMethod("notifyDone", &LayoutTestController::notifyDone);
-    bindMethod("numberOfActiveAnimations", &LayoutTestController::numberOfActiveAnimations);
-    bindMethod("numberOfPages", &LayoutTestController::numberOfPages);
-    bindMethod("numberOfPendingGeolocationPermissionRequests", &LayoutTestController:: numberOfPendingGeolocationPermissionRequests);
-    bindMethod("objCIdentityIsEqual", &LayoutTestController::objCIdentityIsEqual);
-    bindMethod("overridePreference", &LayoutTestController::overridePreference);
-    bindMethod("pageProperty", &LayoutTestController::pageProperty);
-    bindMethod("pageSizeAndMarginsInPixels", &LayoutTestController::pageSizeAndMarginsInPixels);
-    bindMethod("pathToLocalResource", &LayoutTestController::pathToLocalResource);
-    bindMethod("pauseAnimationAtTimeOnElementWithId", &LayoutTestController::pauseAnimationAtTimeOnElementWithId);
-    bindMethod("pauseTransitionAtTimeOnElementWithId", &LayoutTestController::pauseTransitionAtTimeOnElementWithId);
-    bindMethod("queueBackNavigation", &LayoutTestController::queueBackNavigation);
-    bindMethod("queueForwardNavigation", &LayoutTestController::queueForwardNavigation);
-    bindMethod("queueLoadingScript", &LayoutTestController::queueLoadingScript);
-    bindMethod("queueLoad", &LayoutTestController::queueLoad);
-    bindMethod("queueLoadHTMLString", &LayoutTestController::queueLoadHTMLString);
-    bindMethod("queueNonLoadingScript", &LayoutTestController::queueNonLoadingScript);
-    bindMethod("queueReload", &LayoutTestController::queueReload);
-    bindMethod("removeOriginAccessWhitelistEntry", &LayoutTestController::removeOriginAccessWhitelistEntry);
-    bindMethod("repaintSweepHorizontally", &LayoutTestController::repaintSweepHorizontally);
-    bindMethod("resetPageVisibility", &LayoutTestController::resetPageVisibility);
-    bindMethod("setAcceptsEditing", &LayoutTestController::setAcceptsEditing);
-    bindMethod("setAllowDisplayOfInsecureContent", &LayoutTestController::setAllowDisplayOfInsecureContent);
-    bindMethod("setAllowFileAccessFromFileURLs", &LayoutTestController::setAllowFileAccessFromFileURLs);
-    bindMethod("setAllowRunningOfInsecureContent", &LayoutTestController::setAllowRunningOfInsecureContent);
-    bindMethod("setAllowUniversalAccessFromFileURLs", &LayoutTestController::setAllowUniversalAccessFromFileURLs);
-    bindMethod("setAlwaysAcceptCookies", &LayoutTestController::setAlwaysAcceptCookies);
-    bindMethod("setAuthorAndUserStylesEnabled", &LayoutTestController::setAuthorAndUserStylesEnabled);
-    bindMethod("setAutofilled", &LayoutTestController::setAutofilled);
-    bindMethod("setCanOpenWindows", &LayoutTestController::setCanOpenWindows);
-    bindMethod("setCloseRemainingWindowsWhenComplete", &LayoutTestController::setCloseRemainingWindowsWhenComplete);
-    bindMethod("setCustomPolicyDelegate", &LayoutTestController::setCustomPolicyDelegate);
-    bindMethod("setDatabaseQuota", &LayoutTestController::setDatabaseQuota);
-    bindMethod("setDeferMainResourceDataLoad", &LayoutTestController::setDeferMainResourceDataLoad);
-    bindMethod("setDomainRelaxationForbiddenForURLScheme", &LayoutTestController::setDomainRelaxationForbiddenForURLScheme);
-    bindMethod("setAudioData", &LayoutTestController::setAudioData);
-    bindMethod("setGeolocationPermission", &LayoutTestController::setGeolocationPermission);
-    bindMethod("setIconDatabaseEnabled", &LayoutTestController::setIconDatabaseEnabled);
-    bindMethod("setJavaScriptCanAccessClipboard", &LayoutTestController::setJavaScriptCanAccessClipboard);
-    bindMethod("setMinimumTimerInterval", &LayoutTestController::setMinimumTimerInterval);
-    bindMethod("setMockDeviceOrientation", &LayoutTestController::setMockDeviceOrientation);
-    bindMethod("setMockGeolocationError", &LayoutTestController::setMockGeolocationError);
-    bindMethod("setMockGeolocationPosition", &LayoutTestController::setMockGeolocationPosition);
-    bindMethod("setPageVisibility", &LayoutTestController::setPageVisibility);
-    bindMethod("setPluginsEnabled", &LayoutTestController::setPluginsEnabled);
+    bindMethod("findString", &DRTTestRunner::findString);
+    bindMethod("isCommandEnabled", &DRTTestRunner::isCommandEnabled);
+    bindMethod("hasCustomPageSizeStyle", &DRTTestRunner::hasCustomPageSizeStyle);
+    bindMethod("layerTreeAsText", &DRTTestRunner::layerTreeAsText);
+    bindMethod("loseCompositorContext", &DRTTestRunner::loseCompositorContext);
+    bindMethod("markerTextForListItem", &DRTTestRunner::markerTextForListItem);
+    bindMethod("notifyDone", &DRTTestRunner::notifyDone);
+    bindMethod("numberOfActiveAnimations", &DRTTestRunner::numberOfActiveAnimations);
+    bindMethod("numberOfPages", &DRTTestRunner::numberOfPages);
+    bindMethod("numberOfPendingGeolocationPermissionRequests", &DRTTestRunner:: numberOfPendingGeolocationPermissionRequests);
+    bindMethod("objCIdentityIsEqual", &DRTTestRunner::objCIdentityIsEqual);
+    bindMethod("overridePreference", &DRTTestRunner::overridePreference);
+    bindMethod("pageProperty", &DRTTestRunner::pageProperty);
+    bindMethod("pageSizeAndMarginsInPixels", &DRTTestRunner::pageSizeAndMarginsInPixels);
+    bindMethod("pathToLocalResource", &DRTTestRunner::pathToLocalResource);
+    bindMethod("pauseAnimationAtTimeOnElementWithId", &DRTTestRunner::pauseAnimationAtTimeOnElementWithId);
+    bindMethod("pauseTransitionAtTimeOnElementWithId", &DRTTestRunner::pauseTransitionAtTimeOnElementWithId);
+    bindMethod("queueBackNavigation", &DRTTestRunner::queueBackNavigation);
+    bindMethod("queueForwardNavigation", &DRTTestRunner::queueForwardNavigation);
+    bindMethod("queueLoadingScript", &DRTTestRunner::queueLoadingScript);
+    bindMethod("queueLoad", &DRTTestRunner::queueLoad);
+    bindMethod("queueLoadHTMLString", &DRTTestRunner::queueLoadHTMLString);
+    bindMethod("queueNonLoadingScript", &DRTTestRunner::queueNonLoadingScript);
+    bindMethod("queueReload", &DRTTestRunner::queueReload);
+    bindMethod("removeOriginAccessWhitelistEntry", &DRTTestRunner::removeOriginAccessWhitelistEntry);
+    bindMethod("repaintSweepHorizontally", &DRTTestRunner::repaintSweepHorizontally);
+    bindMethod("resetPageVisibility", &DRTTestRunner::resetPageVisibility);
+    bindMethod("setAcceptsEditing", &DRTTestRunner::setAcceptsEditing);
+    bindMethod("setAllowDisplayOfInsecureContent", &DRTTestRunner::setAllowDisplayOfInsecureContent);
+    bindMethod("setAllowFileAccessFromFileURLs", &DRTTestRunner::setAllowFileAccessFromFileURLs);
+    bindMethod("setAllowRunningOfInsecureContent", &DRTTestRunner::setAllowRunningOfInsecureContent);
+    bindMethod("setAllowUniversalAccessFromFileURLs", &DRTTestRunner::setAllowUniversalAccessFromFileURLs);
+    bindMethod("setAlwaysAcceptCookies", &DRTTestRunner::setAlwaysAcceptCookies);
+    bindMethod("setAuthorAndUserStylesEnabled", &DRTTestRunner::setAuthorAndUserStylesEnabled);
+    bindMethod("setAutofilled", &DRTTestRunner::setAutofilled);
+    bindMethod("setCanOpenWindows", &DRTTestRunner::setCanOpenWindows);
+    bindMethod("setCloseRemainingWindowsWhenComplete", &DRTTestRunner::setCloseRemainingWindowsWhenComplete);
+    bindMethod("setCustomPolicyDelegate", &DRTTestRunner::setCustomPolicyDelegate);
+    bindMethod("setDatabaseQuota", &DRTTestRunner::setDatabaseQuota);
+    bindMethod("setDeferMainResourceDataLoad", &DRTTestRunner::setDeferMainResourceDataLoad);
+    bindMethod("setDomainRelaxationForbiddenForURLScheme", &DRTTestRunner::setDomainRelaxationForbiddenForURLScheme);
+    bindMethod("setAudioData", &DRTTestRunner::setAudioData);
+    bindMethod("setGeolocationPermission", &DRTTestRunner::setGeolocationPermission);
+    bindMethod("setIconDatabaseEnabled", &DRTTestRunner::setIconDatabaseEnabled);
+    bindMethod("setJavaScriptCanAccessClipboard", &DRTTestRunner::setJavaScriptCanAccessClipboard);
+    bindMethod("setMinimumTimerInterval", &DRTTestRunner::setMinimumTimerInterval);
+    bindMethod("setMockDeviceOrientation", &DRTTestRunner::setMockDeviceOrientation);
+    bindMethod("setMockGeolocationError", &DRTTestRunner::setMockGeolocationError);
+    bindMethod("setMockGeolocationPosition", &DRTTestRunner::setMockGeolocationPosition);
+    bindMethod("setPageVisibility", &DRTTestRunner::setPageVisibility);
+    bindMethod("setPluginsEnabled", &DRTTestRunner::setPluginsEnabled);
 #if ENABLE(POINTER_LOCK)
-    bindMethod("setPointerLockWillFailAsynchronously", &LayoutTestController::setPointerLockWillFailAsynchronously);
-    bindMethod("setPointerLockWillFailSynchronously", &LayoutTestController::setPointerLockWillFailSynchronously);
+    bindMethod("setPointerLockWillFailAsynchronously", &DRTTestRunner::setPointerLockWillFailAsynchronously);
+    bindMethod("setPointerLockWillFailSynchronously", &DRTTestRunner::setPointerLockWillFailSynchronously);
 #endif
-    bindMethod("setPopupBlockingEnabled", &LayoutTestController::setPopupBlockingEnabled);
-    bindMethod("setPOSIXLocale", &LayoutTestController::setPOSIXLocale);
-    bindMethod("setPrinting", &LayoutTestController::setPrinting);
-    bindMethod("setScrollbarPolicy", &LayoutTestController::setScrollbarPolicy);
-    bindMethod("setSelectTrailingWhitespaceEnabled", &LayoutTestController::setSelectTrailingWhitespaceEnabled);
-    bindMethod("setTextSubpixelPositioning", &LayoutTestController::setTextSubpixelPositioning);
-    bindMethod("setBackingScaleFactor", &LayoutTestController::setBackingScaleFactor);
-    bindMethod("setSmartInsertDeleteEnabled", &LayoutTestController::setSmartInsertDeleteEnabled);
-    bindMethod("setStopProvisionalFrameLoads", &LayoutTestController::setStopProvisionalFrameLoads);
-    bindMethod("setTabKeyCyclesThroughElements", &LayoutTestController::setTabKeyCyclesThroughElements);
-    bindMethod("setUserStyleSheetEnabled", &LayoutTestController::setUserStyleSheetEnabled);
-    bindMethod("setUserStyleSheetLocation", &LayoutTestController::setUserStyleSheetLocation);
-    bindMethod("setValueForUser", &LayoutTestController::setValueForUser);
-    bindMethod("setWillSendRequestClearHeader", &LayoutTestController::setWillSendRequestClearHeader);
-    bindMethod("setWillSendRequestReturnsNull", &LayoutTestController::setWillSendRequestReturnsNull);
-    bindMethod("setWillSendRequestReturnsNullOnRedirect", &LayoutTestController::setWillSendRequestReturnsNullOnRedirect);
-    bindMethod("setWindowIsKey", &LayoutTestController::setWindowIsKey);
-    bindMethod("setXSSAuditorEnabled", &LayoutTestController::setXSSAuditorEnabled);
-    bindMethod("setAsynchronousSpellCheckingEnabled", &LayoutTestController::setAsynchronousSpellCheckingEnabled);
-    bindMethod("showWebInspector", &LayoutTestController::showWebInspector);
+    bindMethod("setPopupBlockingEnabled", &DRTTestRunner::setPopupBlockingEnabled);
+    bindMethod("setPOSIXLocale", &DRTTestRunner::setPOSIXLocale);
+    bindMethod("setPrinting", &DRTTestRunner::setPrinting);
+    bindMethod("setScrollbarPolicy", &DRTTestRunner::setScrollbarPolicy);
+    bindMethod("setSelectTrailingWhitespaceEnabled", &DRTTestRunner::setSelectTrailingWhitespaceEnabled);
+    bindMethod("setTextSubpixelPositioning", &DRTTestRunner::setTextSubpixelPositioning);
+    bindMethod("setBackingScaleFactor", &DRTTestRunner::setBackingScaleFactor);
+    bindMethod("setSmartInsertDeleteEnabled", &DRTTestRunner::setSmartInsertDeleteEnabled);
+    bindMethod("setStopProvisionalFrameLoads", &DRTTestRunner::setStopProvisionalFrameLoads);
+    bindMethod("setTabKeyCyclesThroughElements", &DRTTestRunner::setTabKeyCyclesThroughElements);
+    bindMethod("setUserStyleSheetEnabled", &DRTTestRunner::setUserStyleSheetEnabled);
+    bindMethod("setUserStyleSheetLocation", &DRTTestRunner::setUserStyleSheetLocation);
+    bindMethod("setValueForUser", &DRTTestRunner::setValueForUser);
+    bindMethod("setWillSendRequestClearHeader", &DRTTestRunner::setWillSendRequestClearHeader);
+    bindMethod("setWillSendRequestReturnsNull", &DRTTestRunner::setWillSendRequestReturnsNull);
+    bindMethod("setWillSendRequestReturnsNullOnRedirect", &DRTTestRunner::setWillSendRequestReturnsNullOnRedirect);
+    bindMethod("setWindowIsKey", &DRTTestRunner::setWindowIsKey);
+    bindMethod("setXSSAuditorEnabled", &DRTTestRunner::setXSSAuditorEnabled);
+    bindMethod("setAsynchronousSpellCheckingEnabled", &DRTTestRunner::setAsynchronousSpellCheckingEnabled);
+    bindMethod("showWebInspector", &DRTTestRunner::showWebInspector);
 #if ENABLE(NOTIFICATIONS)
-    bindMethod("simulateDesktopNotificationClick", &LayoutTestController::simulateDesktopNotificationClick);
+    bindMethod("simulateDesktopNotificationClick", &DRTTestRunner::simulateDesktopNotificationClick);
 #endif
-    bindMethod("startSpeechInput", &LayoutTestController::startSpeechInput);
-    bindMethod("testRepaint", &LayoutTestController::testRepaint);
-    bindMethod("waitForPolicyDelegate", &LayoutTestController::waitForPolicyDelegate);
-    bindMethod("waitUntilDone", &LayoutTestController::waitUntilDone);
-    bindMethod("windowCount", &LayoutTestController::windowCount);
-    bindMethod("setTextDirection", &LayoutTestController::setTextDirection);
-    bindMethod("setImagesAllowed", &LayoutTestController::setImagesAllowed);
-    bindMethod("setScriptsAllowed", &LayoutTestController::setScriptsAllowed);
-    bindMethod("setStorageAllowed", &LayoutTestController::setStorageAllowed);
-    bindMethod("setPluginsAllowed", &LayoutTestController::setPluginsAllowed);
+    bindMethod("startSpeechInput", &DRTTestRunner::startSpeechInput);
+    bindMethod("testRepaint", &DRTTestRunner::testRepaint);
+    bindMethod("waitForPolicyDelegate", &DRTTestRunner::waitForPolicyDelegate);
+    bindMethod("waitUntilDone", &DRTTestRunner::waitUntilDone);
+    bindMethod("windowCount", &DRTTestRunner::windowCount);
+    bindMethod("setTextDirection", &DRTTestRunner::setTextDirection);
+    bindMethod("setImagesAllowed", &DRTTestRunner::setImagesAllowed);
+    bindMethod("setScriptsAllowed", &DRTTestRunner::setScriptsAllowed);
+    bindMethod("setStorageAllowed", &DRTTestRunner::setStorageAllowed);
+    bindMethod("setPluginsAllowed", &DRTTestRunner::setPluginsAllowed);
 
     // The following are stubs.
-    bindMethod("abortModal", &LayoutTestController::abortModal);
-    bindMethod("accessStoredWebScriptObject", &LayoutTestController::accessStoredWebScriptObject);
-    bindMethod("addDisallowedURL", &LayoutTestController::addDisallowedURL);
-    bindMethod("applicationCacheDiskUsageForOrigin", &LayoutTestController::applicationCacheDiskUsageForOrigin);
-    bindMethod("callShouldCloseOnWebView", &LayoutTestController::callShouldCloseOnWebView);
-    bindMethod("clearAllApplicationCaches", &LayoutTestController::clearAllApplicationCaches);
-    bindMethod("clearApplicationCacheForOrigin", &LayoutTestController::clearApplicationCacheForOrigin);
-    bindMethod("clearBackForwardList", &LayoutTestController::clearBackForwardList);
-    bindMethod("dumpAsWebArchive", &LayoutTestController::dumpAsWebArchive);
-    bindMethod("keepWebHistory", &LayoutTestController::keepWebHistory);
-    bindMethod("objCClassNameOf", &LayoutTestController::objCClassNameOf);
-    bindMethod("setApplicationCacheOriginQuota", &LayoutTestController::setApplicationCacheOriginQuota);
-    bindMethod("setCallCloseOnWebViews", &LayoutTestController::setCallCloseOnWebViews);
-    bindMethod("setMainFrameIsFirstResponder", &LayoutTestController::setMainFrameIsFirstResponder);
-    bindMethod("setPrivateBrowsingEnabled", &LayoutTestController::setPrivateBrowsingEnabled);
-    bindMethod("setUseDashboardCompatibilityMode", &LayoutTestController::setUseDashboardCompatibilityMode);
-    bindMethod("storeWebScriptObject", &LayoutTestController::storeWebScriptObject);
-    bindMethod("deleteAllLocalStorage", &LayoutTestController::deleteAllLocalStorage);
-    bindMethod("localStorageDiskUsageForOrigin", &LayoutTestController::localStorageDiskUsageForOrigin);
-    bindMethod("originsWithLocalStorage", &LayoutTestController::originsWithLocalStorage);
-    bindMethod("deleteLocalStorageForOrigin", &LayoutTestController::deleteLocalStorageForOrigin);
-    bindMethod("observeStorageTrackerNotifications", &LayoutTestController::observeStorageTrackerNotifications);
-    bindMethod("syncLocalStorage", &LayoutTestController::syncLocalStorage);
-    bindMethod("setShouldStayOnPageAfterHandlingBeforeUnload", &LayoutTestController::setShouldStayOnPageAfterHandlingBeforeUnload);
-    bindMethod("enableFixedLayoutMode", &LayoutTestController::enableFixedLayoutMode);
-    bindMethod("setFixedLayoutSize", &LayoutTestController::setFixedLayoutSize);
-    bindMethod("selectionAsMarkup", &LayoutTestController::selectionAsMarkup);
-    bindMethod("setHasCustomFullScreenBehavior", &LayoutTestController::setHasCustomFullScreenBehavior);
-    bindMethod("textSurroundingNode", &LayoutTestController::textSurroundingNode);
+    bindMethod("abortModal", &DRTTestRunner::abortModal);
+    bindMethod("accessStoredWebScriptObject", &DRTTestRunner::accessStoredWebScriptObject);
+    bindMethod("addDisallowedURL", &DRTTestRunner::addDisallowedURL);
+    bindMethod("applicationCacheDiskUsageForOrigin", &DRTTestRunner::applicationCacheDiskUsageForOrigin);
+    bindMethod("callShouldCloseOnWebView", &DRTTestRunner::callShouldCloseOnWebView);
+    bindMethod("clearAllApplicationCaches", &DRTTestRunner::clearAllApplicationCaches);
+    bindMethod("clearApplicationCacheForOrigin", &DRTTestRunner::clearApplicationCacheForOrigin);
+    bindMethod("clearBackForwardList", &DRTTestRunner::clearBackForwardList);
+    bindMethod("dumpAsWebArchive", &DRTTestRunner::dumpAsWebArchive);
+    bindMethod("keepWebHistory", &DRTTestRunner::keepWebHistory);
+    bindMethod("objCClassNameOf", &DRTTestRunner::objCClassNameOf);
+    bindMethod("setApplicationCacheOriginQuota", &DRTTestRunner::setApplicationCacheOriginQuota);
+    bindMethod("setCallCloseOnWebViews", &DRTTestRunner::setCallCloseOnWebViews);
+    bindMethod("setMainFrameIsFirstResponder", &DRTTestRunner::setMainFrameIsFirstResponder);
+    bindMethod("setPrivateBrowsingEnabled", &DRTTestRunner::setPrivateBrowsingEnabled);
+    bindMethod("setUseDashboardCompatibilityMode", &DRTTestRunner::setUseDashboardCompatibilityMode);
+    bindMethod("storeWebScriptObject", &DRTTestRunner::storeWebScriptObject);
+    bindMethod("deleteAllLocalStorage", &DRTTestRunner::deleteAllLocalStorage);
+    bindMethod("localStorageDiskUsageForOrigin", &DRTTestRunner::localStorageDiskUsageForOrigin);
+    bindMethod("originsWithLocalStorage", &DRTTestRunner::originsWithLocalStorage);
+    bindMethod("deleteLocalStorageForOrigin", &DRTTestRunner::deleteLocalStorageForOrigin);
+    bindMethod("observeStorageTrackerNotifications", &DRTTestRunner::observeStorageTrackerNotifications);
+    bindMethod("syncLocalStorage", &DRTTestRunner::syncLocalStorage);
+    bindMethod("setShouldStayOnPageAfterHandlingBeforeUnload", &DRTTestRunner::setShouldStayOnPageAfterHandlingBeforeUnload);
+    bindMethod("enableFixedLayoutMode", &DRTTestRunner::enableFixedLayoutMode);
+    bindMethod("setFixedLayoutSize", &DRTTestRunner::setFixedLayoutSize);
+    bindMethod("selectionAsMarkup", &DRTTestRunner::selectionAsMarkup);
+    bindMethod("setHasCustomFullScreenBehavior", &DRTTestRunner::setHasCustomFullScreenBehavior);
+    bindMethod("textSurroundingNode", &DRTTestRunner::textSurroundingNode);
 
     // The fallback method is called when an unknown method is invoked.
-    bindFallbackMethod(&LayoutTestController::fallbackMethod);
+    bindFallbackMethod(&DRTTestRunner::fallbackMethod);
 
     // Shared properties.
     // globalFlag is used by a number of layout tests in
@@ -289,21 +289,21 @@ LayoutTestController::LayoutTestController(TestShell* shell)
     bindProperty("titleTextDirection", &m_titleTextDirection);
     bindProperty("platformName", &m_platformName);
     bindProperty("interceptPostMessage", &m_interceptPostMessage);
-    bindProperty("workerThreadCount", &LayoutTestController::workerThreadCount);
-    bindMethod("sendWebIntentResponse", &LayoutTestController::sendWebIntentResponse);
-    bindMethod("deliverWebIntent", &LayoutTestController::deliverWebIntent);
+    bindProperty("workerThreadCount", &DRTTestRunner::workerThreadCount);
+    bindMethod("sendWebIntentResponse", &DRTTestRunner::sendWebIntentResponse);
+    bindMethod("deliverWebIntent", &DRTTestRunner::deliverWebIntent);
 }
 
-LayoutTestController::~LayoutTestController()
+DRTTestRunner::~DRTTestRunner()
 {
 }
 
-LayoutTestController::WorkQueue::~WorkQueue()
+DRTTestRunner::WorkQueue::~WorkQueue()
 {
     reset();
 }
 
-void LayoutTestController::WorkQueue::processWorkSoon()
+void DRTTestRunner::WorkQueue::processWorkSoon()
 {
     if (m_controller->m_shell->webViewHost()->topLoadingFrame())
         return;
@@ -315,7 +315,7 @@ void LayoutTestController::WorkQueue::processWorkSoon()
         m_controller->m_shell->testFinished();
 }
 
-void LayoutTestController::WorkQueue::processWork()
+void DRTTestRunner::WorkQueue::processWork()
 {
     TestShell* shell = m_controller->m_shell;
     // Quit doing work once a load is in progress.
@@ -330,14 +330,14 @@ void LayoutTestController::WorkQueue::processWork()
         shell->testFinished();
 }
 
-void LayoutTestController::WorkQueue::reset()
+void DRTTestRunner::WorkQueue::reset()
 {
     m_frozen = false;
     while (!m_queue.isEmpty())
         delete m_queue.takeFirst();
 }
 
-void LayoutTestController::WorkQueue::addWork(WorkItem* work)
+void DRTTestRunner::WorkQueue::addWork(WorkItem* work)
 {
     if (m_frozen) {
         delete work;
@@ -346,7 +346,7 @@ void LayoutTestController::WorkQueue::addWork(WorkItem* work)
     m_queue.append(work);
 }
 
-void LayoutTestController::dumpAsText(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::dumpAsText(const CppArgumentList& arguments, CppVariant* result)
 {
     m_dumpAsText = true;
     m_generatePixelResults = false;
@@ -358,98 +358,98 @@ void LayoutTestController::dumpAsText(const CppArgumentList& arguments, CppVaria
     result->setNull();
 }
 
-void LayoutTestController::dumpDatabaseCallbacks(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::dumpDatabaseCallbacks(const CppArgumentList&, CppVariant* result)
 {
     // Do nothing; we don't use this flag anywhere for now
     result->setNull();
 }
 
-void LayoutTestController::dumpEditingCallbacks(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::dumpEditingCallbacks(const CppArgumentList&, CppVariant* result)
 {
     m_dumpEditingCallbacks = true;
     result->setNull();
 }
 
-void LayoutTestController::dumpBackForwardList(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::dumpBackForwardList(const CppArgumentList&, CppVariant* result)
 {
     m_dumpBackForwardList = true;
     result->setNull();
 }
 
-void LayoutTestController::dumpFrameLoadCallbacks(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::dumpFrameLoadCallbacks(const CppArgumentList&, CppVariant* result)
 {
     m_dumpFrameLoadCallbacks = true;
     result->setNull();
 }
 
-void LayoutTestController::dumpProgressFinishedCallback(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::dumpProgressFinishedCallback(const CppArgumentList&, CppVariant* result)
 {
     m_dumpProgressFinishedCallback = true;
     result->setNull();
 }
 
-void LayoutTestController::dumpUserGestureInFrameLoadCallbacks(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::dumpUserGestureInFrameLoadCallbacks(const CppArgumentList&, CppVariant* result)
 {
     m_dumpUserGestureInFrameLoadCallbacks = true;
     result->setNull();
 }
 
-void LayoutTestController::dumpResourceLoadCallbacks(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::dumpResourceLoadCallbacks(const CppArgumentList&, CppVariant* result)
 {
     m_dumpResourceLoadCallbacks = true;
     result->setNull();
 }
 
-void LayoutTestController::dumpResourceResponseMIMETypes(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::dumpResourceResponseMIMETypes(const CppArgumentList&, CppVariant* result)
 {
     m_dumpResourceResponseMIMETypes = true;
     result->setNull();
 }
 
-void LayoutTestController::dumpChildFrameScrollPositions(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::dumpChildFrameScrollPositions(const CppArgumentList&, CppVariant* result)
 {
     m_dumpChildFrameScrollPositions = true;
     result->setNull();
 }
 
-void LayoutTestController::dumpChildFramesAsText(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::dumpChildFramesAsText(const CppArgumentList&, CppVariant* result)
 {
     m_dumpChildFramesAsText = true;
     result->setNull();
 }
 
-void LayoutTestController::dumpWindowStatusChanges(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::dumpWindowStatusChanges(const CppArgumentList&, CppVariant* result)
 {
     m_dumpWindowStatusChanges = true;
     result->setNull();
 }
 
-void LayoutTestController::dumpTitleChanges(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::dumpTitleChanges(const CppArgumentList&, CppVariant* result)
 {
     m_dumpTitleChanges = true;
     result->setNull();
 }
 
-void LayoutTestController::dumpPermissionClientCallbacks(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::dumpPermissionClientCallbacks(const CppArgumentList&, CppVariant* result)
 {
     m_dumpPermissionClientCallbacks = true;
     result->setNull();
 }
 
-void LayoutTestController::dumpCreateView(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::dumpCreateView(const CppArgumentList&, CppVariant* result)
 {
     m_dumpCreateView = true;
     result->setNull();
 }
 
-void LayoutTestController::setAcceptsEditing(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setAcceptsEditing(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isBool())
         m_acceptsEditing = arguments[0].value.boolValue;
     result->setNull();
 }
 
-void LayoutTestController::waitUntilDone(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::waitUntilDone(const CppArgumentList&, CppVariant* result)
 {
     if (!webkit_support::BeingDebugged())
         postDelayedTask(new NotifyDoneTimedOutTask(this), m_shell->layoutTestTimeout());
@@ -457,7 +457,7 @@ void LayoutTestController::waitUntilDone(const CppArgumentList&, CppVariant* res
     result->setNull();
 }
 
-void LayoutTestController::notifyDone(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::notifyDone(const CppArgumentList&, CppVariant* result)
 {
     // Test didn't timeout. Kill the timeout timer.
     m_taskList.revokeAll();
@@ -466,7 +466,7 @@ void LayoutTestController::notifyDone(const CppArgumentList&, CppVariant* result
     result->setNull();
 }
 
-void LayoutTestController::completeNotifyDone(bool isTimeout)
+void DRTTestRunner::completeNotifyDone(bool isTimeout)
 {
     if (m_waitUntilDone && !m_shell->webViewHost()->topLoadingFrame() && m_workQueue.isEmpty()) {
         if (isTimeout)
@@ -477,7 +477,7 @@ void LayoutTestController::completeNotifyDone(bool isTimeout)
     m_waitUntilDone = false;
 }
 
-class WorkItemBackForward : public LayoutTestController::WorkItem {
+class WorkItemBackForward : public DRTTestRunner::WorkItem {
 public:
     WorkItemBackForward(int distance) : m_distance(distance) { }
     bool run(TestShell* shell)
@@ -490,21 +490,21 @@ private:
     int m_distance;
 };
 
-void LayoutTestController::queueBackNavigation(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::queueBackNavigation(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isNumber())
         m_workQueue.addWork(new WorkItemBackForward(-arguments[0].toInt32()));
     result->setNull();
 }
 
-void LayoutTestController::queueForwardNavigation(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::queueForwardNavigation(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isNumber())
         m_workQueue.addWork(new WorkItemBackForward(arguments[0].toInt32()));
     result->setNull();
 }
 
-class WorkItemReload : public LayoutTestController::WorkItem {
+class WorkItemReload : public DRTTestRunner::WorkItem {
 public:
     bool run(TestShell* shell)
     {
@@ -513,13 +513,13 @@ public:
     }
 };
 
-void LayoutTestController::queueReload(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::queueReload(const CppArgumentList&, CppVariant* result)
 {
     m_workQueue.addWork(new WorkItemReload);
     result->setNull();
 }
 
-class WorkItemLoadingScript : public LayoutTestController::WorkItem {
+class WorkItemLoadingScript : public DRTTestRunner::WorkItem {
 public:
     WorkItemLoadingScript(const string& script) : m_script(script) { }
     bool run(TestShell* shell)
@@ -532,7 +532,7 @@ private:
     string m_script;
 };
 
-class WorkItemNonLoadingScript : public LayoutTestController::WorkItem {
+class WorkItemNonLoadingScript : public DRTTestRunner::WorkItem {
 public:
     WorkItemNonLoadingScript(const string& script) : m_script(script) { }
     bool run(TestShell* shell)
@@ -545,21 +545,21 @@ private:
     string m_script;
 };
 
-void LayoutTestController::queueLoadingScript(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::queueLoadingScript(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isString())
         m_workQueue.addWork(new WorkItemLoadingScript(arguments[0].toString()));
     result->setNull();
 }
 
-void LayoutTestController::queueNonLoadingScript(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::queueNonLoadingScript(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isString())
         m_workQueue.addWork(new WorkItemNonLoadingScript(arguments[0].toString()));
     result->setNull();
 }
 
-class WorkItemLoad : public LayoutTestController::WorkItem {
+class WorkItemLoad : public DRTTestRunner::WorkItem {
 public:
     WorkItemLoad(const WebURL& url, const WebString& target)
         : m_url(url)
@@ -575,7 +575,7 @@ private:
     WebString m_target;
 };
 
-void LayoutTestController::queueLoad(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::queueLoad(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isString()) {
         // FIXME: Implement WebURL::resolve() and avoid GURL.
@@ -591,7 +591,7 @@ void LayoutTestController::queueLoad(const CppArgumentList& arguments, CppVarian
     result->setNull();
 }
 
-class WorkItemLoadHTMLString : public LayoutTestController::WorkItem  {
+class WorkItemLoadHTMLString : public DRTTestRunner::WorkItem  {
 public:
     WorkItemLoadHTMLString(const std::string& html, const WebURL& baseURL)
         : m_html(html)
@@ -613,7 +613,7 @@ private:
     WebURL m_unreachableURL;
 };
 
-void LayoutTestController::queueLoadHTMLString(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::queueLoadHTMLString(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isString()) {
         string html = arguments[0].toString();
@@ -628,7 +628,7 @@ void LayoutTestController::queueLoadHTMLString(const CppArgumentList& arguments,
     result->setNull();
 }
 
-void LayoutTestController::objCIdentityIsEqual(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::objCIdentityIsEqual(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() < 2) {
         // This is the best we can do to return an error.
@@ -638,7 +638,7 @@ void LayoutTestController::objCIdentityIsEqual(const CppArgumentList& arguments,
     result->set(arguments[0].isEqual(arguments[1]));
 }
 
-void LayoutTestController::reset()
+void DRTTestRunner::reset()
 {
     if (m_shell) {
         m_shell->webView()->setZoomLevel(false, 0);
@@ -707,7 +707,7 @@ void LayoutTestController::reset()
 #endif
 }
 
-void LayoutTestController::locationChangeDone()
+void DRTTestRunner::locationChangeDone()
 {
     m_webHistoryItemCount.set(m_shell->navigationEntryCount());
 
@@ -718,72 +718,72 @@ void LayoutTestController::locationChangeDone()
         m_workQueue.processWorkSoon();
 }
 
-void LayoutTestController::policyDelegateDone()
+void DRTTestRunner::policyDelegateDone()
 {
     ASSERT(m_waitUntilDone);
     m_shell->testFinished();
     m_waitUntilDone = false;
 }
 
-void LayoutTestController::setCanOpenWindows(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::setCanOpenWindows(const CppArgumentList&, CppVariant* result)
 {
     m_canOpenWindows = true;
     result->setNull();
 }
 
-void LayoutTestController::setTabKeyCyclesThroughElements(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setTabKeyCyclesThroughElements(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isBool())
         m_shell->webView()->setTabKeyCyclesThroughElements(arguments[0].toBoolean());
     result->setNull();
 }
 
-void LayoutTestController::windowCount(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::windowCount(const CppArgumentList&, CppVariant* result)
 {
     result->set(static_cast<int>(m_shell->windowCount()));
 }
 
-void LayoutTestController::setCloseRemainingWindowsWhenComplete(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setCloseRemainingWindowsWhenComplete(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isBool())
         m_closeRemainingWindows = arguments[0].value.boolValue;
     result->setNull();
 }
 
-void LayoutTestController::setAlwaysAcceptCookies(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setAlwaysAcceptCookies(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0)
         webkit_support::SetAcceptAllCookies(cppVariantToBool(arguments[0]));
     result->setNull();
 }
 
-void LayoutTestController::setAsynchronousSpellCheckingEnabled(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setAsynchronousSpellCheckingEnabled(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isBool())
         m_shell->webView()->settings()->setAsynchronousSpellCheckingEnabled(cppVariantToBool(arguments[0]));
     result->setNull();
 }
 
-void LayoutTestController::showWebInspector(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::showWebInspector(const CppArgumentList&, CppVariant* result)
 {
     m_shell->showDevTools();
     result->setNull();
 }
 
-void LayoutTestController::closeWebInspector(const CppArgumentList& args, CppVariant* result)
+void DRTTestRunner::closeWebInspector(const CppArgumentList& args, CppVariant* result)
 {
     m_shell->closeDevTools();
     result->setNull();
 }
 
-void LayoutTestController::setWindowIsKey(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setWindowIsKey(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isBool())
         m_shell->setFocus(m_shell->webView(), arguments[0].value.boolValue);
     result->setNull();
 }
 
-void LayoutTestController::setUserStyleSheetEnabled(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setUserStyleSheetEnabled(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isBool()) {
         m_shell->preferences()->userStyleSheetLocation = arguments[0].value.boolValue ? m_userStyleSheetLocation : WebURL();
@@ -792,7 +792,7 @@ void LayoutTestController::setUserStyleSheetEnabled(const CppArgumentList& argum
     result->setNull();
 }
 
-void LayoutTestController::setUserStyleSheetLocation(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setUserStyleSheetLocation(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isString()) {
         m_userStyleSheetLocation = webkit_support::LocalFileToDataURL(
@@ -803,7 +803,7 @@ void LayoutTestController::setUserStyleSheetLocation(const CppArgumentList& argu
     result->setNull();
 }
 
-void LayoutTestController::setAuthorAndUserStylesEnabled(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setAuthorAndUserStylesEnabled(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isBool()) {
         m_shell->preferences()->authorAndUserStylesEnabled = arguments[0].value.boolValue;
@@ -812,7 +812,7 @@ void LayoutTestController::setAuthorAndUserStylesEnabled(const CppArgumentList&
     result->setNull();
 }
 
-void LayoutTestController::execCommand(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::execCommand(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
     if (arguments.size() <= 0 || !arguments[0].isString())
@@ -829,7 +829,7 @@ void LayoutTestController::execCommand(const CppArgumentList& arguments, CppVari
     m_shell->webView()->focusedFrame()->executeCommand(WebString::fromUTF8(command), WebString::fromUTF8(value));
 }
 
-void LayoutTestController::isCommandEnabled(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::isCommandEnabled(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() <= 0 || !arguments[0].isString()) {
         result->setNull();
@@ -841,7 +841,7 @@ void LayoutTestController::isCommandEnabled(const CppArgumentList& arguments, Cp
     result->set(rv);
 }
 
-void LayoutTestController::setPopupBlockingEnabled(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setPopupBlockingEnabled(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isBool()) {
         bool blockPopups = arguments[0].toBoolean();
@@ -851,78 +851,78 @@ void LayoutTestController::setPopupBlockingEnabled(const CppArgumentList& argume
     result->setNull();
 }
 
-void LayoutTestController::setImagesAllowed(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setImagesAllowed(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isBool())
         m_shell->webPermissions()->setImagesAllowed(arguments[0].toBoolean());
     result->setNull();
 }
 
-void LayoutTestController::setScriptsAllowed(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setScriptsAllowed(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isBool())
         m_shell->webPermissions()->setScriptsAllowed(arguments[0].toBoolean());
     result->setNull();
 }
 
-void LayoutTestController::setStorageAllowed(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setStorageAllowed(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isBool())
         m_shell->webPermissions()->setStorageAllowed(arguments[0].toBoolean());
     result->setNull();
 }
 
-void LayoutTestController::setPluginsAllowed(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setPluginsAllowed(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isBool())
         m_shell->webPermissions()->setPluginsAllowed(arguments[0].toBoolean());
     result->setNull();
 }
 
-void LayoutTestController::setUseDashboardCompatibilityMode(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::setUseDashboardCompatibilityMode(const CppArgumentList&, CppVariant* result)
 {
     // We have no need to support Dashboard Compatibility Mode (mac-only)
     result->setNull();
 }
 
-void LayoutTestController::clearAllApplicationCaches(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::clearAllApplicationCaches(const CppArgumentList&, CppVariant* result)
 {
     // FIXME: Implement to support application cache quotas.
     result->setNull();
 }
 
-void LayoutTestController::clearApplicationCacheForOrigin(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::clearApplicationCacheForOrigin(const CppArgumentList&, CppVariant* result)
 {
     // FIXME: Implement to support deleting all application cache for an origin.
     result->setNull();
 }
 
-void LayoutTestController::setApplicationCacheOriginQuota(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::setApplicationCacheOriginQuota(const CppArgumentList&, CppVariant* result)
 {
     // FIXME: Implement to support application cache quotas.
     result->setNull();
 }
 
-void LayoutTestController::originsWithApplicationCache(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::originsWithApplicationCache(const CppArgumentList&, CppVariant* result)
 {
     // FIXME: Implement to support getting origins that have application caches.
     result->setNull();
 }
 
-void LayoutTestController::applicationCacheDiskUsageForOrigin(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::applicationCacheDiskUsageForOrigin(const CppArgumentList&, CppVariant* result)
 {
     // FIXME: Implement to support getting disk usage by all application cache for an origin.
     result->setNull();
 }
 
-void LayoutTestController::setScrollbarPolicy(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::setScrollbarPolicy(const CppArgumentList&, CppVariant* result)
 {
     // FIXME: implement.
     // Currently only has a non-null implementation on QT.
     result->setNull();
 }
 
-void LayoutTestController::setCustomPolicyDelegate(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setCustomPolicyDelegate(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isBool()) {
         bool enable = arguments[0].value.boolValue;
@@ -934,14 +934,14 @@ void LayoutTestController::setCustomPolicyDelegate(const CppArgumentList& argume
     result->setNull();
 }
 
-void LayoutTestController::waitForPolicyDelegate(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::waitForPolicyDelegate(const CppArgumentList&, CppVariant* result)
 {
     m_shell->webViewHost()->waitForPolicyDelegate();
     m_waitUntilDone = true;
     result->setNull();
 }
 
-void LayoutTestController::setWillSendRequestClearHeader(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setWillSendRequestClearHeader(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isString()) {
         string header = arguments[0].toString();
@@ -951,21 +951,21 @@ void LayoutTestController::setWillSendRequestClearHeader(const CppArgumentList&
     result->setNull();
 }
 
-void LayoutTestController::setWillSendRequestReturnsNullOnRedirect(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setWillSendRequestReturnsNullOnRedirect(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isBool())
         m_shell->webViewHost()->setBlockRedirects(arguments[0].value.boolValue);
     result->setNull();
 }
 
-void LayoutTestController::setWillSendRequestReturnsNull(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setWillSendRequestReturnsNull(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isBool())
         m_shell->webViewHost()->setRequestReturnNull(arguments[0].value.boolValue);
     result->setNull();
 }
 
-void LayoutTestController::pathToLocalResource(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::pathToLocalResource(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
     if (arguments.size() <= 0 || !arguments[0].isString())
@@ -1003,33 +1003,33 @@ void LayoutTestController::pathToLocalResource(const CppArgumentList& arguments,
     result->set(webkit_support::RewriteLayoutTestsURL(url).spec());
 }
 
-void LayoutTestController::addFileToPasteboardOnDrag(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::addFileToPasteboardOnDrag(const CppArgumentList&, CppVariant* result)
 {
     result->setNull();
     m_shouldAddFileToPasteboard = true;
 }
 
-void LayoutTestController::setStopProvisionalFrameLoads(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::setStopProvisionalFrameLoads(const CppArgumentList&, CppVariant* result)
 {
     result->setNull();
     m_stopProvisionalFrameLoads = true;
 }
 
-void LayoutTestController::setSmartInsertDeleteEnabled(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setSmartInsertDeleteEnabled(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isBool())
         m_shell->webViewHost()->setSmartInsertDeleteEnabled(arguments[0].value.boolValue);
     result->setNull();
 }
 
-void LayoutTestController::setSelectTrailingWhitespaceEnabled(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setSelectTrailingWhitespaceEnabled(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isBool())
         m_shell->webViewHost()->setSelectTrailingWhitespaceEnabled(arguments[0].value.boolValue);
     result->setNull();
 }
 
-bool LayoutTestController::pauseAnimationAtTimeOnElementWithId(const WebString& animationName, double time, const WebString& elementId)
+bool DRTTestRunner::pauseAnimationAtTimeOnElementWithId(const WebString& animationName, double time, const WebString& elementId)
 {
     WebFrame* webFrame = m_shell->webView()->mainFrame();
     if (!webFrame)
@@ -1045,7 +1045,7 @@ bool LayoutTestController::pauseAnimationAtTimeOnElementWithId(const WebString&
     return controller->pauseAnimationAtTime(element, animationName, time);
 }
 
-bool LayoutTestController::pauseTransitionAtTimeOnElementWithId(const WebString& propertyName, double time, const WebString& elementId)
+bool DRTTestRunner::pauseTransitionAtTimeOnElementWithId(const WebString& propertyName, double time, const WebString& elementId)
 {
     WebFrame* webFrame = m_shell->webView()->mainFrame();
     if (!webFrame)
@@ -1061,7 +1061,7 @@ bool LayoutTestController::pauseTransitionAtTimeOnElementWithId(const WebString&
     return controller->pauseTransitionAtTime(element, propertyName, time);
 }
 
-bool LayoutTestController::elementDoesAutoCompleteForElementWithId(const WebString& elementId)
+bool DRTTestRunner::elementDoesAutoCompleteForElementWithId(const WebString& elementId)
 {
     WebFrame* webFrame = m_shell->webView()->mainFrame();
     if (!webFrame)
@@ -1075,7 +1075,7 @@ bool LayoutTestController::elementDoesAutoCompleteForElementWithId(const WebStri
     return inputElement.autoComplete();
 }
 
-int LayoutTestController::numberOfActiveAnimations()
+int DRTTestRunner::numberOfActiveAnimations()
 {
     WebFrame* webFrame = m_shell->webView()->mainFrame();
     if (!webFrame)
@@ -1088,7 +1088,7 @@ int LayoutTestController::numberOfActiveAnimations()
     return controller->numberOfActiveAnimations();
 }
 
-void LayoutTestController::pauseAnimationAtTimeOnElementWithId(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::pauseAnimationAtTimeOnElementWithId(const CppArgumentList& arguments, CppVariant* result)
 {
     result->set(false);
     if (arguments.size() > 2 && arguments[0].isString() && arguments[1].isNumber() && arguments[2].isString()) {
@@ -1099,7 +1099,7 @@ void LayoutTestController::pauseAnimationAtTimeOnElementWithId(const CppArgument
     }
 }
 
-void LayoutTestController::pauseTransitionAtTimeOnElementWithId(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::pauseTransitionAtTimeOnElementWithId(const CppArgumentList& arguments, CppVariant* result)
 {
     result->set(false);
     if (arguments.size() > 2 && arguments[0].isString() && arguments[1].isNumber() && arguments[2].isString()) {
@@ -1110,7 +1110,7 @@ void LayoutTestController::pauseTransitionAtTimeOnElementWithId(const CppArgumen
     }
 }
 
-void LayoutTestController::elementDoesAutoCompleteForElementWithId(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::elementDoesAutoCompleteForElementWithId(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() != 1 || !arguments[0].isString()) {
         result->set(false);
@@ -1120,7 +1120,7 @@ void LayoutTestController::elementDoesAutoCompleteForElementWithId(const CppArgu
     result->set(elementDoesAutoCompleteForElementWithId(elementId));
 }
 
-void LayoutTestController::enableAutoResizeMode(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::enableAutoResizeMode(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() != 4) {
         result->set(false);
@@ -1138,7 +1138,7 @@ void LayoutTestController::enableAutoResizeMode(const CppArgumentList& arguments
     result->set(true);
 }
 
-void LayoutTestController::disableAutoResizeMode(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::disableAutoResizeMode(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() !=2) {
         result->set(false);
@@ -1154,31 +1154,31 @@ void LayoutTestController::disableAutoResizeMode(const CppArgumentList& argument
     result->set(true);
 }
 
-void LayoutTestController::numberOfActiveAnimations(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::numberOfActiveAnimations(const CppArgumentList&, CppVariant* result)
 {
     result->set(numberOfActiveAnimations());
 }
 
-void LayoutTestController::disableImageLoading(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::disableImageLoading(const CppArgumentList&, CppVariant* result)
 {
     m_shell->preferences()->loadsImagesAutomatically = false;
     m_shell->applyPreferences();
     result->setNull();
 }
 
-void LayoutTestController::setIconDatabaseEnabled(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::setIconDatabaseEnabled(const CppArgumentList&, CppVariant* result)
 {
     // We don't use the WebKit icon database.
     result->setNull();
 }
 
-void LayoutTestController::callShouldCloseOnWebView(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::callShouldCloseOnWebView(const CppArgumentList&, CppVariant* result)
 {
     result->set(m_shell->webView()->dispatchBeforeUnloadEvent());
 }
 
 #if ENABLE(NOTIFICATIONS)
-void LayoutTestController::grantDesktopNotificationPermission(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::grantDesktopNotificationPermission(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() != 1 || !arguments[0].isString()) {
         result->set(false);
@@ -1190,7 +1190,7 @@ void LayoutTestController::grantDesktopNotificationPermission(const CppArgumentL
     result->set(true);
 }
 
-void LayoutTestController::simulateDesktopNotificationClick(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::simulateDesktopNotificationClick(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() != 1 || !arguments[0].isString()) {
         result->set(false);
@@ -1205,14 +1205,14 @@ void LayoutTestController::simulateDesktopNotificationClick(const CppArgumentLis
 }
 #endif
 
-void LayoutTestController::setDomainRelaxationForbiddenForURLScheme(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setDomainRelaxationForbiddenForURLScheme(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() != 2 || !arguments[0].isBool() || !arguments[1].isString())
         return;
     m_shell->webView()->setDomainRelaxationForbidden(cppVariantToBool(arguments[0]), cppVariantToWebString(arguments[1]));
 }
 
-void LayoutTestController::setDeferMainResourceDataLoad(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setDeferMainResourceDataLoad(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() == 1)
         m_deferMainResourceDataLoad = cppVariantToBool(arguments[0]);
@@ -1222,23 +1222,23 @@ void LayoutTestController::setDeferMainResourceDataLoad(const CppArgumentList& a
 // Unimplemented stubs
 //
 
-void LayoutTestController::dumpAsWebArchive(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::dumpAsWebArchive(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
 }
 
-void LayoutTestController::setMainFrameIsFirstResponder(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setMainFrameIsFirstResponder(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
 }
 
-void LayoutTestController::dumpSelectionRect(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::dumpSelectionRect(const CppArgumentList& arguments, CppVariant* result)
 {
     m_dumpSelectionRect = true;
     result->setNull();
 }
 
-void LayoutTestController::display(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::display(const CppArgumentList& arguments, CppVariant* result)
 {
     WebViewHost* host = m_shell->webViewHost();
     const WebKit::WebSize& size = m_shell->webView()->size();
@@ -1249,7 +1249,7 @@ void LayoutTestController::display(const CppArgumentList& arguments, CppVariant*
     result->setNull();
 }
 
-void LayoutTestController::displayInvalidatedRegion(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::displayInvalidatedRegion(const CppArgumentList& arguments, CppVariant* result)
 {
     WebViewHost* host = m_shell->webViewHost();
     host->paintInvalidatedRegion();
@@ -1257,59 +1257,59 @@ void LayoutTestController::displayInvalidatedRegion(const CppArgumentList& argum
     result->setNull();
 }
 
-void LayoutTestController::testRepaint(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::testRepaint(const CppArgumentList&, CppVariant* result)
 {
     m_testRepaint = true;
     result->setNull();
 }
 
-void LayoutTestController::repaintSweepHorizontally(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::repaintSweepHorizontally(const CppArgumentList&, CppVariant* result)
 {
     m_sweepHorizontally = true;
     result->setNull();
 }
 
-void LayoutTestController::clearBackForwardList(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::clearBackForwardList(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
 }
 
-void LayoutTestController::keepWebHistory(const CppArgumentList& arguments,  CppVariant* result)
+void DRTTestRunner::keepWebHistory(const CppArgumentList& arguments,  CppVariant* result)
 {
     result->setNull();
 }
 
-void LayoutTestController::storeWebScriptObject(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::storeWebScriptObject(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
 }
 
-void LayoutTestController::accessStoredWebScriptObject(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::accessStoredWebScriptObject(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
 }
 
-void LayoutTestController::objCClassNameOf(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::objCClassNameOf(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
 }
 
-void LayoutTestController::addDisallowedURL(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::addDisallowedURL(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
 }
 
-void LayoutTestController::setCallCloseOnWebViews(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setCallCloseOnWebViews(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
 }
 
-void LayoutTestController::setPrivateBrowsingEnabled(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setPrivateBrowsingEnabled(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
 }
 
-void LayoutTestController::setJavaScriptCanAccessClipboard(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setJavaScriptCanAccessClipboard(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isBool()) {
         m_shell->preferences()->javaScriptCanAccessClipboard = arguments[0].value.boolValue;
@@ -1318,7 +1318,7 @@ void LayoutTestController::setJavaScriptCanAccessClipboard(const CppArgumentList
     result->setNull();
 }
 
-void LayoutTestController::setXSSAuditorEnabled(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setXSSAuditorEnabled(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isBool()) {
         m_shell->preferences()->XSSAuditorEnabled = arguments[0].value.boolValue;
@@ -1327,7 +1327,7 @@ void LayoutTestController::setXSSAuditorEnabled(const CppArgumentList& arguments
     result->setNull();
 }
 
-void LayoutTestController::evaluateScriptInIsolatedWorldAndReturnValue(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::evaluateScriptInIsolatedWorldAndReturnValue(const CppArgumentList& arguments, CppVariant* result)
 {
     v8::HandleScope scope;
     WebVector<v8::Local<v8::Value> > values;
@@ -1357,7 +1357,7 @@ void LayoutTestController::evaluateScriptInIsolatedWorldAndReturnValue(const Cpp
     }
 }
 
-void LayoutTestController::evaluateScriptInIsolatedWorld(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::evaluateScriptInIsolatedWorld(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() >= 2 && arguments[0].isNumber() && arguments[1].isString()) {
         WebScriptSource source(cppVariantToWebString(arguments[1]));
@@ -1368,7 +1368,7 @@ void LayoutTestController::evaluateScriptInIsolatedWorld(const CppArgumentList&
     result->setNull();
 }
 
-void LayoutTestController::setIsolatedWorldSecurityOrigin(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setIsolatedWorldSecurityOrigin(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
 
@@ -1380,7 +1380,7 @@ void LayoutTestController::setIsolatedWorldSecurityOrigin(const CppArgumentList&
         WebSecurityOrigin::createFromString(cppVariantToWebString(arguments[1])));
 }
 
-void LayoutTestController::setAllowUniversalAccessFromFileURLs(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setAllowUniversalAccessFromFileURLs(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isBool()) {
         m_shell->preferences()->allowUniversalAccessFromFileURLs = arguments[0].value.boolValue;
@@ -1389,7 +1389,7 @@ void LayoutTestController::setAllowUniversalAccessFromFileURLs(const CppArgument
     result->setNull();
 }
 
-void LayoutTestController::setAllowDisplayOfInsecureContent(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setAllowDisplayOfInsecureContent(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isBool())
         m_shell->webPermissions()->setDisplayingInsecureContentAllowed(arguments[0].toBoolean());
@@ -1397,7 +1397,7 @@ void LayoutTestController::setAllowDisplayOfInsecureContent(const CppArgumentLis
     result->setNull();
 }
 
-void LayoutTestController::setAllowFileAccessFromFileURLs(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setAllowFileAccessFromFileURLs(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isBool()) {
         m_shell->preferences()->allowFileAccessFromFileURLs = arguments[0].value.boolValue;
@@ -1406,7 +1406,7 @@ void LayoutTestController::setAllowFileAccessFromFileURLs(const CppArgumentList&
     result->setNull();
 }
 
-void LayoutTestController::setAllowRunningOfInsecureContent(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setAllowRunningOfInsecureContent(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isBool())
         m_shell->webPermissions()->setRunningInsecureContentAllowed(arguments[0].value.boolValue);
@@ -1416,7 +1416,7 @@ void LayoutTestController::setAllowRunningOfInsecureContent(const CppArgumentLis
 
 // Need these conversions because the format of the value for booleans
 // may vary - for example, on mac "1" and "0" are used for boolean.
-bool LayoutTestController::cppVariantToBool(const CppVariant& value)
+bool DRTTestRunner::cppVariantToBool(const CppVariant& value)
 {
     if (value.isBool())
         return value.toBoolean();
@@ -1433,7 +1433,7 @@ bool LayoutTestController::cppVariantToBool(const CppVariant& value)
     return false;
 }
 
-int32_t LayoutTestController::cppVariantToInt32(const CppVariant& value)
+int32_t DRTTestRunner::cppVariantToInt32(const CppVariant& value)
 {
     if (value.isNumber())
         return value.toInt32();
@@ -1449,7 +1449,7 @@ int32_t LayoutTestController::cppVariantToInt32(const CppVariant& value)
     return 0;
 }
 
-WebString LayoutTestController::cppVariantToWebString(const CppVariant& value)
+WebString DRTTestRunner::cppVariantToWebString(const CppVariant& value)
 {
     if (!value.isString()) {
         logErrorToConsole("Invalid value for preference. Expected string value.");
@@ -1458,7 +1458,7 @@ WebString LayoutTestController::cppVariantToWebString(const CppVariant& value)
     return WebString::fromUTF8(value.toString());
 }
 
-Vector<WebString> LayoutTestController::cppVariantToWebStringArray(const CppVariant& value)
+Vector<WebString> DRTTestRunner::cppVariantToWebStringArray(const CppVariant& value)
 {
     if (!value.isObject()) {
         logErrorToConsole("Invalid value for preference. Expected object value.");
@@ -1488,7 +1488,7 @@ static void setFontMap(WebPreferences::ScriptFontFamilyMap& map, const Vector<We
     }
 }
 
-void LayoutTestController::overridePreference(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::overridePreference(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
     if (arguments.size() != 2 || !arguments[0].isString())
@@ -1591,13 +1591,13 @@ void LayoutTestController::overridePreference(const CppArgumentList& arguments,
     m_shell->applyPreferences();
 }
 
-void LayoutTestController::fallbackMethod(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::fallbackMethod(const CppArgumentList&, CppVariant* result)
 {
-    printf("CONSOLE MESSAGE: JavaScript ERROR: unknown method called on LayoutTestController\n");
+    printf("CONSOLE MESSAGE: JavaScript ERROR: unknown method called on DRTTestRunner\n");
     result->setNull();
 }
 
-void LayoutTestController::addOriginAccessWhitelistEntry(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::addOriginAccessWhitelistEntry(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
 
@@ -1616,7 +1616,7 @@ void LayoutTestController::addOriginAccessWhitelistEntry(const CppArgumentList&
         arguments[3].toBoolean());
 }
 
-void LayoutTestController::removeOriginAccessWhitelistEntry(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::removeOriginAccessWhitelistEntry(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
 
@@ -1635,20 +1635,20 @@ void LayoutTestController::removeOriginAccessWhitelistEntry(const CppArgumentLis
         arguments[3].toBoolean());
 }
 
-void LayoutTestController::clearAllDatabases(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::clearAllDatabases(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
     webkit_support::ClearAllDatabases();
 }
 
-void LayoutTestController::setDatabaseQuota(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setDatabaseQuota(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
     if ((arguments.size() >= 1) && arguments[0].isNumber())
         webkit_support::SetDatabaseQuota(arguments[0].toInt32());
 }
 
-void LayoutTestController::setPOSIXLocale(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setPOSIXLocale(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
     if (arguments.size() == 1 && arguments[0].isString())
@@ -1715,13 +1715,13 @@ static bool parsePageNumberSizeMargins(const CppArgumentList& arguments, int arg
     return true;
 }
 
-void LayoutTestController::setPrinting(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setPrinting(const CppArgumentList& arguments, CppVariant* result)
 {
     setIsPrinting(true);
     result->setNull();
 }
 
-void LayoutTestController::pageSizeAndMarginsInPixels(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::pageSizeAndMarginsInPixels(const CppArgumentList& arguments, CppVariant* result)
 {
     result->set("");
     int pageNumber = 0;
@@ -1746,7 +1746,7 @@ void LayoutTestController::pageSizeAndMarginsInPixels(const CppArgumentList& arg
     result->set(resultString.str());
 }
 
-void LayoutTestController::hasCustomPageSizeStyle(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::hasCustomPageSizeStyle(const CppArgumentList& arguments, CppVariant* result)
 {
     result->set(false);
     int pageIndex = 0;
@@ -1758,7 +1758,7 @@ void LayoutTestController::hasCustomPageSizeStyle(const CppArgumentList& argumen
     result->set(frame->hasCustomPageSizeStyle(pageIndex));
 }
 
-void LayoutTestController::pageProperty(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::pageProperty(const CppArgumentList& arguments, CppVariant* result)
 {
     result->set("");
     int pageNumber = 0;
@@ -1775,7 +1775,7 @@ void LayoutTestController::pageProperty(const CppArgumentList& arguments, CppVar
     frame->printEnd();
 }
 
-void LayoutTestController::numberOfPages(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::numberOfPages(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
     int pageWidthInPixels = 0;
@@ -1792,7 +1792,7 @@ void LayoutTestController::numberOfPages(const CppArgumentList& arguments, CppVa
     result->set(numberOfPages);
 }
 
-void LayoutTestController::numberOfPendingGeolocationPermissionRequests(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::numberOfPendingGeolocationPermissionRequests(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
     Vector<WebViewHost*> windowList = m_shell->windowList();
@@ -1802,14 +1802,14 @@ void LayoutTestController::numberOfPendingGeolocationPermissionRequests(const Cp
     result->set(numberOfRequests);
 }
 
-void LayoutTestController::logErrorToConsole(const std::string& text)
+void DRTTestRunner::logErrorToConsole(const std::string& text)
 {
     m_shell->webViewHost()->didAddMessageToConsole(
         WebConsoleMessage(WebConsoleMessage::LevelError, WebString::fromUTF8(text)),
         WebString(), 0);
 }
 
-void LayoutTestController::evaluateInWebInspector(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::evaluateInWebInspector(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
     if (arguments.size() < 2 || !arguments[0].isNumber() || !arguments[1].isString())
@@ -1817,13 +1817,13 @@ void LayoutTestController::evaluateInWebInspector(const CppArgumentList& argumen
     m_shell->drtDevToolsAgent()->evaluateInWebInspector(arguments[0].toInt32(), arguments[1].toString());
 }
 
-void LayoutTestController::forceRedSelectionColors(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::forceRedSelectionColors(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
     m_shell->webView()->setSelectionColors(0xffee0000, 0xff00ee00, 0xff000000, 0xffc0c0c0);
 }
 
-void LayoutTestController::addUserScript(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::addUserScript(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
     if (arguments.size() < 3 || !arguments[0].isString() || !arguments[1].isBool() || !arguments[2].isBool())
@@ -1834,7 +1834,7 @@ void LayoutTestController::addUserScript(const CppArgumentList& arguments, CppVa
         arguments[2].toBoolean() ? WebView::UserContentInjectInAllFrames : WebView::UserContentInjectInTopFrameOnly);
 }
 
-void LayoutTestController::addUserStyleSheet(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::addUserStyleSheet(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
     if (arguments.size() < 2 || !arguments[0].isString() || !arguments[1].isBool())
@@ -1847,7 +1847,7 @@ void LayoutTestController::addUserStyleSheet(const CppArgumentList& arguments, C
         WebView::UserStyleInjectInExistingDocuments);
 }
 
-void LayoutTestController::setMockDeviceOrientation(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setMockDeviceOrientation(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
     if (arguments.size() < 6 || !arguments[0].isBool() || !arguments[1].isNumber() || !arguments[2].isBool() || !arguments[3].isNumber() || !arguments[4].isBool() || !arguments[5].isNumber())
@@ -1870,7 +1870,7 @@ void LayoutTestController::setMockDeviceOrientation(const CppArgumentList& argum
 
 // FIXME: For greater test flexibility, we should be able to set each page's geolocation mock individually.
 // https://bugs.webkit.org/show_bug.cgi?id=52368
-void LayoutTestController::setGeolocationPermission(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setGeolocationPermission(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
     if (arguments.size() < 1 || !arguments[0].isBool())
@@ -1880,7 +1880,7 @@ void LayoutTestController::setGeolocationPermission(const CppArgumentList& argum
         windowList[i]->geolocationClientMock()->setPermission(arguments[0].toBoolean());
 }
 
-void LayoutTestController::setMockGeolocationPosition(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setMockGeolocationPosition(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
     if (arguments.size() < 3 || !arguments[0].isNumber() || !arguments[1].isNumber() || !arguments[2].isNumber())
@@ -1890,7 +1890,7 @@ void LayoutTestController::setMockGeolocationPosition(const CppArgumentList& arg
         windowList[i]->geolocationClientMock()->setPosition(arguments[0].toDouble(), arguments[1].toDouble(), arguments[2].toDouble());
 }
 
-void LayoutTestController::setMockGeolocationError(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setMockGeolocationError(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
     if (arguments.size() < 2 || !arguments[0].isNumber() || !arguments[1].isString())
@@ -1900,13 +1900,13 @@ void LayoutTestController::setMockGeolocationError(const CppArgumentList& argume
         windowList[i]->geolocationClientMock()->setError(arguments[0].toInt32(), cppVariantToWebString(arguments[1]));
 }
 
-void LayoutTestController::abortModal(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::abortModal(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
 }
 
 #if ENABLE(INPUT_SPEECH)
-void LayoutTestController::addMockSpeechInputResult(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::addMockSpeechInputResult(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
     if (arguments.size() < 3 || !arguments[0].isString() || !arguments[1].isNumber() || !arguments[2].isString())
@@ -1916,7 +1916,7 @@ void LayoutTestController::addMockSpeechInputResult(const CppArgumentList& argum
         controller->addMockRecognitionResult(cppVariantToWebString(arguments[0]), arguments[1].toDouble(), cppVariantToWebString(arguments[2]));
 }
 
-void LayoutTestController::setMockSpeechInputDumpRect(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setMockSpeechInputDumpRect(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
     if (arguments.size() < 1 || !arguments[0].isBool())
@@ -1928,7 +1928,7 @@ void LayoutTestController::setMockSpeechInputDumpRect(const CppArgumentList& arg
 #endif
 
 #if ENABLE(SCRIPTED_SPEECH)
-void LayoutTestController::addMockSpeechRecognitionResult(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::addMockSpeechRecognitionResult(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
     if (arguments.size() < 2 || !arguments[0].isString() || !arguments[1].isNumber())
@@ -1938,7 +1938,7 @@ void LayoutTestController::addMockSpeechRecognitionResult(const CppArgumentList&
         recognizer->addMockResult(cppVariantToWebString(arguments[0]), arguments[1].toDouble());
 }
 
-void LayoutTestController::setMockSpeechRecognitionError(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setMockSpeechRecognitionError(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
     if (arguments.size() < 2 || !arguments[0].isNumber() || !arguments[1].isString())
@@ -1948,7 +1948,7 @@ void LayoutTestController::setMockSpeechRecognitionError(const CppArgumentList&
         recognizer->setError(arguments[0].toInt32(), cppVariantToWebString(arguments[1]));
 }
 
-void LayoutTestController::wasMockSpeechRecognitionAborted(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::wasMockSpeechRecognitionAborted(const CppArgumentList&, CppVariant* result)
 {
     result->set(false);
     if (MockWebSpeechRecognizer* recognizer = m_shell->webViewHost()->mockSpeechRecognizer())
@@ -1956,7 +1956,7 @@ void LayoutTestController::wasMockSpeechRecognitionAborted(const CppArgumentList
 }
 #endif
 
-void LayoutTestController::startSpeechInput(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::startSpeechInput(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
     if (arguments.size() != 1)
@@ -1976,12 +1976,12 @@ void LayoutTestController::startSpeechInput(const CppArgumentList& arguments, Cp
     input->startSpeechInput();
 }
 
-void LayoutTestController::layerTreeAsText(const CppArgumentList& args, CppVariant* result)
+void DRTTestRunner::layerTreeAsText(const CppArgumentList& args, CppVariant* result)
 {
     result->set(m_shell->webView()->mainFrame()->layerTreeAsText(m_showDebugLayerTree).utf8());
 }
 
-void LayoutTestController::loseCompositorContext(const CppArgumentList& args, CppVariant*)
+void DRTTestRunner::loseCompositorContext(const CppArgumentList& args, CppVariant*)
 {
     int numTimes;
     if (args.size() == 1 || !args[0].isNumber())
@@ -1991,7 +1991,7 @@ void LayoutTestController::loseCompositorContext(const CppArgumentList& args, Cp
     m_shell->webView()->loseCompositorContext(numTimes);
 }
 
-void LayoutTestController::markerTextForListItem(const CppArgumentList& args, CppVariant* result)
+void DRTTestRunner::markerTextForListItem(const CppArgumentList& args, CppVariant* result)
 {
     WebElement element;
     if (!WebBindings::getElement(args[0].value.objectValue, &element))
@@ -2000,7 +2000,7 @@ void LayoutTestController::markerTextForListItem(const CppArgumentList& args, Cp
         result->set(element.document().frame()->markerTextForListItem(element).utf8());
 }
 
-void LayoutTestController::findString(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::findString(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() < 1 || !arguments[0].isString())
         return;
@@ -2028,7 +2028,7 @@ void LayoutTestController::findString(const CppArgumentList& arguments, CppVaria
     result->set(findResult);
 }
 
-void LayoutTestController::setMinimumTimerInterval(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setMinimumTimerInterval(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
     if (arguments.size() < 1 || !arguments[0].isNumber())
@@ -2036,7 +2036,7 @@ void LayoutTestController::setMinimumTimerInterval(const CppArgumentList& argume
     m_shell->webView()->settings()->setMinimumTimerInterval(arguments[0].toDouble());
 }
 
-void LayoutTestController::setAutofilled(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setAutofilled(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
     if (arguments.size() != 2 || !arguments[1].isBool())
@@ -2053,7 +2053,7 @@ void LayoutTestController::setAutofilled(const CppArgumentList& arguments, CppVa
     input->setAutofilled(arguments[1].value.boolValue);
 }
 
-void LayoutTestController::setValueForUser(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setValueForUser(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
     if (arguments.size() != 2)
@@ -2070,37 +2070,37 @@ void LayoutTestController::setValueForUser(const CppArgumentList& arguments, Cpp
     input->setValue(cppVariantToWebString(arguments[1]), true);
 }
 
-void LayoutTestController::deleteAllLocalStorage(const CppArgumentList& arguments, CppVariant*)
+void DRTTestRunner::deleteAllLocalStorage(const CppArgumentList& arguments, CppVariant*)
 {
     // Not Implemented
 }
 
-void LayoutTestController::localStorageDiskUsageForOrigin(const CppArgumentList& arguments, CppVariant*)
+void DRTTestRunner::localStorageDiskUsageForOrigin(const CppArgumentList& arguments, CppVariant*)
 {
     // Not Implemented
 }
 
-void LayoutTestController::originsWithLocalStorage(const CppArgumentList& arguments, CppVariant*)
+void DRTTestRunner::originsWithLocalStorage(const CppArgumentList& arguments, CppVariant*)
 {
     // Not Implemented
 }
 
-void LayoutTestController::deleteLocalStorageForOrigin(const CppArgumentList& arguments, CppVariant*)
+void DRTTestRunner::deleteLocalStorageForOrigin(const CppArgumentList& arguments, CppVariant*)
 {
     // Not Implemented
 }
 
-void LayoutTestController::observeStorageTrackerNotifications(const CppArgumentList&, CppVariant*)
+void DRTTestRunner::observeStorageTrackerNotifications(const CppArgumentList&, CppVariant*)
 {
     // Not Implemented
 }
 
-void LayoutTestController::syncLocalStorage(const CppArgumentList&, CppVariant*)
+void DRTTestRunner::syncLocalStorage(const CppArgumentList&, CppVariant*)
 {
     // Not Implemented
 }
 
-void LayoutTestController::setShouldStayOnPageAfterHandlingBeforeUnload(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setShouldStayOnPageAfterHandlingBeforeUnload(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() == 1 && arguments[0].isBool())
         m_shouldStayOnPageAfterHandlingBeforeUnload = arguments[0].toBoolean();
@@ -2108,7 +2108,7 @@ void LayoutTestController::setShouldStayOnPageAfterHandlingBeforeUnload(const Cp
     result->setNull();
 }
 
-void LayoutTestController::enableFixedLayoutMode(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::enableFixedLayoutMode(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
     if (arguments.size() <  1 || !arguments[0].isBool())
@@ -2117,7 +2117,7 @@ void LayoutTestController::enableFixedLayoutMode(const CppArgumentList& argument
     m_shell->webView()->enableFixedLayoutMode(enableFixedLayout);
 }
 
-void LayoutTestController::setFixedLayoutSize(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setFixedLayoutSize(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
     if (arguments.size() <  2 || !arguments[0].isNumber() || !arguments[1].isNumber())
@@ -2127,17 +2127,17 @@ void LayoutTestController::setFixedLayoutSize(const CppArgumentList& arguments,
     m_shell->webView()->setFixedLayoutSize(WebSize(width, height));
 }
 
-void LayoutTestController::selectionAsMarkup(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::selectionAsMarkup(const CppArgumentList& arguments, CppVariant* result)
 {
     result->set(m_shell->webView()->mainFrame()->selectionAsMarkup().utf8());
 }
 
-void LayoutTestController::workerThreadCount(CppVariant* result)
+void DRTTestRunner::workerThreadCount(CppVariant* result)
 {
     result->set(static_cast<int>(WebWorkerInfo::dedicatedWorkerCount()));
 }
 
-void LayoutTestController::sendWebIntentResponse(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::sendWebIntentResponse(const CppArgumentList& arguments, CppVariant* result)
 {
     v8::HandleScope scope;
     v8::Local<v8::Context> ctx = m_shell->webView()->mainFrame()->mainWorldScriptContext();
@@ -2159,7 +2159,7 @@ void LayoutTestController::sendWebIntentResponse(const CppArgumentList& argument
     result->setNull();
 }
 
-void LayoutTestController::deliverWebIntent(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::deliverWebIntent(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() <  3)
         return;
@@ -2180,7 +2180,7 @@ void LayoutTestController::deliverWebIntent(const CppArgumentList& arguments, Cp
     m_shell->webView()->mainFrame()->deliverIntent(intent, 0, m_intentClient.get());
 }
 
-void LayoutTestController::setTextSubpixelPositioning(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setTextSubpixelPositioning(const CppArgumentList& arguments, CppVariant* result)
 {
 #if OS(LINUX) || OS(ANDROID)
     // Since FontConfig doesn't provide a variable to control subpixel positioning, we'll fall back
@@ -2191,10 +2191,10 @@ void LayoutTestController::setTextSubpixelPositioning(const CppArgumentList& arg
     result->setNull();
 }
 
-class InvokeCallbackTask : public MethodTask<LayoutTestController> {
+class InvokeCallbackTask : public MethodTask<DRTTestRunner> {
 public:
-    InvokeCallbackTask(LayoutTestController* object, PassOwnArrayPtr<CppVariant> callbackArguments, uint32_t numberOfArguments)
-        : MethodTask<LayoutTestController>(object)
+    InvokeCallbackTask(DRTTestRunner* object, PassOwnArrayPtr<CppVariant> callbackArguments, uint32_t numberOfArguments)
+        : MethodTask<DRTTestRunner>(object)
         , m_callbackArguments(callbackArguments)
         , m_numberOfArguments(numberOfArguments)
     {
@@ -2211,7 +2211,7 @@ private:
     uint32_t m_numberOfArguments;
 };
 
-void LayoutTestController::setBackingScaleFactor(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setBackingScaleFactor(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() < 2 || !arguments[0].isNumber() || !arguments[1].isObject())
         return;
@@ -2225,7 +2225,7 @@ void LayoutTestController::setBackingScaleFactor(const CppArgumentList& argument
     postTask(new InvokeCallbackTask(this, callbackArguments.release(), 1));
 }
 
-void LayoutTestController::setPluginsEnabled(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setPluginsEnabled(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isBool()) {
         m_shell->preferences()->pluginsEnabled = arguments[0].toBoolean();
@@ -2234,12 +2234,12 @@ void LayoutTestController::setPluginsEnabled(const CppArgumentList& arguments, C
     result->setNull();
 }
 
-void LayoutTestController::resetPageVisibility(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::resetPageVisibility(const CppArgumentList& arguments, CppVariant* result)
 {
     m_shell->webView()->setVisibilityState(WebPageVisibilityStateVisible, true);
 }
 
-void LayoutTestController::setPageVisibility(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setPageVisibility(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isString()) {
         string newVisibility = arguments[0].toString();
@@ -2254,12 +2254,12 @@ void LayoutTestController::setPageVisibility(const CppArgumentList& arguments, C
     }
 }
 
-void LayoutTestController::setAutomaticLinkDetectionEnabled(bool)
+void DRTTestRunner::setAutomaticLinkDetectionEnabled(bool)
 {
     // Not Implemented
 }
 
-void LayoutTestController::setTextDirection(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setTextDirection(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
     if (arguments.size() != 1 || !arguments[0].isString())
@@ -2280,7 +2280,7 @@ void LayoutTestController::setTextDirection(const CppArgumentList& arguments, Cp
     m_shell->webView()->setTextDirection(direction);
 }
 
-void LayoutTestController::setAudioData(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setAudioData(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
 
@@ -2297,7 +2297,7 @@ void LayoutTestController::setAudioData(const CppArgumentList& arguments, CppVar
     setShouldDumpAsAudio(true);
 }
 
-void LayoutTestController::setHasCustomFullScreenBehavior(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setHasCustomFullScreenBehavior(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
     if (arguments.size() <  1 || !arguments[0].isBool())
@@ -2306,26 +2306,26 @@ void LayoutTestController::setHasCustomFullScreenBehavior(const CppArgumentList&
 }
 
 #if ENABLE(POINTER_LOCK)
-void LayoutTestController::didLosePointerLock(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::didLosePointerLock(const CppArgumentList&, CppVariant* result)
 {
     m_shell->webViewHost()->didLosePointerLock();
     result->setNull();
 }
 
-void LayoutTestController::setPointerLockWillFailAsynchronously(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::setPointerLockWillFailAsynchronously(const CppArgumentList&, CppVariant* result)
 {
     m_shell->webViewHost()->setPointerLockWillFailAsynchronously();
     result->setNull();
 }
 
-void LayoutTestController::setPointerLockWillFailSynchronously(const CppArgumentList&, CppVariant* result)
+void DRTTestRunner::setPointerLockWillFailSynchronously(const CppArgumentList&, CppVariant* result)
 {
     m_shell->webViewHost()->setPointerLockWillFailSynchronously();
     result->setNull();
 }
 #endif
 
-void LayoutTestController::textSurroundingNode(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::textSurroundingNode(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
     if (arguments.size() < 4 || !arguments[0].isObject() || !arguments[1].isNumber() || !arguments[2].isNumber() || !arguments[3].isNumber())
index 5834850..e9c0171 100644 (file)
@@ -30,8 +30,8 @@
  */
 
 /*
-  LayoutTestController class:
-  Bound to a JavaScript window.layoutTestController object using the
+  DRTTestRunner class:
+  Bound to a JavaScript window.testRunner object using the
   CppBoundClass::bindToJavascript(), this allows layout tests that are run in
   the test_shell (or, in principle, any web page loaded into a client app built
   with this class) to control various aspects of how the tests are run and what
 
 class TestShell;
 
-class LayoutTestController : public TestRunner {
+class DRTTestRunner : public TestRunner {
 public:
     // Builds the property and method lists needed to bind this class to a JS
     // object.
-    LayoutTestController(TestShell*);
+    DRTTestRunner(TestShell*);
 
-    ~LayoutTestController();
+    ~DRTTestRunner();
 
     // This function sets a flag that tells the test_shell to dump pages as
     // plain text, rather than as a text representation of the renderer's state.
@@ -345,7 +345,7 @@ public:
     void setMockGeolocationPosition(const CppArgumentList&, CppVariant*);
     void setMockGeolocationError(const CppArgumentList&, CppVariant*);
 
-    // Empty stub method to keep parity with object model exposed by global LayoutTestController.
+    // Empty stub method to keep parity with object model exposed by global DRTTestRunner.
     void abortModal(const CppArgumentList&, CppVariant*);
 
     // Speech input related functions.
@@ -528,7 +528,7 @@ private:
     // queueScript.
     class WorkQueue {
     public:
-        WorkQueue(LayoutTestController* controller) : m_frozen(false), m_controller(controller) { }
+        WorkQueue(DRTTestRunner* controller) : m_frozen(false), m_controller(controller) { }
         virtual ~WorkQueue();
         void processWorkSoon();
 
@@ -552,7 +552,7 @@ private:
         TaskList m_taskList;
         Deque<WorkItem*> m_queue;
         bool m_frozen;
-        LayoutTestController* m_controller;
+        DRTTestRunner* m_controller;
     };
 
     // Support for overridePreference.
@@ -563,9 +563,9 @@ private:
 
     void logErrorToConsole(const std::string&);
     void completeNotifyDone(bool isTimeout);
-    class NotifyDoneTimedOutTask: public MethodTask<LayoutTestController> {
+    class NotifyDoneTimedOutTask: public MethodTask<DRTTestRunner> {
     public:
-        NotifyDoneTimedOutTask(LayoutTestController* object): MethodTask<LayoutTestController>(object) { }
+        NotifyDoneTimedOutTask(DRTTestRunner* object): MethodTask<DRTTestRunner>(object) { }
         virtual void runIfValid() { m_object->completeNotifyDone(true); }
     };
 
@@ -578,7 +578,7 @@ private:
     // Used for test timeouts.
     TaskList m_taskList;
 
-    // Non-owning pointer. The LayoutTestController is owned by the host.
+    // Non-owning pointer. The DRTTestRunner is owned by the host.
     TestShell* m_shell;
 
     // If true, the test_shell will produce a plain text dump rather than a
@@ -717,4 +717,4 @@ private:
     bool m_hasCustomFullScreenBehavior;
 };
 
-#endif // LayoutTestController_h
+#endif // DRTTestRunner_h
index ae5502c..9a8bd7f 100644 (file)
@@ -252,7 +252,7 @@ int main(int argc, char* argv[])
         shell.callJSGC();
         shell.callJSGC();
 
-        // When we finish the last test, cleanup the LayoutTestController.
+        // 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();
index 5fed178..e98cc72 100644 (file)
@@ -46,10 +46,10 @@ public:
     explicit NotificationPresenter(TestShell*) { }
     virtual ~NotificationPresenter();
 
-    // Called by the LayoutTestController to simulate a user granting permission.
+    // Called by the DRTTestRunner to simulate a user granting permission.
     void grantPermission(const WebKit::WebString& origin);
 
-    // Called by the LayoutTestController to simulate a user clicking on a notification.
+    // Called by the DRTTestRunner to simulate a user clicking on a notification.
     bool simulateClick(const WebKit::WebString& notificationIdentifier);
 
     // WebKit::WebNotificationPresenter interface
index 174a1cf..9fe0b4d 100644 (file)
@@ -151,7 +151,7 @@ void TestShell::initialize()
 {
     m_webPermissions = adoptPtr(new WebPermissions(this));
     m_testInterfaces = adoptPtr(new TestInterfaces());
-    m_layoutTestController = adoptPtr(new LayoutTestController(this));
+    m_testRunner = adoptPtr(new DRTTestRunner(this));
 #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
     m_notificationPresenter = adoptPtr(new NotificationPresenter(this));
 #endif
@@ -240,11 +240,11 @@ void TestShell::runFileTest(const TestParams& params, bool shouldDumpPixels)
     m_params = params;
     string testUrl = m_params.testUrl.spec();
 
-    m_layoutTestController->setShouldGeneratePixelResults(shouldDumpPixels);
+    m_testRunner->setShouldGeneratePixelResults(shouldDumpPixels);
 
     if (testUrl.find("loading/") != string::npos
         || testUrl.find("loading\\") != string::npos)
-        m_layoutTestController->setShouldDumpFrameLoadCallbacks(true);
+        m_testRunner->setShouldDumpFrameLoadCallbacks(true);
 
     if (testUrl.find("compositing/") != string::npos || testUrl.find("compositing\\") != string::npos) {
         m_prefs.acceleratedCompositingForVideoEnabled = true;
@@ -256,8 +256,8 @@ void TestShell::runFileTest(const TestParams& params, bool shouldDumpPixels)
 
     if (testUrl.find("/dumpAsText/") != string::npos
         || testUrl.find("\\dumpAsText\\") != string::npos) {
-        m_layoutTestController->setShouldDumpAsText(true);
-        m_layoutTestController->setShouldGeneratePixelResults(false);
+        m_testRunner->setShouldDumpAsText(true);
+        m_testRunner->setShouldGeneratePixelResults(false);
     }
 
     if (testUrl.find("/inspector/") != string::npos
@@ -265,7 +265,7 @@ void TestShell::runFileTest(const TestParams& params, bool shouldDumpPixels)
         showDevTools();
 
     if (m_params.debugLayerTree)
-        m_layoutTestController->setShowDebugLayerTree(true);
+        m_testRunner->setShowDebugLayerTree(true);
 
     if (m_dumpWhenFinished)
         m_printer.handleTestHeader(testUrl.c_str());
@@ -298,7 +298,7 @@ void TestShell::resetTestController()
     resetWebSettings(*webView());
     m_webPermissions->reset();
     m_testInterfaces->resetAll();
-    m_layoutTestController->reset();
+    m_testRunner->reset();
     m_webViewHost->reset();
 #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
     m_notificationPresenter->reset();
@@ -555,14 +555,14 @@ void TestShell::dump()
     WebFrame* frame = m_webView->mainFrame();
     if (!frame)
         return;
-    bool shouldDumpAsText = m_layoutTestController->shouldDumpAsText();
-    bool shouldDumpAsAudio = m_layoutTestController->shouldDumpAsAudio();
-    bool shouldGeneratePixelResults = m_layoutTestController->shouldGeneratePixelResults();
-    bool shouldDumpAsPrinted = m_layoutTestController->isPrinting();
+    bool shouldDumpAsText = m_testRunner->shouldDumpAsText();
+    bool shouldDumpAsAudio = m_testRunner->shouldDumpAsAudio();
+    bool shouldGeneratePixelResults = m_testRunner->shouldGeneratePixelResults();
+    bool shouldDumpAsPrinted = m_testRunner->isPrinting();
     bool dumpedAnything = false;
 
     if (shouldDumpAsAudio) {
-        const WebKit::WebArrayBufferView& webArrayBufferView = m_layoutTestController->audioData();
+        const WebKit::WebArrayBufferView& webArrayBufferView = m_testRunner->audioData();
         m_printer.handleAudio(webArrayBufferView.baseAddress(), webArrayBufferView.byteLength());
         m_printer.handleAudioFooter();
         m_printer.handleTestFooter(true);
@@ -586,7 +586,7 @@ void TestShell::dump()
             }
         }
         if (shouldDumpAsText) {
-            bool recursive = m_layoutTestController->shouldDumpChildFramesAsText();
+            bool recursive = m_testRunner->shouldDumpChildFramesAsText();
             string dataUtf8 = shouldDumpAsPrinted ? dumpFramesAsPrintedText(frame, recursive) : dumpFramesAsText(frame, recursive);
             if (fwrite(dataUtf8.c_str(), 1, dataUtf8.size(), stdout) != dataUtf8.size())
                 FATAL("Short write to stdout, disk full?\n");
@@ -597,10 +597,10 @@ void TestShell::dump()
             if (m_params.debugRenderTree)
                 renderTextBehavior |= WebFrame::RenderAsTextDebug;
             printf("%s", frame->renderTreeAsText(renderTextBehavior).utf8().data());
-            bool recursive = m_layoutTestController->shouldDumpChildFrameScrollPositions();
+            bool recursive = m_testRunner->shouldDumpChildFrameScrollPositions();
             dumpFrameScrollPosition(frame, recursive);
         }
-        if (m_layoutTestController->shouldDumpBackForwardList())
+        if (m_testRunner->shouldDumpBackForwardList())
             printf("%s", dumpAllBackForwardLists().c_str());
     }
     if (dumpedAnything && m_params.printSeparators)
@@ -612,18 +612,18 @@ void TestShell::dump()
         // stdout.
         dumpedAnything = true;
         m_webView->layout();
-        if (m_layoutTestController->testRepaint()) {
+        if (m_testRunner->testRepaint()) {
             WebSize viewSize = m_webView->size();
             int width = viewSize.width;
             int height = viewSize.height;
-            if (m_layoutTestController->sweepHorizontally()) {
+            if (m_testRunner->sweepHorizontally()) {
                 for (WebRect column(0, 0, 1, height); column.x < width; column.x++)
                     m_webViewHost->paintRect(column);
             } else {
                 for (WebRect line(0, 0, width, 1); line.y < height; line.y++)
                     m_webViewHost->paintRect(line);
             }
-        } else if (m_layoutTestController->isPrinting())
+        } else if (m_testRunner->isPrinting())
             m_webViewHost->paintPagesWithBoundaries();
         else
             m_webViewHost->paintInvalidatedRegion();
@@ -631,7 +631,7 @@ void TestShell::dump()
         // See if we need to draw the selection bounds rect. Selection bounds
         // rect is the rect enclosing the (possibly transformed) selection.
         // The rect should be drawn after everything is laid out and painted.
-        if (m_layoutTestController->shouldDumpSelectionRect()) {
+        if (m_testRunner->shouldDumpSelectionRect()) {
             // If there is a selection rect - draw a red 1px border enclosing rect
             WebRect wr = frame->selectionBoundsRect();
             if (!wr.isEmpty()) {
@@ -725,8 +725,8 @@ void TestShell::bindJSObjectsToWindow(WebFrame* frame)
 {
     WebTestingSupport::injectInternalsObject(frame);
     m_testInterfaces->bindTo(frame);
-    m_layoutTestController->bindToJavascript(frame, WebString::fromUTF8("layoutTestController"));
-    m_layoutTestController->bindToJavascript(frame, WebString::fromUTF8("testRunner"));
+    m_testRunner->bindToJavascript(frame, WebString::fromUTF8("testRunner"));
+    m_testRunner->bindToJavascript(frame, WebString::fromUTF8("testRunner"));
 }
 
 WebViewHost* TestShell::createNewWindow(const WebKit::WebURL& url)
index 9f71ecc..405034a 100644 (file)
@@ -87,7 +87,7 @@ public:
     WebKit::WebView* webView() const { return m_webView; }
     // Returns the host for the main WebView.
     WebViewHost* webViewHost() const { return m_webViewHost.get(); }
-    LayoutTestController* layoutTestController() const { return m_layoutTestController.get(); }
+    DRTTestRunner* testRunner() const { return m_testRunner.get(); }
     EventSender* eventSender() const { return m_testInterfaces->eventSender(); }
     AccessibilityController* accessibilityController() const { return m_testInterfaces->accessibilityController(); }
 #if ENABLE(NOTIFICATIONS)
@@ -113,15 +113,15 @@ public:
     int navigationEntryCount() const;
 
     void setFocus(WebKit::WebWidget*, bool enable);
-    bool shouldDumpFrameLoadCallbacks() const { return (m_testIsPreparing || m_testIsPending) && layoutTestController()->shouldDumpFrameLoadCallbacks(); }
-    bool shouldDumpUserGestureInFrameLoadCallbacks() const { return (m_testIsPreparing || m_testIsPending) && layoutTestController()->shouldDumpUserGestureInFrameLoadCallbacks(); }
-    bool shouldDumpResourceLoadCallbacks() const  { return (m_testIsPreparing || m_testIsPending) && layoutTestController()->shouldDumpResourceLoadCallbacks(); }
-    bool shouldDumpResourceResponseMIMETypes() const  { return (m_testIsPreparing || m_testIsPending) && layoutTestController()->shouldDumpResourceResponseMIMETypes(); }
+    bool shouldDumpFrameLoadCallbacks() const { return (m_testIsPreparing || m_testIsPending) && testRunner()->shouldDumpFrameLoadCallbacks(); }
+    bool shouldDumpUserGestureInFrameLoadCallbacks() const { return (m_testIsPreparing || m_testIsPending) && testRunner()->shouldDumpUserGestureInFrameLoadCallbacks(); }
+    bool shouldDumpResourceLoadCallbacks() const  { return (m_testIsPreparing || m_testIsPending) && testRunner()->shouldDumpResourceLoadCallbacks(); }
+    bool shouldDumpResourceResponseMIMETypes() const  { return (m_testIsPreparing || m_testIsPending) && testRunner()->shouldDumpResourceResponseMIMETypes(); }
     void setIsLoading(bool flag) { m_isLoading = flag; }
 
-    // Called by the LayoutTestController to signal test completion.
+    // Called by the DRTTestRunner to signal test completion.
     void testFinished();
-    // Called by LayoutTestController when a test hits the timeout, but does not
+    // 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();
@@ -211,7 +211,7 @@ private:
     OwnPtr<DRTDevToolsAgent> m_drtDevToolsAgent;
     OwnPtr<DRTDevToolsClient> m_drtDevToolsClient;
     OwnPtr<TestInterfaces> m_testInterfaces;
-    OwnPtr<LayoutTestController> m_layoutTestController;
+    OwnPtr<DRTTestRunner> m_testRunner;
 #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
     OwnPtr<NotificationPresenter> m_notificationPresenter;
 #endif
index d630086..2c7c9ee 100644 (file)
@@ -49,7 +49,7 @@ WebPermissions::~WebPermissions()
 bool WebPermissions::allowImage(WebKit::WebFrame*, bool enabledPerSettings, const WebKit::WebURL& imageURL)
 {
     bool allowed = enabledPerSettings && m_imagesAllowed;
-    if (layoutTestController()->shouldDumpPermissionClientCallbacks())
+    if (testRunner()->shouldDumpPermissionClientCallbacks())
         fprintf(stdout, "PERMISSION CLIENT: allowImage(%s): %s\n", m_shell->normalizeLayoutTestURL(imageURL.spec()).c_str(), allowed ? "true" : "false");
     return allowed;
 }
@@ -57,7 +57,7 @@ bool WebPermissions::allowImage(WebKit::WebFrame*, bool enabledPerSettings, cons
 bool WebPermissions::allowScriptFromSource(WebKit::WebFrame*, bool enabledPerSettings, const WebKit::WebURL& scriptURL)
 {
     bool allowed = enabledPerSettings && m_scriptsAllowed;
-    if (layoutTestController()->shouldDumpPermissionClientCallbacks())
+    if (testRunner()->shouldDumpPermissionClientCallbacks())
         fprintf(stdout, "PERMISSION CLIENT: allowScriptFromSource(%s): %s\n", m_shell->normalizeLayoutTestURL(scriptURL.spec()).c_str(), allowed ? "true" : "false");
     return allowed;
 }
@@ -126,7 +126,7 @@ void WebPermissions::reset()
 
 // Private functions ----------------------------------------------------------
 
-LayoutTestController* WebPermissions::layoutTestController() const
+DRTTestRunner* WebPermissions::testRunner() const
 {
-    return m_shell->layoutTestController();
+    return m_shell->testRunner();
 }
index 184046a..c625077 100644 (file)
@@ -33,7 +33,7 @@
 
 #include "WebPermissionClient.h"
 
-class LayoutTestController;
+class DRTTestRunner;
 class TestShell;
 
 class WebPermissions : public WebKit::WebPermissionClient {
@@ -63,7 +63,7 @@ public:
     void reset();
 
 private:
-    LayoutTestController* layoutTestController() const;
+    DRTTestRunner* testRunner() const;
 
     // Non-owning pointer. The WebPermissions instance is owned by this TestShell instance.
     TestShell* m_shell;
index c77250a..5e6194e 100644 (file)
@@ -251,9 +251,9 @@ static string textAffinityDescription(WebTextAffinity affinity)
 
 WebView* WebViewHost::createView(WebFrame*, const WebURLRequest& request, const WebWindowFeatures&, const WebString&, WebNavigationPolicy)
 {
-    if (!layoutTestController()->canOpenWindows())
+    if (!testRunner()->canOpenWindows())
         return 0;
-    if (layoutTestController()->shouldDumpCreateView())
+    if (testRunner()->shouldDumpCreateView())
         fprintf(stdout, "createView(%s)\n", URLDescription(request.url()).c_str());
     return m_shell->createNewWindow(WebURL())->webView();
 }
@@ -319,7 +319,7 @@ void WebViewHost::didStartLoading()
 
 void WebViewHost::didStopLoading()
 {
-    if (layoutTestController()->shouldDumpProgressFinishedCallback())
+    if (testRunner()->shouldDumpProgressFinishedCallback())
         fputs("postProgressFinishedNotification\n", stdout);
     m_shell->setIsLoading(false);
 }
@@ -329,50 +329,50 @@ void WebViewHost::didStopLoading()
 
 bool WebViewHost::shouldBeginEditing(const WebRange& range)
 {
-    if (layoutTestController()->shouldDumpEditingCallbacks()) {
+    if (testRunner()->shouldDumpEditingCallbacks()) {
         fputs("EDITING DELEGATE: shouldBeginEditingInDOMRange:", stdout);
         printRangeDescription(range);
         fputs("\n", stdout);
     }
-    return layoutTestController()->acceptsEditing();
+    return testRunner()->acceptsEditing();
 }
 
 bool WebViewHost::shouldEndEditing(const WebRange& range)
 {
-    if (layoutTestController()->shouldDumpEditingCallbacks()) {
+    if (testRunner()->shouldDumpEditingCallbacks()) {
         fputs("EDITING DELEGATE: shouldEndEditingInDOMRange:", stdout);
         printRangeDescription(range);
         fputs("\n", stdout);
     }
-    return layoutTestController()->acceptsEditing();
+    return testRunner()->acceptsEditing();
 }
 
 bool WebViewHost::shouldInsertNode(const WebNode& node, const WebRange& range, WebEditingAction action)
 {
-    if (layoutTestController()->shouldDumpEditingCallbacks()) {
+    if (testRunner()->shouldDumpEditingCallbacks()) {
         fputs("EDITING DELEGATE: shouldInsertNode:", stdout);
         printNodeDescription(node, 0);
         fputs(" replacingDOMRange:", stdout);
         printRangeDescription(range);
         printf(" givenAction:%s\n", editingActionDescription(action).c_str());
     }
-    return layoutTestController()->acceptsEditing();
+    return testRunner()->acceptsEditing();
 }
 
 bool WebViewHost::shouldInsertText(const WebString& text, const WebRange& range, WebEditingAction action)
 {
-    if (layoutTestController()->shouldDumpEditingCallbacks()) {
+    if (testRunner()->shouldDumpEditingCallbacks()) {
         printf("EDITING DELEGATE: shouldInsertText:%s replacingDOMRange:", text.utf8().data());
         printRangeDescription(range);
         printf(" givenAction:%s\n", editingActionDescription(action).c_str());
     }
-    return layoutTestController()->acceptsEditing();
+    return testRunner()->acceptsEditing();
 }
 
 bool WebViewHost::shouldChangeSelectedRange(
     const WebRange& fromRange, const WebRange& toRange, WebTextAffinity affinity, bool stillSelecting)
 {
-    if (layoutTestController()->shouldDumpEditingCallbacks()) {
+    if (testRunner()->shouldDumpEditingCallbacks()) {
         fputs("EDITING DELEGATE: shouldChangeSelectedDOMRange:", stdout);
         printRangeDescription(fromRange);
         fputs(" toDOMRange:", stdout);
@@ -381,27 +381,27 @@ bool WebViewHost::shouldChangeSelectedRange(
                textAffinityDescription(affinity).c_str(),
                (stillSelecting ? "TRUE" : "FALSE"));
     }
-    return layoutTestController()->acceptsEditing();
+    return testRunner()->acceptsEditing();
 }
 
 bool WebViewHost::shouldDeleteRange(const WebRange& range)
 {
-    if (layoutTestController()->shouldDumpEditingCallbacks()) {
+    if (testRunner()->shouldDumpEditingCallbacks()) {
         fputs("EDITING DELEGATE: shouldDeleteDOMRange:", stdout);
         printRangeDescription(range);
         fputs("\n", stdout);
     }
-    return layoutTestController()->acceptsEditing();
+    return testRunner()->acceptsEditing();
 }
 
 bool WebViewHost::shouldApplyStyle(const WebString& style, const WebRange& range)
 {
-    if (layoutTestController()->shouldDumpEditingCallbacks()) {
+    if (testRunner()->shouldDumpEditingCallbacks()) {
         printf("EDITING DELEGATE: shouldApplyStyle:%s toElementsInDOMRange:", style.utf8().data());
         printRangeDescription(range);
         fputs("\n", stdout);
     }
-    return layoutTestController()->acceptsEditing();
+    return testRunner()->acceptsEditing();
 }
 
 bool WebViewHost::isSmartInsertDeleteEnabled()
@@ -416,28 +416,28 @@ bool WebViewHost::isSelectTrailingWhitespaceEnabled()
 
 void WebViewHost::didBeginEditing()
 {
-    if (!layoutTestController()->shouldDumpEditingCallbacks())
+    if (!testRunner()->shouldDumpEditingCallbacks())
         return;
     fputs("EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification\n", stdout);
 }
 
 void WebViewHost::didChangeSelection(bool isEmptySelection)
 {
-    if (layoutTestController()->shouldDumpEditingCallbacks())
+    if (testRunner()->shouldDumpEditingCallbacks())
         fputs("EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification\n", stdout);
     // No need to update clipboard with the selected text in DRT.
 }
 
 void WebViewHost::didChangeContents()
 {
-    if (!layoutTestController()->shouldDumpEditingCallbacks())
+    if (!testRunner()->shouldDumpEditingCallbacks())
         return;
     fputs("EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification\n", stdout);
 }
 
 void WebViewHost::didEndEditing()
 {
-    if (!layoutTestController()->shouldDumpEditingCallbacks())
+    if (!testRunner()->shouldDumpEditingCallbacks())
         return;
     fputs("EDITING DELEGATE: webViewDidEndEditing:WebViewDidEndEditingNotification\n", stdout);
 }
@@ -561,7 +561,7 @@ bool WebViewHost::runModalPromptDialog(WebFrame* frame, const WebString& message
 bool WebViewHost::runModalBeforeUnloadDialog(WebFrame*, const WebString& message)
 {
     printf("CONFIRM NAVIGATION: %s\n", message.utf8().data());
-    return !layoutTestController()->shouldStayOnPageAfterHandlingBeforeUnload();
+    return !testRunner()->shouldStayOnPageAfterHandlingBeforeUnload();
 }
 
 void WebViewHost::showContextMenu(WebFrame*, const WebContextMenuData& contextMenuData)
@@ -581,7 +581,7 @@ WebContextMenuData* WebViewHost::lastContextMenuData() const
 
 void WebViewHost::setStatusText(const WebString& text)
 {
-    if (!layoutTestController()->shouldDumpStatusCallbacks())
+    if (!testRunner()->shouldDumpStatusCallbacks())
         return;
     // When running tests, write to stdout.
     printf("UI DELEGATE STATUS CALLBACK: setStatusText:%s\n", text.utf8().data());
@@ -590,7 +590,7 @@ void WebViewHost::setStatusText(const WebString& text)
 void WebViewHost::startDragging(WebFrame*, const WebDragData& data, WebDragOperationsMask mask, const WebImage&, const WebPoint&)
 {
     WebDragData mutableDragData = data;
-    if (layoutTestController()->shouldAddFileToPasteboard()) {
+    if (testRunner()->shouldAddFileToPasteboard()) {
         // Add a file called DRTFakeFile to the drag&drop clipboard.
         addDRTFakeFileToDataObject(&mutableDragData);
     }
@@ -1055,7 +1055,7 @@ WebNavigationPolicy WebViewHost::decidePolicyForNavigation(
         result = WebKit::WebNavigationPolicyIgnore;
 
     if (m_policyDelegateShouldNotifyDone)
-        layoutTestController()->policyDelegateDone();
+        testRunner()->policyDelegateDone();
     return result;
 }
 
@@ -1113,7 +1113,7 @@ void WebViewHost::didCancelClientRedirect(WebFrame* frame)
 void WebViewHost::didCreateDataSource(WebFrame*, WebDataSource* ds)
 {
     ds->setExtraData(m_pendingExtraData.leakPtr());
-    if (!layoutTestController()->deferMainResourceDataLoad())
+    if (!testRunner()->deferMainResourceDataLoad())
         ds->setDeferMainResourceDataLoad(false);
 }
 
@@ -1130,7 +1130,7 @@ void WebViewHost::didStartProvisionalLoad(WebFrame* frame)
     if (!m_topLoadingFrame)
         m_topLoadingFrame = frame;
 
-    if (layoutTestController()->stopProvisionalFrameLoads()) {
+    if (testRunner()->stopProvisionalFrameLoads()) {
         printFrameDescription(frame);
         fputs(" - stopping load in didStartProvisionalLoadForFrame callback\n", stdout);
         frame->stopLoading();
@@ -1183,11 +1183,11 @@ void WebViewHost::didReceiveTitle(WebFrame* frame, const WebString& title, WebTe
         printf(" - didReceiveTitle: %s\n", title8.data());
     }
 
-    if (layoutTestController()->shouldDumpTitleChanges())
+    if (testRunner()->shouldDumpTitleChanges())
         printf("TITLE CHANGED: %s\n", title8.data());
 
     setPageTitle(title);
-    layoutTestController()->setTitleTextDirection(direction);
+    testRunner()->setTitleTextDirection(direction);
 }
 
 void WebViewHost::didFinishDocumentLoad(WebFrame* frame)
@@ -1281,7 +1281,7 @@ void WebViewHost::willSendRequest(WebFrame* frame, unsigned identifier, WebURLRe
     string requestURL = url.possibly_invalid_spec();
 
     GURL mainDocumentURL = request.firstPartyForCookies();
-    if (layoutTestController()->shouldDumpResourceLoadCallbacks()) {
+    if (testRunner()->shouldDumpResourceLoadCallbacks()) {
         printResourceDescription(identifier);
         printf(" - willSendRequest <NSURLRequest URL %s, main document URL %s,"
                " http method %s> redirectResponse ",
@@ -1387,7 +1387,7 @@ void WebViewHost::openFileSystem(WebFrame* frame, WebFileSystem::Type type, long
 
 bool WebViewHost::willCheckAndDispatchMessageEvent(WebFrame* source, WebSecurityOrigin target, WebDOMMessageEvent event)
 {
-    if (m_shell->layoutTestController()->shouldInterceptPostMessage()) {
+    if (m_shell->testRunner()->shouldInterceptPostMessage()) {
         fputs("intercepted postMessage\n", stdout);
         return true;
     }
@@ -1638,9 +1638,9 @@ bool WebViewHost::navigate(const TestNavigationEntry& entry, bool reload)
 
 // Private functions ----------------------------------------------------------
 
-LayoutTestController* WebViewHost::layoutTestController() const
+DRTTestRunner* WebViewHost::testRunner() const
 {
-    return m_shell->layoutTestController();
+    return m_shell->testRunner();
 }
 
 void WebViewHost::updateAddressBar(WebView* webView)
@@ -1660,7 +1660,7 @@ void WebViewHost::locationChangeDone(WebFrame* frame)
     if (frame != m_topLoadingFrame)
         return;
     m_topLoadingFrame = 0;
-    layoutTestController()->locationChangeDone();
+    testRunner()->locationChangeDone();
 }
 
 void WebViewHost::updateForCommittedLoad(WebFrame* frame, bool isNewNavigation)
@@ -1780,7 +1780,7 @@ void WebViewHost::setAddressBarURL(const WebURL&)
 
 void WebViewHost::enterFullScreenNow()
 {
-    if (layoutTestController()->hasCustomFullScreenBehavior())
+    if (testRunner()->hasCustomFullScreenBehavior())
         return;
 
     webView()->willEnterFullScreen();
@@ -1789,7 +1789,7 @@ void WebViewHost::enterFullScreenNow()
 
 void WebViewHost::exitFullScreenNow()
 {
-    if (layoutTestController()->hasCustomFullScreenBehavior())
+    if (testRunner()->hasCustomFullScreenBehavior())
         return;
 
     webView()->willExitFullScreen();
index 13f2e1e..8265895 100644 (file)
@@ -47,7 +47,7 @@
 #include <wtf/Vector.h>
 #include <wtf/text/WTFString.h>
 
-class LayoutTestController;
+class DRTTestRunner;
 class MockWebSpeechInputController;
 class MockWebSpeechRecognizer;
 class SkCanvas;
@@ -277,7 +277,7 @@ class WebViewHost : public WebKit::WebViewClient, public WebKit::WebFrameClient,
     void finishLastTextCheck();
     virtual void fillSpellingSuggestionList(const WebKit::WebString& word, Vector<WebKit::WebString>* suggestions) OVERRIDE;
 
-    // Geolocation client mocks for LayoutTestController
+    // Geolocation client mocks for DRTTestRunner
     WebKit::WebGeolocationClientMock* geolocationClientMock();
 
     // Pending task list, Note taht the method is referred from MethodTask class.
@@ -302,7 +302,7 @@ private:
         CallbackMethodType m_callback;
     };
 
-    LayoutTestController* layoutTestController() const;
+    DRTTestRunner* testRunner() const;
 
     // Called the title of the page changes.
     // Can be used to update the title of the window.
index 2cbe63d..c1e4801 100644 (file)
@@ -62,7 +62,7 @@ Ecore_Timer* waitToDumpWatchdog = 0;
 extern Ewk_History_Item* prevTestBFItem;
 
 // From the top-level DumpRenderTree.h
-RefPtr<LayoutTestController> gLayoutTestController;
+RefPtr<TestRunner> gTestRunner;
 volatile bool done = false;
 
 static bool dumpPixelsForCurrentTest;
@@ -85,7 +85,7 @@ static String dumpFramesAsText(Evas_Object* frame)
     result.append("\n");
     eina_stringshare_del(frameContents);
 
-    if (gLayoutTestController->dumpChildFramesAsText()) {
+    if (gTestRunner->dumpChildFramesAsText()) {
         Eina_List* children = DumpRenderTreeSupportEfl::frameChildren(frame);
         void* iterator;
 
@@ -128,7 +128,7 @@ static void dumpFrameScrollPosition(Evas_Object* frame)
         printf("%s", result.toString().utf8().data());
     }
 
-    if (gLayoutTestController->dumpChildFrameScrollPositions()) {
+    if (gTestRunner->dumpChildFrameScrollPositions()) {
         Eina_List* children = DumpRenderTreeSupportEfl::frameChildren(frame);
         void* iterator;
 
@@ -215,29 +215,29 @@ static inline bool isGlobalHistoryTest(const String& cTestPathOrURL)
     return cTestPathOrURL.contains("/globalhistory/");
 }
 
-static void createLayoutTestController(const String& testURL, const String& expectedPixelHash)
+static void createTestRunner(const String& testURL, const String& expectedPixelHash)
 {
-    gLayoutTestController =
-        LayoutTestController::create(std::string(testURL.utf8().data()),
+    gTestRunner =
+        TestRunner::create(std::string(testURL.utf8().data()),
                                      std::string(expectedPixelHash.utf8().data()));
 
     topLoadingFrame = 0;
     done = false;
 
-    gLayoutTestController->setIconDatabaseEnabled(false);
+    gTestRunner->setIconDatabaseEnabled(false);
 
     if (shouldLogFrameLoadDelegates(testURL))
-        gLayoutTestController->setDumpFrameLoadCallbacks(true);
+        gTestRunner->setDumpFrameLoadCallbacks(true);
 
-    gLayoutTestController->setDeveloperExtrasEnabled(true);
+    gTestRunner->setDeveloperExtrasEnabled(true);
     if (shouldOpenWebInspector(testURL))
-        gLayoutTestController->showWebInspector();
+        gTestRunner->showWebInspector();
 
-    gLayoutTestController->setDumpHistoryDelegateCallbacks(isGlobalHistoryTest(testURL));
+    gTestRunner->setDumpHistoryDelegateCallbacks(isGlobalHistoryTest(testURL));
 
     if (shouldDumpAsText(testURL)) {
-        gLayoutTestController->setDumpAsText(true);
-        gLayoutTestController->setGeneratePixelResults(false);
+        gTestRunner->setDumpAsText(true);
+        gTestRunner->setGeneratePixelResults(false);
     }
 }
 
@@ -268,14 +268,14 @@ static void runTest(const char* inputLine)
     const String testURL = getFinalTestURL(testPathOrURL);
 
     browser->resetDefaultsToConsistentValues();
-    createLayoutTestController(testURL, expectedPixelHash);
+    createTestRunner(testURL, expectedPixelHash);
 
     WorkQueue::shared()->clear();
     WorkQueue::shared()->setFrozen(false);
 
     const bool isSVGW3CTest = testURL.contains("svg/W3C-SVG-1.1");
-    const int width = isSVGW3CTest ? 480 : LayoutTestController::maxViewWidth;
-    const int height = isSVGW3CTest ? 360 : LayoutTestController::maxViewHeight;
+    const int width = isSVGW3CTest ? 480 : TestRunner::maxViewWidth;
+    const int height = isSVGW3CTest ? 360 : TestRunner::maxViewHeight;
     evas_object_resize(browser->mainView(), width, height);
 
     if (prevTestBFItem)
@@ -288,8 +288,8 @@ static void runTest(const char* inputLine)
 
     ecore_main_loop_begin();
 
-    gLayoutTestController->closeWebInspector();
-    gLayoutTestController->setDeveloperExtrasEnabled(false);
+    gTestRunner->closeWebInspector();
+    gTestRunner->setDeveloperExtrasEnabled(false);
 
     browser->clearExtraViews();
 
@@ -298,7 +298,7 @@ static void runTest(const char* inputLine)
 
     ewk_view_uri_set(browser->mainView(), "about:blank");
 
-    gLayoutTestController.clear();
+    gTestRunner.clear();
     sendPixelResultsEOF();
 }
 
@@ -320,15 +320,15 @@ static void adjustOutputTypeByMimeType(const Evas_Object* frame)
 {
     const String responseMimeType(DumpRenderTreeSupportEfl::responseMimeType(frame));
     if (responseMimeType == "text/plain") {
-        gLayoutTestController->setDumpAsText(true);
-        gLayoutTestController->setGeneratePixelResults(false);
+        gTestRunner->setDumpAsText(true);
+        gTestRunner->setGeneratePixelResults(false);
     }
 }
 
 static void dumpFrameContentsAsText(Evas_Object* frame)
 {
     String result;
-    if (gLayoutTestController->dumpAsText())
+    if (gTestRunner->dumpAsText())
         result = dumpFramesAsText(frame);
     else
         result = DumpRenderTreeSupportEfl::renderTreeDump(frame);
@@ -338,17 +338,17 @@ static void dumpFrameContentsAsText(Evas_Object* frame)
 
 static bool shouldDumpFrameScrollPosition()
 {
-    return !gLayoutTestController->dumpAsText() && !gLayoutTestController->dumpDOMAsWebArchive() && !gLayoutTestController->dumpSourceAsWebArchive();
+    return !gTestRunner->dumpAsText() && !gTestRunner->dumpDOMAsWebArchive() && !gTestRunner->dumpSourceAsWebArchive();
 }
 
 static bool shouldDumpPixelsAndCompareWithExpected()
 {
-    return dumpPixelsForCurrentTest && gLayoutTestController->generatePixelResults() && !gLayoutTestController->dumpDOMAsWebArchive() && !gLayoutTestController->dumpSourceAsWebArchive();
+    return dumpPixelsForCurrentTest && gTestRunner->generatePixelResults() && !gTestRunner->dumpDOMAsWebArchive() && !gTestRunner->dumpSourceAsWebArchive();
 }
 
 static bool shouldDumpBackForwardList()
 {
-    return gLayoutTestController->dumpBackForwardList();
+    return gTestRunner->dumpBackForwardList();
 }
 
 static bool initEfl()
@@ -412,7 +412,7 @@ void dump()
     }
 
     if (shouldDumpPixelsAndCompareWithExpected())
-        dumpWebViewAsPixelsAndCompareWithExpected(gLayoutTestController->expectedPixelHash());
+        dumpWebViewAsPixelsAndCompareWithExpected(gTestRunner->expectedPixelHash());
 
     done = true;
     ecore_main_loop_quit();
index 06762bc..c167aca 100644 (file)
@@ -148,7 +148,7 @@ Evas_Object* DumpRenderTreeChrome::createWebInspectorView()
     Evas_Object* mainFrame = ewk_view_frame_main_get(inspectorView);
     evas_object_smart_callback_add(mainFrame, "load,finished", onInspectorFrameLoadFinished, 0);
 
-    evas_object_resize(inspectorView, LayoutTestController::maxViewWidth, LayoutTestController::maxViewHeight);
+    evas_object_resize(inspectorView, TestRunner::maxViewWidth, TestRunner::maxViewHeight);
     evas_object_show(inspectorView);
     evas_object_focus_set(inspectorView, true);
 
@@ -418,12 +418,12 @@ void DumpRenderTreeChrome::onWindowObjectCleared(void* userData, Evas_Object*, v
 {
     Ewk_Window_Object_Cleared_Event* objectClearedInfo = static_cast<Ewk_Window_Object_Cleared_Event*>(eventInfo);
     JSValueRef exception = 0;
-    ASSERT(gLayoutTestController);
+    ASSERT(gTestRunner);
 
     GCController* gcController = static_cast<GCController*>(userData);
     ASSERT(gcController);
 
-    gLayoutTestController->makeWindowObject(objectClearedInfo->context, objectClearedInfo->windowObject, &exception);
+    gTestRunner->makeWindowObject(objectClearedInfo->context, objectClearedInfo->windowObject, &exception);
     ASSERT(!exception);
 
     gcController->makeWindowObject(objectClearedInfo->context, objectClearedInfo->windowObject, &exception);
@@ -456,7 +456,7 @@ void DumpRenderTreeChrome::onLoadStarted(void*, Evas_Object* view, void* eventIn
 
 Eina_Bool DumpRenderTreeChrome::processWork(void*)
 {
-    if (WorkQueue::shared()->processWork() && !gLayoutTestController->waitToDump())
+    if (WorkQueue::shared()->processWork() && !gTestRunner->waitToDump())
         dump();
 
     return ECORE_CALLBACK_CANCEL;
@@ -467,7 +467,7 @@ void DumpRenderTreeChrome::topLoadingFrameLoadFinished()
     topLoadingFrame = 0;
 
     WorkQueue::shared()->setFrozen(true);
-    if (gLayoutTestController->waitToDump())
+    if (gTestRunner->waitToDump())
         return;
 
     if (WorkQueue::shared()->count())
@@ -478,7 +478,7 @@ void DumpRenderTreeChrome::topLoadingFrameLoadFinished()
 
 void DumpRenderTreeChrome::onStatusbarTextSet(void*, Evas_Object*, void* eventInfo)
 {
-    if (!gLayoutTestController->dumpStatusCallbacks())
+    if (!gTestRunner->dumpStatusCallbacks())
         return;
 
     const char* statusbarText = static_cast<const char*>(eventInfo);
@@ -487,7 +487,7 @@ void DumpRenderTreeChrome::onStatusbarTextSet(void*, Evas_Object*, void* eventIn
 
 void DumpRenderTreeChrome::onFrameIconChanged(void*, Evas_Object* frame, void*)
 {
-    if (!done && gLayoutTestController->dumpIconChanges()) {
+    if (!done && gTestRunner->dumpIconChanges()) {
         const String frameName(DumpRenderTreeSupportEfl::suitableDRTFrameName(frame));
         printf("%s - didChangeIcons\n", frameName.utf8().data());
     }
@@ -497,19 +497,19 @@ void DumpRenderTreeChrome::onFrameTitleChanged(void*, Evas_Object* frame, void*
 {
     const Ewk_Text_With_Direction* titleText = static_cast<const Ewk_Text_With_Direction*>(eventInfo);
 
-    if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) {
+    if (!done && gTestRunner->dumpFrameLoadCallbacks()) {
         const String frameName(DumpRenderTreeSupportEfl::suitableDRTFrameName(frame));
         printf("%s - didReceiveTitle: %s\n", frameName.utf8().data(), (titleText && titleText->string) ? titleText->string : "");
     }
 
-    if (!done && gLayoutTestController->dumpTitleChanges())
+    if (!done && gTestRunner->dumpTitleChanges())
         printf("TITLE CHANGED: %s\n", (titleText && titleText->string) ? titleText->string : "");
 
-    if (!done && gLayoutTestController->dumpHistoryDelegateCallbacks())
+    if (!done && gTestRunner->dumpHistoryDelegateCallbacks())
         printf("WebView updated the title for history URL \"%s\" to \"%s\".\n", ewk_frame_uri_get(frame)
                , (titleText && titleText->string) ? titleText->string : "");
 
-    gLayoutTestController->setTitleTextDirection(titleText->direction == EWK_TEXT_DIRECTION_LEFT_TO_RIGHT ? "ltr" : "rtl");
+    gTestRunner->setTitleTextDirection(titleText->direction == EWK_TEXT_DIRECTION_LEFT_TO_RIGHT ? "ltr" : "rtl");
 }
 
 void DumpRenderTreeChrome::onDocumentLoadFinished(void*, Evas_Object*, void* eventInfo)
@@ -517,7 +517,7 @@ void DumpRenderTreeChrome::onDocumentLoadFinished(void*, Evas_Object*, void* eve
     const Evas_Object* frame = static_cast<Evas_Object*>(eventInfo);
     const String frameName(DumpRenderTreeSupportEfl::suitableDRTFrameName(frame));
 
-    if (!done && gLayoutTestController->dumpFrameLoadCallbacks())
+    if (!done && gTestRunner->dumpFrameLoadCallbacks())
         printf("%s - didFinishDocumentLoadForFrame\n", frameName.utf8().data());
     else if (!done) {
         const unsigned pendingFrameUnloadEvents = DumpRenderTreeSupportEfl::pendingUnloadEventCount(frame);
@@ -530,19 +530,19 @@ void DumpRenderTreeChrome::onWillSendRequest(void*, Evas_Object*, void* eventInf
 {
     Ewk_Frame_Resource_Messages* messages = static_cast<Ewk_Frame_Resource_Messages*>(eventInfo);
 
-    if (!done && gLayoutTestController->dumpResourceLoadCallbacks())
+    if (!done && gTestRunner->dumpResourceLoadCallbacks())
         printf("%s - willSendRequest %s redirectResponse %s\n",
                m_dumpAssignedUrls.contains(messages->request->identifier) ? m_dumpAssignedUrls.get(messages->request->identifier).data() : "<unknown>",
                descriptionSuitableForTestResult(messages->request).data(),
                descriptionSuitableForTestResult(messages->redirect_response).data());
 
-    if (!done && gLayoutTestController->willSendRequestReturnsNull()) {
-        // As requested by the LayoutTestController, don't perform the request.
+    if (!done && gTestRunner->willSendRequestReturnsNull()) {
+        // As requested by the TestRunner, don't perform the request.
         messages->request->url = 0;
         return;
     }
 
-    if (!done && gLayoutTestController->willSendRequestReturnsNullOnRedirect() && messages->redirect_response) {
+    if (!done && gTestRunner->willSendRequestReturnsNullOnRedirect() && messages->redirect_response) {
         printf("Returning null for this redirect\n");
         messages->request->url = 0;
         return;
@@ -560,7 +560,7 @@ void DumpRenderTreeChrome::onWillSendRequest(void*, Evas_Object*, void* eventInf
         return;
     }
 
-    const std::string& destination = gLayoutTestController->redirectionDestinationForURL(url.string().utf8().data());
+    const std::string& destination = gTestRunner->redirectionDestinationForURL(url.string().utf8().data());
     if (destination.length())
         messages->request->url = strdup(destination.c_str());
 }
@@ -569,7 +569,7 @@ void DumpRenderTreeChrome::onWebViewOnloadEvent(void*, Evas_Object*, void* event
 {
     const Evas_Object* frame = static_cast<Evas_Object*>(eventInfo);
 
-    if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) {
+    if (!done && gTestRunner->dumpFrameLoadCallbacks()) {
         const String frameName(DumpRenderTreeSupportEfl::suitableDRTFrameName(frame));
         printf("%s - didHandleOnloadEventsForFrame\n", frameName.utf8().data());
     }
@@ -577,13 +577,13 @@ void DumpRenderTreeChrome::onWebViewOnloadEvent(void*, Evas_Object*, void* event
 
 void DumpRenderTreeChrome::onInsecureContentRun(void*, Evas_Object*, void*)
 {
-    if (!done && gLayoutTestController->dumpFrameLoadCallbacks())
+    if (!done && gTestRunner->dumpFrameLoadCallbacks())
         printf("didRunInsecureContent\n");
 }
 
 void DumpRenderTreeChrome::onInsecureContentDisplayed(void*, Evas_Object*, void*)
 {
-    if (!done && gLayoutTestController->dumpFrameLoadCallbacks())
+    if (!done && gTestRunner->dumpFrameLoadCallbacks())
         printf("didDisplayInsecureContent\n");
 }
 
@@ -608,7 +608,7 @@ void DumpRenderTreeChrome::onFrameCreated(void*, Evas_Object*, void* eventInfo)
 
 void DumpRenderTreeChrome::onWebViewNavigatedWithData(void*, Evas_Object*, void* eventInfo)
 {
-    if (done || !gLayoutTestController->dumpHistoryDelegateCallbacks())
+    if (done || !gTestRunner->dumpHistoryDelegateCallbacks())
         return;
 
     ASSERT(eventInfo);
@@ -631,7 +631,7 @@ void DumpRenderTreeChrome::onWebViewNavigatedWithData(void*, Evas_Object*, void*
 
 void DumpRenderTreeChrome::onWebViewServerRedirect(void*, Evas_Object*, void* eventInfo)
 {
-    if (done || !gLayoutTestController->dumpHistoryDelegateCallbacks())
+    if (done || !gTestRunner->dumpHistoryDelegateCallbacks())
         return;
 
     ASSERT(eventInfo);
@@ -641,7 +641,7 @@ void DumpRenderTreeChrome::onWebViewServerRedirect(void*, Evas_Object*, void* ev
 
 void DumpRenderTreeChrome::onWebViewClientRedirect(void*, Evas_Object*, void* eventInfo)
 {
-    if (done || !gLayoutTestController->dumpHistoryDelegateCallbacks())
+    if (done || !gTestRunner->dumpHistoryDelegateCallbacks())
         return;
 
     ASSERT(eventInfo);
@@ -651,7 +651,7 @@ void DumpRenderTreeChrome::onWebViewClientRedirect(void*, Evas_Object*, void* ev
 
 void DumpRenderTreeChrome::onWebViewPopulateVisitedLinks(void*, Evas_Object* ewkView, void*)
 {
-    if (done || !gLayoutTestController->dumpHistoryDelegateCallbacks())
+    if (done || !gTestRunner->dumpHistoryDelegateCallbacks())
         return;
 
     printf("Asked to populate visited links for WebView \"%s\"\n", ewk_view_uri_get(ewkView));
@@ -678,7 +678,7 @@ void DumpRenderTreeChrome::onInspectorFrameLoadFinished(void*, Evas_Object*, voi
 
 void DumpRenderTreeChrome::onFrameProvisionalLoad(void*, Evas_Object* frame, void*)
 {
-    if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) {
+    if (!done && gTestRunner->dumpFrameLoadCallbacks()) {
         const String frameName(DumpRenderTreeSupportEfl::suitableDRTFrameName(frame));
         printf("%s - didStartProvisionalLoadForFrame\n", frameName.utf8().data());
     }
@@ -686,7 +686,7 @@ void DumpRenderTreeChrome::onFrameProvisionalLoad(void*, Evas_Object* frame, voi
     if (!topLoadingFrame && !done)
         topLoadingFrame = frame;
   
-    if (!done && gLayoutTestController->stopProvisionalFrameLoads()) { 
+    if (!done && gTestRunner->stopProvisionalFrameLoads()) { 
         const String frameName(DumpRenderTreeSupportEfl::suitableDRTFrameName(frame));
         printf("%s - stopping load in didStartProvisionalLoadForFrame callback\n", frameName.utf8().data());
         ewk_frame_stop(frame);
@@ -697,7 +697,7 @@ void DumpRenderTreeChrome::onFrameProvisionalLoadFailed(void*, Evas_Object* fram
 {
     m_provisionalLoadFailedFrame = frame;
 
-    if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) {
+    if (!done && gTestRunner->dumpFrameLoadCallbacks()) {
         const String frameName(DumpRenderTreeSupportEfl::suitableDRTFrameName(frame));
         printf("%s - didFailProvisionalLoadWithError\n", frameName.utf8().data());
     }
@@ -705,7 +705,7 @@ void DumpRenderTreeChrome::onFrameProvisionalLoadFailed(void*, Evas_Object* fram
 
 void DumpRenderTreeChrome::onFrameLoadCommitted(void*, Evas_Object* frame, void*)
 {
-    if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) {
+    if (!done && gTestRunner->dumpFrameLoadCallbacks()) {
         const String frameName(DumpRenderTreeSupportEfl::suitableDRTFrameName(frame));
         printf("%s - didCommitLoadForFrame\n", frameName.utf8().data());
     }
@@ -721,10 +721,10 @@ void DumpRenderTreeChrome::onFrameLoadFinished(void*, Evas_Object* frame, void*
     if (error)
         return;
 
-    if (!done && gLayoutTestController->dumpProgressFinishedCallback())
+    if (!done && gTestRunner->dumpProgressFinishedCallback())
         printf("postProgressFinishedNotification\n");
 
-    if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) {
+    if (!done && gTestRunner->dumpFrameLoadCallbacks()) {
         const String frameName(DumpRenderTreeSupportEfl::suitableDRTFrameName(frame));
         printf("%s - didFinishLoadForFrame\n", frameName.utf8().data());
     }
@@ -738,7 +738,7 @@ void DumpRenderTreeChrome::onFrameLoadError(void*, Evas_Object* frame, void*)
     // In case of provisional load error, we receive both "load,error" and "load,provisional,failed"
     // signals. m_provisionalLoadFailedFrame is used to avoid printing twice the load error: in
     // onFrameProvisionalLoadFailed() and onFrameLoadError().
-    if (!done && gLayoutTestController->dumpFrameLoadCallbacks() && frame != m_provisionalLoadFailedFrame) {
+    if (!done && gTestRunner->dumpFrameLoadCallbacks() && frame != m_provisionalLoadFailedFrame) {
         const String frameName(DumpRenderTreeSupportEfl::suitableDRTFrameName(frame));
         printf("%s - didFailLoadWithError\n", frameName.utf8().data());
     }
@@ -752,7 +752,7 @@ void DumpRenderTreeChrome::onFrameLoadError(void*, Evas_Object* frame, void*)
 
 void DumpRenderTreeChrome::onFrameRedirectCancelled(void*, Evas_Object* frame, void*)
 {
-    if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) {
+    if (!done && gTestRunner->dumpFrameLoadCallbacks()) {
         const String frameName(DumpRenderTreeSupportEfl::suitableDRTFrameName(frame));
         printf("%s - didCancelClientRedirectForFrame\n", frameName.utf8().data());
     }
@@ -760,7 +760,7 @@ void DumpRenderTreeChrome::onFrameRedirectCancelled(void*, Evas_Object* frame, v
 
 void DumpRenderTreeChrome::onFrameRedirectForProvisionalLoad(void*, Evas_Object* frame, void*)
 {
-    if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) {
+    if (!done && gTestRunner->dumpFrameLoadCallbacks()) {
         const String frameName(DumpRenderTreeSupportEfl::suitableDRTFrameName(frame));
         printf("%s - didReceiveServerRedirectForProvisionalLoadForFrame\n", frameName.utf8().data());
     }
@@ -770,7 +770,7 @@ void DumpRenderTreeChrome::onFrameRedirectRequested(void*, Evas_Object* frame, v
 {
     const char* url = static_cast<const char*>(eventInfo);
 
-    if (!done && gLayoutTestController->dumpFrameLoadCallbacks()) {
+    if (!done && gTestRunner->dumpFrameLoadCallbacks()) {
         const String frameName(DumpRenderTreeSupportEfl::suitableDRTFrameName(frame));
         printf("%s - willPerformClientRedirectToURL: %s \n", frameName.utf8().data(), pathSuitableForTestResult(url).data());
     }
@@ -778,7 +778,7 @@ void DumpRenderTreeChrome::onFrameRedirectRequested(void*, Evas_Object* frame, v
 
 void DumpRenderTreeChrome::onDidDetectXSS(void*, Evas_Object* view, void*)
 {
-    if (!done && gLayoutTestController->dumpFrameLoadCallbacks())
+    if (!done && gTestRunner->dumpFrameLoadCallbacks())
         printf("didDetectXSS\n");
 }
 
@@ -786,14 +786,14 @@ void DumpRenderTreeChrome::onResponseReceived(void*, Evas_Object*, void* eventIn
 {
     Ewk_Frame_Resource_Response* response = static_cast<Ewk_Frame_Resource_Response*>(eventInfo);
 
-    if (!done && gLayoutTestController->dumpResourceLoadCallbacks()) {
+    if (!done && gTestRunner->dumpResourceLoadCallbacks()) {
         CString responseDescription(descriptionSuitableForTestResult(response));
         printf("%s - didReceiveResponse %s\n",
                m_dumpAssignedUrls.contains(response->identifier) ? m_dumpAssignedUrls.get(response->identifier).data() : "<unknown>",
                responseDescription.data());
     }
 
-    if (!done && gLayoutTestController->dumpResourceResponseMIMETypes()) {
+    if (!done && gTestRunner->dumpResourceResponseMIMETypes()) {
         printf("%s has MIME type %s\n",
                KURL(ParsedURLString, response->url).lastPathComponent().utf8().data(),
                response->mime_type);
@@ -804,7 +804,7 @@ void DumpRenderTreeChrome::onResourceLoadFinished(void*, Evas_Object*, void* eve
 {
     unsigned long identifier = *static_cast<unsigned long*>(eventInfo);
 
-    if (!done && gLayoutTestController->dumpResourceLoadCallbacks())
+    if (!done && gTestRunner->dumpResourceLoadCallbacks())
         printf("%s - didFinishLoading\n",
                (m_dumpAssignedUrls.contains(identifier) ? m_dumpAssignedUrls.take(identifier).data() : "<unknown>"));
 }
@@ -813,7 +813,7 @@ void DumpRenderTreeChrome::onResourceLoadFailed(void*, Evas_Object*, void* event
 {
     Ewk_Frame_Load_Error* error = static_cast<Ewk_Frame_Load_Error*>(eventInfo);
 
-    if (!done && gLayoutTestController->dumpResourceLoadCallbacks())
+    if (!done && gTestRunner->dumpResourceLoadCallbacks())
         printf("%s - didFailLoadingWithError: %s\n",
                (m_dumpAssignedUrls.contains(error->resource_identifier) ? m_dumpAssignedUrls.take(error->resource_identifier).data() : "<unknown>"),
                descriptionSuitableForTestResult(error).data());
@@ -823,7 +823,7 @@ void DumpRenderTreeChrome::onNewResourceRequest(void*, Evas_Object*, void* event
 {
     Ewk_Frame_Resource_Request* request = static_cast<Ewk_Frame_Resource_Request*>(eventInfo);
 
-    if (!done && gLayoutTestController->dumpResourceLoadCallbacks())
+    if (!done && gTestRunner->dumpResourceLoadCallbacks())
         m_dumpAssignedUrls.add(request->identifier, pathSuitableForTestResult(request->url));
 }
 
index 729ed17..f801c3c 100644 (file)
@@ -95,7 +95,7 @@ static Eina_Bool onJavaScriptPrompt(Ewk_View_Smart_Data*, Evas_Object*, const ch
 
 static Evas_Object* onWindowCreate(Ewk_View_Smart_Data*, Eina_Bool, const Ewk_Window_Features*)
 {
-    return gLayoutTestController->canOpenWindows() ? browser->createNewWindow() : 0;
+    return gTestRunner->canOpenWindows() ? browser->createNewWindow() : 0;
 }
 
 static Eina_Bool onWindowCloseDelayed(void* data)
@@ -113,7 +113,7 @@ static void onWindowClose(Ewk_View_Smart_Data* smartData)
 
 static uint64_t onExceededDatabaseQuota(Ewk_View_Smart_Data* smartData, Evas_Object* frame, const char* databaseName, uint64_t currentSize, uint64_t expectedSize)
 {
-    if (!gLayoutTestController->dumpDatabaseCallbacks())
+    if (!gTestRunner->dumpDatabaseCallbacks())
         return 0;
 
     Ewk_Security_Origin* origin = ewk_frame_security_origin_get(frame);
@@ -129,7 +129,7 @@ static uint64_t onExceededDatabaseQuota(Ewk_View_Smart_Data* smartData, Evas_Obj
 
 static int64_t onExceededApplicationCacheQuota(Ewk_View_Smart_Data*, Ewk_Security_Origin *origin, int64_t defaultOriginQuota, int64_t totalSpaceNeeded)
 {
-    if (gLayoutTestController->dumpApplicationCacheDelegateCallbacks()) {
+    if (gTestRunner->dumpApplicationCacheDelegateCallbacks()) {
         // For example, numbers from 30000 - 39999 will output as 30000.
         // Rounding up or down does not really matter for these tests. It's
         // sufficient to just get a range of 10000 to determine if we were
@@ -142,7 +142,7 @@ static int64_t onExceededApplicationCacheQuota(Ewk_View_Smart_Data*, Ewk_Securit
                truncatedSpaceNeeded);
     }
 
-    if (gLayoutTestController->disallowIncreaseForApplicationCacheQuota())
+    if (gTestRunner->disallowIncreaseForApplicationCacheQuota())
         return 0;
 
     return defaultOriginQuota;
@@ -187,8 +187,8 @@ static Eina_Bool onNavigationPolicyDecision(Ewk_View_Smart_Data*, Ewk_Frame_Reso
     printf("Policy delegate: attempt to load %s with navigation type '%s'\n", urlSuitableForTestResult(request->url).utf8().data(),
            navigationTypeToString(navigationType));
 
-    if (gLayoutTestController)
-        gLayoutTestController->notifyDone();
+    if (gTestRunner)
+        gTestRunner->notifyDone();
 
     return policyDelegatePermissive;
 }
index 106429b..7a03cdd 100644 (file)
@@ -87,7 +87,7 @@ static const char* selectionAffinityString(WebCore::EAffinity affinity)
 
 void shouldBeginEditing(void*, Evas_Object*, void* eventInfo)
 {
-    if (!done && gLayoutTestController->dumpEditingCallbacks()) {
+    if (!done && gTestRunner->dumpEditingCallbacks()) {
         WebCore::Range* range = static_cast<WebCore::Range*>(eventInfo);
         printf("EDITING DELEGATE: shouldBeginEditingInDOMRange:%s\n", dumpRange(range).utf8().data());
     }
@@ -95,7 +95,7 @@ void shouldBeginEditing(void*, Evas_Object*, void* eventInfo)
 
 void shouldEndEditing(void*, Evas_Object*, void* eventInfo)
 {
-    if (!done && gLayoutTestController->dumpEditingCallbacks()) {
+    if (!done && gTestRunner->dumpEditingCallbacks()) {
         WebCore::Range* range = static_cast<WebCore::Range*>(eventInfo);
         printf("EDITING DELEGATE: shouldEndEditingInDOMRange:%s\n", dumpRange(range).utf8().data());
     }
@@ -103,7 +103,7 @@ void shouldEndEditing(void*, Evas_Object*, void* eventInfo)
 
 void shouldInsertNode(void*, Evas_Object*, void* eventInfo)
 {
-    if (!done && gLayoutTestController->dumpEditingCallbacks()) {
+    if (!done && gTestRunner->dumpEditingCallbacks()) {
         Ewk_Should_Insert_Node_Event* shouldInsertNodeEvent = static_cast<Ewk_Should_Insert_Node_Event*>(eventInfo);
         printf("EDITING DELEGATE: shouldInsertNode:%s replacingDOMRange:%s givenAction:%s\n",
                dumpPath(shouldInsertNodeEvent->node).utf8().data(), dumpRange(shouldInsertNodeEvent->range).utf8().data(),
@@ -113,7 +113,7 @@ void shouldInsertNode(void*, Evas_Object*, void* eventInfo)
 
 void shouldInsertText(void*, Evas_Object*, void* eventInfo)
 {
-    if (!done && gLayoutTestController->dumpEditingCallbacks()) {
+    if (!done && gTestRunner->dumpEditingCallbacks()) {
         Ewk_Should_Insert_Text_Event* shouldInsertTextEvent = static_cast<Ewk_Should_Insert_Text_Event*>(eventInfo);
         printf("EDITING DELEGATE: shouldInsertText:%s replacingDOMRange:%s givenAction:%s\n",
                 shouldInsertTextEvent->text, dumpRange(shouldInsertTextEvent->range).utf8().data(), insertActionString(shouldInsertTextEvent->action));
@@ -122,7 +122,7 @@ void shouldInsertText(void*, Evas_Object*, void* eventInfo)
 
 void shouldDeleteRange(void*, Evas_Object*, void* eventInfo)
 {
-    if (!done && gLayoutTestController->dumpEditingCallbacks()) {
+    if (!done && gTestRunner->dumpEditingCallbacks()) {
         WebCore::Range* range = static_cast<WebCore::Range*>(eventInfo);
         printf("EDITING DELEGATE: shouldDeleteDOMRange:%s\n", dumpRange(range).utf8().data());
     }
@@ -130,7 +130,7 @@ void shouldDeleteRange(void*, Evas_Object*, void* eventInfo)
 
 void shouldChangeSelectedRange(void*, Evas_Object*, void* eventInfo)
 {
-    if (!done && gLayoutTestController->dumpEditingCallbacks()) {
+    if (!done && gTestRunner->dumpEditingCallbacks()) {
         Ewk_Should_Change_Selected_Range_Event* shouldChangeSelectedRangeEvent = static_cast<Ewk_Should_Change_Selected_Range_Event*>(eventInfo);
         printf("EDITING DELEGATE: shouldChangeSelectedDOMRange:%s toDOMRange:%s affinity:%s stillSelecting:%s\n",
                dumpRange(shouldChangeSelectedRangeEvent->fromRange).utf8().data(), dumpRange(shouldChangeSelectedRangeEvent->toRange).utf8().data(),
@@ -140,7 +140,7 @@ void shouldChangeSelectedRange(void*, Evas_Object*, void* eventInfo)
 
 void shouldApplyStyle(void*, Evas_Object*, void* eventInfo)
 {
-    if (!done && gLayoutTestController->dumpEditingCallbacks()) {
+    if (!done && gTestRunner->dumpEditingCallbacks()) {
         Ewk_Should_Apply_Style_Event* shouldApplyStyleEvent = static_cast<Ewk_Should_Apply_Style_Event*>(eventInfo);
         printf("EDITING DELEGATE: shouldApplyStyle:%s toElementsInDOMRange:%s\n",
                 shouldApplyStyleEvent->style->asText().utf8().data(), dumpRange(shouldApplyStyleEvent->range).utf8().data());
@@ -149,25 +149,25 @@ void shouldApplyStyle(void*, Evas_Object*, void* eventInfo)
 
 void editingBegan(void*, Evas_Object*, void*)
 {
-    if (!done && gLayoutTestController->dumpEditingCallbacks())
+    if (!done && gTestRunner->dumpEditingCallbacks())
         printf("EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification\n");
 }
 
 void userChangedContents(void*, Evas_Object*, void*)
 {
-    if (!done && gLayoutTestController->dumpEditingCallbacks())
+    if (!done && gTestRunner->dumpEditingCallbacks())
         printf("EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification\n");
 }
 
 void editingEnded(void*, Evas_Object*, void*)
 {
-    if (!done && gLayoutTestController->dumpEditingCallbacks())
+    if (!done && gTestRunner->dumpEditingCallbacks())
         printf("EDITING DELEGATE: webViewDidEndEditing:WebViewDidEndEditingNotification\n");
 }
 
 void selectionChanged(void*, Evas_Object*, void*)
 {
-    if (!done && gLayoutTestController->dumpEditingCallbacks())
+    if (!done && gTestRunner->dumpEditingCallbacks())
         printf("EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification\n");
 }
 
index f1e1688..1b1dca3 100644 (file)
@@ -62,16 +62,16 @@ enum {
     WebCacheModelPrimaryWebBrowser = 2
 };
 
-LayoutTestController::~LayoutTestController()
+TestRunner::~TestRunner()
 {
 }
 
-void LayoutTestController::addDisallowedURL(JSStringRef)
+void TestRunner::addDisallowedURL(JSStringRef)
 {
     notImplemented();
 }
 
-void LayoutTestController::clearBackForwardList()
+void TestRunner::clearBackForwardList()
 {
     Ewk_History* history = ewk_view_history_get(browser->mainView());
     if (!history)
@@ -84,51 +84,51 @@ void LayoutTestController::clearBackForwardList()
     ewk_history_item_free(item);
 }
 
-JSStringRef LayoutTestController::copyDecodedHostName(JSStringRef)
+JSStringRef TestRunner::copyDecodedHostName(JSStringRef)
 {
     notImplemented();
     return 0;
 }
 
-JSStringRef LayoutTestController::copyEncodedHostName(JSStringRef)
+JSStringRef TestRunner::copyEncodedHostName(JSStringRef)
 {
     notImplemented();
     return 0;
 }
 
-void LayoutTestController::dispatchPendingLoadRequests()
+void TestRunner::dispatchPendingLoadRequests()
 {
     // FIXME: Implement for testing fix for 6727495
     notImplemented();
 }
 
-void LayoutTestController::display()
+void TestRunner::display()
 {
     displayWebView();
 }
 
-void LayoutTestController::keepWebHistory()
+void TestRunner::keepWebHistory()
 {
     notImplemented();
 }
 
-JSValueRef LayoutTestController::computedStyleIncludingVisitedInfo(JSContextRef context, JSValueRef value)
+JSValueRef TestRunner::computedStyleIncludingVisitedInfo(JSContextRef context, JSValueRef value)
 {
     return DumpRenderTreeSupportEfl::computedStyleIncludingVisitedInfo(context, value);
 }
 
-JSRetainPtr<JSStringRef> LayoutTestController::layerTreeAsText() const
+JSRetainPtr<JSStringRef> TestRunner::layerTreeAsText() const
 {
     notImplemented();
     return JSRetainPtr<JSStringRef>(Adopt, JSStringCreateWithUTF8CString(""));
 }
 
-int LayoutTestController::numberOfPages(float pageWidth, float pageHeight)
+int TestRunner::numberOfPages(float pageWidth, float pageHeight)
 {
     return DumpRenderTreeSupportEfl::numberOfPages(browser->mainFrame(), pageWidth, pageHeight);
 }
 
-JSRetainPtr<JSStringRef> LayoutTestController::pageProperty(const char* propertyName, int pageNumber) const
+JSRetainPtr<JSStringRef> TestRunner::pageProperty(const char* propertyName, int pageNumber) const
 {
     const String property = DumpRenderTreeSupportEfl::pageProperty(browser->mainFrame(), propertyName, pageNumber);
     if (property.isEmpty())
@@ -138,7 +138,7 @@ JSRetainPtr<JSStringRef> LayoutTestController::pageProperty(const char* property
     return propertyValue;
 }
 
-JSRetainPtr<JSStringRef> LayoutTestController::pageSizeAndMarginsInPixels(int pageNumber, int width, int height, int marginTop, int marginRight, int marginBottom, int marginLeft) const
+JSRetainPtr<JSStringRef> TestRunner::pageSizeAndMarginsInPixels(int pageNumber, int width, int height, int marginTop, int marginRight, int marginBottom, int marginLeft) const
 {
     String pageSizeAndMargins = DumpRenderTreeSupportEfl::pageSizeAndMarginsInPixels(browser->mainFrame(), pageNumber, width, height, marginTop, marginRight, marginBottom, marginLeft);
 
@@ -149,7 +149,7 @@ JSRetainPtr<JSStringRef> LayoutTestController::pageSizeAndMarginsInPixels(int pa
     return returnValue;
 }
 
-size_t LayoutTestController::webHistoryItemCount()
+size_t TestRunner::webHistoryItemCount()
 {
     const Ewk_History* history = ewk_view_history_get(browser->mainView());
     if (!history)
@@ -158,12 +158,12 @@ size_t LayoutTestController::webHistoryItemCount()
     return ewk_history_back_list_length(history) + ewk_history_forward_list_length(history);
 }
 
-unsigned LayoutTestController::workerThreadCount() const
+unsigned TestRunner::workerThreadCount() const
 {
     return DumpRenderTreeSupportEfl::workerThreadCount();
 }
 
-void LayoutTestController::notifyDone()
+void TestRunner::notifyDone()
 {
     if (m_waitToDump && !topLoadingFrame && !WorkQueue::shared()->count())
         dump();
@@ -171,7 +171,7 @@ void LayoutTestController::notifyDone()
     waitForPolicy = false;
 }
 
-JSStringRef LayoutTestController::pathToLocalResource(JSContextRef context, JSStringRef url)
+JSStringRef TestRunner::pathToLocalResource(JSContextRef context, JSStringRef url)
 {
     String requestedUrl(url->characters(), url->length());
     String resourceRoot;
@@ -197,7 +197,7 @@ JSStringRef LayoutTestController::pathToLocalResource(JSContextRef context, JSSt
     return JSStringCreateWithUTF8CString(fullPathToUrl.utf8().data());
 }
 
-void LayoutTestController::queueLoad(JSStringRef url, JSStringRef target)
+void TestRunner::queueLoad(JSStringRef url, JSStringRef target)
 {
     WebCore::KURL baseURL(WebCore::KURL(), String::fromUTF8(ewk_frame_uri_get(browser->mainFrame())));
     WebCore::KURL absoluteURL(baseURL, WTF::String(url->ustring().impl()));
@@ -208,35 +208,35 @@ void LayoutTestController::queueLoad(JSStringRef url, JSStringRef target)
     WorkQueue::shared()->queue(new LoadItem(jsAbsoluteURL.get(), target));
 }
 
-void LayoutTestController::setAcceptsEditing(bool acceptsEditing)
+void TestRunner::setAcceptsEditing(bool acceptsEditing)
 {
     ewk_view_editable_set(browser->mainView(), acceptsEditing);
 }
 
-void LayoutTestController::setAlwaysAcceptCookies(bool alwaysAcceptCookies)
+void TestRunner::setAlwaysAcceptCookies(bool alwaysAcceptCookies)
 {
     ewk_cookies_policy_set(alwaysAcceptCookies ? EWK_COOKIE_JAR_ACCEPT_ALWAYS : EWK_COOKIE_JAR_ACCEPT_NEVER);
 }
 
-void LayoutTestController::setCustomPolicyDelegate(bool enabled, bool permissive)
+void TestRunner::setCustomPolicyDelegate(bool enabled, bool permissive)
 {
     policyDelegateEnabled = enabled;
     policyDelegatePermissive = permissive;
 }
 
-void LayoutTestController::waitForPolicyDelegate()
+void TestRunner::waitForPolicyDelegate()
 {
     setCustomPolicyDelegate(true, false);
     waitForPolicy = true;
     setWaitToDump(true);
 }
 
-void LayoutTestController::setScrollbarPolicy(JSStringRef, JSStringRef)
+void TestRunner::setScrollbarPolicy(JSStringRef, JSStringRef)
 {
     notImplemented();
 }
 
-void LayoutTestController::addOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef protocol, JSStringRef host, bool includeSubdomains)
+void TestRunner::addOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef protocol, JSStringRef host, bool includeSubdomains)
 {
     WebCore::KURL kurl;
     kurl.setProtocol(String(protocol->characters(), protocol->length()));
@@ -245,7 +245,7 @@ void LayoutTestController::addOriginAccessWhitelistEntry(JSStringRef sourceOrigi
     ewk_security_policy_whitelist_origin_add(sourceOrigin->ustring().utf8().data(), kurl.string().utf8().data(), includeSubdomains);
 }
 
-void LayoutTestController::removeOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef protocol, JSStringRef host, bool includeSubdomains)
+void TestRunner::removeOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef protocol, JSStringRef host, bool includeSubdomains)
 {
     WebCore::KURL kurl;
     kurl.setProtocol(String(protocol->characters(), protocol->length()));
@@ -254,17 +254,17 @@ void LayoutTestController::removeOriginAccessWhitelistEntry(JSStringRef sourceOr
     ewk_security_policy_whitelist_origin_del(sourceOrigin->ustring().utf8().data(), kurl.string().utf8().data(), includeSubdomains);
 }
 
-void LayoutTestController::setMainFrameIsFirstResponder(bool)
+void TestRunner::setMainFrameIsFirstResponder(bool)
 {
     notImplemented();
 }
 
-void LayoutTestController::setTabKeyCyclesThroughElements(bool)
+void TestRunner::setTabKeyCyclesThroughElements(bool)
 {
     notImplemented();
 }
 
-void LayoutTestController::setUseDashboardCompatibilityMode(bool)
+void TestRunner::setUseDashboardCompatibilityMode(bool)
 {
     notImplemented();
 }
@@ -272,13 +272,13 @@ void LayoutTestController::setUseDashboardCompatibilityMode(bool)
 static CString gUserStyleSheet;
 static bool gUserStyleSheetEnabled = true;
 
-void LayoutTestController::setUserStyleSheetEnabled(bool flag)
+void TestRunner::setUserStyleSheetEnabled(bool flag)
 {
     gUserStyleSheetEnabled = flag;
     ewk_view_setting_user_stylesheet_set(browser->mainView(), flag ? gUserStyleSheet.data() : 0);
 }
 
-void LayoutTestController::setUserStyleSheetLocation(JSStringRef path)
+void TestRunner::setUserStyleSheetLocation(JSStringRef path)
 {
     gUserStyleSheet = path->ustring().utf8();
 
@@ -286,12 +286,12 @@ void LayoutTestController::setUserStyleSheetLocation(JSStringRef path)
         setUserStyleSheetEnabled(true);
 }
 
-void LayoutTestController::setValueForUser(JSContextRef context, JSValueRef nodeObject, JSStringRef value)
+void TestRunner::setValueForUser(JSContextRef context, JSValueRef nodeObject, JSStringRef value)
 {
     DumpRenderTreeSupportEfl::setValueForUser(context, nodeObject, WTF::String(value->ustring().impl()));
 }
 
-void LayoutTestController::setViewModeMediaFeature(JSStringRef mode)
+void TestRunner::setViewModeMediaFeature(JSStringRef mode)
 {
     Evas_Object* view = browser->mainView();
     if (!view)
@@ -309,12 +309,12 @@ void LayoutTestController::setViewModeMediaFeature(JSStringRef mode)
         ewk_view_mode_set(view, EWK_VIEW_MODE_MINIMIZED);
 }
 
-void LayoutTestController::setWindowIsKey(bool)
+void TestRunner::setWindowIsKey(bool)
 {
     notImplemented();
 }
 
-void LayoutTestController::setSmartInsertDeleteEnabled(bool flag)
+void TestRunner::setSmartInsertDeleteEnabled(bool flag)
 {
     DumpRenderTreeSupportEfl::setSmartInsertDeleteEnabled(browser->mainView(), flag);
 }
@@ -322,11 +322,11 @@ void LayoutTestController::setSmartInsertDeleteEnabled(bool flag)
 static Eina_Bool waitToDumpWatchdogFired(void*)
 {
     waitToDumpWatchdog = 0;
-    gLayoutTestController->waitToDumpWatchdogTimerFired();
+    gTestRunner->waitToDumpWatchdogTimerFired();
     return ECORE_CALLBACK_CANCEL;
 }
 
-void LayoutTestController::setWaitToDump(bool waitUntilDone)
+void TestRunner::setWaitToDump(bool waitUntilDone)
 {
     static const double timeoutSeconds = 30;
 
@@ -335,116 +335,116 @@ void LayoutTestController::setWaitToDump(bool waitUntilDone)
         waitToDumpWatchdog = ecore_timer_add(timeoutSeconds, waitToDumpWatchdogFired, 0);
 }
 
-int LayoutTestController::windowCount()
+int TestRunner::windowCount()
 {
     return browser->extraViews().size() + 1; // + 1 for the main view.
 }
 
-void LayoutTestController::setPrivateBrowsingEnabled(bool flag)
+void TestRunner::setPrivateBrowsingEnabled(bool flag)
 {
     ewk_view_setting_private_browsing_set(browser->mainView(), flag);
 }
 
-void LayoutTestController::setJavaScriptCanAccessClipboard(bool flag)
+void TestRunner::setJavaScriptCanAccessClipboard(bool flag)
 {
     ewk_view_setting_scripts_can_access_clipboard_set(browser->mainView(), flag);
 }
 
-void LayoutTestController::setXSSAuditorEnabled(bool flag)
+void TestRunner::setXSSAuditorEnabled(bool flag)
 {
     ewk_view_setting_enable_xss_auditor_set(browser->mainView(), flag);
 }
 
-void LayoutTestController::setFrameFlatteningEnabled(bool flag)
+void TestRunner::setFrameFlatteningEnabled(bool flag)
 {
     ewk_view_setting_enable_frame_flattening_set(browser->mainView(), flag);
 }
 
-void LayoutTestController::setSpatialNavigationEnabled(bool flag)
+void TestRunner::setSpatialNavigationEnabled(bool flag)
 {
     ewk_view_setting_spatial_navigation_set(browser->mainView(), flag);
 }
 
-void LayoutTestController::setAllowUniversalAccessFromFileURLs(bool)
+void TestRunner::setAllowUniversalAccessFromFileURLs(bool)
 {
     notImplemented();
 }
 
-void LayoutTestController::setAllowFileAccessFromFileURLs(bool)
+void TestRunner::setAllowFileAccessFromFileURLs(bool)
 {
     notImplemented();
 }
 
-void LayoutTestController::setAuthorAndUserStylesEnabled(bool flag)
+void TestRunner::setAuthorAndUserStylesEnabled(bool flag)
 {
     DumpRenderTreeSupportEfl::setAuthorAndUserStylesEnabled(browser->mainView(), flag);
 }
 
-void LayoutTestController::setAutofilled(JSContextRef context, JSValueRef nodeObject, bool autofilled)
+void TestRunner::setAutofilled(JSContextRef context, JSValueRef nodeObject, bool autofilled)
 {
     DumpRenderTreeSupportEfl::setAutofilled(context, nodeObject, autofilled);
 }
 
-void LayoutTestController::disableImageLoading()
+void TestRunner::disableImageLoading()
 {
     ewk_view_setting_auto_load_images_set(browser->mainView(), EINA_FALSE);
 }
 
-void LayoutTestController::setMockDeviceOrientation(bool, double, bool, double, bool, double)
+void TestRunner::setMockDeviceOrientation(bool, double, bool, double, bool, double)
 {
     // FIXME: Implement for DeviceOrientation layout tests.
     // See https://bugs.webkit.org/show_bug.cgi?id=30335.
     notImplemented();
 }
 
-void LayoutTestController::setMockGeolocationPosition(double, double, double)
+void TestRunner::setMockGeolocationPosition(double, double, double)
 {
     // FIXME: Implement for Geolocation layout tests.
     // See https://bugs.webkit.org/show_bug.cgi?id=28264.
     notImplemented();
 }
 
-void LayoutTestController::setMockGeolocationError(int, JSStringRef)
+void TestRunner::setMockGeolocationError(int, JSStringRef)
 {
     // FIXME: Implement for Geolocation layout tests.
     // See https://bugs.webkit.org/show_bug.cgi?id=28264.
     notImplemented();
 }
 
-void LayoutTestController::setGeolocationPermission(bool allow)
+void TestRunner::setGeolocationPermission(bool allow)
 {
     // FIXME: Implement for Geolocation layout tests.
     setGeolocationPermissionCommon(allow);
 }
 
-int LayoutTestController::numberOfPendingGeolocationPermissionRequests()
+int TestRunner::numberOfPendingGeolocationPermissionRequests()
 {
     // FIXME: Implement for Geolocation layout tests.
     return -1;
 }
 
-void LayoutTestController::addMockSpeechInputResult(JSStringRef, double, JSStringRef)
+void TestRunner::addMockSpeechInputResult(JSStringRef, double, JSStringRef)
 {
     // FIXME: Implement for speech input layout tests.
     // See https://bugs.webkit.org/show_bug.cgi?id=39485.
     notImplemented();
 }
 
-void LayoutTestController::setMockSpeechInputDumpRect(bool)
+void TestRunner::setMockSpeechInputDumpRect(bool)
 {
     // FIXME: Implement for speech input layout tests.
     // See https://bugs.webkit.org/show_bug.cgi?id=39485.
     notImplemented();
 }
 
-void LayoutTestController::startSpeechInput(JSContextRef inputElement)
+void TestRunner::startSpeechInput(JSContextRef inputElement)
 {
     // FIXME: Implement for speech input layout tests.
     // See https://bugs.webkit.org/show_bug.cgi?id=39485.
     notImplemented();
 }
 
-void LayoutTestController::setIconDatabaseEnabled(bool enabled)
+void TestRunner::setIconDatabaseEnabled(bool enabled)
 {
     ewk_settings_icon_database_path_set(0);
 
@@ -467,34 +467,34 @@ void LayoutTestController::setIconDatabaseEnabled(bool enabled)
         ewk_settings_icon_database_path_set(databasePath.utf8().data());
 }
 
-void LayoutTestController::setSelectTrailingWhitespaceEnabled(bool flag)
+void TestRunner::setSelectTrailingWhitespaceEnabled(bool flag)
 {
     DumpRenderTreeSupportEfl::setSelectTrailingWhitespaceEnabled(browser->mainView(), flag);
 }
 
-void LayoutTestController::setPopupBlockingEnabled(bool flag)
+void TestRunner::setPopupBlockingEnabled(bool flag)
 {
     ewk_view_setting_scripts_can_open_windows_set(browser->mainView(), !flag);
 }
 
-void LayoutTestController::setPluginsEnabled(bool flag)
+void TestRunner::setPluginsEnabled(bool flag)
 {
     ewk_view_setting_enable_plugins_set(browser->mainView(), flag);
 }
 
-bool LayoutTestController::elementDoesAutoCompleteForElementWithId(JSStringRef id)
+bool TestRunner::elementDoesAutoCompleteForElementWithId(JSStringRef id)
 {
     const String elementId(id->ustring().impl());
     const Evas_Object* mainFrame = browser->mainFrame();
     return DumpRenderTreeSupportEfl::elementDoesAutoCompleteForElementWithId(mainFrame, elementId);
 }
 
-void LayoutTestController::execCommand(JSStringRef name, JSStringRef value)
+void TestRunner::execCommand(JSStringRef name, JSStringRef value)
 {
     DumpRenderTreeSupportEfl::executeCoreCommandByName(browser->mainView(), name->ustring().utf8().data(), value->ustring().utf8().data());
 }
 
-bool LayoutTestController::findString(JSContextRef context, JSStringRef target, JSObjectRef optionsArray)
+bool TestRunner::findString(JSContextRef context, JSStringRef target, JSObjectRef optionsArray)
 {
     JSRetainPtr<JSStringRef> lengthPropertyName(Adopt, JSStringCreateWithUTF8CString("length"));
     JSValueRef lengthValue = JSObjectGetProperty(context, optionsArray, lengthPropertyName.get(), 0);
@@ -528,12 +528,12 @@ bool LayoutTestController::findString(JSContextRef context, JSStringRef target,
     return DumpRenderTreeSupportEfl::findString(browser->mainView(), WTF::String(target->ustring().impl()), options);
 }
 
-bool LayoutTestController::isCommandEnabled(JSStringRef name)
+bool TestRunner::isCommandEnabled(JSStringRef name)
 {
     return DumpRenderTreeSupportEfl::isCommandEnabled(browser->mainView(), name->ustring().utf8().data());
 }
 
-void LayoutTestController::setCacheModel(int cacheModel)
+void TestRunner::setCacheModel(int cacheModel)
 {
     unsigned int cacheTotalCapacity;
     unsigned int cacheMinDeadCapacity;
@@ -574,124 +574,124 @@ void LayoutTestController::setCacheModel(int cacheModel)
     ewk_settings_page_cache_capacity_set(pageCacheCapacity);
 }
 
-void LayoutTestController::setPersistentUserStyleSheetLocation(JSStringRef)
+void TestRunner::setPersistentUserStyleSheetLocation(JSStringRef)
 {
     notImplemented();
 }
 
-void LayoutTestController::clearPersistentUserStyleSheet()
+void TestRunner::clearPersistentUserStyleSheet()
 {
     notImplemented();
 }
 
-void LayoutTestController::clearAllApplicationCaches()
+void TestRunner::clearAllApplicationCaches()
 {
     ewk_settings_application_cache_clear();
 }
 
-void LayoutTestController::setApplicationCacheOriginQuota(unsigned long long quota)
+void TestRunner::setApplicationCacheOriginQuota(unsigned long long quota)
 {
     Ewk_Security_Origin* origin = ewk_frame_security_origin_get(browser->mainFrame());
     ewk_security_origin_application_cache_quota_set(origin, quota);
     ewk_security_origin_free(origin);
 }
 
-void LayoutTestController::clearApplicationCacheForOrigin(OpaqueJSString* url)
+void TestRunner::clearApplicationCacheForOrigin(OpaqueJSString* url)
 {
     Ewk_Security_Origin* origin = ewk_security_origin_new_from_string(url->ustring().utf8().data());
     ewk_security_origin_application_cache_clear(origin);
     ewk_security_origin_free(origin);
 }
 
-long long LayoutTestController::localStorageDiskUsageForOrigin(JSStringRef)
+long long TestRunner::localStorageDiskUsageForOrigin(JSStringRef)
 {
     // FIXME: Implement to support getting disk usage in bytes for an origin.
     notImplemented();
     return 0;
 }
 
-JSValueRef LayoutTestController::originsWithApplicationCache(JSContextRef context)
+JSValueRef TestRunner::originsWithApplicationCache(JSContextRef context)
 {
     // FIXME: Implement to get origins that contain application caches.
     notImplemented();
     return JSValueMakeUndefined(context);
 }
 
-long long LayoutTestController::applicationCacheDiskUsageForOrigin(JSStringRef)
+long long TestRunner::applicationCacheDiskUsageForOrigin(JSStringRef)
 {
     notImplemented();
     return 0;
 }
 
-void LayoutTestController::clearAllDatabases()
+void TestRunner::clearAllDatabases()
 {
     ewk_web_database_remove_all();
 }
 
-void LayoutTestController::setDatabaseQuota(unsigned long long quota)
+void TestRunner::setDatabaseQuota(unsigned long long quota)
 {
     Ewk_Security_Origin* origin = ewk_frame_security_origin_get(browser->mainFrame());
     ewk_security_origin_web_database_quota_set(origin, quota);
     ewk_security_origin_free(origin);
 }
 
-JSValueRef LayoutTestController::originsWithLocalStorage(JSContextRef context)
+JSValueRef TestRunner::originsWithLocalStorage(JSContextRef context)
 {
     notImplemented();
     return JSValueMakeUndefined(context);
 }
 
-void LayoutTestController::deleteAllLocalStorage()
+void TestRunner::deleteAllLocalStorage()
 {
     notImplemented();
 }
 
-void LayoutTestController::deleteLocalStorageForOrigin(JSStringRef)
+void TestRunner::deleteLocalStorageForOrigin(JSStringRef)
 {
     notImplemented();
 }
 
-void LayoutTestController::observeStorageTrackerNotifications(unsigned)
+void TestRunner::observeStorageTrackerNotifications(unsigned)
 {
     notImplemented();
 }
 
-void LayoutTestController::syncLocalStorage()
+void TestRunner::syncLocalStorage()
 {
     notImplemented();
 }
 
-void LayoutTestController::setDomainRelaxationForbiddenForURLScheme(bool forbidden, JSStringRef scheme)
+void TestRunner::setDomainRelaxationForbiddenForURLScheme(bool forbidden, JSStringRef scheme)
 {
     DumpRenderTreeSupportEfl::setDomainRelaxationForbiddenForURLScheme(forbidden, WTF::String(scheme->ustring().impl()));
 }
 
-void LayoutTestController::goBack()
+void TestRunner::goBack()
 {
     ewk_frame_back(browser->mainFrame());
 }
 
-void LayoutTestController::setDefersLoading(bool defers)
+void TestRunner::setDefersLoading(bool defers)
 {
     DumpRenderTreeSupportEfl::setDefersLoading(browser->mainView(), defers);
 }
 
-void LayoutTestController::setAppCacheMaximumSize(unsigned long long size)
+void TestRunner::setAppCacheMaximumSize(unsigned long long size)
 {
     ewk_settings_application_cache_max_quota_set(size);
 }
 
-bool LayoutTestController::pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, double time, JSStringRef elementId)
+bool TestRunner::pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, double time, JSStringRef elementId)
 {
     return DumpRenderTreeSupportEfl::pauseAnimation(browser->mainFrame(), animationName->ustring().utf8().data(), elementId->ustring().utf8().data(), time);
 }
 
-bool LayoutTestController::pauseTransitionAtTimeOnElementWithId(JSStringRef propertyName, double time, JSStringRef elementId)
+bool TestRunner::pauseTransitionAtTimeOnElementWithId(JSStringRef propertyName, double time, JSStringRef elementId)
 {
     return DumpRenderTreeSupportEfl::pauseTransition(browser->mainFrame(), propertyName->ustring().utf8().data(), elementId->ustring().utf8().data(), time);
 }
 
-unsigned LayoutTestController::numberOfActiveAnimations() const
+unsigned TestRunner::numberOfActiveAnimations() const
 {
     return DumpRenderTreeSupportEfl::activeAnimationsCount(browser->mainFrame());
 }
@@ -706,7 +706,7 @@ static inline int toInt(JSStringRef value)
     return atoi(value->ustring().utf8().data());
 }
 
-void LayoutTestController::overridePreference(JSStringRef key, JSStringRef value)
+void TestRunner::overridePreference(JSStringRef key, JSStringRef value)
 {
     if (equals(key, "WebKitJavaScriptEnabled"))
         ewk_view_setting_enable_scripts_set(browser->mainView(), toBool(value));
@@ -735,56 +735,56 @@ void LayoutTestController::overridePreference(JSStringRef key, JSStringRef value
     else if (equals(key, "WebKitWebAudioEnabled"))
         ewk_view_setting_web_audio_set(browser->mainView(), toBool(value));
     else
-        fprintf(stderr, "LayoutTestController::overridePreference tried to override unknown preference '%s'.\n", value->ustring().utf8().data());
+        fprintf(stderr, "TestRunner::overridePreference tried to override unknown preference '%s'.\n", value->ustring().utf8().data());
 }
 
-void LayoutTestController::addUserScript(JSStringRef source, bool runAtStart, bool allFrames)
+void TestRunner::addUserScript(JSStringRef source, bool runAtStart, bool allFrames)
 {
     DumpRenderTreeSupportEfl::addUserScript(browser->mainView(), String(source->ustring().impl()), runAtStart, allFrames);
 }
 
-void LayoutTestController::addUserStyleSheet(JSStringRef source, bool allFrames)
+void TestRunner::addUserStyleSheet(JSStringRef source, bool allFrames)
 {
     DumpRenderTreeSupportEfl::addUserStyleSheet(browser->mainView(), WTF::String(source->ustring().impl()), allFrames);
 }
 
-void LayoutTestController::setDeveloperExtrasEnabled(bool enabled)
+void TestRunner::setDeveloperExtrasEnabled(bool enabled)
 {
     ewk_view_setting_enable_developer_extras_set(browser->mainView(), enabled);
 }
 
-void LayoutTestController::setAsynchronousSpellCheckingEnabled(bool)
+void TestRunner::setAsynchronousSpellCheckingEnabled(bool)
 {
     notImplemented();
 }
 
-void LayoutTestController::showWebInspector()
+void TestRunner::showWebInspector()
 {
     ewk_view_web_inspector_show(browser->mainView());
     browser->waitInspectorLoadFinished();
 }
 
-void LayoutTestController::closeWebInspector()
+void TestRunner::closeWebInspector()
 {
     ewk_view_web_inspector_close(browser->mainView());
 }
 
-void LayoutTestController::evaluateInWebInspector(long callId, JSStringRef script)
+void TestRunner::evaluateInWebInspector(long callId, JSStringRef script)
 {
     DumpRenderTreeSupportEfl::evaluateInWebInspector(browser->mainView(), callId, String(script->ustring().impl()));
 }
 
-void LayoutTestController::evaluateScriptInIsolatedWorldAndReturnValue(unsigned, JSObjectRef, JSStringRef)
+void TestRunner::evaluateScriptInIsolatedWorldAndReturnValue(unsigned, JSObjectRef, JSStringRef)
 {
     notImplemented();
 }
 
-void LayoutTestController::evaluateScriptInIsolatedWorld(unsigned worldID, JSObjectRef globalObject, JSStringRef script)
+void TestRunner::evaluateScriptInIsolatedWorld(unsigned worldID, JSObjectRef globalObject, JSStringRef script)
 {
     DumpRenderTreeSupportEfl::evaluateScriptInIsolatedWorld(browser->mainFrame(), worldID, globalObject, String(script->ustring().impl()));
 }
 
-void LayoutTestController::removeAllVisitedLinks()
+void TestRunner::removeAllVisitedLinks()
 {
     Ewk_History* history = ewk_view_history_get(browser->mainView());
     if (!history)
@@ -793,27 +793,27 @@ void LayoutTestController::removeAllVisitedLinks()
     ewk_history_clear(history);
 }
 
-bool LayoutTestController::callShouldCloseOnWebView()
+bool TestRunner::callShouldCloseOnWebView()
 {
     return DumpRenderTreeSupportEfl::callShouldCloseOnWebView(browser->mainFrame());
 }
 
-void LayoutTestController::apiTestNewWindowDataLoadBaseURL(JSStringRef, JSStringRef)
+void TestRunner::apiTestNewWindowDataLoadBaseURL(JSStringRef, JSStringRef)
 {
     notImplemented();
 }
 
-void LayoutTestController::apiTestGoToCurrentBackForwardItem()
+void TestRunner::apiTestGoToCurrentBackForwardItem()
 {
     notImplemented();
 }
 
-void LayoutTestController::setWebViewEditable(bool)
+void TestRunner::setWebViewEditable(bool)
 {
     ewk_frame_editable_set(browser->mainFrame(), EINA_TRUE);
 }
 
-JSRetainPtr<JSStringRef> LayoutTestController::markerTextForListItem(JSContextRef context, JSValueRef nodeObject) const
+JSRetainPtr<JSStringRef> TestRunner::markerTextForListItem(JSContextRef context, JSValueRef nodeObject) const
 {
     String markerTextChar = DumpRenderTreeSupportEfl::markerTextForListItem(context, nodeObject);
     if (markerTextChar.isEmpty())
@@ -823,27 +823,27 @@ JSRetainPtr<JSStringRef> LayoutTestController::markerTextForListItem(JSContextRe
     return markerText;
 }
 
-void LayoutTestController::authenticateSession(JSStringRef, JSStringRef, JSStringRef)
+void TestRunner::authenticateSession(JSStringRef, JSStringRef, JSStringRef)
 {
     notImplemented();
 }
 
-void LayoutTestController::abortModal()
+void TestRunner::abortModal()
 {
     notImplemented();
 }
 
-void LayoutTestController::setSerializeHTTPLoads(bool serialize)
+void TestRunner::setSerializeHTTPLoads(bool serialize)
 {
     DumpRenderTreeSupportEfl::setSerializeHTTPLoads(serialize);
 }
 
-void LayoutTestController::setMinimumTimerInterval(double minimumTimerInterval)
+void TestRunner::setMinimumTimerInterval(double minimumTimerInterval)
 {
     ewk_view_setting_minimum_timer_interval_set(browser->mainView(), minimumTimerInterval);
 }
 
-void LayoutTestController::setTextDirection(JSStringRef direction)
+void TestRunner::setTextDirection(JSStringRef direction)
 {
     Ewk_Text_Direction ewkDirection;
     if (JSStringIsEqualToUTF8CString(direction, "auto"))
@@ -853,43 +853,43 @@ void LayoutTestController::setTextDirection(JSStringRef direction)
     else if (JSStringIsEqualToUTF8CString(direction, "ltr"))
         ewkDirection = EWK_TEXT_DIRECTION_LEFT_TO_RIGHT;
     else {
-        fprintf(stderr, "LayoutTestController::setTextDirection called with unknown direction: '%s'.\n", direction->ustring().utf8().data());
+        fprintf(stderr, "TestRunner::setTextDirection called with unknown direction: '%s'.\n", direction->ustring().utf8().data());
         return;
     }
 
     ewk_view_text_direction_set(browser->mainView(), ewkDirection);
 }
 
-void LayoutTestController::addChromeInputField()
+void TestRunner::addChromeInputField()
 {
     notImplemented();
 }
 
-void LayoutTestController::removeChromeInputField()
+void TestRunner::removeChromeInputField()
 {
     notImplemented();
 }
 
-void LayoutTestController::focusWebView()
+void TestRunner::focusWebView()
 {
     notImplemented();
 }
 
-void LayoutTestController::setBackingScaleFactor(double)
+void TestRunner::setBackingScaleFactor(double)
 {
     notImplemented();
 }
 
-void LayoutTestController::simulateDesktopNotificationClick(JSStringRef title)
+void TestRunner::simulateDesktopNotificationClick(JSStringRef title)
 {
 }
 
-void LayoutTestController::resetPageVisibility()
+void TestRunner::resetPageVisibility()
 {
     ewk_view_visibility_state_set(browser->mainView(), EWK_PAGE_VISIBILITY_STATE_VISIBLE, true);
 }
 
-void LayoutTestController::setPageVisibility(const char* visibility)
+void TestRunner::setPageVisibility(const char* visibility)
 {
     String newVisibility(visibility);
     if (newVisibility == "visible")
@@ -902,12 +902,12 @@ void LayoutTestController::setPageVisibility(const char* visibility)
         ewk_view_visibility_state_set(browser->mainView(), EWK_PAGE_VISIBILITY_STATE_PREVIEW, false);
 }
 
-void LayoutTestController::setAutomaticLinkDetectionEnabled(bool)
+void TestRunner::setAutomaticLinkDetectionEnabled(bool)
 {
     notImplemented();
 }
 
-void LayoutTestController::sendWebIntentResponse(JSStringRef response)
+void TestRunner::sendWebIntentResponse(JSStringRef response)
 {
     Ewk_Intent_Request* request = browser->currentIntentRequest();
     if (!request)
@@ -916,12 +916,12 @@ void LayoutTestController::sendWebIntentResponse(JSStringRef response)
     DumpRenderTreeSupportEfl::sendWebIntentResponse(request, response);
 }
 
-void LayoutTestController::deliverWebIntent(JSStringRef action, JSStringRef type, JSStringRef data)
+void TestRunner::deliverWebIntent(JSStringRef action, JSStringRef type, JSStringRef data)
 {
     DumpRenderTreeSupportEfl::deliverWebIntent(browser->mainFrame(), action, type, data);
 }
 
-void LayoutTestController::setStorageDatabaseIdleInterval(double)
+void TestRunner::setStorageDatabaseIdleInterval(double)
 {
     notImplemented();
 }
index fe745bb..75986d8 100644 (file)
@@ -78,7 +78,7 @@ static int dumpTree = 1;
 static int useTimeoutWatchdog = 1;
 
 AccessibilityController* axController = 0;
-RefPtr<LayoutTestController> gLayoutTestController;
+RefPtr<TestRunner> gTestRunner;
 static GCController* gcController = 0;
 static WebKitWebView* webView;
 static GtkWidget* window;
@@ -140,7 +140,7 @@ void dumpFrameScrollPosition(WebKitWebFrame* frame)
         printf("scrolled to %ld,%ld\n", x, y);
     }
 
-    if (gLayoutTestController->dumpChildFrameScrollPositions()) {
+    if (gTestRunner->dumpChildFrameScrollPositions()) {
         GSList* children = DumpRenderTreeSupportGtk::getFrameChildren(frame);
         for (GSList* child = children; child; child = g_slist_next(child))
             dumpFrameScrollPosition(static_cast<WebKitWebFrame*>(child->data));
@@ -292,7 +292,7 @@ static gchar* dumpFramesAsText(WebKitWebFrame* frame)
         result = g_strdup_printf("\n--------\nFrame: '%s'\n--------\n%s\n", frameName, innerText.data());
     }
 
-    if (gLayoutTestController->dumpChildFramesAsText()) {
+    if (gTestRunner->dumpChildFramesAsText()) {
         GSList* children = DumpRenderTreeSupportGtk::getFrameChildren(frame);
         for (GSList* child = children; child; child = g_slist_next(child)) {
             GOwnPtr<gchar> childData(dumpFramesAsText(static_cast<WebKitWebFrame*>(child->data)));
@@ -574,12 +574,12 @@ void dump()
         gchar* responseMimeType = webkit_web_frame_get_response_mime_type(mainFrame);
 
         if (g_str_equal(responseMimeType, "text/plain")) {
-            gLayoutTestController->setDumpAsText(true);
-            gLayoutTestController->setGeneratePixelResults(false);
+            gTestRunner->setDumpAsText(true);
+            gTestRunner->setGeneratePixelResults(false);
         }
         g_free(responseMimeType);
 
-        if (gLayoutTestController->dumpAsText())
+        if (gTestRunner->dumpAsText())
             result = dumpFramesAsText(mainFrame);
         else {
             // Widget resizing is done asynchronously in GTK+. We pump the main
@@ -596,11 +596,11 @@ void dump()
 
         if (!result) {
             const char* errorMessage;
-            if (gLayoutTestController->dumpAsText())
+            if (gTestRunner->dumpAsText())
                 errorMessage = "[documentElement innerText]";
-            else if (gLayoutTestController->dumpDOMAsWebArchive())
+            else if (gTestRunner->dumpDOMAsWebArchive())
                 errorMessage = "[[mainFrame DOMDocument] webArchive]";
-            else if (gLayoutTestController->dumpSourceAsWebArchive())
+            else if (gTestRunner->dumpSourceAsWebArchive())
                 errorMessage = "[[mainFrame dataSource] webArchive]";
             else
                 errorMessage = "[mainFrame renderTreeAsExternalRepresentation]";
@@ -608,10 +608,10 @@ void dump()
         } else {
             printf("%s", result);
             g_free(result);
-            if (!gLayoutTestController->dumpAsText() && !gLayoutTestController->dumpDOMAsWebArchive() && !gLayoutTestController->dumpSourceAsWebArchive())
+            if (!gTestRunner->dumpAsText() && !gTestRunner->dumpDOMAsWebArchive() && !gTestRunner->dumpSourceAsWebArchive())
                 dumpFrameScrollPosition(mainFrame);
 
-            if (gLayoutTestController->dumpBackForwardList())
+            if (gTestRunner->dumpBackForwardList())
                 dumpBackForwardListForAllWebViews();
         }
 
@@ -624,11 +624,11 @@ void dump()
     }
 
     if (dumpPixelsForCurrentTest
-     && gLayoutTestController->generatePixelResults()
-     && !gLayoutTestController->dumpDOMAsWebArchive()
-     && !gLayoutTestController->dumpSourceAsWebArchive()) {
+     && gTestRunner->generatePixelResults()
+     && !gTestRunner->dumpDOMAsWebArchive()
+     && !gTestRunner->dumpSourceAsWebArchive()) {
         DumpRenderTreeSupportGtk::forceWebViewPaint(webView);
-        dumpWebViewAsPixelsAndCompareWithExpected(gLayoutTestController->expectedPixelHash());
+        dumpWebViewAsPixelsAndCompareWithExpected(gTestRunner->expectedPixelHash());
     }
 
     // FIXME: call displayWebView here when we support --paint
@@ -706,22 +706,22 @@ static void runTest(const string& inputLine)
 
     resetDefaultsToConsistentValues();
 
-    gLayoutTestController = LayoutTestController::create(testURL, command.expectedPixelHash);
+    gTestRunner = TestRunner::create(testURL, command.expectedPixelHash);
     topLoadingFrame = 0;
     done = false;
 
-    gLayoutTestController->setIconDatabaseEnabled(false);
+    gTestRunner->setIconDatabaseEnabled(false);
 
     if (shouldLogFrameLoadDelegates(testURL))
-        gLayoutTestController->setDumpFrameLoadCallbacks(true);
+        gTestRunner->setDumpFrameLoadCallbacks(true);
 
     if (shouldEnableDeveloperExtras(testURL)) {
-        gLayoutTestController->setDeveloperExtrasEnabled(true);
+        gTestRunner->setDeveloperExtrasEnabled(true);
         if (shouldOpenWebInspector(testURL))
-            gLayoutTestController->showWebInspector();
+            gTestRunner->showWebInspector();
         if (shouldDumpAsText(testURL)) {
-            gLayoutTestController->setDumpAsText(true);
-            gLayoutTestController->setGeneratePixelResults(false);
+            gTestRunner->setDumpAsText(true);
+            gTestRunner->setGeneratePixelResults(false);
         }
     }
 
@@ -731,8 +731,8 @@ static void runTest(const string& inputLine)
     bool isSVGW3CTest = (testURL.find("svg/W3C-SVG-1.1") != string::npos);
     GtkAllocation size;
     size.x = size.y = 0;
-    size.width = isSVGW3CTest ? 480 : LayoutTestController::maxViewWidth;
-    size.height = isSVGW3CTest ? 360 : LayoutTestController::maxViewHeight;
+    size.width = isSVGW3CTest ? 480 : TestRunner::maxViewWidth;
+    size.height = isSVGW3CTest ? 360 : TestRunner::maxViewHeight;
     gtk_window_resize(GTK_WINDOW(window), size.width, size.height);
     gtk_widget_size_allocate(container, &size);
 
@@ -753,12 +753,12 @@ static void runTest(const string& inputLine)
 
     // If developer extras enabled Web Inspector may have been open by the test.
     if (shouldEnableDeveloperExtras(testURL)) {
-        gLayoutTestController->closeWebInspector();
-        gLayoutTestController->setDeveloperExtrasEnabled(false);
+        gTestRunner->closeWebInspector();
+        gTestRunner->setDeveloperExtrasEnabled(false);
     }
 
     // Also check if we still have opened webViews and free them.
-    if (gLayoutTestController->closeRemainingWindowsWhenComplete() || webViewList) {
+    if (gTestRunner->closeRemainingWindowsWhenComplete() || webViewList) {
         while (webViewList) {
             g_object_unref(WEBKIT_WEB_VIEW(webViewList->data));
             webViewList = g_slist_next(webViewList);
@@ -772,7 +772,7 @@ static void runTest(const string& inputLine)
     // A blank load seems to be necessary to reset state after certain tests.
     webkit_web_view_open(webView, "about:blank");
 
-    gLayoutTestController.clear();
+    gTestRunner.clear();
 
     // terminate the (possibly empty) pixels block after all the state reset
     sendPixelResultsEOF();
@@ -789,7 +789,7 @@ void webViewLoadStarted(WebKitWebView* view, WebKitWebFrame* frame, void*)
 static gboolean processWork(void* data)
 {
     // if we finish all the commands, we're ready to dump state
-    if (WorkQueue::shared()->pr