Let TestWebKitAPI work for chromium
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Sep 2011 14:08:42 +0000 (14:08 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Sep 2011 14:08:42 +0000 (14:08 +0000)
https://bugs.webkit.org/show_bug.cgi?id=67756

Patch by Xianzhu Wang <wangxianzhu@chromium.org> on 2011-09-15
Reviewed by Sam Weinig.

Source/WebKit/chromium:

* WebKit.gyp:

Tools:

* Scripts/build-api-tests:
* Scripts/run-api-tests:
(isSupportedPlatform):
(runTest):
(populateTests):
* Scripts/webkitdirs.pm:
(determineBaseProductDir):
* TestWebKitAPI/Configurations/InjectedBundle.xcconfig:
* TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
* TestWebKitAPI/Configurations/TestWebKitAPICommon.vsprops:
* TestWebKitAPI/InjectedBundleController.cpp:
* TestWebKitAPI/InjectedBundleMain.cpp:
* TestWebKitAPI/JavaScriptTest.cpp:
* TestWebKitAPI/PlatformUtilities.cpp:
* TestWebKitAPI/TestWebKitAPI.gypi: Added.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/TestWebKitAPIPrefix.h: Removed.
* TestWebKitAPI/Tests/WTF/CheckedArithmeticOperations.cpp:
* TestWebKitAPI/Tests/WTF/StringOperators.cpp:
* TestWebKitAPI/Tests/WTF/VectorBasic.cpp:
* TestWebKitAPI/Tests/WTF/VectorReverse.cpp:
* TestWebKitAPI/Tests/WebKit2/AboutBlankLoad.cpp:
* TestWebKitAPI/Tests/WebKit2/CanHandleRequest.cpp:
* TestWebKitAPI/Tests/WebKit2/CanHandleRequest_Bundle.cpp:
* TestWebKitAPI/Tests/WebKit2/CookieManager.cpp:
* TestWebKitAPI/Tests/WebKit2/DocumentStartUserScriptAlertCrash.cpp:
* TestWebKitAPI/Tests/WebKit2/DocumentStartUserScriptAlertCrash_Bundle.cpp:
* TestWebKitAPI/Tests/WebKit2/DownloadDecideDestinationCrash.cpp:
* TestWebKitAPI/Tests/WebKit2/EvaluateJavaScript.cpp:
* TestWebKitAPI/Tests/WebKit2/FailedLoad.cpp:
* TestWebKitAPI/Tests/WebKit2/Find.cpp:
* TestWebKitAPI/Tests/WebKit2/ForceRepaint.cpp:
* TestWebKitAPI/Tests/WebKit2/FrameMIMETypeHTML.cpp:
* TestWebKitAPI/Tests/WebKit2/FrameMIMETypePNG.cpp:
* TestWebKitAPI/Tests/WebKit2/HitTestResultNodeHandle.cpp:
* TestWebKitAPI/Tests/WebKit2/HitTestResultNodeHandle_Bundle.cpp:
* TestWebKitAPI/Tests/WebKit2/InjectedBundleBasic.cpp:
* TestWebKitAPI/Tests/WebKit2/InjectedBundleBasic_Bundle.cpp:
* TestWebKitAPI/Tests/WebKit2/LoadCanceledNoServerRedirectCallback.cpp:
* TestWebKitAPI/Tests/WebKit2/LoadCanceledNoServerRedirectCallback_Bundle.cpp:
* TestWebKitAPI/Tests/WebKit2/MouseMoveAfterCrash.cpp:
* TestWebKitAPI/Tests/WebKit2/MouseMoveAfterCrash_Bundle.cpp:
* TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp:
* TestWebKitAPI/Tests/WebKit2/PageLoadDidChangeLocationWithinPageForFrame.cpp:
* TestWebKitAPI/Tests/WebKit2/PreventEmptyUserAgent.cpp:
* TestWebKitAPI/Tests/WebKit2/ResponsivenessTimerDoesntFireEarly.cpp:
* TestWebKitAPI/Tests/WebKit2/ResponsivenessTimerDoesntFireEarly_Bundle.cpp:
* TestWebKitAPI/Tests/WebKit2/RestoreSessionStateContainingFormData.cpp:
* TestWebKitAPI/Tests/WebKit2/SpacebarScrolling.cpp:
* TestWebKitAPI/Tests/WebKit2/WKPreferences.cpp:
* TestWebKitAPI/Tests/WebKit2/WKString.cpp:
* TestWebKitAPI/Tests/WebKit2/WKStringJSString.cpp:
* TestWebKitAPI/Tests/WebKit2/win/AltKeyGeneratesWMSysCommand.cpp:
* TestWebKitAPI/Tests/WebKit2/win/DoNotCopyANullCFURLResponse.cpp:
* TestWebKitAPI/Tests/WebKit2/win/HideFindIndicator.cpp:
* TestWebKitAPI/Tests/WebKit2/win/ResizeViewWhileHidden.cpp:
* TestWebKitAPI/Tests/WebKit2/win/TranslateMessageGeneratesWMChar.cpp:
* TestWebKitAPI/Tests/WebKit2/win/WMCloseCallsUIClientClose.cpp:
* TestWebKitAPI/Tests/WebKit2/win/WMPrint.cpp:
* TestWebKitAPI/TestsController.cpp:
* TestWebKitAPI/config.h: Copied from TestWebKitAPI/TestWebKitAPIPrefix.h.
* TestWebKitAPI/win/InjectedBundleControllerWin.cpp:
* TestWebKitAPI/win/PlatformUtilitiesWin.cpp:
* TestWebKitAPI/win/PlatformWebViewWin.cpp:
* TestWebKitAPI/win/TestWebKitAPI.vcproj:
* TestWebKitAPI/win/main.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95188 268f45cc-cd09-0410-ab3c-d52691b4dbfc

64 files changed:
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/WebKit.gyp
Tools/ChangeLog
Tools/Scripts/build-api-tests
Tools/Scripts/run-api-tests
Tools/Scripts/webkitdirs.pm
Tools/TestWebKitAPI/Configurations/InjectedBundle.xcconfig
Tools/TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig
Tools/TestWebKitAPI/Configurations/TestWebKitAPICommon.vsprops
Tools/TestWebKitAPI/InjectedBundleController.cpp
Tools/TestWebKitAPI/InjectedBundleMain.cpp
Tools/TestWebKitAPI/JavaScriptTest.cpp
Tools/TestWebKitAPI/PlatformUtilities.cpp
Tools/TestWebKitAPI/TestWebKitAPI.gypi [new file with mode: 0644]
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Tools/TestWebKitAPI/Tests/WTF/CheckedArithmeticOperations.cpp
Tools/TestWebKitAPI/Tests/WTF/StringOperators.cpp
Tools/TestWebKitAPI/Tests/WTF/VectorBasic.cpp
Tools/TestWebKitAPI/Tests/WTF/VectorReverse.cpp
Tools/TestWebKitAPI/Tests/WebKit2/AboutBlankLoad.cpp
Tools/TestWebKitAPI/Tests/WebKit2/CanHandleRequest.cpp
Tools/TestWebKitAPI/Tests/WebKit2/CanHandleRequest_Bundle.cpp
Tools/TestWebKitAPI/Tests/WebKit2/CookieManager.cpp
Tools/TestWebKitAPI/Tests/WebKit2/DocumentStartUserScriptAlertCrash.cpp
Tools/TestWebKitAPI/Tests/WebKit2/DocumentStartUserScriptAlertCrash_Bundle.cpp
Tools/TestWebKitAPI/Tests/WebKit2/DownloadDecideDestinationCrash.cpp
Tools/TestWebKitAPI/Tests/WebKit2/EvaluateJavaScript.cpp
Tools/TestWebKitAPI/Tests/WebKit2/FailedLoad.cpp
Tools/TestWebKitAPI/Tests/WebKit2/Find.cpp
Tools/TestWebKitAPI/Tests/WebKit2/ForceRepaint.cpp
Tools/TestWebKitAPI/Tests/WebKit2/FrameMIMETypeHTML.cpp
Tools/TestWebKitAPI/Tests/WebKit2/FrameMIMETypePNG.cpp
Tools/TestWebKitAPI/Tests/WebKit2/HitTestResultNodeHandle.cpp
Tools/TestWebKitAPI/Tests/WebKit2/HitTestResultNodeHandle_Bundle.cpp
Tools/TestWebKitAPI/Tests/WebKit2/InjectedBundleBasic.cpp
Tools/TestWebKitAPI/Tests/WebKit2/InjectedBundleBasic_Bundle.cpp
Tools/TestWebKitAPI/Tests/WebKit2/LoadCanceledNoServerRedirectCallback.cpp
Tools/TestWebKitAPI/Tests/WebKit2/LoadCanceledNoServerRedirectCallback_Bundle.cpp
Tools/TestWebKitAPI/Tests/WebKit2/MouseMoveAfterCrash.cpp
Tools/TestWebKitAPI/Tests/WebKit2/MouseMoveAfterCrash_Bundle.cpp
Tools/TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp
Tools/TestWebKitAPI/Tests/WebKit2/PageLoadDidChangeLocationWithinPageForFrame.cpp
Tools/TestWebKitAPI/Tests/WebKit2/PreventEmptyUserAgent.cpp
Tools/TestWebKitAPI/Tests/WebKit2/ResponsivenessTimerDoesntFireEarly.cpp
Tools/TestWebKitAPI/Tests/WebKit2/ResponsivenessTimerDoesntFireEarly_Bundle.cpp
Tools/TestWebKitAPI/Tests/WebKit2/RestoreSessionStateContainingFormData.cpp
Tools/TestWebKitAPI/Tests/WebKit2/SpacebarScrolling.cpp
Tools/TestWebKitAPI/Tests/WebKit2/WKPreferences.cpp
Tools/TestWebKitAPI/Tests/WebKit2/WKString.cpp
Tools/TestWebKitAPI/Tests/WebKit2/WKStringJSString.cpp
Tools/TestWebKitAPI/Tests/WebKit2/win/AltKeyGeneratesWMSysCommand.cpp
Tools/TestWebKitAPI/Tests/WebKit2/win/DoNotCopyANullCFURLResponse.cpp
Tools/TestWebKitAPI/Tests/WebKit2/win/HideFindIndicator.cpp
Tools/TestWebKitAPI/Tests/WebKit2/win/ResizeViewWhileHidden.cpp
Tools/TestWebKitAPI/Tests/WebKit2/win/TranslateMessageGeneratesWMChar.cpp
Tools/TestWebKitAPI/Tests/WebKit2/win/WMCloseCallsUIClientClose.cpp
Tools/TestWebKitAPI/Tests/WebKit2/win/WMPrint.cpp
Tools/TestWebKitAPI/TestsController.cpp
Tools/TestWebKitAPI/config.h [moved from Tools/TestWebKitAPI/TestWebKitAPIPrefix.h with 97% similarity]
Tools/TestWebKitAPI/win/InjectedBundleControllerWin.cpp
Tools/TestWebKitAPI/win/PlatformUtilitiesWin.cpp
Tools/TestWebKitAPI/win/PlatformWebViewWin.cpp
Tools/TestWebKitAPI/win/TestWebKitAPI.vcproj
Tools/TestWebKitAPI/win/main.cpp

index 7dd2aa7..bcd79d4 100644 (file)
@@ -1,3 +1,12 @@
+2011-09-15  Xianzhu Wang  <wangxianzhu@chromium.org>
+
+        Let TestWebKitAPI work for chromium
+        https://bugs.webkit.org/show_bug.cgi?id=67756
+
+        Reviewed by Sam Weinig.
+
+        * WebKit.gyp:
+
 2011-09-14  Hao Zheng  <zhenghao@chromium.org>
 
         Remove some dependencies of DRT for Android.
index f6a54e7..acf7a12 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2010 Google Inc. All rights reserved.
+# Copyright (C) 2011 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
@@ -32,6 +32,7 @@
     'includes': [
         '../../WebCore/WebCore.gypi',
         '../../../Tools/DumpRenderTree/DumpRenderTree.gypi',
+        '../../../Tools/TestWebKitAPI/TestWebKitAPI.gypi',
         'WebKit.gypi',
         'features.gypi',
     ],
                 }],
             ],
         },
