Title: [139821] trunk
Revision
139821
Author
[email protected]
Date
2013-01-15 18:39:17 -0800 (Tue, 15 Jan 2013)

Log Message

Unreviewed, rolling out r139792.
http://trac.webkit.org/changeset/139792
https://bugs.webkit.org/show_bug.cgi?id=106970

Broke the windows build.

Source/_javascript_Core: 

* bytecode/GlobalResolveInfo.h: Removed property svn:mergeinfo.

Tools: 

* DumpRenderTree/chromium/DRTTestRunner.cpp:
(DRTTestRunner::DRTTestRunner):
(DRTTestRunner::notifyDone):
(DRTTestRunner::reset):
(DRTTestRunner::setAlwaysAcceptCookies):
(DRTTestRunner::setWindowIsKey):
(DRTTestRunner::pathToLocalResource):
(DRTTestRunner::setPOSIXLocale):
(InvokeCallbackTask):
(InvokeCallbackTask::InvokeCallbackTask):
(InvokeCallbackTask::runIfValid):
(DRTTestRunner::setBackingScaleFactor):
* DumpRenderTree/chromium/DRTTestRunner.h:
(DRTTestRunner):
(DRTTestRunner::taskList):
* DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
(WebTestRunner::WebTestDelegate::setDatabaseQuota):
* DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
(WebTestRunner::TestRunner::TestRunner):
(WebTestRunner::TestRunner::reset):
(WebTestRunner::TestRunner::setDatabaseQuota):
* DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
(TestRunner):
* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::setPendingExtraData):
(WebViewHost::setDeviceScaleFactor):
* DumpRenderTree/chromium/WebViewHost.h:
(WebViewHost):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (139820 => 139821)


--- trunk/Source/_javascript_Core/ChangeLog	2013-01-16 02:38:07 UTC (rev 139820)
+++ trunk/Source/_javascript_Core/ChangeLog	2013-01-16 02:39:17 UTC (rev 139821)
@@ -1,3 +1,13 @@
+2013-01-15  Levi Weintraub  <[email protected]>
+
+        Unreviewed, rolling out r139792.
+        http://trac.webkit.org/changeset/139792
+        https://bugs.webkit.org/show_bug.cgi?id=106970
+
+        Broke the windows build.
+
+        * bytecode/GlobalResolveInfo.h: Removed property svn:mergeinfo.
+
 2013-01-15  Pratik Solanki  <[email protected]>
 
         Use MADV_FREE_REUSABLE to return JIT memory to OS

Modified: trunk/Tools/ChangeLog (139820 => 139821)


--- trunk/Tools/ChangeLog	2013-01-16 02:38:07 UTC (rev 139820)
+++ trunk/Tools/ChangeLog	2013-01-16 02:39:17 UTC (rev 139821)
@@ -1,3 +1,40 @@
+2013-01-15  Levi Weintraub  <[email protected]>
+
+        Unreviewed, rolling out r139792.
+        http://trac.webkit.org/changeset/139792
+        https://bugs.webkit.org/show_bug.cgi?id=106970
+
+        Broke the windows build.
+
+        * DumpRenderTree/chromium/DRTTestRunner.cpp:
+        (DRTTestRunner::DRTTestRunner):
+        (DRTTestRunner::notifyDone):
+        (DRTTestRunner::reset):
+        (DRTTestRunner::setAlwaysAcceptCookies):
+        (DRTTestRunner::setWindowIsKey):
+        (DRTTestRunner::pathToLocalResource):
+        (DRTTestRunner::setPOSIXLocale):
+        (InvokeCallbackTask):
+        (InvokeCallbackTask::InvokeCallbackTask):
+        (InvokeCallbackTask::runIfValid):
+        (DRTTestRunner::setBackingScaleFactor):
+        * DumpRenderTree/chromium/DRTTestRunner.h:
+        (DRTTestRunner):
+        (DRTTestRunner::taskList):
+        * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+        (WebTestRunner::WebTestDelegate::setDatabaseQuota):
+        * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+        (WebTestRunner::TestRunner::TestRunner):
+        (WebTestRunner::TestRunner::reset):
+        (WebTestRunner::TestRunner::setDatabaseQuota):
+        * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+        (TestRunner):
+        * DumpRenderTree/chromium/WebViewHost.cpp:
+        (WebViewHost::setPendingExtraData):
+        (WebViewHost::setDeviceScaleFactor):
+        * DumpRenderTree/chromium/WebViewHost.h:
+        (WebViewHost):
+
 2013-01-15  Ryosuke Niwa  <[email protected]>
 
         Build fix after r139357. The port name of MacWK2EWS should be 'mac-wk2'.

