Diff
Modified: trunk/Tools/ChangeLog (143851 => 143852)
--- trunk/Tools/ChangeLog 2013-02-23 22:37:30 UTC (rev 143851)
+++ trunk/Tools/ChangeLog 2013-02-23 23:31:36 UTC (rev 143852)
@@ -1,3 +1,36 @@
+2013-02-23 Mark Pilgrim <[email protected]>
+
+ [Chromium] DumpRenderTree TestShell::initialize should take Platform* now that WebKitPlatformSupport is empty
+ https://bugs.webkit.org/show_bug.cgi?id=110606
+
+ Reviewed by Adam Barth.
+
+ Part of a larger refactoring series; see tracking bug 82948.
+
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/DumpRenderTree.cpp:
+ (WebKitSupportTestEnvironment::WebKitSupportTestEnvironment):
+ (WebKitSupportTestEnvironment::mockPlatform):
+ (WebKitSupportTestEnvironment):
+ * DumpRenderTree/chromium/MockPlatform.cpp: Copied from Tools/DumpRenderTree/chromium/MockWebKitPlatformSupport.cpp.
+ (MockPlatform::create):
+ (MockPlatform::MockPlatform):
+ (MockPlatform::~MockPlatform):
+ (MockPlatform::setInterfaces):
+ (MockPlatform::cryptographicallyRandomValues):
+ (MockPlatform::createMediaStreamCenter):
+ (MockPlatform::createRTCPeerConnectionHandler):
+ * DumpRenderTree/chromium/MockPlatform.h: Copied from Tools/DumpRenderTree/chromium/MockWebKitPlatformSupport.h.
+ (MockPlatform):
+ * DumpRenderTree/chromium/MockWebKitPlatformSupport.cpp: Removed.
+ * DumpRenderTree/chromium/MockWebKitPlatformSupport.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebTestDelegate):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::initialize):
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestShell):
+
2013-02-23 Ryosuke Niwa <[email protected]>
Chromium Windows Perf bot fix. Tolerate CR at the end of the line that contains the timestamp.
Modified: trunk/Tools/DumpRenderTree/DumpRenderTree.gypi (143851 => 143852)
--- trunk/Tools/DumpRenderTree/DumpRenderTree.gypi 2013-02-23 22:37:30 UTC (rev 143851)
+++ trunk/Tools/DumpRenderTree/DumpRenderTree.gypi 2013-02-23 23:31:36 UTC (rev 143852)
@@ -8,8 +8,8 @@
'chromium/DRTDevToolsClient.cpp',
'chromium/DRTDevToolsClient.h',
'chromium/DumpRenderTree.cpp',
- 'chromium/MockWebKitPlatformSupport.cpp',
- 'chromium/MockWebKitPlatformSupport.h',
+ 'chromium/MockPlatform.cpp',
+ 'chromium/MockPlatform.h',
'chromium/MockWebPrerenderingSupport.cpp',
'chromium/MockWebPrerenderingSupport.h',
'chromium/Task.h',
Modified: trunk/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp (143851 => 143852)
--- trunk/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp 2013-02-23 22:37:30 UTC (rev 143851)
+++ trunk/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp 2013-02-23 23:31:36 UTC (rev 143852)
@@ -31,7 +31,7 @@
#include "config.h"
#include "DumpRenderTree.h"
-#include "MockWebKitPlatformSupport.h"
+#include "MockPlatform.h"
#include "TestShell.h"
#include "webkit/support/webkit_support.h"
#include <public/WebCompositorSupport.h>
@@ -80,7 +80,7 @@
public:
WebKitSupportTestEnvironment()
{
- m_mockPlatform = MockWebKitPlatformSupport::create();
+ m_mockPlatform = MockPlatform::create();
webkit_support::SetUpTestEnvironment(m_mockPlatform.get());
}
~WebKitSupportTestEnvironment()
@@ -88,10 +88,10 @@
webkit_support::TearDownTestEnvironment();
}
- MockWebKitPlatformSupport* mockPlatform() { return m_mockPlatform.get(); }
+ MockPlatform* mockPlatform() { return m_mockPlatform.get(); }
private:
- OwnPtr<MockWebKitPlatformSupport> m_mockPlatform;
+ OwnPtr<MockPlatform> m_mockPlatform;
};
static void runTest(TestShell& shell, TestParams& params, const string& inputLine, const bool forceDumpPixels)
Copied: trunk/Tools/DumpRenderTree/chromium/MockPlatform.cpp (from rev 143851, trunk/Tools/DumpRenderTree/chromium/MockWebKitPlatformSupport.cpp) (0 => 143852)
--- trunk/Tools/DumpRenderTree/chromium/MockPlatform.cpp (rev 0)
+++ trunk/Tools/DumpRenderTree/chromium/MockPlatform.cpp 2013-02-23 23:31:36 UTC (rev 143852)
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "MockPlatform.h"
+
+#include "WebTestInterfaces.h"
+#include <public/WebMediaStreamCenter.h>
+#include <wtf/Assertions.h>
+#include <wtf/PassOwnPtr.h>
+
+using namespace WebKit;
+using namespace WebTestRunner;
+
+PassOwnPtr<MockPlatform> MockPlatform::create()
+{
+ return adoptPtr(new MockPlatform());
+}
+
+MockPlatform::MockPlatform()
+{
+}
+
+MockPlatform::~MockPlatform()
+{
+}
+
+void MockPlatform::setInterfaces(WebTestInterfaces* interfaces)
+{
+ m_interfaces = interfaces;
+}
+
+void MockPlatform::cryptographicallyRandomValues(unsigned char*, size_t)
+{
+ CRASH();
+}
+
+#if ENABLE(MEDIA_STREAM)
+WebMediaStreamCenter* MockPlatform::createMediaStreamCenter(WebMediaStreamCenterClient* client)
+{
+ ASSERT(m_interfaces);
+
+ if (!m_mockMediaStreamCenter)
+ m_mockMediaStreamCenter = adoptPtr(m_interfaces->createMediaStreamCenter(client));
+
+ return m_mockMediaStreamCenter.get();
+}
+
+WebRTCPeerConnectionHandler* MockPlatform::createRTCPeerConnectionHandler(WebRTCPeerConnectionHandlerClient* client)
+{
+ ASSERT(m_interfaces);
+
+ return m_interfaces->createWebRTCPeerConnectionHandler(client);
+}
+#endif // ENABLE(MEDIA_STREAM)
Copied: trunk/Tools/DumpRenderTree/chromium/MockPlatform.h (from rev 143851, trunk/Tools/DumpRenderTree/chromium/MockWebKitPlatformSupport.h) (0 => 143852)
--- trunk/Tools/DumpRenderTree/chromium/MockPlatform.h (rev 0)
+++ trunk/Tools/DumpRenderTree/chromium/MockPlatform.h 2013-02-23 23:31:36 UTC (rev 143852)
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef MockPlatform_h
+#define MockPlatform_h
+
+#include <public/Platform.h>
+#include <wtf/OwnPtr.h>
+#include <wtf/PassOwnPtr.h>
+
+namespace WebTestRunner {
+class WebTestInterfaces;
+}
+
+class MockPlatform : public WebKit::Platform {
+public:
+ static PassOwnPtr<MockPlatform> create();
+ ~MockPlatform();
+
+ void setInterfaces(WebTestRunner::WebTestInterfaces*);
+ virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t length) OVERRIDE;
+
+#if ENABLE(MEDIA_STREAM)
+ virtual WebKit::WebMediaStreamCenter* createMediaStreamCenter(WebKit::WebMediaStreamCenterClient*) OVERRIDE;
+ virtual WebKit::WebRTCPeerConnectionHandler* createRTCPeerConnectionHandler(WebKit::WebRTCPeerConnectionHandlerClient*) OVERRIDE;
+#endif // ENABLE(MEDIA_STREAM)
+
+private:
+ MockPlatform();
+
+ WebTestRunner::WebTestInterfaces* m_interfaces;
+
+#if ENABLE(MEDIA_STREAM)
+ OwnPtr<WebKit::WebMediaStreamCenter> m_mockMediaStreamCenter;
+#endif // ENABLE(MEDIA_STREAM)
+};
+
+#endif // MockPlatform_h
Deleted: trunk/Tools/DumpRenderTree/chromium/MockWebKitPlatformSupport.cpp (143851 => 143852)
--- trunk/Tools/DumpRenderTree/chromium/MockWebKitPlatformSupport.cpp 2013-02-23 22:37:30 UTC (rev 143851)
+++ trunk/Tools/DumpRenderTree/chromium/MockWebKitPlatformSupport.cpp 2013-02-23 23:31:36 UTC (rev 143852)
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "MockWebKitPlatformSupport.h"
-
-#include "WebTestInterfaces.h"
-#include <public/WebMediaStreamCenter.h>
-#include <wtf/Assertions.h>
-#include <wtf/PassOwnPtr.h>
-
-using namespace WebKit;
-using namespace WebTestRunner;
-
-PassOwnPtr<MockWebKitPlatformSupport> MockWebKitPlatformSupport::create()
-{
- return adoptPtr(new MockWebKitPlatformSupport());
-}
-
-MockWebKitPlatformSupport::MockWebKitPlatformSupport()
-{
-}
-
-MockWebKitPlatformSupport::~MockWebKitPlatformSupport()
-{
-}
-
-void MockWebKitPlatformSupport::setInterfaces(WebTestInterfaces* interfaces)
-{
- m_interfaces = interfaces;
-}
-
-void MockWebKitPlatformSupport::cryptographicallyRandomValues(unsigned char*, size_t)
-{
- CRASH();
-}
-
-#if ENABLE(MEDIA_STREAM)
-WebMediaStreamCenter* MockWebKitPlatformSupport::createMediaStreamCenter(WebMediaStreamCenterClient* client)
-{
- ASSERT(m_interfaces);
-
- if (!m_mockMediaStreamCenter)
- m_mockMediaStreamCenter = adoptPtr(m_interfaces->createMediaStreamCenter(client));
-
- return m_mockMediaStreamCenter.get();
-}
-
-WebRTCPeerConnectionHandler* MockWebKitPlatformSupport::createRTCPeerConnectionHandler(WebRTCPeerConnectionHandlerClient* client)
-{
- ASSERT(m_interfaces);
-
- return m_interfaces->createWebRTCPeerConnectionHandler(client);
-}
-#endif // ENABLE(MEDIA_STREAM)
Deleted: trunk/Tools/DumpRenderTree/chromium/MockWebKitPlatformSupport.h (143851 => 143852)
--- trunk/Tools/DumpRenderTree/chromium/MockWebKitPlatformSupport.h 2013-02-23 22:37:30 UTC (rev 143851)
+++ trunk/Tools/DumpRenderTree/chromium/MockWebKitPlatformSupport.h 2013-02-23 23:31:36 UTC (rev 143852)
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef MockWebKitPlatformSupport_h
-#define MockWebKitPlatformSupport_h
-
-#include <public/Platform.h>
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
-
-namespace WebTestRunner {
-class WebTestInterfaces;
-}
-
-class MockWebKitPlatformSupport : public WebKit::Platform {
-public:
- static PassOwnPtr<MockWebKitPlatformSupport> create();
- ~MockWebKitPlatformSupport();
-
- void setInterfaces(WebTestRunner::WebTestInterfaces*);
- virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t length) OVERRIDE;
-
-#if ENABLE(MEDIA_STREAM)
- virtual WebKit::WebMediaStreamCenter* createMediaStreamCenter(WebKit::WebMediaStreamCenterClient*) OVERRIDE;
- virtual WebKit::WebRTCPeerConnectionHandler* createRTCPeerConnectionHandler(WebKit::WebRTCPeerConnectionHandlerClient*) OVERRIDE;
-#endif // ENABLE(MEDIA_STREAM)
-
-private:
- MockWebKitPlatformSupport();
-
- WebTestRunner::WebTestInterfaces* m_interfaces;
-
-#if ENABLE(MEDIA_STREAM)
- OwnPtr<WebKit::WebMediaStreamCenter> m_mockMediaStreamCenter;
-#endif // ENABLE(MEDIA_STREAM)
-};
-
-#endif // MockWebKitPlatformSupport_h
Modified: trunk/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h (143851 => 143852)
--- trunk/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h 2013-02-23 22:37:30 UTC (rev 143851)
+++ trunk/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h 2013-02-23 23:31:36 UTC (rev 143852)
@@ -58,7 +58,7 @@
virtual void clearEditCommand() = 0;
virtual void setEditCommand(const std::string& name, const std::string& value) = 0;
- // Set the gamepads to return from WebKitPlatformSupport::sampleGamepads().
+ // Set the gamepads to return from Platform::sampleGamepads().
virtual void setGamepadData(const WebKit::WebGamepads&) = 0;
// Add a message to the text dump for the layout test.
Modified: trunk/Tools/DumpRenderTree/chromium/TestShell.cpp (143851 => 143852)
--- trunk/Tools/DumpRenderTree/chromium/TestShell.cpp 2013-02-23 22:37:30 UTC (rev 143851)
+++ trunk/Tools/DumpRenderTree/chromium/TestShell.cpp 2013-02-23 23:31:36 UTC (rev 143852)
@@ -33,7 +33,7 @@
#include "DRTDevToolsAgent.h"
#include "DRTDevToolsClient.h"
-#include "MockWebKitPlatformSupport.h"
+#include "MockPlatform.h"
#include "MockWebPrerenderingSupport.h"
#include "WebArrayBufferView.h"
#include "WebDataSource.h"
@@ -159,7 +159,7 @@
m_timeout = 30 * 1000;
}
-void TestShell::initialize(MockWebKitPlatformSupport* platformSupport)
+void TestShell::initialize(MockPlatform* platformSupport)
{
m_testInterfaces = adoptPtr(new WebTestInterfaces());
platformSupport->setInterfaces(m_testInterfaces.get());
Modified: trunk/Tools/DumpRenderTree/chromium/TestShell.h (143851 => 143852)
--- trunk/Tools/DumpRenderTree/chromium/TestShell.h 2013-02-23 22:37:30 UTC (rev 143851)
+++ trunk/Tools/DumpRenderTree/chromium/TestShell.h 2013-02-23 23:31:36 UTC (rev 143852)
@@ -54,7 +54,7 @@
class DRTDevToolsCallArgs;
class DRTDevToolsClient;
class MockWebPrerenderingSupport;
-class MockWebKitPlatformSupport;
+class MockPlatform;
struct TestParams {
bool dumpTree;
@@ -76,7 +76,7 @@
TestShell();
~TestShell();
- void initialize(MockWebKitPlatformSupport*);
+ void initialize(MockPlatform*);
// The main WebView.
WebKit::WebView* webView() const { return m_webView; }