[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
victorw at chromium.org
victorw at chromium.org
Wed Dec 22 14:20:49 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 2b4d29efc25874ab2978dd684ec7a57867838f3f
Author: victorw at chromium.org <victorw at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Oct 6 22:33:41 2010 +0000
2010-10-06 Victor Wang <victorw at chromium.org>
Reviewed by Darin Fisher.
[Chromium] Add webkit unit tests to chromium multi-dll build.
In chromium multi-dll build mode, compile the webkit unit tests
code in webkit.dll and export an api that runs the tests.
https://bugs.webkit.org/show_bug.cgi?id=46907
* WebKit.gyp:
* WebKit.gypi:
* tests/RunAllTests.cpp:
(main):
* tests/WebUnitTests.cpp: Added.
(WebKit::RunAllUnitTests):
* tests/WebUnitTests.h: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69243 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 54786ee..b47e4d6 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,22 @@
+2010-10-06 Victor Wang <victorw at chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Add webkit unit tests to chromium multi-dll build.
+
+ In chromium multi-dll build mode, compile the webkit unit tests
+ code in webkit.dll and export an api that runs the tests.
+
+ https://bugs.webkit.org/show_bug.cgi?id=46907
+
+ * WebKit.gyp:
+ * WebKit.gypi:
+ * tests/RunAllTests.cpp:
+ (main):
+ * tests/WebUnitTests.cpp: Added.
+ (WebKit::RunAllUnitTests):
+ * tests/WebUnitTests.h: Added.
+
2010-10-05 Jeremy Orlow <jorlow at chromium.org>
Reviewed by Nate Chapin.
diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp
index 4cc951b..bc3b8ca 100644
--- a/WebKit/chromium/WebKit.gyp
+++ b/WebKit/chromium/WebKit.gyp
@@ -556,7 +556,9 @@
],
'dependencies': [
'../../WebCore/WebCore.gyp/WebCore.gyp:webcore_bindings',
+ '<(chromium_src_dir)/base/base.gyp:test_support_base',
'<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
+ '<(chromium_src_dir)/testing/gtest.gyp:gtest',
'<(chromium_src_dir)/third_party/icu/icu.gyp:*',
'<(chromium_src_dir)/third_party/libjpeg/libjpeg.gyp:libjpeg',
'<(chromium_src_dir)/third_party/libpng/libpng.gyp:libpng',
@@ -577,6 +579,13 @@
'<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
'<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
],
+ 'sources': [
+ '<@(webkit_unittest_files)',
+ 'tests/PopupMenuTest.cpp',
+ 'tests/TransparencyWinTest.cpp',
+ 'tests/UniscribeHelperTest.cpp',
+ 'tests/WebUnitTests.cpp'
+ ]
}],
],
}, {
@@ -721,40 +730,32 @@
{
'target_name': 'webkit_unit_tests',
+ 'type': 'executable',
+ 'msvs_guid': '7CEFE800-8403-418A-AD6A-2D52C6FC3EAD',
+ 'dependencies': [
+ 'webkit',
+ '../../WebCore/WebCore.gyp/WebCore.gyp:webcore',
+ '<(chromium_src_dir)/testing/gtest.gyp:gtest',
+ '<(chromium_src_dir)/base/base.gyp:base',
+ '<(chromium_src_dir)/base/base.gyp:base_i18n',
+ '<(chromium_src_dir)/base/base.gyp:test_support_base',
+ '<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support',
+ ],
+ 'sources': [
+ 'tests/RunAllTests.cpp',
+ ],
+ 'include_dirs': [
+ 'public',
+ 'src',
+ ],
'conditions': [
- # FIXME: make webkit unit tests working for multi dll build.
['inside_chromium_build==1 and OS=="win" and component=="shared_library"', {
- 'type': 'none',
- }, {
- 'type': 'executable',
- 'msvs_guid': '7CEFE800-8403-418A-AD6A-2D52C6FC3EAD',
- 'dependencies': [
- 'webkit',
- '../../WebCore/WebCore.gyp/WebCore.gyp:webcore',
- '<(chromium_src_dir)/testing/gtest.gyp:gtest',
- '<(chromium_src_dir)/base/base.gyp:base',
- '<(chromium_src_dir)/base/base.gyp:base_i18n',
- '<(chromium_src_dir)/base/base.gyp:test_support_base',
- '<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support',
- ],
- 'include_dirs': [
- 'public',
- 'src',
+ 'defines': [
+ 'WEBKIT_DLL_UNITTEST',
],
+ }, {
'sources': [
- 'tests/ArenaTestHelpers.h',
- 'tests/DragImageTest.cpp',
- 'tests/IDBBindingUtilitiesTest.cpp',
- 'tests/IDBKeyPathTest.cpp',
- 'tests/KeyboardTest.cpp',
- 'tests/KURLTest.cpp',
- 'tests/PODArenaTest.cpp',
- 'tests/PODIntervalTreeTest.cpp',
- 'tests/PODRedBlackTreeTest.cpp',
- 'tests/RunAllTests.cpp',
- 'tests/TilingDataTest.cpp',
- 'tests/TreeTestHelpers.cpp',
- 'tests/TreeTestHelpers.h',
+ '<@(webkit_unittest_files)',
],
'conditions': [
['OS=="win"', {
diff --git a/WebKit/chromium/WebKit.gypi b/WebKit/chromium/WebKit.gypi
index 035015b..016cf1a 100644
--- a/WebKit/chromium/WebKit.gypi
+++ b/WebKit/chromium/WebKit.gypi
@@ -51,6 +51,20 @@
'src/js/Images/statusbarMenuButtonChromium.png',
'src/js/Images/statusbarMenuButtonSelectedChromium.png',
],
+ 'webkit_unittest_files': [
+ 'tests/ArenaTestHelpers.h',
+ 'tests/DragImageTest.cpp',
+ 'tests/IDBBindingUtilitiesTest.cpp',
+ 'tests/IDBKeyPathTest.cpp',
+ 'tests/KeyboardTest.cpp',
+ 'tests/KURLTest.cpp',
+ 'tests/PODArenaTest.cpp',
+ 'tests/PODIntervalTreeTest.cpp',
+ 'tests/PODRedBlackTreeTest.cpp',
+ 'tests/TilingDataTest.cpp',
+ 'tests/TreeTestHelpers.cpp',
+ 'tests/TreeTestHelpers.h',
+ ],
},
}
diff --git a/WebKit/chromium/tests/RunAllTests.cpp b/WebKit/chromium/tests/RunAllTests.cpp
index cfcfbee..b213de7 100644
--- a/WebKit/chromium/tests/RunAllTests.cpp
+++ b/WebKit/chromium/tests/RunAllTests.cpp
@@ -35,13 +35,25 @@
#include "WebKitClient.h"
#include <webkit/support/webkit_support.h>
+#if defined(WIN32) && defined(WEBKIT_DLL_UNITTEST)
+#include "WebUnitTests.h"
+#endif
+
int main(int argc, char** argv)
{
TestSuite testSuite(argc, argv);
// TestSuite must be created before SetUpTestEnvironment so it performs
// initializations needed by WebKit support.
webkit_support::SetUpTestEnvironmentForUnitTests();
+
+#if defined(WIN32) && defined(WEBKIT_DLL_UNITTEST)
+ // For chromium multi-dll build, need to call webkit api to create a
+ // TestSuite instance in webkit.dll and run all tests from there.
+ int result = WebKit::RunAllUnitTests(argc, argv);
+#else
int result = testSuite.Run();
+#endif
+
webkit_support::TearDownTestEnvironment();
return result;
}
diff --git a/WebKit/chromium/tests/WebUnitTests.cpp b/WebKit/chromium/tests/WebUnitTests.cpp
new file mode 100644
index 0000000..5e207f3
--- /dev/null
+++ b/WebKit/chromium/tests/WebUnitTests.cpp
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebUnitTests.h"
+
+#include <base/test/test_suite.h>
+
+namespace WebKit {
+
+int RunAllUnitTests(int argc, char** argv)
+{
+ TestSuite testSuite(argc, argv);
+ return testSuite.Run();
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/tests/WebUnitTests.h b/WebKit/chromium/tests/WebUnitTests.h
new file mode 100644
index 0000000..3add1c2
--- /dev/null
+++ b/WebKit/chromium/tests/WebUnitTests.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebUnitTests_h
+#define WebUnitTests_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+// In chromium multi-dll build, webkit unittest code are compiled in webkit.dll.
+// This is the API to run all unittests inside webkit.dll.
+WEBKIT_API int RunAllUnitTests(int argc, char** argv);
+
+} // namespace WebKit
+
+#endif
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list