Modified: trunk/Tools/DumpRenderTree/chromium/DRTTestRunner.cpp (139820 => 139821)


--- trunk/Tools/DumpRenderTree/chromium/DRTTestRunner.cpp	2013-01-16 02:38:07 UTC (rev 139820)
+++ trunk/Tools/DumpRenderTree/chromium/DRTTestRunner.cpp	2013-01-16 02:39:17 UTC (rev 139821)
@@ -68,6 +68,7 @@
 #include "webkit/support/webkit_support.h"
 #include <algorithm>
 #include <cctype>
+#include <clocale>
 #include <cstdlib>
 #include <limits>
 #include <sstream>
@@ -115,6 +116,7 @@
 #endif
     bindMethod("notifyDone", &DRTTestRunner::notifyDone);
     bindMethod("numberOfPendingGeolocationPermissionRequests", &DRTTestRunner:: numberOfPendingGeolocationPermissionRequests);
+    bindMethod("pathToLocalResource", &DRTTestRunner::pathToLocalResource);
     bindMethod("queueBackNavigation", &DRTTestRunner::queueBackNavigation);
     bindMethod("queueForwardNavigation", &DRTTestRunner::queueForwardNavigation);
     bindMethod("queueLoadingScript", &DRTTestRunner::queueLoadingScript);
@@ -122,6 +124,7 @@
     bindMethod("queueLoadHTMLString", &DRTTestRunner::queueLoadHTMLString);
     bindMethod("queueNonLoadingScript", &DRTTestRunner::queueNonLoadingScript);
     bindMethod("queueReload", &DRTTestRunner::queueReload);
+    bindMethod("setAlwaysAcceptCookies", &DRTTestRunner::setAlwaysAcceptCookies);
     bindMethod("setCloseRemainingWindowsWhenComplete", &DRTTestRunner::setCloseRemainingWindowsWhenComplete);
     bindMethod("setCustomPolicyDelegate", &DRTTestRunner::setCustomPolicyDelegate);
     bindMethod("setGeolocationPermission", &DRTTestRunner::setGeolocationPermission);
@@ -132,9 +135,12 @@
     bindMethod("setPointerLockWillRespondAsynchronously", &DRTTestRunner::setPointerLockWillRespondAsynchronously);
     bindMethod("setPointerLockWillFailSynchronously", &DRTTestRunner::setPointerLockWillFailSynchronously);
 #endif
+    bindMethod("setPOSIXLocale", &DRTTestRunner::setPOSIXLocale);
+    bindMethod("setBackingScaleFactor", &DRTTestRunner::setBackingScaleFactor);
     bindMethod("setWillSendRequestClearHeader", &DRTTestRunner::setWillSendRequestClearHeader);
     bindMethod("setWillSendRequestReturnsNull", &DRTTestRunner::setWillSendRequestReturnsNull);
     bindMethod("setWillSendRequestReturnsNullOnRedirect", &DRTTestRunner::setWillSendRequestReturnsNullOnRedirect);
+    bindMethod("setWindowIsKey", &DRTTestRunner::setWindowIsKey);
 #if ENABLE(NOTIFICATIONS)
     bindMethod("simulateLegacyWebNotificationClick", &DRTTestRunner::simulateLegacyWebNotificationClick);
 #endif
@@ -213,7 +219,7 @@
 void DRTTestRunner::notifyDone(const CppArgumentList&, CppVariant* result)
 {
     // Test didn't timeout. Kill the timeout timer.
-    taskList()->revokeAll();
+    m_taskList.revokeAll();
 
     completeNotifyDone(false);
     result->setNull();
@@ -384,16 +390,23 @@
 void DRTTestRunner::reset()
 {
     TestRunner::reset();
+    if (m_shell)
+        m_shell->webViewHost()->setDeviceScaleFactor(1);
     m_waitUntilDone = false;
     m_webHistoryItemCount.set(0);
     m_titleTextDirection.set("ltr");
     m_interceptPostMessage.set(false);
 
+    webkit_support::SetAcceptAllCookies(false);
+
+    setlocale(LC_ALL, "");
+
     if (m_closeRemainingWindows)
         m_shell->closeRemainingWindows();
     else
         m_closeRemainingWindows = true;
     m_workQueue.reset();
+    m_taskList.revokeAll();
 }
 
 void DRTTestRunner::locationChangeDone()
@@ -426,6 +439,20 @@
     result->setNull();
 }
 
