Title: [95647] trunk
Revision
95647
Author
[email protected]
Date
2011-09-21 10:37:57 -0700 (Wed, 21 Sep 2011)

Log Message

Ensure TestWebKitAPI works on mac, win, chromium-mac and chromium-linux
https://bugs.webkit.org/show_bug.cgi?id=68206

Patch by Xianzhu Wang <[email protected]> on 2011-09-21
Reviewed by Tony Chang.

Source/WebCore:

Added two new wtf headers into ForwardingHeaders/wtf to make
#include <wtf/...h> cross-platform.
No new tests needed.

* ForwardingHeaders/wtf/MetaAllocator.h: Added.
* ForwardingHeaders/wtf/RedBlackTree.h: Added.

Source/WebKit/chromium:

* WebKit.gyp:

Tools:

* Scripts/webkitdirs.pm:
(determineBaseProductDir): add support for chromium-mac
* TestWebKitAPI/Tests/WTF/MetaAllocator.cpp:
* TestWebKitAPI/Tests/WTF/RedBlackTree.cpp:

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (95646 => 95647)


--- trunk/Source/WebCore/ChangeLog	2011-09-21 17:10:45 UTC (rev 95646)
+++ trunk/Source/WebCore/ChangeLog	2011-09-21 17:37:57 UTC (rev 95647)
@@ -1,3 +1,17 @@
+2011-09-21  Xianzhu Wang  <[email protected]>
+
+        Ensure TestWebKitAPI works on mac, win, chromium-mac and chromium-linux
+        https://bugs.webkit.org/show_bug.cgi?id=68206
+
+        Reviewed by Tony Chang.
+
+        Added two new wtf headers into ForwardingHeaders/wtf to make
+        #include <wtf/...h> cross-platform.
+        No new tests needed.
+
+        * ForwardingHeaders/wtf/MetaAllocator.h: Added.
+        * ForwardingHeaders/wtf/RedBlackTree.h: Added.
+
 2011-09-21  David Delaune  <[email protected]>
 
         [WinCairo] IconDatabase::defaultIcon always fails for non-CAN_THEME_URL_ICON builds.

Added: trunk/Source/WebCore/ForwardingHeaders/wtf/MetaAllocator.h (0 => 95647)


--- trunk/Source/WebCore/ForwardingHeaders/wtf/MetaAllocator.h	                        (rev 0)
+++ trunk/Source/WebCore/ForwardingHeaders/wtf/MetaAllocator.h	2011-09-21 17:37:57 UTC (rev 95647)
@@ -0,0 +1,4 @@
+#ifndef WebCore_FWD_MetaAllocator_h
+#define WebCore_FWD_MetaAllocator_h
+#include <_javascript_Core/MetaAllocator.h>
+#endif

Added: trunk/Source/WebCore/ForwardingHeaders/wtf/RedBlackTree.h (0 => 95647)


--- trunk/Source/WebCore/ForwardingHeaders/wtf/RedBlackTree.h	                        (rev 0)
+++ trunk/Source/WebCore/ForwardingHeaders/wtf/RedBlackTree.h	2011-09-21 17:37:57 UTC (rev 95647)
@@ -0,0 +1,4 @@
+#ifndef WebCore_FWD_RedBlackTree_h
+#define WebCore_FWD_RedBlackTree_h
+#include <_javascript_Core/RedBlackTree.h>
+#endif

Modified: trunk/Source/WebKit/chromium/ChangeLog (95646 => 95647)


--- trunk/Source/WebKit/chromium/ChangeLog	2011-09-21 17:10:45 UTC (rev 95646)
+++ trunk/Source/WebKit/chromium/ChangeLog	2011-09-21 17:37:57 UTC (rev 95647)
@@ -1,3 +1,12 @@
+2011-09-21  Xianzhu Wang  <[email protected]>
+
+        Ensure TestWebKitAPI works on mac, win, chromium-mac and chromium-linux
+        https://bugs.webkit.org/show_bug.cgi?id=68206
+
+        Reviewed by Tony Chang.
+
+        * WebKit.gyp:
+
 2011-09-21  chandra shekar vallala  <[email protected]>
 
         [chromium]ClearFocusedNode doesn't clear the cursor or selection in editable div element.

Modified: trunk/Source/WebKit/chromium/WebKit.gyp (95646 => 95647)


--- trunk/Source/WebKit/chromium/WebKit.gyp	2011-09-21 17:10:45 UTC (rev 95646)
+++ trunk/Source/WebKit/chromium/WebKit.gyp	2011-09-21 17:37:57 UTC (rev 95647)
@@ -32,6 +32,7 @@
     'includes': [
         '../../WebCore/WebCore.gypi',
         '../../../Tools/DumpRenderTree/DumpRenderTree.gypi',
+        '../../../Tools/TestWebKitAPI/TestWebKitAPI.gypi',
         'WebKit.gypi',
         'features.gypi',
     ],
@@ -1178,7 +1179,7 @@
                         '<(chromium_src_dir)/webkit/support/setup_third_party.gyp:third_party_headers',
                     ]
                 }],
-                ['component!="shared_library"', {
+                ['inside_chromium_build==0 or component!="shared_library"', {
                     'dependencies': [
                         '../../WebCore/WebCore.gyp/WebCore.gyp:webcore_test_support',
                     ],
@@ -1269,6 +1270,39 @@
                 }],
             ],
         },