+        {
+            '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',
+                'public',
+                'src',
+            ],
+            'sources': [
+                'tests/RunAllTests.cpp',
+                '<@(TestWebKitAPI_files)',
+            ],
+        },
     ], # targets
     'conditions': [
         ['OS=="win"', {
index ab59a9d..a947cbf 100644 (file)
@@ -1,3 +1,77 @@
+2011-09-15  Xianzhu Wang  <wangxianzhu@chromium.org>
+
+        Let TestWebKitAPI work for chromium
+        https://bugs.webkit.org/show_bug.cgi?id=67756
+
+        Reviewed by Sam Weinig.
+
+        * Scripts/build-api-tests:
+        * Scripts/run-api-tests:
+        (isSupportedPlatform):
+        (runTest):
+        (populateTests):
+        * Scripts/webkitdirs.pm:
+        (determineBaseProductDir):
+        * TestWebKitAPI/Configurations/InjectedBundle.xcconfig:
+        * TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
+        * TestWebKitAPI/Configurations/TestWebKitAPICommon.vsprops:
+        * TestWebKitAPI/InjectedBundleController.cpp:
+        * TestWebKitAPI/InjectedBundleMain.cpp:
+        * TestWebKitAPI/JavaScriptTest.cpp:
+        * TestWebKitAPI/PlatformUtilities.cpp:
+        * TestWebKitAPI/TestWebKitAPI.gypi: Added.
+        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+        * TestWebKitAPI/TestWebKitAPIPrefix.h: Removed.
+        * TestWebKitAPI/Tests/WTF/CheckedArithmeticOperations.cpp:
+        * TestWebKitAPI/Tests/WTF/StringOperators.cpp:
+        * TestWebKitAPI/Tests/WTF/VectorBasic.cpp:
+        * TestWebKitAPI/Tests/WTF/VectorReverse.cpp:
+        * TestWebKitAPI/Tests/WebKit2/AboutBlankLoad.cpp:
+        * TestWebKitAPI/Tests/WebKit2/CanHandleRequest.cpp:
+        * TestWebKitAPI/Tests/WebKit2/CanHandleRequest_Bundle.cpp:
+        * TestWebKitAPI/Tests/WebKit2/CookieManager.cpp:
+        * TestWebKitAPI/Tests/WebKit2/DocumentStartUserScriptAlertCrash.cpp:
+        * TestWebKitAPI/Tests/WebKit2/DocumentStartUserScriptAlertCrash_Bundle.cpp:
+        * TestWebKitAPI/Tests/WebKit2/DownloadDecideDestinationCrash.cpp:
+        * TestWebKitAPI/Tests/WebKit2/EvaluateJavaScript.cpp:
+        * TestWebKitAPI/Tests/WebKit2/FailedLoad.cpp:
+        * TestWebKitAPI/Tests/WebKit2/Find.cpp:
+        * TestWebKitAPI/Tests/WebKit2/ForceRepaint.cpp:
+        * TestWebKitAPI/Tests/WebKit2/FrameMIMETypeHTML.cpp:
+        * TestWebKitAPI/Tests/WebKit2/FrameMIMETypePNG.cpp:
+        * TestWebKitAPI/Tests/WebKit2/HitTestResultNodeHandle.cpp:
+        * TestWebKitAPI/Tests/WebKit2/HitTestResultNodeHandle_Bundle.cpp:
+        * TestWebKitAPI/Tests/WebKit2/InjectedBundleBasic.cpp:
+        * TestWebKitAPI/Tests/WebKit2/InjectedBundleBasic_Bundle.cpp:
+        * TestWebKitAPI/Tests/WebKit2/LoadCanceledNoServerRedirectCallback.cpp:
+        * TestWebKitAPI/Tests/WebKit2/LoadCanceledNoServerRedirectCallback_Bundle.cpp:
+        * TestWebKitAPI/Tests/WebKit2/MouseMoveAfterCrash.cpp:
+        * TestWebKitAPI/Tests/WebKit2/MouseMoveAfterCrash_Bundle.cpp:
+        * TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp:
+        * TestWebKitAPI/Tests/WebKit2/PageLoadDidChangeLocationWithinPageForFrame.cpp:
+        * TestWebKitAPI/Tests/WebKit2/PreventEmptyUserAgent.cpp:
+        * TestWebKitAPI/Tests/WebKit2/ResponsivenessTimerDoesntFireEarly.cpp:
+        * TestWebKitAPI/Tests/WebKit2/ResponsivenessTimerDoesntFireEarly_Bundle.cpp:
+        * TestWebKitAPI/Tests/WebKit2/RestoreSessionStateContainingFormData.cpp:
+        * TestWebKitAPI/Tests/WebKit2/SpacebarScrolling.cpp:
+        * TestWebKitAPI/Tests/WebKit2/WKPreferences.cpp:
+        * TestWebKitAPI/Tests/WebKit2/WKString.cpp:
+        * TestWebKitAPI/Tests/WebKit2/WKStringJSString.cpp:
+        * TestWebKitAPI/Tests/WebKit2/win/AltKeyGeneratesWMSysCommand.cpp:
+        * TestWebKitAPI/Tests/WebKit2/win/DoNotCopyANullCFURLResponse.cpp:
+        * TestWebKitAPI/Tests/WebKit2/win/HideFindIndicator.cpp:
+        * TestWebKitAPI/Tests/WebKit2/win/ResizeViewWhileHidden.cpp:
+        * TestWebKitAPI/Tests/WebKit2/win/TranslateMessageGeneratesWMChar.cpp:
+        * TestWebKitAPI/Tests/WebKit2/win/WMCloseCallsUIClientClose.cpp:
+        * TestWebKitAPI/Tests/WebKit2/win/WMPrint.cpp:
+        * TestWebKitAPI/TestsController.cpp:
+        * TestWebKitAPI/config.h: Copied from TestWebKitAPI/TestWebKitAPIPrefix.h.
+        * TestWebKitAPI/win/InjectedBundleControllerWin.cpp:
+        * TestWebKitAPI/win/PlatformUtilitiesWin.cpp:
+        * TestWebKitAPI/win/PlatformWebViewWin.cpp:
+        * TestWebKitAPI/win/TestWebKitAPI.vcproj:
+        * TestWebKitAPI/win/main.cpp:
+
 2011-09-15  Jochen Eisinger  <jochen@chromium.org>
 
         [chromium] extract normalization of LayoutTests URLs to a method of TestShell
index f6ddec0..09d19bf 100755 (executable)
@@ -66,6 +66,9 @@ if (isAppleMacWebKit()) {
 } elsif (isAppleWinWebKit()) {
     chdir "Tools/TestWebKitAPI" or die;
     $result = buildVisualStudioProject("win/TestWebKitAPI.sln", $clean);
+} elsif (isChromium()) {
+    # Chromium build everything in one shot. No need to build anything here.
+    $result = 0;
 } else {
     die "TestWebKitAPI is not supported on this platform.\n";
 }
index b863897..3b60bd5 100755 (executable)
@@ -66,6 +66,7 @@ Usage: $programName [options]
   -v|--verbose          Verbose output
   -d|--dump-tests       Dump the names of testcases without running them
   --[no-]build          Build (or do not build) unit tests prior to running (default: $buildDefault)
+  --chromium            Run the Chromium port on Mac/Win/Linux
 EOF
 
 GetOptions(
@@ -94,6 +95,11 @@ if (runAllTests()) {
     exit 1;
 }
 
+sub isSupportedPlatform()
+{
+    return isAppleMacWebKit() || isAppleWinWebKit() || isChromium();
+}
+
 sub dumpAllTests()
 {
     print "Dumping test cases\n";
@@ -145,7 +151,7 @@ sub runTest($$)
     my $result = 0;
     my $timedOut = 0;
 
-    die "run-api-tests is not supported on this platform.\n" unless isAppleMacWebKit() || isAppleWinWebKit();
+    die "run-api-tests is not supported on this platform.\n" unless isSupportedPlatform();
 
     prepareEnvironmentForRunningTestTool();
 
@@ -202,7 +208,7 @@ sub populateTests()
     my @tests;
     my $timedOut;
 
-    die "run-api-tests is not supported on this platform.\n" unless isAppleMacWebKit() || isAppleWinWebKit();
+    die "run-api-tests is not supported on this platform.\n" unless isSupportedPlatform();
 
     prepareEnvironmentForRunningTestTool();
 
index 42f3aff..962a168 100644 (file)
@@ -155,6 +155,8 @@ sub determineBaseProductDir
     } elsif (isSymbian()) {
         # Shadow builds are not supported on Symbian
         $baseProductDir = $sourceDir;
+    } elsif (isChromium()) {
+        $baseProductDir = "$sourceDir/out";
     }
 
     if (!defined($baseProductDir)) { # Port-spesific checks failed, use default
index 7f8c897..164a05c 100644 (file)
@@ -22,4 +22,3 @@
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
 
 PRODUCT_NAME = InjectedBundleTestWebKitAPI;
-GCC_PREFIX_HEADER = TestWebKitAPIPrefix.h;
index 5e69d0e..c2ab7cd 100644 (file)
@@ -23,4 +23,3 @@
 
 PRODUCT_NAME = TestWebKitAPI
 GCC_ENABLE_OBJC_EXCEPTIONS = YES
-GCC_PREFIX_HEADER = TestWebKitAPIPrefix.h
index aebfc92..bd7f45b 100644 (file)
@@ -7,7 +7,6 @@
        <Tool
                Name="VCCLCompilerTool"
                 AdditionalIncludeDirectories="&quot;$(ProjectDir)&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ConfigurationBuildDir)\include&quot;;&quot;$(ConfigurationBuildDir)\include\WebCore\ForwardingHeaders&quot;;&quot;$(ConfigurationBuildDir)\include\private&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(ProjectDir)\..\..\..\Source\ThirdParty\gtest\include&quot;"
-               ForcedIncludeFiles="TestWebKitAPIPrefix.h"
        />
        <Tool
                Name="VCLinkerTool"
index f312377..13375c5 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "InjectedBundleController.h"
 
 #include "InjectedBundleTest.h"
index 355c35b..8ad6c2b 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "InjectedBundleController.h"
 #include <WebKit2/WKBundleInitialize.h>
 
index 4802c71..4f109b6 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "JavaScriptTest.h"
 
 #include "PlatformUtilities.h"
index 7e91d6c..ec20dc1 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "PlatformUtilities.h"
 
 #include <wtf/OwnArrayPtr.h>
diff --git a/Tools/TestWebKitAPI/TestWebKitAPI.gypi b/Tools/TestWebKitAPI/TestWebKitAPI.gypi
new file mode 100644 (file)
index 0000000..571a22f
--- /dev/null
@@ -0,0 +1,40 @@
+#
+# Copyright (C) 2011 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.
+#
+
+{
+    'variables': {
+        'TestWebKitAPI_files': [
+            'Tests/WTF/CheckedArithmeticOperations.cpp',
+            'Tests/WTF/StringOperators.cpp',
+            'Tests/WTF/VectorBasic.cpp',
+            'Tests/WTF/VectorReverse.cpp',
+        ],
+    },
+}
index fa1d023..4ba8b5a 100644 (file)
                BC131883117114A800B69727 /* PlatformUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformUtilities.h; sourceTree = "<group>"; };
                BC131884117114B600B69727 /* PlatformUtilitiesMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformUtilitiesMac.mm; sourceTree = "<group>"; };
                BC131A9A1171316900B69727 /* main.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = "<group>"; };
-               BC131A9E1171317C00B69727 /* TestWebKitAPIPrefix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestWebKitAPIPrefix.h; sourceTree = "<group>"; };
+               BC131A9E1171317C00B69727 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; };
                BC131AA8117131FC00B69727 /* TestsController.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 4; path = TestsController.cpp; sourceTree = "<group>"; };
                BC246D8C132F115A00B56D7C /* AboutBlankLoad.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AboutBlankLoad.cpp; sourceTree = "<group>"; };
                BC246D97132F1FE100B56D7C /* CanHandleRequest_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CanHandleRequest_Bundle.cpp; sourceTree = "<group>"; };
                                BC575944126E733C006F0F12 /* InjectedBundle */,
                                C0ADBE7A12FCA4D000D2C129 /* JavaScriptTest.cpp */,
                                C0ADBE7B12FCA4D000D2C129 /* JavaScriptTest.h */,
-                               BC131A9E1171317C00B69727 /* TestWebKitAPIPrefix.h */,
+                               BC131A9E1171317C00B69727 /* config.h */,
                                BC575BBF126F5752006F0F12 /* PlatformUtilities.cpp */,
                                BC131883117114A800B69727 /* PlatformUtilities.h */,
                                BC90951B125533D700083756 /* PlatformWebView.h */,
index 0ef6e55..768c7d3 100644 (file)
@@ -23,7 +23,8 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <JavaScriptCore/CheckedArithmetic.h>
+#include "config.h"
+#include <wtf/CheckedArithmetic.h>
 
 namespace TestWebKitAPI {
 
index 985964b..819013f 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#define JS_EXPORTDATA
+#include "config.h"
+
 #define WTF_STRINGTYPEADAPTER_COPIED_WTF_STRING() (++wtfStringCopyCount)
 
 static int wtfStringCopyCount;
 
-#include <JavaScriptCore/WTFString.h>
+#include <wtf/text/WTFString.h>
 
 namespace TestWebKitAPI {
 
index 946b60c..211ef88 100644 (file)
@@ -23,7 +23,8 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <JavaScriptCore/Vector.h>
+#include "config.h"
+#include <wtf/Vector.h>
 
 namespace TestWebKitAPI {
 
index c9a0af0..6d4a00f 100644 (file)
@@ -23,7 +23,8 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <JavaScriptCore/Vector.h>
+#include "config.h"
+#include <wtf/Vector.h>
 
 namespace TestWebKitAPI {
 
index dd40ef2..ff36a0b 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "PlatformUtilities.h"
 #include "PlatformWebView.h"
 
index 80dc2dd..8fbcf64 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "PlatformUtilities.h"
 #include "PlatformWebView.h"
 #include <WebKit2/WKContextPrivate.h>
index b5d644d..5f66b53 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "InjectedBundleTest.h"
 
 #include "PlatformUtilities.h"
index 57377e5..df5fb2e 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "PlatformUtilities.h"
 #include "PlatformWebView.h"
 #include <WebKit2/WKCookieManager.h>
index af4d259..7559da2 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "PlatformUtilities.h"
 #include "PlatformWebView.h"
 #include "Test.h"
index fbda52e..3aa2909 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "InjectedBundleTest.h"
 #include <WebKit2/WKBundlePageGroup.h>
 #include <WebKit2/WKBundlePrivate.h>
index 3809331..f360646 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "PlatformUtilities.h"
 #include "PlatformWebView.h"
 #include <WebKit2/WKDownload.h>
index bcf5db4..99b7ff7 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "PlatformUtilities.h"
 #include "PlatformWebView.h"
 #include "Test.h"
index 25fe10a..99b1b97 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "PlatformUtilities.h"
 #include "PlatformWebView.h"
 #include "Test.h"
index ae10fe0..2717c13 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "PlatformUtilities.h"
 #include "PlatformWebView.h"
 #include <WebKit2/WKRetainPtr.h>
index 8fdeea2..08873f8 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "PlatformUtilities.h"
 #include "PlatformWebView.h"
 #include "Test.h"
index 2d296e4..7349866 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "PlatformUtilities.h"
 #include "PlatformWebView.h"
 #include "Test.h"
index d1e1591..46f63da 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "PlatformUtilities.h"
 #include "PlatformWebView.h"
 #include <WebKit2/WKRetainPtr.h>
index 0fc1a84..2100d28 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "PlatformUtilities.h"
 #include "PlatformWebView.h"
 #include <WebKit2/WKRetainPtr.h>
index c40a7f6..882909e 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "InjectedBundleTest.h"
 #include "InjectedBundleController.h"
 #include "PlatformUtilities.h"
index 6234e10..40ca269 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "PlatformUtilities.h"
 #include "PlatformWebView.h"
 #include <WebKit2/WKRetainPtr.h>
index 1707640..6a597be 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "InjectedBundleTest.h"
 #include <WebKit2/WKRetainPtr.h>
 
index 175968b..7dbd063 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "JavaScriptTest.h"
 #include "PlatformUtilities.h"
 #include "PlatformWebView.h"
index 779bf15..c5e8514 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "JavaScriptTest.h"
 #include "PlatformUtilities.h"
 #include "PlatformWebView.h"
index 1e4b6ec..a075620 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "InjectedBundleTest.h"
 
 #include "PlatformUtilities.h"
index c546c70..0191b65 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "PlatformUtilities.h"
 #include "PlatformWebView.h"
 #include "Test.h"
index ea85bd7..86fbe5e 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "PlatformUtilities.h"
 #include "PlatformWebView.h"
 #include <WebKit2/WKRetainPtr.h>
index dc94f0c..4c52278 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "PlatformUtilities.h"
 #include "PlatformWebView.h"
 #include "Test.h"
index 209d534..f75de12 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "JavaScriptTest.h"
 #include "PlatformUtilities.h"
 #include "PlatformWebView.h"
index 0a598c6..f87da58 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "JavaScriptTest.h"
 #include "PlatformUtilities.h"
 #include "PlatformWebView.h"
index 5137486..8a0a7cf 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "PlatformUtilities.h"
 #include <WebKit2/WKPreferencesPrivate.h>
 #include <WebKit2/WKRetainPtr.h>
index 2adba9b..b672359 100644 (file)
@@ -23,6 +23,8 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
+
 namespace TestWebKitAPI {
 
 TEST(WebKit2, WKString)
index 7eb6008..cdba57d 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include <WebKit2/WKStringPrivate.h>
 #include <JavaScriptCore/JSStringRef.h>
 
index 5a5e2d0..000f9cd 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "PlatformUtilities.h"
 #include "PlatformWebView.h"
 #include "WindowMessageObserver.h"
index 03e0914..8bd0c56 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include <WebKit2/WKRetainPtr.h>
 #include <WebKit2/WKURLResponseCF.h>
 #include <wtf/RetainPtr.h>
index 64ce4eb..6e350ff 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "PlatformUtilities.h"
 #include "PlatformWebView.h"
 #include "Test.h"
index db5c378..32c8a07 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "PlatformUtilities.h"
 #include "PlatformWebView.h"
 #include <WebKit2/WKRetainPtr.h>
index 6b513a7..844499c 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "PlatformUtilities.h"
 #include "PlatformWebView.h"
 #include "WindowMessageObserver.h"
index 7d10cb6..5fa4b3a 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "PlatformUtilities.h"
 #include "PlatformWebView.h"
 #include <WebKit2/WKRetainPtr.h>
index 51c1540..36a18ca 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "PlatformUtilities.h"
 #include "PlatformWebView.h"
 #include <WebKit2/WKRetainPtr.h>
index 8d27150..29dcc71 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "TestsController.h"
 
 #include <wtf/Threading.h>
similarity index 97%
rename from Tools/TestWebKitAPI/TestWebKitAPIPrefix.h
rename to Tools/TestWebKitAPI/config.h
index c31528e..ffb4d9a 100644 (file)
 #define JS_EXPORT_PRIVATE
 #define WTF_EXPORT_PRIVATE
 
+#define JS_EXPORTDATA
+
 #include <stdint.h>
+
+#if !PLATFORM(CHROMIUM)
 #include <WebKit2/WebKit2.h>
+#endif
 
 #ifdef __cplusplus
 #include <gtest/gtest.h>
index 919627e..5c4f42d 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "InjectedBundleController.h"
 
 namespace TestWebKitAPI {
index 90208c5..1b9823d 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "PlatformUtilities.h"
 
 #include <WebKit2/WKStringCF.h>
index 292e380..2015f26 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "PlatformWebView.h"
 
 #include "WindowMessageObserver.h"
index aabb50f..e1eb9c5 100644 (file)
                        >
                </File>
                <File
-                       RelativePath="..\TestWebKitAPIPrefix.h"
+                       RelativePath="..\config.h"
                        >
                </File>
        </Files>
index a756197..b7211ea 100644 (file)
@@ -23,6 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "TestsController.h"
 
 int main(int argc, char** argv)