+void DRTTestRunner::setAlwaysAcceptCookies(const CppArgumentList& arguments, CppVariant* result)
+{
+    if (arguments.size() > 0)
+        webkit_support::SetAcceptAllCookies(cppVariantToBool(arguments[0]));
+    result->setNull();
+}
+
+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 DRTTestRunner::setCustomPolicyDelegate(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() > 0 && arguments[0].isBool()) {
@@ -469,7 +496,45 @@
     result->setNull();
 }
 
+void DRTTestRunner::pathToLocalResource(const CppArgumentList& arguments, CppVariant* result)
+{
+    result->setNull();
+    if (arguments.size() <= 0 || !arguments[0].isString())
+        return;
 
+    string url = ""
+#if OS(WINDOWS)
+    if (!url.find("/tmp/")) {
+        // We want a temp file.
+        const unsigned tempPrefixLength = 5;
+        size_t bufferSize = MAX_PATH;
+        OwnArrayPtr<WCHAR> tempPath = adoptArrayPtr(new WCHAR[bufferSize]);
+        DWORD tempLength = ::GetTempPathW(bufferSize, tempPath.get());
+        if (tempLength + url.length() - tempPrefixLength + 1 > bufferSize) {
+            bufferSize = tempLength + url.length() - tempPrefixLength + 1;
+            tempPath = adoptArrayPtr(new WCHAR[bufferSize]);
+            tempLength = GetTempPathW(bufferSize, tempPath.get());
+            ASSERT(tempLength < bufferSize);
+        }
+        string resultPath(WebString(tempPath.get(), tempLength).utf8());
+        resultPath.append(url.substr(tempPrefixLength));
+        result->set(resultPath);
+        return;
+    }
+#endif
+
+    // Some layout tests use file://// which we resolve as a UNC path. Normalize
+    // them to just file:///.
+    string lowerUrl = url;
+    transform(lowerUrl.begin(), lowerUrl.end(), lowerUrl.begin(), ::tolower);
+    while (!lowerUrl.find("file:////")) {
+        url = "" 8) + url.substr(9);
+        lowerUrl = lowerUrl.substr(0, 8) + lowerUrl.substr(9);
+    }
+    result->set(webkit_support::RewriteLayoutTestsURL(url).spec());
+}
+
+
 #if ENABLE(NOTIFICATIONS)
 void DRTTestRunner::grantWebNotificationPermission(const CppArgumentList& arguments, CppVariant* result)
 {
@@ -517,6 +582,13 @@
     result->setNull();
 }
 
+void DRTTestRunner::setPOSIXLocale(const CppArgumentList& arguments, CppVariant* result)
+{
+    result->setNull();
+    if (arguments.size() == 1 && arguments[0].isString())
+        setlocale(LC_ALL, arguments[0].toString().c_str());
+}
+
 void DRTTestRunner::numberOfPendingGeolocationPermissionRequests(const CppArgumentList& arguments, CppVariant* result)
 {
     result->setNull();
@@ -632,6 +704,40 @@
 }
 #endif
 