+        {
+            'target_name': 'TestWebKitAPI',
+            'type': 'executable',
+            'dependencies': [
+                'webkit',
+                '../../WebCore/WebCore.gyp/WebCore.gyp:webcore',
+                '<(chromium_src_dir)/base/base.gyp:test_support_base',
+                '<(chromium_src_dir)/testing/gtest.gyp:gtest',
+                '<(chromium_src_dir)/testing/gmock.gyp:gmock',
+                '<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support',
+            ],
+            'include_dirs': [
+                '../../../Tools/TestWebKitAPI',
+                # Needed by tests/RunAllTests.cpp, as well as ChromiumCurrentTime.cpp and
+                # ChromiumThreading.cpp in chromium shared library configuration.
+                'public',
+            ],
+            'sources': [
+                # Reuse the same testing driver of Chromium's webkit_unit_tests.
+                'tests/RunAllTests.cpp',
+                '<@(TestWebKitAPI_files)',
+            ],
+            'conditions': [
+                ['inside_chromium_build==1 and component=="shared_library"', {
+                    'sources': [
+                        # To satisfy linking of WTF::currentTime() etc. in shared library configuration,
+                        # as the symbols are not exported from the DLLs.
+                        'src/ChromiumCurrentTime.cpp',
+                        'src/ChromiumThreading.cpp',
+                    ],
+                }],
+            ],
+        },
     ], # targets
     'conditions': [
         ['OS=="win"', {

Modified: trunk/Tools/ChangeLog (95646 => 95647)


--- trunk/Tools/ChangeLog	2011-09-21 17:10:45 UTC (rev 95646)
+++ trunk/Tools/ChangeLog	2011-09-21 17:37:57 UTC (rev 95647)
@@ -1,3 +1,15 @@
+2011-09-21  Xianzhu Wang  <[email protected]>
+
+        Ensure TestWebKitAPI works on mac, win, chromium-mac and chromium-linux
+        https://bugs.webkit.org/show_bug.cgi?id=68206
+
+        Reviewed by Tony Chang.
+
+        * Scripts/webkitdirs.pm:
+        (determineBaseProductDir): add support for chromium-mac
+        * TestWebKitAPI/Tests/WTF/MetaAllocator.cpp:
+        * TestWebKitAPI/Tests/WTF/RedBlackTree.cpp:
+
 2011-09-21  Adam Barth  <[email protected]>
 
         garden-o-matic command should explain that it is starting a local server

Modified: trunk/Tools/Scripts/webkitdirs.pm (95646 => 95647)


--- trunk/Tools/Scripts/webkitdirs.pm	2011-09-21 17:10:45 UTC (rev 95646)
+++ trunk/Tools/Scripts/webkitdirs.pm	2011-09-21 17:37:57 UTC (rev 95647)
@@ -156,7 +156,13 @@
         # Shadow builds are not supported on Symbian
         $baseProductDir = $sourceDir;
     } elsif (isChromium()) {
-        $baseProductDir = "$sourceDir/out";
+        if (isLinux() || isChromiumAndroid()) {
+            $baseProductDir = "$sourceDir/out";
+        } elsif (isDarwin()) {
+            $baseProductDir = "$sourceDir/Source/WebKit/chromium/xcodebuild";
+        } elsif (isWindows() || isCygwin()) {
+            # FIXME: set the correct baseProductDir for chromium-win.
+        }
     }
 
     if (!defined($baseProductDir)) { # Port-spesific checks failed, use default

Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.gypi (95646 => 95647)


--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.gypi	2011-09-21 17:10:45 UTC (rev 95646)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.gypi	2011-09-21 17:37:57 UTC (rev 95647)
@@ -32,6 +32,7 @@
     'variables': {
         'TestWebKitAPI_files': [
             'Tests/WTF/CheckedArithmeticOperations.cpp',
+            'Tests/WTF/RedBlackTree.cpp',
             'Tests/WTF/StringOperators.cpp',
             'Tests/WTF/VectorBasic.cpp',
             'Tests/WTF/VectorReverse.cpp',

Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/MetaAllocator.cpp (95646 => 95647)


--- trunk/Tools/TestWebKitAPI/Tests/WTF/MetaAllocator.cpp	2011-09-21 17:10:45 UTC (rev 95646)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/MetaAllocator.cpp	2011-09-21 17:37:57 UTC (rev 95647)
@@ -27,8 +27,9 @@
  */
 
 #include "config.h"
-#include <_javascript_Core/MetaAllocator.h>
-#include <_javascript_Core/Vector.h>
+#include <stdarg.h>
+#include <wtf/MetaAllocator.h>
+#include <wtf/Vector.h>
 
 using namespace WTF;
 

Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/RedBlackTree.cpp (95646 => 95647)


--- trunk/Tools/TestWebKitAPI/Tests/WTF/RedBlackTree.cpp	2011-09-21 17:10:45 UTC (rev 95646)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/RedBlackTree.cpp	2011-09-21 17:37:57 UTC (rev 95647)
@@ -27,8 +27,8 @@
  */
 
 #include "config.h"
-#include <_javascript_Core/RedBlackTree.h>
-#include <_javascript_Core/Vector.h>
+#include <wtf/RedBlackTree.h>
+#include <wtf/Vector.h>
 
 using namespace WTF;
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to