Diff
Modified: trunk/Tools/ChangeLog (147288 => 147289)
--- trunk/Tools/ChangeLog 2013-03-31 20:34:50 UTC (rev 147288)
+++ trunk/Tools/ChangeLog 2013-03-31 23:17:50 UTC (rev 147289)
@@ -1,3 +1,20 @@
+2013-03-31 Wei Jia <[email protected]>
+
+ Allow WebUserMediaClientMock to be used by client
+ https://bugs.webkit.org/show_bug.cgi?id=113633
+
+ Reviewed by Adam Barth.
+
+ Export WebUserMediaClientMock.
+ Allow files in chromium/TestRunner/public to have WEBKIT_EXPORT.
+
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/TestRunner/public/WebUserMediaClientMock.h: Copied from Tools/DumpRenderTree/chromium/TestRunner/src/WebUserMediaClientMock.h.
+ (WebUserMediaClientMock):
+ * DumpRenderTree/chromium/TestRunner/src/WebUserMediaClientMock.h: Removed.
+ * Scripts/webkitpy/style/checkers/cpp.py:
+ (check_function_definition):
+
2013-03-29 Alexey Proskuryakov <[email protected]>
Expose FeatureObserver data to WebKit clients
Modified: trunk/Tools/DumpRenderTree/DumpRenderTree.gypi (147288 => 147289)
--- trunk/Tools/DumpRenderTree/DumpRenderTree.gypi 2013-03-31 20:34:50 UTC (rev 147288)
+++ trunk/Tools/DumpRenderTree/DumpRenderTree.gypi 2013-03-31 23:17:50 UTC (rev 147289)
@@ -37,6 +37,7 @@
'chromium/TestRunner/public/WebTestInterfaces.h',
'chromium/TestRunner/public/WebTestProxy.h',
'chromium/TestRunner/public/WebTestRunner.h',
+ 'chromium/TestRunner/public/WebUserMediaClientMock.h',
'chromium/TestRunner/src/AccessibilityControllerChromium.cpp',
'chromium/TestRunner/src/AccessibilityControllerChromium.h',
'chromium/TestRunner/src/AccessibilityUIElementChromium.cpp',
@@ -96,7 +97,6 @@
'chromium/TestRunner/src/WebTestThemeEngineWin.cpp',
'chromium/TestRunner/src/WebTestThemeEngineWin.h',
'chromium/TestRunner/src/WebUserMediaClientMock.cpp',
- 'chromium/TestRunner/src/WebUserMediaClientMock.h',
],
'test_plugin_files': [
'TestNetscapePlugIn/PluginObject.cpp',
Copied: trunk/Tools/DumpRenderTree/chromium/TestRunner/public/WebUserMediaClientMock.h (from rev 147287, trunk/Tools/DumpRenderTree/chromium/TestRunner/src/WebUserMediaClientMock.h) (0 => 147289)
--- trunk/Tools/DumpRenderTree/chromium/TestRunner/public/WebUserMediaClientMock.h (rev 0)
+++ trunk/Tools/DumpRenderTree/chromium/TestRunner/public/WebUserMediaClientMock.h 2013-03-31 23:17:50 UTC (rev 147289)
@@ -0,0 +1,62 @@
+/*
+ * 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 WebUserMediaClientMock_h
+#define WebUserMediaClientMock_h
+
+#include "Platform/chromium/public/WebCommon.h"
+#include "Platform/chromium/public/WebString.h"
+#include "Platform/chromium/public/WebURL.h"
+#include "WebKit/chromium/public/WebUserMediaClient.h"
+#include "WebTask.h"
+
+namespace WebTestRunner {
+
+class WebTestDelegate;
+
+class WebUserMediaClientMock : public WebKit::WebUserMediaClient {
+public:
+ WEBKIT_EXPORT explicit WebUserMediaClientMock(WebTestDelegate*);
+ ~WebUserMediaClientMock() { }
+
+ virtual void requestUserMedia(const WebKit::WebUserMediaRequest&, const WebKit::WebVector<WebKit::WebMediaStreamSource>&, const WebKit::WebVector<WebKit::WebMediaStreamSource>&);
+ virtual void cancelUserMediaRequest(const WebKit::WebUserMediaRequest&);
+
+ // Task related methods
+ WebTaskList* taskList() { return &m_taskList; }
+
+private:
+ WebTaskList m_taskList;
+ WebTestDelegate* m_delegate;
+};
+
+}
+
+#endif // WebUserMediaClientMock_h
Deleted: trunk/Tools/DumpRenderTree/chromium/TestRunner/src/WebUserMediaClientMock.h (147288 => 147289)
--- trunk/Tools/DumpRenderTree/chromium/TestRunner/src/WebUserMediaClientMock.h 2013-03-31 20:34:50 UTC (rev 147288)
+++ trunk/Tools/DumpRenderTree/chromium/TestRunner/src/WebUserMediaClientMock.h 2013-03-31 23:17:50 UTC (rev 147289)
@@ -1,63 +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 WebUserMediaClientMock_h
-#define WebUserMediaClientMock_h
-
-#include "TestCommon.h"
-#include "WebTask.h"
-#include "WebUserMediaClient.h"
-#include <public/WebCommon.h>
-#include <public/WebString.h>
-#include <public/WebURL.h>
-
-namespace WebTestRunner {
-
-class WebTestDelegate;
-
-class WebUserMediaClientMock : public WebKit::WebUserMediaClient {
-public:
- explicit WebUserMediaClientMock(WebTestDelegate*);
- ~WebUserMediaClientMock() { }
-
- virtual void requestUserMedia(const WebKit::WebUserMediaRequest&, const WebKit::WebVector<WebKit::WebMediaStreamSource>&, const WebKit::WebVector<WebKit::WebMediaStreamSource>&) OVERRIDE;
- virtual void cancelUserMediaRequest(const WebKit::WebUserMediaRequest&);
-
- // Task related methods
- WebTaskList* taskList() { return &m_taskList; }
-
-private:
- WebTaskList m_taskList;
- WebTestDelegate* m_delegate;
-};
-
-}
-
-#endif // WebUserMediaClientMock_h
Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py (147288 => 147289)
--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py 2013-03-31 20:34:50 UTC (rev 147288)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py 2013-03-31 23:17:50 UTC (rev 147289)
@@ -1663,7 +1663,7 @@
modifiers_and_return_type = function_state.modifiers_and_return_type()
if filename.find('/chromium/') != -1 and search(r'\bWEBKIT_EXPORT\b', modifiers_and_return_type):
- if filename.find('/chromium/public/') == -1 and filename.find('/chromium/tests/') == -1 and filename.find('chromium/platform') == -1:
+ if filename.find('/chromium/public/') == -1 and filename.find('/chromium/tests/') == -1 and filename.find('chromium/platform') == -1 and filename.find('chromium/TestRunner/public') == -1:
error(function_state.function_name_start_position.row, 'readability/webkit_export', 5,
'WEBKIT_EXPORT should only appear in the chromium public (or tests) directory.')
elif not file_extension == "h":