+class InvokeCallbackTask : public WebMethodTask<DRTTestRunner> {
+public:
+    InvokeCallbackTask(DRTTestRunner* object, PassOwnArrayPtr<CppVariant> callbackArguments, uint32_t numberOfArguments)
+        : WebMethodTask<DRTTestRunner>(object)
+        , m_callbackArguments(callbackArguments)
+        , m_numberOfArguments(numberOfArguments)
+    {
+    }
+
+    virtual void runIfValid()
+    {
+        CppVariant invokeResult;
+        m_callbackArguments[0].invokeDefault(m_callbackArguments.get(), m_numberOfArguments, invokeResult);
+    }
+
+private:
+    OwnArrayPtr<CppVariant> m_callbackArguments;
+    uint32_t m_numberOfArguments;
+};
+
+void DRTTestRunner::setBackingScaleFactor(const CppArgumentList& arguments, CppVariant* result)
+{
+    if (arguments.size() < 2 || !arguments[0].isNumber() || !arguments[1].isObject())
+        return;
+    
+    float value = arguments[0].value.doubleValue;
+    m_shell->webViewHost()->setDeviceScaleFactor(value);
+
+    OwnArrayPtr<CppVariant> callbackArguments = adoptArrayPtr(new CppVariant[1]);
+    callbackArguments[0].set(arguments[1]);
+    result->setNull();
+    postTask(new InvokeCallbackTask(this, callbackArguments.release(), 1));
+}
+
 #if ENABLE(POINTER_LOCK)
 void DRTTestRunner::didAcquirePointerLock(const CppArgumentList&, CppVariant* result)
 {

Modified: trunk/Tools/DumpRenderTree/chromium/DRTTestRunner.h (139820 => 139821)


--- trunk/Tools/DumpRenderTree/chromium/DRTTestRunner.h	2013-01-16 02:38:07 UTC (rev 139820)
+++ trunk/Tools/DumpRenderTree/chromium/DRTTestRunner.h	2013-01-16 02:39:17 UTC (rev 139821)
@@ -94,7 +94,13 @@
     void queueLoad(const CppArgumentList&, CppVariant*);
     void queueLoadHTMLString(const CppArgumentList&, CppVariant*);
 
+    // Changes the cookie policy from the default to allow all cookies.
+    void setAlwaysAcceptCookies(const CppArgumentList&, CppVariant*);
 
+    // Gives focus to the window.
+    void setWindowIsKey(const CppArgumentList&, CppVariant*);
+
+
     // Causes navigation actions just printout the intended navigation instead
     // of taking you to the page. This is used for cases like mailto, where you
     // don't actually want to open the mail program.
@@ -112,6 +118,9 @@
     // Causes WillSendRequest to return an empty request.
     void setWillSendRequestReturnsNull(const CppArgumentList&, CppVariant*);
 
+    // Converts a URL starting with file:///tmp/ to the local mapping.
+    void pathToLocalResource(const CppArgumentList&, CppVariant*);
+
 #if ENABLE(NOTIFICATIONS)
     // Grants permission for desktop notifications to an origin
     void grantWebNotificationPermission(const CppArgumentList&, CppVariant*);
@@ -122,6 +131,10 @@
     void display(const CppArgumentList&, CppVariant*);
     void displayInvalidatedRegion(const CppArgumentList&, CppVariant*);
 
+    // Calls setlocale(LC_ALL, ...) for a specified locale.
+    // Resets between tests.
+    void setPOSIXLocale(const CppArgumentList&, CppVariant*);
+
     // Gets the number of geolocation permissions requests pending.
     void numberOfPendingGeolocationPermissionRequests(const CppArgumentList&, CppVariant*);
 
@@ -152,6 +165,9 @@
     void setPointerLockWillRespondAsynchronously(const CppArgumentList&, CppVariant*);
 #endif
 
+    // Used to set the device scale factor.
+    void setBackingScaleFactor(const CppArgumentList&, CppVariant*);
+
 public:
     // The following methods are not exposed to _javascript_.
     void setWorkQueueFrozen(bool frozen) { m_workQueue.setFrozen(frozen); }
@@ -187,6 +203,8 @@
         virtual bool run(TestShell*) = 0;
     };
 
+    WebTaskList* taskList() { return &m_taskList; }
+
 private:
     friend class WorkItem;
     friend class WorkQueue;
@@ -228,6 +246,9 @@
         virtual void runIfValid() { m_object->completeNotifyDone(true); }
     };
 
+    // Used for test timeouts.
+    WebTaskList m_taskList;
+
     // Non-owning pointer. The DRTTestRunner is owned by the host.
     TestShell* m_shell;
 

Modified: trunk/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h (139820 => 139821)


--- trunk/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h	2013-01-16 02:38:07 UTC (rev 139820)
+++ trunk/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h	2013-01-16 02:39:17 UTC (rev 139821)
@@ -87,11 +87,6 @@
     virtual void evaluateInWebInspector(long, const std::string&) { }
     virtual void clearAllDatabases() { }
     virtual void setDatabaseQuota(int) { }
-    virtual void setDeviceScaleFactor(float) { }
-    virtual void setFocus(bool) { }
-    virtual void setAcceptAllCookies(bool) { }
-    virtual std::string pathToLocalResource(const std::string& resource) { return std::string(); }
-    virtual void setLocale(const std::string&) { }
 };
 
 }

Modified: trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp (139820 => 139821)


--- trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp	2013-01-16 02:38:07 UTC (rev 139820)
+++ trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp	2013-01-16 02:39:17 UTC (rev 139821)
@@ -47,14 +47,12 @@
 #include "WebSecurityPolicy.h"
 #include "WebSettings.h"
 #include "WebSurroundingText.h"
-#include "WebTask.h"
 #include "WebTestDelegate.h"
 #include "WebView.h"
 #include "WebWorkerInfo.h"
 #include "platform/WebPoint.h"
 #include "platform/WebSerializedScriptValue.h"
 #include "v8/include/v8.h"
-#include <wtf/OwnArrayPtr.h>
 #include <wtf/text/WTFString.h>
 
 #if OS(LINUX) || OS(ANDROID)
@@ -78,26 +76,6 @@
     virtual void destroy() { }
 };
 
-class InvokeCallbackTask : public WebMethodTask<TestRunner> {
-public:
-    InvokeCallbackTask(TestRunner* object, PassOwnArrayPtr<CppVariant> callbackArguments, uint32_t numberOfArguments)
-        : WebMethodTask<TestRunner>(object)
-        , m_callbackArguments(callbackArguments)
-        , m_numberOfArguments(numberOfArguments)
-    {
-    }
-
-    virtual void runIfValid()
-    {
-        CppVariant invokeResult;
-        m_callbackArguments[0].invokeDefault(m_callbackArguments.get(), m_numberOfArguments, invokeResult);
-    }
-
-private:
-    OwnArrayPtr<CppVariant> m_callbackArguments;
-    uint32_t m_numberOfArguments;
-};
-
 }
 
 TestRunner::TestRunner()
@@ -202,11 +180,6 @@
     bindMethod("evaluateInWebInspector", &TestRunner::evaluateInWebInspector);
     bindMethod("clearAllDatabases", &TestRunner::clearAllDatabases);
     bindMethod("setDatabaseQuota", &TestRunner::setDatabaseQuota);
-    bindMethod("setAlwaysAcceptCookies", &TestRunner::setAlwaysAcceptCookies);
-    bindMethod("setWindowIsKey", &TestRunner::setWindowIsKey);
-    bindMethod("pathToLocalResource", &TestRunner::pathToLocalResource);
-    bindMethod("setBackingScaleFactor", &TestRunner::setBackingScaleFactor);
-    bindMethod("setPOSIXLocale", &TestRunner::setPOSIXLocale);
 
     // Properties.
     bindProperty("workerThreadCount", &TestRunner::workerThreadCount);
@@ -275,9 +248,6 @@
 
     // Reset the default quota for each origin to 5MB
     m_delegate->setDatabaseQuota(5 * 1024 * 1024);
-    m_delegate->setDeviceScaleFactor(1);
-    m_delegate->setAcceptAllCookies(false);
-    m_delegate->setLocale("");
 
     m_dumpEditingCallbacks = false;
     m_dumpAsText = false;
@@ -310,8 +280,6 @@
     m_userStyleSheetLocation = WebURL();
 
     m_webPermissions->reset();
-
-    m_taskList.revokeAll();
 }
 
 void TestRunner::setTestIsRunning(bool running)
@@ -1345,50 +1313,6 @@
         m_delegate->setDatabaseQuota(arguments[0].toInt32());
 }
 
-void TestRunner::setAlwaysAcceptCookies(const CppArgumentList& arguments, CppVariant* result)
-{
-    if (arguments.size() > 0)
-        m_delegate->setAcceptAllCookies(cppVariantToBool(arguments[0]));
-    result->setNull();
-}
-
-void TestRunner::setWindowIsKey(const CppArgumentList& arguments, CppVariant* result)
-{
-    if (arguments.size() > 0 && arguments[0].isBool())
-        m_delegate->setFocus(arguments[0].value.boolValue);
-    result->setNull();
-}
-
-void TestRunner::pathToLocalResource(const CppArgumentList& arguments, CppVariant* result)
-{
-    result->setNull();
-    if (arguments.size() <= 0 || !arguments[0].isString())
-        return;
-
-    result->set(m_delegate->pathToLocalResource(arguments[0].toString()));
-}
-
-void TestRunner::setBackingScaleFactor(const CppArgumentList& arguments, CppVariant* result)
-{
-    if (arguments.size() < 2 || !arguments[0].isNumber() || !arguments[1].isObject())
-        return;
-
-    float value = arguments[0].value.doubleValue;
-    m_delegate->setDeviceScaleFactor(value);
-
-    OwnArrayPtr<CppVariant> callbackArguments = adoptArrayPtr(new CppVariant[1]);
-    callbackArguments[0].set(arguments[1]);
-    result->setNull();
-    m_delegate->postTask(new InvokeCallbackTask(this, callbackArguments.release(), 1));
-}
-
-void TestRunner::setPOSIXLocale(const CppArgumentList& arguments, CppVariant* result)
-{
-    result->setNull();
-    if (arguments.size() == 1 && arguments[0].isString())
-        m_delegate->setLocale(arguments[0].toString());
-}
-
 void TestRunner::dumpEditingCallbacks(const CppArgumentList&, CppVariant* result)
 {
     m_dumpEditingCallbacks = true;

Modified: trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h (139820 => 139821)


--- trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h	2013-01-16 02:38:07 UTC (rev 139820)
+++ trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h	2013-01-16 02:39:17 UTC (rev 139821)
@@ -34,7 +34,6 @@
 
 #include "CppBoundClass.h"
 #include "WebDeliveredIntentClient.h"
-#include "WebTask.h"
 #include "WebTestRunner.h"
 #include "platform/WebArrayBufferView.h"
 #include "platform/WebURL.h"
@@ -60,8 +59,6 @@
 
     void reset();
 
-    WebTaskList* taskList() { return &m_taskList; }
-
     // WebTestRunner implementation.
     virtual void setTestIsRunning(bool) OVERRIDE;
     virtual bool shouldDumpEditingCallbacks() const OVERRIDE;
@@ -339,27 +336,11 @@
     // Sets the default quota for all origins
     void setDatabaseQuota(const CppArgumentList&, CppVariant*);
 
-    // Changes the cookie policy from the default to allow all cookies.
-    void setAlwaysAcceptCookies(const CppArgumentList&, CppVariant*);
-
-    // Gives focus to the window.
-    void setWindowIsKey(const CppArgumentList&, CppVariant*);
-
-    // Converts a URL starting with file:///tmp/ to the local mapping.
-    void pathToLocalResource(const CppArgumentList&, CppVariant*);
-
-    // Used to set the device scale factor.
-    void setBackingScaleFactor(const CppArgumentList&, CppVariant*);
-
-    // Calls setlocale(LC_ALL, ...) for a specified locale.
-    // Resets between tests.
-    void setPOSIXLocale(const CppArgumentList&, CppVariant*);
-
     ///////////////////////////////////////////////////////////////////////////
     // Properties
     void workerThreadCount(CppVariant*);
 
-    //////////////////////////////////////////////////////////////////////////
+    ///////////////////////////////////////////////////////////////////////////
     // Fallback and stub methods
 
     // The fallback method is called when a nonexistent method is called on
@@ -481,9 +462,6 @@
     // WAV audio data is stored here.
     WebKit::WebArrayBufferView m_audioData;
 
-    // Used for test timeouts.
-    WebTaskList m_taskList;
-
     WebTestDelegate* m_delegate;
     WebKit::WebView* m_webView;
 

Modified: trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp (139820 => 139821)


--- trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp	2013-01-16 02:38:07 UTC (rev 139820)
+++ trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp	2013-01-16 02:39:17 UTC (rev 139821)
@@ -70,8 +70,6 @@
 #include "skia/ext/platform_canvas.h"
 #include "webkit/support/test_media_stream_client.h"
 #include "webkit/support/webkit_support.h"
-#include <cctype>
-#include <clocale>
 #include <public/WebCString.h>
 #include <public/WebCompositorOutputSurface.h>
 #include <public/WebCompositorSupport.h>
@@ -1081,60 +1079,6 @@
     webkit_support::SetDatabaseQuota(quota);
 }
 
-void WebViewHost::setDeviceScaleFactor(float deviceScaleFactor)
-{
-    webView()->setDeviceScaleFactor(deviceScaleFactor);
-    discardBackingStore();
-}
-
-void WebViewHost::setFocus(bool focused)
-{
-    m_shell->setFocus(m_shell->webView(), focused);
-}
-
-void WebViewHost::setAcceptAllCookies(bool acceptCookies)
-{
-    webkit_support::SetAcceptAllCookies(acceptCookies);
-}
-
-string WebViewHost::pathToLocalResource(const string& url)
-{
-#if OS(WINDOWS)
-    if (!url.find("/tmp/")) {
-        // We want a temp file.
-        const unsigned tempPrefixLength = 5;
-        size_t bufferSize = MAX_PATH;
-        OwnArrayPtr<WCHAR> tempPath = adoptArrayPtr(new WCHAR[bufferSize]);
-        DWORD tempLength = ::GetTempPathW(bufferSize, tempPath.get());
-        if (tempLength + url.length() - tempPrefixLength + 1 > bufferSize) {
-            bufferSize = tempLength + url.length() - tempPrefixLength + 1;
-            tempPath = adoptArrayPtr(new WCHAR[bufferSize]);
-            tempLength = GetTempPathW(bufferSize, tempPath.get());
-            ASSERT(tempLength < bufferSize);
-        }
-        string resultPath(WebString(tempPath.get(), tempLength).utf8());
-        resultPath.append(url.substr(tempPrefixLength));
-        return resultPath;
-    }
-#endif
-
-    // Some layout tests use file://// which we resolve as a UNC path. Normalize
-    // them to just file:///.
-    string lowerUrl = url;
-    string result = url;
-    transform(lowerUrl.begin(), lowerUrl.end(), lowerUrl.begin(), ::tolower);
-    while (!lowerUrl.find("file:////")) {
-        result = result.substr(0, 8) + result.substr(9);
-        lowerUrl = lowerUrl.substr(0, 8) + lowerUrl.substr(9);
-    }
-    return webkit_support::RewriteLayoutTestsURL(result).spec();
-}
-
-void WebViewHost::setLocale(const std::string& locale)
-{
-    setlocale(LC_ALL, locale.c_str());
-}
-
 // Public functions -----------------------------------------------------------
 
 WebViewHost::WebViewHost(TestShell* shell)
@@ -1458,6 +1402,12 @@
     m_pendingExtraData = extraData;
 }
 
+void WebViewHost::setDeviceScaleFactor(float deviceScaleFactor)
+{
+    webView()->setDeviceScaleFactor(deviceScaleFactor);
+    discardBackingStore();
+}
+
 void WebViewHost::setPageTitle(const WebString&)
 {
     // Nothing to do in layout test.

Modified: trunk/Tools/DumpRenderTree/chromium/WebViewHost.h (139820 => 139821)


--- trunk/Tools/DumpRenderTree/chromium/WebViewHost.h	2013-01-16 02:38:07 UTC (rev 139820)
+++ trunk/Tools/DumpRenderTree/chromium/WebViewHost.h	2013-01-16 02:39:17 UTC (rev 139821)
@@ -96,6 +96,7 @@
     void setBlockRedirects(bool block) { m_blocksRedirects = block; }
     void setRequestReturnNull(bool returnNull) { m_requestReturnNull = returnNull; }
     void setPendingExtraData(PassOwnPtr<TestShellExtraData>);
+    void setDeviceScaleFactor(float);
 
     void paintRect(const WebKit::WebRect&);
     void paintInvalidatedRegion();
@@ -155,11 +156,6 @@
     virtual void evaluateInWebInspector(long, const std::string&) OVERRIDE;
     virtual void clearAllDatabases() OVERRIDE;
     virtual void setDatabaseQuota(int) OVERRIDE;
-    virtual void setDeviceScaleFactor(float) OVERRIDE;
-    virtual void setFocus(bool) OVERRIDE;
-    virtual void setAcceptAllCookies(bool) OVERRIDE;
-    virtual std::string pathToLocalResource(const std::string& url) OVERRIDE;
-    virtual void setLocale(const std::string&) OVERRIDE;
 
     // NavigationHost
     virtual bool navigate(const TestNavigationEntry&, bool reload);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to