summaryrefslogtreecommitdiffstats
path: root/WebKitTools/WebKitTestRunner
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-07-22 15:37:06 +0100
committerBen Murdoch <benm@google.com>2010-07-27 10:20:25 +0100
commit967717af5423377c967781471ee106e2bb4e11c8 (patch)
tree1e701dc0a12f7f07cce1df4a7681717de77a211b /WebKitTools/WebKitTestRunner
parentdcc30a9fca45f634b1d3a12b276d3a0ccce99fc3 (diff)
downloadexternal_webkit-967717af5423377c967781471ee106e2bb4e11c8.zip
external_webkit-967717af5423377c967781471ee106e2bb4e11c8.tar.gz
external_webkit-967717af5423377c967781471ee106e2bb4e11c8.tar.bz2
Merge WebKit at r63859 : Initial merge by git.
Change-Id: Ie8096c63ec7c991c9a9cba8bdd9c3b74a3b8ed62
Diffstat (limited to 'WebKitTools/WebKitTestRunner')
-rw-r--r--WebKitTools/WebKitTestRunner/Configurations/Base.xcconfig3
-rw-r--r--WebKitTools/WebKitTestRunner/Configurations/DebugRelease.xcconfig2
-rw-r--r--WebKitTools/WebKitTestRunner/Configurations/InjectedBundleCommon.vsprops25
-rw-r--r--WebKitTools/WebKitTestRunner/DerivedSources.make49
-rw-r--r--WebKitTools/WebKitTestRunner/ForwardingHeaders/wtf/GetPtr.h1
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/ActivateFonts.h35
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm525
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h42
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp79
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.h50
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl45
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp3
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp7
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp89
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h12
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp108
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h27
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm75
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/win/ActivateFonts.cpp35
-rw-r--r--WebKitTools/WebKitTestRunner/InjectedBundle/win/InjectedBundle.vcproj355
-rw-r--r--WebKitTools/WebKitTestRunner/TestController.cpp70
-rw-r--r--WebKitTools/WebKitTestRunner/TestController.h9
-rw-r--r--WebKitTools/WebKitTestRunner/TestInvocation.cpp13
-rw-r--r--WebKitTools/WebKitTestRunner/TestInvocation.h2
-rw-r--r--WebKitTools/WebKitTestRunner/WebKitTestRunner.sln78
-rw-r--r--WebKitTools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj184
-rw-r--r--WebKitTools/WebKitTestRunner/WebKitTestRunnerPrefix.h3
-rw-r--r--WebKitTools/WebKitTestRunner/fonts/AHEM____.TTFbin0 -> 12480 bytes
-rw-r--r--WebKitTools/WebKitTestRunner/fonts/ColorBits-A.pngbin0 -> 585 bytes
-rw-r--r--WebKitTools/WebKitTestRunner/fonts/ColorBits.ttfbin0 -> 1028 bytes
-rw-r--r--WebKitTools/WebKitTestRunner/fonts/WebKit Layout Tests 2.ttfbin0 -> 28812 bytes
-rw-r--r--WebKitTools/WebKitTestRunner/fonts/WebKit Layout Tests.ttfbin0 -> 28780 bytes
-rw-r--r--WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher100.ttfbin0 -> 28512 bytes
-rw-r--r--WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher200.ttfbin0 -> 28512 bytes
-rw-r--r--WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher300.ttfbin0 -> 28492 bytes
-rw-r--r--WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher400.ttfbin0 -> 28440 bytes
-rw-r--r--WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher500.ttfbin0 -> 28424 bytes
-rw-r--r--WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher600.ttfbin0 -> 28460 bytes
-rw-r--r--WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher700.ttfbin0 -> 28384 bytes
-rw-r--r--WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher800.ttfbin0 -> 28492 bytes
-rw-r--r--WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher900.ttfbin0 -> 28492 bytes
-rw-r--r--WebKitTools/WebKitTestRunner/mac/TestControllerMac.mm23
-rwxr-xr-xWebKitTools/WebKitTestRunner/win/InjectedBundleGenerated.vcproj53
-rw-r--r--WebKitTools/WebKitTestRunner/win/PlatformWebViewWin.cpp33
-rw-r--r--WebKitTools/WebKitTestRunner/win/TestControllerWin.cpp25
-rw-r--r--WebKitTools/WebKitTestRunner/win/TestInvocationWin.cpp9
-rw-r--r--WebKitTools/WebKitTestRunner/win/WebKitTestRunner.sln13
-rw-r--r--WebKitTools/WebKitTestRunner/win/WebKitTestRunner.vcproj64
-rw-r--r--WebKitTools/WebKitTestRunner/win/build-generated-files.sh42
49 files changed, 1934 insertions, 254 deletions
diff --git a/WebKitTools/WebKitTestRunner/Configurations/Base.xcconfig b/WebKitTools/WebKitTestRunner/Configurations/Base.xcconfig
index af3f4e6..7ceab07 100644
--- a/WebKitTools/WebKitTestRunner/Configurations/Base.xcconfig
+++ b/WebKitTools/WebKitTestRunner/Configurations/Base.xcconfig
@@ -66,3 +66,6 @@ SDKROOT_1060_1050 = macosx10.5;
SDKROOT_1070_1040 = macosx10.4;
SDKROOT_1070_1050 = macosx10.5;
SDKROOT_1070_1060 = macosx10.6;
+
+WEBKIT_UMBRELLA_FRAMEWORKS_DIR = $(NEXT_ROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/WebKit.framework/Versions/A/Frameworks;
+WEBCORE_PRIVATE_HEADERS_DIR = $(WEBKIT_UMBRELLA_FRAMEWORKS_DIR)/WebCore.framework/PrivateHeaders;
diff --git a/WebKitTools/WebKitTestRunner/Configurations/DebugRelease.xcconfig b/WebKitTools/WebKitTestRunner/Configurations/DebugRelease.xcconfig
index 8b156e8..41600b1 100644
--- a/WebKitTools/WebKitTestRunner/Configurations/DebugRelease.xcconfig
+++ b/WebKitTools/WebKitTestRunner/Configurations/DebugRelease.xcconfig
@@ -38,3 +38,5 @@ MACOSX_DEPLOYMENT_TARGET_1040 = 10.4;
MACOSX_DEPLOYMENT_TARGET_1050 = 10.5;
MACOSX_DEPLOYMENT_TARGET_1060 = 10.6;
MACOSX_DEPLOYMENT_TARGET_1070 = 10.7;
+
+WEBKIT_UMBRELLA_FRAMEWORKS_DIR = $(BUILT_PRODUCTS_DIR);
diff --git a/WebKitTools/WebKitTestRunner/Configurations/InjectedBundleCommon.vsprops b/WebKitTools/WebKitTestRunner/Configurations/InjectedBundleCommon.vsprops
new file mode 100644
index 0000000..20a4852
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/Configurations/InjectedBundleCommon.vsprops
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="InjectedBundleCommon"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\..&quot;;&quot;$(ProjectDir)\..\Bindings&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitOutputDir)\obj\InjectedBundle\DerivedSources\&quot;"
+ ForcedIncludeFiles="WebKitTestRunnerPrefix.h"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib"
+ OutputFile="$(OutDir)\$(ProjectName)$(WebKitConfigSuffix).dll"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;"
+ />
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine="%SystemDrive%\cygwin\bin\which.exe bash&#x0D;&#x0A;if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;cmd /c&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ />
+</VisualStudioPropertySheet>
diff --git a/WebKitTools/WebKitTestRunner/DerivedSources.make b/WebKitTools/WebKitTestRunner/DerivedSources.make
new file mode 100644
index 0000000..6134380
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/DerivedSources.make
@@ -0,0 +1,49 @@
+# Copyright (C) 2010 Apple 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:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. 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.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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.
+
+VPATH = \
+ $(WebKitTestRunner)/InjectedBundle/Bindings \
+#
+
+INTERFACES = \
+ LayoutTestController \
+#
+
+SCRIPTS = \
+ $(WebCoreScripts)/CodeGenerator.pm \
+ $(WebKitTestRunner)/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm \
+ $(WebCoreScripts)/IDLParser.pm \
+ $(WebCoreScripts)/IDLStructure.pm \
+ $(WebCoreScripts)/generate-bindings.pl \
+#
+
+.PHONY : all
+
+JS%.h JS%.cpp : %.idl $(SCRIPTS)
+ @echo Generating bindings for $*...
+ @perl -I $(WebCoreScripts) -I $(WebKitTestRunner)/InjectedBundle/Bindings $(WebCoreScripts)/generate-bindings.pl --defines "" --include InjectedBundle/Bindings --outputDir . --generator TestRunner $<
+
+all : \
+ $(INTERFACES:%=JS%.h) \
+ $(INTERFACES:%=JS%.cpp) \
+#
diff --git a/WebKitTools/WebKitTestRunner/ForwardingHeaders/wtf/GetPtr.h b/WebKitTools/WebKitTestRunner/ForwardingHeaders/wtf/GetPtr.h
new file mode 100644
index 0000000..aedd784
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/ForwardingHeaders/wtf/GetPtr.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/GetPtr.h>
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/ActivateFonts.h b/WebKitTools/WebKitTestRunner/InjectedBundle/ActivateFonts.h
new file mode 100644
index 0000000..5ee1276
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/ActivateFonts.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2010 Apple 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:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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 ActivateFonts_h
+#define ActivateFonts_h
+
+namespace WTR {
+
+void activateFonts();
+
+} // namespace WTR
+
+#endif // ActivateFonts_h
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm
new file mode 100644
index 0000000..d72d4fc
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm
@@ -0,0 +1,525 @@
+# Copyright (C) 2010 Apple 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:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. 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.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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.
+
+use strict;
+use warnings;
+use File::Spec;
+
+package CodeGeneratorTestRunner;
+
+sub new
+{
+ my ($class, $codeGenerator, $outputDir) = @_;
+
+ my $reference = {
+ codeGenerator => $codeGenerator,
+ outputDir => $outputDir,
+ };
+
+ bless($reference, $class);
+ return $reference;
+}
+
+sub GenerateModule
+{
+}
+
+sub GenerateInterface
+{
+ my ($self, $interface, $defines) = @_;
+
+ foreach my $file ($self->_generateHeaderFile($interface), $self->_generateImplementationFile($interface)) {
+ open(FILE, ">", File::Spec->catfile($$self{outputDir}, $$file{name})) or die "Failed to open $$file{name} for writing: $!";
+ print FILE @{$$file{contents}};
+ close(FILE) or die "Failed to close $$file{name} after writing: $!";
+ }
+}
+
+sub finish
+{
+}
+
+sub _className
+{
+ my ($idlType) = @_;
+
+ return "JS" . _implementationClassName($idlType);
+}
+
+sub _classRefGetter
+{
+ my ($self, $idlType) = @_;
+ return $$self{codeGenerator}->WK_lcfirst(_implementationClassName($idlType)) . "Class";
+}
+
+sub _fileHeaderString
+{
+ my ($filename) = @_;
+
+ # FIXME: We should pull header out of the IDL file to get the copyright
+ # year(s) right.
+ return <<EOF;
+/*
+ * Copyright (C) 2010 Apple 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:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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.
+ */
+EOF
+}
+
+sub _generateHeaderFile
+{
+ my ($self, $interface) = @_;
+
+ my @contents = ();
+
+ my $idlType = $interface->name;
+ my $className = _className($idlType);
+ my $implementationClassName = _implementationClassName($idlType);
+ my $filename = $className . ".h";
+
+ push(@contents, _fileHeaderString($filename));
+
+ my $parentClassName = _parentClassName($interface);
+
+ push(@contents, <<EOF);
+
+#ifndef ${className}_h
+#define ${className}_h
+
+#include "${parentClassName}.h"
+EOF
+ push(@contents, <<EOF);
+
+namespace WTR {
+
+class ${implementationClassName};
+
+class ${className} : public ${parentClassName} {
+public:
+ static JSClassRef @{[$self->_classRefGetter($idlType)]}();
+
+private:
+ static const JSStaticFunction* staticFunctions();
+ static const JSStaticValue* staticValues();
+EOF
+
+ if (my @functions = @{$interface->functions}) {
+ push(@contents, "\n // Functions\n\n");
+ foreach my $function (@functions) {
+ push(@contents, " static JSValueRef @{[$function->signature->name]}(JSContextRef, JSObjectRef, JSObjectRef, size_t, const JSValueRef[], JSValueRef*);\n");
+ }
+ }
+
+ if (my @attributes = @{$interface->attributes}) {
+ push(@contents, "\n // Attributes\n\n");
+ foreach my $attribute (@attributes) {
+ push(@contents, " static JSValueRef @{[$self->_getterName($attribute)]}(JSContextRef, JSObjectRef, JSStringRef, JSValueRef*);\n");
+ push(@contents, " static bool @{[$self->_setterName($attribute)]}(JSContextRef, JSObjectRef, JSStringRef, JSValueRef, JSValueRef*);\n") unless $attribute->type =~ /^readonly/;
+ }
+ }
+
+ push(@contents, <<EOF);
+};
+
+${implementationClassName}* to${implementationClassName}(JSContextRef, JSValueRef);
+
+} // namespace WTR
+
+#endif // ${className}_h
+EOF
+
+ return { name => $filename, contents => \@contents };
+}
+
+sub _generateImplementationFile
+{
+ my ($self, $interface) = @_;
+
+ my @contentsPrefix = ();
+ my %contentsIncludes = ();
+ my @contents = ();
+
+ my $idlType = $interface->name;
+ my $className = _className($idlType);
+ my $implementationClassName = _implementationClassName($idlType);
+ my $filename = $className . ".cpp";
+
+ push(@contentsPrefix, _fileHeaderString($filename));
+
+ my $classRefGetter = $self->_classRefGetter($idlType);
+ my $parentClassName = _parentClassName($interface);
+
+ $contentsIncludes{"${className}.h"} = 1;
+ $contentsIncludes{"${implementationClassName}.h"} = 1;
+
+ push(@contentsPrefix, <<EOF);
+
+EOF
+
+ push(@contents, <<EOF);
+#include <JavaScriptCore/JSRetainPtr.h>
+#include <wtf/GetPtr.h>
+
+namespace WTR {
+
+${implementationClassName}* to${implementationClassName}(JSContextRef context, JSValueRef value)
+{
+ if (!context || !value || !${className}::${classRefGetter}() || !JSValueIsObjectOfClass(context, value, ${className}::${classRefGetter}()))
+ return 0;
+ return static_cast<${implementationClassName}*>(JSWrapper::unwrap(context, value));
+}
+
+JSClassRef ${className}::${classRefGetter}()
+{
+ static JSClassRef jsClass;
+ if (!jsClass) {
+ JSClassDefinition definition = kJSClassDefinitionEmpty;
+ definition.className = "${idlType}";
+ definition.parentClass = @{[$self->_parentClassRefGetterExpression($interface)]};
+ definition.staticValues = staticValues();
+ definition.staticFunctions = staticFunctions();
+EOF
+
+ push(@contents, " definition.initialize = initialize;\n") unless _parentInterface($interface);
+ push(@contents, " definition.finalize = finalize;\n") unless _parentInterface($interface);
+
+ push(@contents, <<EOF);
+ jsClass = JSClassCreate(&definition);
+ }
+ return jsClass;
+}
+
+EOF
+
+ push(@contents, $self->_staticFunctionsGetterImplementation($interface), "\n");
+ push(@contents, $self->_staticValuesGetterImplementation($interface));
+
+ if (my @functions = @{$interface->functions}) {
+ push(@contents, "\n// Functions\n");
+
+ foreach my $function (@functions) {
+ push(@contents, <<EOF);
+
+JSValueRef ${className}::@{[$function->signature->name]}(JSContextRef context, JSObjectRef, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ ${implementationClassName}* impl = to${implementationClassName}(context, thisObject);
+ if (!impl)
+ return JSValueMakeUndefined(context);
+EOF
+ my @parameters = ();
+ my @specifiedParameters = @{$function->parameters};
+
+ push(@contents, "\n") if scalar @specifiedParameters;
+
+ $self->_includeHeaders(\%contentsIncludes, $function->signature->type, $function->signature);
+
+ foreach my $i (0..$#specifiedParameters) {
+ my $parameter = $specifiedParameters[$i];
+
+ $self->_includeHeaders(\%contentsIncludes, $idlType, $parameter);
+
+ push(@contents, " " . $self->_platformTypeVariableDeclaration($parameter, $parameter->name, "arguments[$i]", "argumentCount > $i") . "\n");
+
+ push(@parameters, $self->_paramterExpression($parameter));
+ }
+
+ my $isVoidReturn = $function->signature->type eq "void";
+ my $functionName = "impl->" . $function->signature->name;
+ my $functionCall = $functionName . "(" . join(", ", @parameters) . ")";
+
+ push(@contents, "\n") unless scalar @specifiedParameters == 1;
+ push(@contents, " ${functionCall};\n\n") if $isVoidReturn;
+ push(@contents, " return " . $self->_returnExpression($function->signature, $functionCall) . ";\n}\n");
+ }
+ }
+
+ if (my @attributes = @{$interface->attributes}) {
+ push(@contents, "\n// Attributes\n");
+ foreach my $attribute (@attributes) {
+ $self->_includeHeaders(\%contentsIncludes, $attribute->signature->type, $attribute->signature);
+
+ my $getterName = $self->_getterName($attribute);
+ my $getterExpression = "impl->${getterName}()";
+
+ push(@contents, <<EOF);
+
+JSValueRef ${className}::${getterName}(JSContextRef context, JSObjectRef object, JSStringRef, JSValueRef* exception)
+{
+ ${implementationClassName}* impl = to${implementationClassName}(context, object);
+ if (!impl)
+ return JSValueMakeUndefined(context);
+
+ return @{[$self->_returnExpression($attribute->signature, $getterExpression)]};
+}
+EOF
+
+ unless ($attribute->type =~ /^readonly/) {
+ push(@contents, <<EOF);
+
+bool ${className}::@{[$self->_setterName($attribute)]}(JSContextRef context, JSObjectRef object, JSStringRef, JSValueRef value, JSValueRef* exception)
+{
+ ${implementationClassName}* impl = to${implementationClassName}(context, object);
+ if (!impl)
+ return false;
+
+EOF
+
+ my $platformValue = $self->_platformTypeConstructor($attribute->signature, "value");
+
+ push(@contents, <<EOF);
+ impl->@{[$self->_setterName($attribute)]}(${platformValue});
+
+ return true;
+}
+EOF
+ }
+ }
+ }
+
+ push(@contents, <<EOF);
+
+} // namespace WTR
+
+EOF
+
+ unshift(@contents, map { "#include \"$_\"\n" } sort keys(%contentsIncludes));
+ unshift(@contents, @contentsPrefix);
+
+ return { name => $filename, contents => \@contents };
+}
+
+sub _getterName
+{
+ my ($self, $attribute) = @_;
+
+ my $signature = $attribute->signature;
+ my $name = $signature->name;
+
+ return $name;
+}
+
+sub _includeHeaders
+{
+ my ($self, $headers, $idlType, $signature) = @_;
+
+ return unless defined $idlType;
+ return if $idlType eq "boolean" or $$self{codeGenerator}->IsNonPointerType($idlType);
+
+ $$headers{_className($idlType) . ".h"} = 1;
+ $$headers{_implementationClassName($idlType) . ".h"} = 1;
+}
+
+sub _implementationClassName
+{
+ my ($idlType) = @_;
+
+ return $idlType;
+}
+
+sub _parentClassName
+{
+ my ($interface) = @_;
+
+ my $parentInterface = _parentInterface($interface);
+ return $parentInterface ? _className($parentInterface) : "JSWrapper";
+}
+
+sub _parentClassRefGetterExpression
+{
+ my ($self, $interface) = @_;
+
+ my $parentInterface = _parentInterface($interface);
+ return $parentInterface ? $self->_classRefGetter($parentInterface) . "()" : "0";
+}
+
+sub _parentInterface
+{
+ my ($interface) = @_;
+ return $interface->parents->[0];
+}
+
+sub _platformType
+{
+ my ($self, $idlType, $signature) = @_;
+
+ return undef unless defined $idlType;
+
+ return "bool" if $idlType eq "boolean";
+ return "JSRetainPtr<JSStringRef>" if $$self{codeGenerator}->IsStringType($idlType);
+ return "double" if $$self{codeGenerator}->IsNonPointerType($idlType);
+ return _implementationClassName($idlType);
+}
+
+sub _platformTypeConstructor
+{
+ my ($self, $signature, $argumentName) = @_;
+
+ my $idlType = $signature->type;
+
+ return "JSRetainPtr<JSStringRef>(Adopt, JSValueToStringCopy(context, $argumentName, 0))" if $$self{codeGenerator}->IsStringType($idlType);
+ return "JSValueToBoolean(context, $argumentName)" if $idlType eq "boolean";
+ return "JSValueToNumber(context, $argumentName, 0)" if $$self{codeGenerator}->IsNonPointerType($idlType);
+ return "to" . _implementationClassName($idlType) . "(context, $argumentName)";
+}
+
+sub _platformTypeVariableDeclaration
+{
+ my ($self, $signature, $variableName, $argumentName, $condition) = @_;
+
+ my $platformType = $self->_platformType($signature->type, $signature);
+ my $constructor = $self->_platformTypeConstructor($signature, $argumentName);
+
+ my %nonPointerTypes = (
+ "bool" => 1,
+ "double" => 1,
+ "JSRetainPtr<JSStringRef>" => 1,
+ );
+
+ my $nullValue = "0";
+ $nullValue = "$platformType()" if defined $nonPointerTypes{$platformType} && $platformType ne "double";
+
+ $platformType .= "*" unless defined $nonPointerTypes{$platformType};
+
+ return "$platformType $variableName = $condition && $constructor;" if $condition && $platformType eq "bool";
+ return "$platformType $variableName = $condition ? $constructor : $nullValue;" if $condition;
+ return "$platformType $variableName = $constructor;";
+}
+
+sub _returnExpression
+{
+ my ($self, $signature, $expression) = @_;
+
+ my $convertNullStringAttribute = $signature->extendedAttributes->{"ConvertNullStringTo"};
+ my $nullOrEmptyString = "NullStringAsEmptyString";
+ $nullOrEmptyString = "NullStringAsNull" if defined $convertNullStringAttribute && $convertNullStringAttribute eq "Null";
+
+ my $returnIDLType = $signature->type;
+
+ return "JSValueMakeUndefined(context)" if $returnIDLType eq "void";
+ return "JSValueMakeBoolean(context, ${expression})" if $returnIDLType eq "boolean";
+ return "JSValueMakeNumber(context, ${expression})" if $$self{codeGenerator}->IsNonPointerType($returnIDLType);
+ return "toJS(context, WTF::getPtr(${expression}))";
+}
+
+sub _paramterExpression
+{
+ my ($self, $parameter) = @_;
+
+ my $idlType = $parameter->type;
+ my $name = $parameter->name;
+
+ return "${name}.get()" if $$self{codeGenerator}->IsStringType($idlType);
+ return $name;
+}
+
+sub _setterName
+{
+ my ($self, $attribute) = @_;
+
+ my $name = $attribute->signature->name;
+
+ return "set" . $$self{codeGenerator}->WK_ucfirst($name);
+}
+
+sub _staticFunctionsGetterImplementation
+{
+ my ($self, $interface) = @_;
+
+ my $mapFunction = sub {
+ my $name = $_->signature->name;
+ my @attributes = qw(kJSPropertyAttributeDontDelete kJSPropertyAttributeReadOnly);
+ push(@attributes, "kJSPropertyAttributeDontEnum") if $_->signature->extendedAttributes->{"DontEnum"};
+
+ return "{ \"$name\", $name, " . join(" | ", @attributes) . " }";
+ };
+
+ return $self->_staticFunctionsOrValuesGetterImplementation($interface, "function", "{ 0, 0, 0 }", $mapFunction, $interface->functions);
+}
+
+sub _staticFunctionsOrValuesGetterImplementation
+{
+ my ($self, $interface, $functionOrValue, $arrayTerminator, $mapFunction, $functionsOrAttributes) = @_;
+
+ my $className = _className($interface->name);
+ my $uppercaseFunctionOrValue = $$self{codeGenerator}->WK_ucfirst($functionOrValue);
+
+ my $result = <<EOF;
+const JSStatic${uppercaseFunctionOrValue}* ${className}::static${uppercaseFunctionOrValue}s()
+{
+EOF
+
+ my @initializers = map(&$mapFunction, @{$functionsOrAttributes});
+ return $result . " return 0;\n}\n" unless @initializers;
+
+ $result .= <<EOF
+ static const JSStatic${uppercaseFunctionOrValue} ${functionOrValue}s[] = {
+ @{[join(",\n ", @initializers)]},
+ ${arrayTerminator}
+ };
+ return ${functionOrValue}s;
+}
+EOF
+}
+
+sub _staticValuesGetterImplementation
+{
+ my ($self, $interface) = @_;
+
+ my $mapFunction = sub {
+ return if $_->signature->extendedAttributes->{"NoImplementation"};
+
+ my $attributeName = $_->signature->name;
+ my $attributeIsReadonly = $_->type =~ /^readonly/;
+ my $getterName = $self->_getterName($_);
+ my $setterName = $attributeIsReadonly ? "0" : $self->_setterName($_);
+ my @attributes = qw(kJSPropertyAttributeDontDelete);
+ push(@attributes, "kJSPropertyAttributeReadOnly") if $attributeIsReadonly;
+ push(@attributes, "kJSPropertyAttributeDontEnum") if $_->signature->extendedAttributes->{"DontEnum"};
+
+ return "{ \"$attributeName\", $getterName, $setterName, " . join(" | ", @attributes) . " }";
+ };
+
+ return $self->_staticFunctionsOrValuesGetterImplementation($interface, "value", "{ 0, 0, 0, 0 }", $mapFunction, $interface->attributes);
+}
+
+1;
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h
new file mode 100644
index 0000000..cf56c5d
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2010 Apple 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:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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 JSWrappable_h
+#define JSWrappable_h
+
+#include <JavaScriptCore/JavaScriptCore.h>
+#include <wtf/RefCounted.h>
+
+namespace WTR {
+
+class JSWrappable : public RefCounted<JSWrappable> {
+public:
+ virtual ~JSWrappable() { }
+ virtual JSClassRef wrapperClass() = 0;
+};
+
+} // namespace WTR
+
+#endif // JSWrappable_h
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp
new file mode 100644
index 0000000..a62cb2e
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2010 Apple 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:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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 "JSWrapper.h"
+
+#include <JavaScriptCore/JSContextRefPrivate.h>
+
+namespace WTR {
+
+JSValueRef JSWrapper::wrap(JSContextRef context, JSWrappable* object)
+{
+ ASSERT_ARG(context, context);
+
+ if (!object)
+ return JSValueMakeNull(context);
+
+ JSClassRef objectClass = object->wrapperClass();
+ ASSERT(objectClass);
+ JSObjectRef wrapperObject = JSObjectMake(context, objectClass, object);
+ ASSERT(wrapperObject);
+
+ return wrapperObject;
+}
+
+JSWrappable* JSWrapper::unwrap(JSContextRef context, JSValueRef value)
+{
+ ASSERT_ARG(context, context);
+ ASSERT_ARG(value, value);
+ if (!context || !value)
+ return 0;
+ return static_cast<JSWrappable*>(JSObjectGetPrivate(JSValueToObject(context, value, 0)));
+}
+
+static JSWrappable* unwrapObject(JSObjectRef object)
+{
+ JSWrappable* wrappable = static_cast<JSWrappable*>(JSObjectGetPrivate(object));
+ ASSERT(wrappable);
+ return wrappable;
+}
+
+void JSWrapper::initialize(JSContextRef ctx, JSObjectRef object)
+{
+ JSWrappable* wrappable = unwrapObject(object);
+ if (!wrappable)
+ return;
+ wrappable->ref();
+}
+
+void JSWrapper::finalize(JSObjectRef object)
+{
+ JSWrappable* wrappable = unwrapObject(object);
+ if (!wrappable)
+ return;
+ wrappable->deref();
+}
+
+} // namespace WTR
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.h b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.h
new file mode 100644
index 0000000..9839cb4
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2010 Apple 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:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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 JSWrapper_h
+#define JSWrapper_h
+
+#include "JSWrappable.h"
+
+namespace WTR {
+
+// FIXME: If necessary, we can do wrapper caching here.
+class JSWrapper {
+public:
+ static JSValueRef wrap(JSContextRef context, JSWrappable* object);
+ static JSWrappable* unwrap(JSContextRef context, JSValueRef value);
+
+ static void initialize(JSContextRef, JSObjectRef);
+ static void finalize(JSObjectRef);
+};
+
+inline JSValueRef toJS(JSContextRef context, JSWrappable* impl)
+{
+ return JSWrapper::wrap(context, impl);
+}
+
+} // namespace WTR
+
+#endif // JSWrapper_h
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl
new file mode 100644
index 0000000..7da2e81
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2010 Apple 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:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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.
+ */
+
+module WTR {
+
+ interface LayoutTestController {
+ void dumpAsText();
+ void dumpStatusCallbacks();
+
+ void waitUntilDone();
+ void notifyDone();
+
+ // Repaint testing
+ void testRepaint();
+ void repaintSweepHorizontally();
+ void display();
+
+ // Animation testing
+ int numberOfActiveAnimations();
+ boolean pauseAnimationAtTimeOnElementWithId(in DOMString animationName, in double time, in DOMString elementId);
+ };
+
+}
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
index 9eea3e2..d3c66fd 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
@@ -25,6 +25,7 @@
#include "InjectedBundle.h"
+#include "ActivateFonts.h"
#include "InjectedBundlePage.h"
#include <WebKit2/WKBundle.h>
#include <WebKit2/WKBundlePage.h>
@@ -73,6 +74,8 @@ void InjectedBundle::initialize(WKBundleRef bundle)
_didRecieveMessage
};
WKBundleSetClient(m_bundle, &client);
+
+ activateFonts();
}
void InjectedBundle::done()
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp
index 27779df..b1bc89d 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp
@@ -26,7 +26,12 @@
#include "InjectedBundle.h"
#include <WebKit2/WKBundleInitialize.h>
-extern "C" void WKBundleInitialize(WKBundleRef bundle)
+#if defined(WIN32) || defined(_WIN32)
+extern "C" __declspec(dllexport)
+#else
+extern "C"
+#endif
+void WKBundleInitialize(WKBundleRef bundle)
{
WTR::InjectedBundle::shared().initialize(bundle);
}
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
index b254405..cbba470 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
@@ -37,6 +37,19 @@
namespace WTR {
+static PassOwnPtr<Vector<char> > WKStringToUTF8(WKStringRef wkStringRef)
+{
+ RetainPtr<CFStringRef> cfString(AdoptCF, WKStringCopyCFString(0, wkStringRef));
+ CFIndex bufferLength = CFStringGetMaximumSizeForEncoding(CFStringGetLength(cfString.get()), kCFStringEncodingUTF8) + 1;
+ OwnPtr<Vector<char> > buffer(new Vector<char>(bufferLength));
+ if (!CFStringGetCString(cfString.get(), buffer->data(), bufferLength, kCFStringEncodingUTF8)) {
+ buffer->shrink(1);
+ (*buffer)[0] = 0;
+ } else
+ buffer->shrink(strlen(buffer->data()) + 1);
+ return buffer.release();
+}
+
InjectedBundlePage::InjectedBundlePage(WKBundlePageRef page)
: m_page(page)
, m_isLoading(false)
@@ -58,10 +71,13 @@ InjectedBundlePage::InjectedBundlePage(WKBundlePageRef page)
WKBundlePageUIClient uiClient = {
0,
this,
- _addMessageToConsole
+ _willAddMessageToConsole,
+ _willSetStatusbarText,
+ _willRunJavaScriptAlert,
+ _willRunJavaScriptConfirm,
+ _willRunJavaScriptPrompt
};
WKBundlePageSetUIClient(m_page, &uiClient);
-
}
InjectedBundlePage::~InjectedBundlePage()
@@ -128,24 +144,11 @@ void InjectedBundlePage::didCommitLoadForFrame(WKBundleFrameRef frame)
{
}
-static PassOwnPtr<Vector<char> > WKStringToUTF8(WKStringRef wkStringRef)
-{
- RetainPtr<CFStringRef> cfString(AdoptCF, WKStringCopyCFString(0, wkStringRef));
- CFIndex bufferLength = CFStringGetMaximumSizeForEncoding(CFStringGetLength(cfString.get()), kCFStringEncodingUTF8) + 1;
- OwnPtr<Vector<char> > buffer(new Vector<char>(bufferLength));
- if (!CFStringGetCString(cfString.get(), buffer->data(), bufferLength, kCFStringEncodingUTF8)) {
- buffer->shrink(1);
- (*buffer)[0] = 0;
- } else
- buffer->shrink(strlen(buffer->data()) + 1);
- return buffer.release();
-}
-
void InjectedBundlePage::dump()
{
InjectedBundle::shared().layoutTestController()->invalidateWaitToDumpWatchdog();
- if (InjectedBundle::shared().layoutTestController()->dumpAsText()) {
+ if (InjectedBundle::shared().layoutTestController()->shouldDumpAsText()) {
// FIXME: Support dumping subframes when layoutTestController()->dumpChildFramesAsText() is true.
WKRetainPtr<WKStringRef> innerText(AdoptWK, WKBundleFrameCopyInnerText(WKBundlePageGetMainFrame(m_page)));
OwnPtr<Vector<char> > utf8InnerText = WKStringToUTF8(innerText.get());
@@ -193,16 +196,64 @@ void InjectedBundlePage::didClearWindowForFrame(WKBundleFrameRef frame, JSContex
// UI Client Callbacks
-void InjectedBundlePage::_addMessageToConsole(WKBundlePageRef page, WKStringRef message, uint32_t lineNumber, const void *clientInfo)
+void InjectedBundlePage::_willAddMessageToConsole(WKBundlePageRef page, WKStringRef message, uint32_t lineNumber, const void *clientInfo)
+{
+ static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willAddMessageToConsole(message, lineNumber);
+}
+
+void InjectedBundlePage::_willSetStatusbarText(WKBundlePageRef page, WKStringRef statusbarText, const void *clientInfo)
+{
+ static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willSetStatusbarText(statusbarText);
+}
+
+void InjectedBundlePage::_willRunJavaScriptAlert(WKBundlePageRef page, WKStringRef message, WKBundleFrameRef frame, const void *clientInfo)
+{
+ static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willRunJavaScriptAlert(message, frame);
+}
+
+void InjectedBundlePage::_willRunJavaScriptConfirm(WKBundlePageRef page, WKStringRef message, WKBundleFrameRef frame, const void *clientInfo)
+{
+ return static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willRunJavaScriptConfirm(message, frame);
+}
+
+void InjectedBundlePage::_willRunJavaScriptPrompt(WKBundlePageRef page, WKStringRef message, WKStringRef defaultValue, WKBundleFrameRef frame, const void *clientInfo)
{
- static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->addMessageToConsole(message, lineNumber);
+ static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willRunJavaScriptPrompt(message, defaultValue, frame);
}
-void InjectedBundlePage::addMessageToConsole(WKStringRef message, uint32_t lineNumber)
+void InjectedBundlePage::willAddMessageToConsole(WKStringRef message, uint32_t lineNumber)
{
// FIXME: Strip file: urls.
OwnPtr<Vector<char> > utf8Message = WKStringToUTF8(message);
InjectedBundle::shared().os() << "CONSOLE MESSAGE: line " << lineNumber << ": " << utf8Message->data() << "\n";
}
+void InjectedBundlePage::willSetStatusbarText(WKStringRef statusbarText)
+{
+ if (!InjectedBundle::shared().layoutTestController()->shouldDumpStatusCallbacks())
+ return;
+
+ OwnPtr<Vector<char> > utf8StatusbarText = WKStringToUTF8(statusbarText);
+ InjectedBundle::shared().os() << "UI DELEGATE STATUS CALLBACK: setStatusText:" << utf8StatusbarText->data() << "\n";
+}
+
+void InjectedBundlePage::willRunJavaScriptAlert(WKStringRef message, WKBundleFrameRef)
+{
+ OwnPtr<Vector<char> > utf8Message = WKStringToUTF8(message);
+ InjectedBundle::shared().os() << "ALERT: " << utf8Message->data() << "\n";
+}
+
+void InjectedBundlePage::willRunJavaScriptConfirm(WKStringRef message, WKBundleFrameRef)
+{
+ OwnPtr<Vector<char> > utf8Message = WKStringToUTF8(message);
+ InjectedBundle::shared().os() << "CONFIRM: " << utf8Message->data() << "\n";
+}
+
+void InjectedBundlePage::willRunJavaScriptPrompt(WKStringRef message, WKStringRef defaultValue, WKBundleFrameRef)
+{
+ OwnPtr<Vector<char> > utf8Message = WKStringToUTF8(message);
+ OwnPtr<Vector<char> > utf8DefaultValue = WKStringToUTF8(defaultValue);
+ InjectedBundle::shared().os() << "PROMPT: " << utf8Message->data() << ", default text: " << utf8DefaultValue->data() << "\n";
+}
+
} // namespace WTR
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h
index 79aebb7..bce9d2c 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h
@@ -60,8 +60,16 @@ private:
void didClearWindowForFrame(WKBundleFrameRef frame, JSContextRef ctx, JSObjectRef window);
// UI Client
- static void _addMessageToConsole(WKBundlePageRef page, WKStringRef message, uint32_t lineNumber, const void *clientInfo);
- void addMessageToConsole(WKStringRef message, uint32_t lineNumber);
+ static void _willAddMessageToConsole(WKBundlePageRef page, WKStringRef message, uint32_t lineNumber, const void* clientInfo);
+ static void _willSetStatusbarText(WKBundlePageRef page, WKStringRef statusbarText, const void* clientInfo);
+ static void _willRunJavaScriptAlert(WKBundlePageRef page, WKStringRef message, WKBundleFrameRef frame, const void* clientInfo);
+ static void _willRunJavaScriptConfirm(WKBundlePageRef page, WKStringRef message, WKBundleFrameRef frame, const void* clientInfo);
+ static void _willRunJavaScriptPrompt(WKBundlePageRef page, WKStringRef message, WKStringRef defaultValue, WKBundleFrameRef frame, const void* clientInfo);
+ void willAddMessageToConsole(WKStringRef message, uint32_t lineNumber);
+ void willSetStatusbarText(WKStringRef statusbarText);
+ void willRunJavaScriptAlert(WKStringRef message, WKBundleFrameRef);
+ void willRunJavaScriptConfirm(WKStringRef message, WKBundleFrameRef);
+ void willRunJavaScriptPrompt(WKStringRef message, WKStringRef defaultValue, WKBundleFrameRef);
WKBundlePageRef m_page;
bool m_isLoading;
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
index cf3e0fb..fafa1e3 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
@@ -24,9 +24,10 @@
*/
#include "LayoutTestController.h"
+
#include "InjectedBundle.h"
#include "InjectedBundlePage.h"
-
+#include "JSLayoutTestController.h"
#include <JavaScriptCore/JSRetainPtr.h>
#include <WebKit2/WKBundleFrame.h>
#include <WebKit2/WKRetainPtr.h>
@@ -42,7 +43,10 @@ PassRefPtr<LayoutTestController> LayoutTestController::create(const std::string&
LayoutTestController::LayoutTestController(const std::string& testPathOrURL)
: m_dumpAsText(false)
+ , m_dumpStatusCallbacks(false)
, m_waitToDump(false)
+ , m_testRepaint(false)
+ , m_testRepaintSweepHorizontally(false)
, m_testPathOrURL(testPathOrURL)
{
}
@@ -51,8 +55,19 @@ LayoutTestController::~LayoutTestController()
{
}
-static const CFTimeInterval waitToDumpWatchdogInterval = 30.0;
+JSClassRef LayoutTestController::wrapperClass()
+{
+ return JSLayoutTestController::layoutTestControllerClass();
+}
+// This is lower than DumpRenderTree's timeout, to make it easier to work through the failures
+// Eventually it should be changed to match.
+static const CFTimeInterval waitToDumpWatchdogInterval = 6.0;
+
+void LayoutTestController::display()
+{
+ // FIXME: actually implement, once we want pixel tests
+}
void LayoutTestController::invalidateWaitToDumpWatchdog()
{
@@ -67,7 +82,7 @@ static void waitUntilDoneWatchdogFired(CFRunLoopTimerRef timer, void* info)
InjectedBundle::shared().layoutTestController()->waitToDumpWatchdogTimerFired();
}
-void LayoutTestController::setWaitToDump()
+void LayoutTestController::waitUntilDone()
{
m_waitToDump = true;
if (!m_waitToDumpWatchdog) {
@@ -109,97 +124,12 @@ bool LayoutTestController::pauseAnimationAtTimeOnElementWithId(JSStringRef anima
return WKBundleFramePauseAnimationOnElementWithId(mainFrame, nameWK.get(), idWK.get(), time);
}
-static JSValueRef dumpAsTextCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
- LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
- controller->setDumpAsText(true);
- return JSValueMakeUndefined(context);
-}
-
-static JSValueRef waitUntilDoneCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
- LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
- controller->setWaitToDump();
- return JSValueMakeUndefined(context);
-}
-
-static JSValueRef notifyDoneCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
- LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
- controller->notifyDone();
- return JSValueMakeUndefined(context);
-}
-
-static JSValueRef numberOfActiveAnimationsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
- if (argumentCount)
- return JSValueMakeUndefined(context);
-
- LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
- return JSValueMakeNumber(context, controller->numberOfActiveAnimations());
-}
-
-static JSValueRef pauseAnimationAtTimeOnElementWithIdCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
- if (argumentCount != 3)
- return JSValueMakeUndefined(context);
-
- JSRetainPtr<JSStringRef> animationName(Adopt, JSValueToStringCopy(context, arguments[0], exception));
- ASSERT(!*exception);
- double time = JSValueToNumber(context, arguments[1], exception);
- ASSERT(!*exception);
- JSRetainPtr<JSStringRef> elementId(Adopt, JSValueToStringCopy(context, arguments[2], exception));
- ASSERT(!*exception);
-
- LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
- return JSValueMakeBoolean(context, controller->pauseAnimationAtTimeOnElementWithId(animationName.get(), time, elementId.get()));
-}
-
-// Object Finalization
-
-static void layoutTestControllerObjectFinalize(JSObjectRef object)
-{
- LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(object));
- controller->deref();
-}
-
// Object Creation
void LayoutTestController::makeWindowObject(JSContextRef context, JSObjectRef windowObject, JSValueRef* exception)
{
JSRetainPtr<JSStringRef> layoutTestContollerStr(Adopt, JSStringCreateWithUTF8CString("layoutTestController"));
- ref();
-
- JSClassRef classRef = getJSClass();
- JSValueRef layoutTestContollerObject = JSObjectMake(context, classRef, this);
- JSClassRelease(classRef);
-
- JSObjectSetProperty(context, windowObject, layoutTestContollerStr.get(), layoutTestContollerObject, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, exception);
-}
-
-JSClassRef LayoutTestController::getJSClass()
-{
- static JSStaticFunction* staticFunctions = LayoutTestController::staticFunctions();
- static JSClassDefinition classDefinition = {
- 0, kJSClassAttributeNone, "LayoutTestController", 0, 0, staticFunctions,
- 0, layoutTestControllerObjectFinalize, 0, 0, 0, 0, 0, 0, 0, 0, 0
- };
-
- return JSClassCreate(&classDefinition);
-}
-
-JSStaticFunction* LayoutTestController::staticFunctions()
-{
- static JSStaticFunction staticFunctions[] = {
- { "dumpAsText", dumpAsTextCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "notifyDone", notifyDoneCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "numberOfActiveAnimations", numberOfActiveAnimationsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "pauseAnimationAtTimeOnElementWithId", pauseAnimationAtTimeOnElementWithIdCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "waitUntilDone", waitUntilDoneCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { 0, 0, 0 }
- };
-
- return staticFunctions;
+ JSObjectSetProperty(context, windowObject, layoutTestContollerStr.get(), JSWrapper::wrap(context, this), kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, exception);
}
} // namespace WTR
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h
index 203f358..f9585a3 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h
@@ -26,30 +26,40 @@
#ifndef LayoutTestController_h
#define LayoutTestController_h
+#include "JSWrappable.h"
#include <JavaScriptCore/JavaScriptCore.h>
#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
#include <wtf/RetainPtr.h>
#include <string>
namespace WTR {
-class LayoutTestController : public RefCounted<LayoutTestController> {
+class LayoutTestController : public JSWrappable {
public:
static PassRefPtr<LayoutTestController> create(const std::string& testPathOrURL);
~LayoutTestController();
+ // JSWrappable
+ JSClassRef wrapperClass();
+
void makeWindowObject(JSContextRef context, JSObjectRef windowObject, JSValueRef* exception);
- bool dumpAsText() const { return m_dumpAsText; }
- void setDumpAsText(bool dumpAsText) { m_dumpAsText = dumpAsText; }
+ bool shouldDumpAsText() const { return m_dumpAsText; }
+ void dumpAsText() { m_dumpAsText = true; }
+
+ bool shouldDumpStatusCallbacks() const { return m_dumpStatusCallbacks; }
+ void dumpStatusCallbacks() { m_dumpStatusCallbacks = true; }
bool waitToDump() const { return m_waitToDump; }
- void setWaitToDump();
void waitToDumpWatchdogTimerFired();
void invalidateWaitToDumpWatchdog();
+ void waitUntilDone();
void notifyDone();
+ void testRepaint() { m_testRepaint = true; }
+ void repaintSweepHorizontally() { m_testRepaintSweepHorizontally = true; }
+ void display();
+
unsigned numberOfActiveAnimations() const;
bool pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, double time, JSStringRef elementId);
@@ -57,15 +67,14 @@ private:
LayoutTestController(const std::string& testPathOrURL);
bool m_dumpAsText;
+ bool m_dumpStatusCallbacks;
bool m_waitToDump; // True if waitUntilDone() has been called, but notifyDone() has not yet been called.
+ bool m_testRepaint;
+ bool m_testRepaintSweepHorizontally;
std::string m_testPathOrURL;
RetainPtr<CFRunLoopTimerRef> m_waitToDumpWatchdog;
-
- static JSClassRef getJSClass();
- static JSStaticValue* staticValues();
- static JSStaticFunction* staticFunctions();
};
} // namespace WTR
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm b/WebKitTools/WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm
new file mode 100644
index 0000000..b5bc4a1
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2010 Apple 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:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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 "ActivateFonts.h"
+
+#import <AppKit/AppKit.h>
+#import <CoreFoundation/CoreFoundation.h>
+#import <Foundation/Foundation.h>
+
+@interface WKTRFontActivatorDummyClass : NSObject
+@end
+
+@implementation WKTRFontActivatorDummyClass
+@end
+
+namespace WTR {
+
+void activateFonts()
+{
+ // Work around <rdar://problem/6698023> by activating fonts from disk
+
+ static const char* fontFileNames[] = {
+ "AHEM____.TTF",
+ "ColorBits.ttf",
+ "WebKitWeightWatcher100.ttf",
+ "WebKitWeightWatcher200.ttf",
+ "WebKitWeightWatcher300.ttf",
+ "WebKitWeightWatcher400.ttf",
+ "WebKitWeightWatcher500.ttf",
+ "WebKitWeightWatcher600.ttf",
+ "WebKitWeightWatcher700.ttf",
+ "WebKitWeightWatcher800.ttf",
+ "WebKitWeightWatcher900.ttf",
+ 0
+ };
+
+ NSMutableArray *fontURLs = [NSMutableArray array];
+ NSURL *resourcesDirectory = [[NSBundle bundleForClass:[WKTRFontActivatorDummyClass class]] resourceURL];
+ for (unsigned i = 0; fontFileNames[i]; ++i) {
+ NSURL *fontURL = [resourcesDirectory URLByAppendingPathComponent:[NSString stringWithUTF8String:fontFileNames[i]]];
+ [fontURLs addObject:[fontURL absoluteURL]];
+ }
+
+ CFArrayRef errors = 0;
+ if (!CTFontManagerRegisterFontsForURLs((CFArrayRef)fontURLs, kCTFontManagerScopeProcess, &errors)) {
+ NSLog(@"Failed to activate fonts: %@", errors);
+ CFRelease(errors);
+ exit(1);
+ }
+}
+
+}
+
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/win/ActivateFonts.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/win/ActivateFonts.cpp
new file mode 100644
index 0000000..c7532ce
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/win/ActivateFonts.cpp
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2010 Apple 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:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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 "ActivateFonts.h"
+
+namespace WTR {
+
+void activateFonts()
+{
+ // FIXME: Not implemented.
+}
+
+}
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/win/InjectedBundle.vcproj b/WebKitTools/WebKitTestRunner/InjectedBundle/win/InjectedBundle.vcproj
new file mode 100644
index 0000000..601a4ac
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/win/InjectedBundle.vcproj
@@ -0,0 +1,355 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="InjectedBundle"
+ ProjectGUID="{CBC3391C-F060-4BF5-A66E-81404168816B}"
+ RootNamespace="InjectedBundle"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;..\..\Configurations\InjectedBundleCommon.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ ForcedIncludeFiles=""
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile=""
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\release.vsprops;..\..\Configurations\InjectedBundleCommon.vsprops"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ ForcedIncludeFiles=""
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile=""
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug_All|Win32"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_all.vsprops;..\..\Configurations\InjectedBundleCommon.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ RuntimeLibrary="3"
+ ForcedIncludeFiles=""
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile=""
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug_Internal|Win32"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(WebKitLibrariesDir)\tools\vsprops\common.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug.vsprops;$(WebKitLibrariesDir)\tools\vsprops\debug_internal.vsprops;..\..\Configurations\InjectedBundleCommon.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ ForcedIncludeFiles=""
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile=""
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine=""
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Bindings"
+ >
+ <File
+ RelativePath="..\Bindings\CodeGeneratorTestRunner.pm"
+ >
+ </File>
+ <File
+ RelativePath="..\Bindings\JSWrappable.h"
+ >
+ </File>
+ <File
+ RelativePath="..\Bindings\JSWrapper.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\Bindings\JSWrapper.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Derived Sources"
+ >
+ <File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSLayoutTestController.cpp"
+ >
+ </File>
+ <File
+ RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSLayoutTestController.h"
+ >
+ </File>
+ </Filter>
+ <File
+ RelativePath="ActivateFonts.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\InjectedBundle.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\InjectedBundle.h"
+ >
+ </File>
+ <File
+ RelativePath="..\InjectedBundleMain.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\InjectedBundlePage.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\InjectedBundlePage.h"
+ >
+ </File>
+ <File
+ RelativePath="..\LayoutTestController.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\LayoutTestController.h"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/WebKitTools/WebKitTestRunner/TestController.cpp b/WebKitTools/WebKitTestRunner/TestController.cpp
index b5b15d1..fec6b56 100644
--- a/WebKitTools/WebKitTestRunner/TestController.cpp
+++ b/WebKitTools/WebKitTestRunner/TestController.cpp
@@ -27,7 +27,7 @@
#include "PlatformWebView.h"
#include "TestInvocation.h"
-#include <getopt.h>
+#include <WebKit2/WKContextPrivate.h>
namespace WTR {
@@ -38,62 +38,44 @@ TestController& TestController::shared()
}
TestController::TestController()
- : m_dumpTree(false)
- , m_dumpPixels(false)
- , m_threaded(false)
- , m_forceComplexText(false)
+ : m_dumpPixels(false)
, m_verbose(false)
, m_printSeparators(false)
, m_usingServerMode(false)
{
}
-void TestController::initialize(int argc, const char *argv[])
+void TestController::initialize(int argc, const char* argv[])
{
- int dumpTree = 0;
- int dumpPixels = 0;
- int threaded = 0;
- int forceComplexText = 0;
- int useHTML5Parser = 0;
- int verbose = 0;
-
- struct option options[] = {
- {"notree", no_argument, &dumpTree, false},
- {"pixel-tests", no_argument, &dumpPixels, true},
- {"tree", no_argument, &dumpTree, true},
- {"threaded", no_argument, &threaded, true},
- {"complex-text", no_argument, &forceComplexText, true},
- {"legacy-parser", no_argument, &useHTML5Parser, false},
- {"verbose", no_argument, &verbose, true},
- {0, 0, 0, 0}
- };
-
- int option;
- while ((option = getopt_long(argc, (char * const *)argv, "", options, 0)) != -1) {
- switch (option) {
- case '?': // unknown or ambiguous option
- case ':': // missing argument
- exit(1);
- break;
+ platformInitialize();
+
+ for (int i = 1; i < argc; ++i) {
+ std::string argument(argv[i]);
+
+ if (argument == "--pixel-tests") {
+ m_dumpPixels = true;
+ continue;
}
- }
+ if (argument == "--verbose") {
+ m_verbose = true;
+ continue;
+ }
+
+ // Skip any other arguments that begin with '--'.
+ if (argument.length() >= 2 && argument[0] == '-' && argument[1] == '-')
+ continue;
- m_dumpTree = dumpTree;
- m_dumpPixels = dumpPixels;
- m_threaded = threaded;
- m_forceComplexText = forceComplexText;
- m_verbose = verbose;
+ m_paths.push_back(argument);
+ }
- m_usingServerMode = (argc == optind + 1 && strcmp(argv[optind], "-") == 0);
+ m_usingServerMode = (m_paths.size() == 1 && m_paths[0] == "-");
if (m_usingServerMode)
m_printSeparators = true;
- else {
- m_printSeparators = (optind < argc - 1 || (m_dumpPixels && m_dumpTree));
- for (int i = optind; i != argc; ++i)
- m_paths.push_back(std::string(argv[i]));
- }
+ else
+ m_printSeparators = m_paths.size() > 1;
initializeInjectedBundlePath();
+ initializeTestPluginPath();
m_context.adopt(WKContextCreateWithInjectedBundlePath(injectedBundlePath()));
@@ -104,6 +86,8 @@ void TestController::initialize(int argc, const char *argv[])
};
WKContextSetInjectedBundleClient(m_context.get(), &injectedBundlePathClient);
+ _WKContextSetAdditionalPluginPath(m_context.get(), testPluginPath());
+
m_pageNamespace.adopt(WKPageNamespaceCreate(m_context.get()));
m_mainWebView = new PlatformWebView(m_pageNamespace.get());
}
diff --git a/WebKitTools/WebKitTestRunner/TestController.h b/WebKitTools/WebKitTestRunner/TestController.h
index 7ad11fe..7e829b6 100644
--- a/WebKitTools/WebKitTestRunner/TestController.h
+++ b/WebKitTools/WebKitTestRunner/TestController.h
@@ -49,6 +49,7 @@ public:
bool verbose() const { return m_verbose; }
WKStringRef injectedBundlePath() { return m_injectedBundlePath.get(); }
+ WKStringRef testPluginPath() { return m_testPluginPath.get(); }
PlatformWebView* mainWebView() { return m_mainWebView; }
WKPageNamespaceRef pageNamespace() { return m_pageNamespace.get(); }
@@ -60,8 +61,10 @@ private:
void runTestingServerLoop();
void runTest(const char* pathOrURL);
-
+
+ void platformInitialize();
void initializeInjectedBundlePath();
+ void initializeTestPluginPath();
// WKContextInjectedBundleClient
static void _didRecieveMessageFromInjectedBundle(WKContextRef context, WKStringRef message, const void*);
@@ -69,15 +72,13 @@ private:
OwnPtr<TestInvocation> m_currentInvocation;
- bool m_dumpTree;
bool m_dumpPixels;
- bool m_threaded;
- bool m_forceComplexText;
bool m_verbose;
bool m_printSeparators;
bool m_usingServerMode;
std::vector<std::string> m_paths;
WKRetainPtr<WKStringRef> m_injectedBundlePath;
+ WKRetainPtr<WKStringRef> m_testPluginPath;
PlatformWebView* m_mainWebView;
WKRetainPtr<WKContextRef> m_context;
diff --git a/WebKitTools/WebKitTestRunner/TestInvocation.cpp b/WebKitTools/WebKitTestRunner/TestInvocation.cpp
index d3bb8d2..1434d50 100644
--- a/WebKitTools/WebKitTestRunner/TestInvocation.cpp
+++ b/WebKitTools/WebKitTestRunner/TestInvocation.cpp
@@ -46,7 +46,11 @@ static WKURLRef createWKURL(const char* pathOrURL)
if (CFStringHasPrefix(pathOrURLCFString.get(), CFSTR("http://")) || CFStringHasPrefix(pathOrURLCFString.get(), CFSTR("https://")))
cfURL.adoptCF(CFURLCreateWithString(0, pathOrURLCFString.get(), 0));
else
+#if defined(WIN32) || defined(_WIN32)
+ cfURL.adoptCF(CFURLCreateWithFileSystemPath(0, pathOrURLCFString.get(), kCFURLWindowsPathStyle, false));
+#else
cfURL.adoptCF(CFURLCreateWithFileSystemPath(0, pathOrURLCFString.get(), kCFURLPOSIXPathStyle, false));
+#endif
return WKURLCreateWithCFURL(cfURL.get());
}
@@ -92,9 +96,18 @@ static void sizeWebViewForCurrentTest(char* pathOrURL)
TestController::shared().mainWebView()->resizeTo(normalWidth, normalHeight);
}
+void TestInvocation::resetPreferencesToConsistentValues()
+{
+ WKPreferencesRef preferences = WKContextGetPreferences(TestController::shared().context());
+
+ WKPreferencesSetOfflineWebApplicationCacheEnabled(preferences, true);
+}
+
void TestInvocation::invoke()
{
sizeWebViewForCurrentTest(m_pathOrURL);
+ resetPreferencesToConsistentValues();
+
WKRetainPtr<WKStringRef> message(AdoptWK, WKStringCreateWithCFString(CFSTR("BeginTest")));
WKContextPostMessageToInjectedBundle(TestController::shared().context(), message.get());
diff --git a/WebKitTools/WebKitTestRunner/TestInvocation.h b/WebKitTools/WebKitTestRunner/TestInvocation.h
index ea1e840..b5fc041 100644
--- a/WebKitTools/WebKitTestRunner/TestInvocation.h
+++ b/WebKitTools/WebKitTestRunner/TestInvocation.h
@@ -42,6 +42,8 @@ public:
private:
void dump(const char*);
+ void resetPreferencesToConsistentValues();
+
// Helper
static void runUntil(bool& done);
diff --git a/WebKitTools/WebKitTestRunner/WebKitTestRunner.sln b/WebKitTools/WebKitTestRunner/WebKitTestRunner.sln
new file mode 100644
index 0000000..e2435d3
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/WebKitTestRunner.sln
@@ -0,0 +1,78 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebKitTestRunner", "win\WebKitTestRunner.vcproj", "{3B99669B-1817-443B-BCBE-835580146668}"
+ ProjectSection(ProjectDependencies) = postProject
+ {CBC3391C-F060-4BF5-A66E-81404168816B} = {CBC3391C-F060-4BF5-A66E-81404168816B}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InjectedBundleGenerated", "win\InjectedBundleGenerated.vcproj", "{4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}"
+ ProjectSection(ProjectDependencies) = postProject
+ {59CC0547-70AC-499C-9B19-EC01C6F61137} = {59CC0547-70AC-499C-9B19-EC01C6F61137}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FindSafari", "..\FindSafari\FindSafari.vcproj", "{DA31DA52-6675-48D4-89E0-333A7144397C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImageDiff", "..\DumpRenderTree\win\ImageDiff.vcproj", "{59CC0547-70AC-499C-9B19-EC01C6F61137}"
+ ProjectSection(ProjectDependencies) = postProject
+ {DA31DA52-6675-48D4-89E0-333A7144397C} = {DA31DA52-6675-48D4-89E0-333A7144397C}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InjectedBundle", "InjectedBundle\win\InjectedBundle.vcproj", "{CBC3391C-F060-4BF5-A66E-81404168816B}"
+ ProjectSection(ProjectDependencies) = postProject
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD} = {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug_All|Win32 = Debug_All|Win32
+ Debug_Internal|Win32 = Debug_Internal|Win32
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {3B99669B-1817-443B-BCBE-835580146668}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Debug_All|Win32.Build.0 = Debug_All|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Debug|Win32.ActiveCfg = Debug|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Debug|Win32.Build.0 = Debug|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Release|Win32.ActiveCfg = Release|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Release|Win32.Build.0 = Release|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Debug_All|Win32.ActiveCfg = all|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Debug_All|Win32.Build.0 = all|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Debug_Internal|Win32.ActiveCfg = all|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Debug_Internal|Win32.Build.0 = all|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Debug|Win32.ActiveCfg = all|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Debug|Win32.Build.0 = all|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Release|Win32.ActiveCfg = all|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Release|Win32.Build.0 = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_All|Win32.ActiveCfg = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_All|Win32.Build.0 = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Internal|Win32.ActiveCfg = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Internal|Win32.Build.0 = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.ActiveCfg = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.Build.0 = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.ActiveCfg = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.Build.0 = all|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_All|Win32.Build.0 = Debug_All|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug|Win32.ActiveCfg = Debug|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug|Win32.Build.0 = Debug|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Release|Win32.ActiveCfg = Release|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Release|Win32.Build.0 = Release|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_All|Win32.Build.0 = Debug_All|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug|Win32.Build.0 = Debug|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Release|Win32.ActiveCfg = Release|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/WebKitTools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj b/WebKitTools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj
index caf26a4..eccf330 100644
--- a/WebKitTools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj
+++ b/WebKitTools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj
@@ -6,7 +6,33 @@
objectVersion = 45;
objects = {
+/* Begin PBXAggregateTarget section */
+ BC952D7711F3BF5D003398B4 /* Derived Sources */ = {
+ isa = PBXAggregateTarget;
+ buildConfigurationList = BC952D7D11F3BF6A003398B4 /* Build configuration list for PBXAggregateTarget "Derived Sources" */;
+ buildPhases = (
+ BC952D8211F3BF78003398B4 /* Generate Derived Sources */,
+ );
+ dependencies = (
+ );
+ name = "Derived Sources";
+ productName = "Derived Sources";
+ };
+/* End PBXAggregateTarget section */
+
/* Begin PBXBuildFile section */
+ 6510A78211EC643800410867 /* AHEM____.TTF in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77711EC643800410867 /* AHEM____.TTF */; };
+ 6510A78311EC643800410867 /* ColorBits.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77811EC643800410867 /* ColorBits.ttf */; };
+ 6510A78411EC643800410867 /* WebKitWeightWatcher100.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77911EC643800410867 /* WebKitWeightWatcher100.ttf */; };
+ 6510A78511EC643800410867 /* WebKitWeightWatcher200.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77A11EC643800410867 /* WebKitWeightWatcher200.ttf */; };
+ 6510A78611EC643800410867 /* WebKitWeightWatcher300.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77B11EC643800410867 /* WebKitWeightWatcher300.ttf */; };
+ 6510A78711EC643800410867 /* WebKitWeightWatcher400.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77C11EC643800410867 /* WebKitWeightWatcher400.ttf */; };
+ 6510A78811EC643800410867 /* WebKitWeightWatcher500.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77D11EC643800410867 /* WebKitWeightWatcher500.ttf */; };
+ 6510A78911EC643800410867 /* WebKitWeightWatcher600.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77E11EC643800410867 /* WebKitWeightWatcher600.ttf */; };
+ 6510A78A11EC643800410867 /* WebKitWeightWatcher700.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77F11EC643800410867 /* WebKitWeightWatcher700.ttf */; };
+ 6510A78B11EC643800410867 /* WebKitWeightWatcher800.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A78011EC643800410867 /* WebKitWeightWatcher800.ttf */; };
+ 6510A78C11EC643800410867 /* WebKitWeightWatcher900.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A78111EC643800410867 /* WebKitWeightWatcher900.ttf */; };
+ 65EB85A011EC67CC0034D300 /* ActivateFonts.mm in Sources */ = {isa = PBXBuildFile; fileRef = 65EB859F11EC67CC0034D300 /* ActivateFonts.mm */; };
BC25193E11D15D8B002EBC01 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC7934A411906584005EA8E2 /* Cocoa.framework */; };
BC25193F11D15D8B002EBC01 /* WebKit2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC7934AB1190658C005EA8E2 /* WebKit2.framework */; };
BC25194011D15D8B002EBC01 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BCDA2B991191051F00C3BC47 /* JavaScriptCore.framework */; };
@@ -17,6 +43,8 @@
BC7934AC1190658C005EA8E2 /* WebKit2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC7934AB1190658C005EA8E2 /* WebKit2.framework */; };
BC7934E811906846005EA8E2 /* PlatformWebViewMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC7934E711906846005EA8E2 /* PlatformWebViewMac.mm */; };
BC8C795C11D2785D004535A1 /* TestControllerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC8C795B11D2785D004535A1 /* TestControllerMac.mm */; };
+ BC952C0D11F3B965003398B4 /* JSWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC952C0C11F3B965003398B4 /* JSWrapper.cpp */; };
+ BC952F1F11F3C652003398B4 /* JSLayoutTestController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC952F1D11F3C652003398B4 /* JSLayoutTestController.cpp */; };
BCC997A411D3C8F60017BCA2 /* InjectedBundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCC997A011D3C8F60017BCA2 /* InjectedBundle.cpp */; };
BCC997A511D3C8F60017BCA2 /* InjectedBundlePage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCC997A211D3C8F60017BCA2 /* InjectedBundlePage.cpp */; };
BCC9981811D3F51E0017BCA2 /* LayoutTestController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCC9981711D3F51E0017BCA2 /* LayoutTestController.cpp */; };
@@ -33,21 +61,29 @@
remoteGlobalIDString = BC25186111D15D54002EBC01;
remoteInfo = InjectedBundle;
};
-/* End PBXContainerItemProxy section */
-
-/* Begin PBXCopyFilesBuildPhase section */
- 8DD76F9E0486AA7600D96B5E /* CopyFiles */ = {
- isa = PBXCopyFilesBuildPhase;
- buildActionMask = 8;
- dstPath = /usr/share/man/man1/;
- dstSubfolderSpec = 0;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 1;
+ BC952ED611F3C38B003398B4 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = BC952D7711F3BF5D003398B4;
+ remoteInfo = "Derived Sources";
};
-/* End PBXCopyFilesBuildPhase section */
+/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
+ 6510A77711EC643800410867 /* AHEM____.TTF */ = {isa = PBXFileReference; lastKnownFileType = file; name = "AHEM____.TTF"; path = "fonts/AHEM____.TTF"; sourceTree = "<group>"; };
+ 6510A77811EC643800410867 /* ColorBits.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = ColorBits.ttf; path = fonts/ColorBits.ttf; sourceTree = "<group>"; };
+ 6510A77911EC643800410867 /* WebKitWeightWatcher100.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher100.ttf; path = fonts/WebKitWeightWatcher100.ttf; sourceTree = "<group>"; };
+ 6510A77A11EC643800410867 /* WebKitWeightWatcher200.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher200.ttf; path = fonts/WebKitWeightWatcher200.ttf; sourceTree = "<group>"; };
+ 6510A77B11EC643800410867 /* WebKitWeightWatcher300.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher300.ttf; path = fonts/WebKitWeightWatcher300.ttf; sourceTree = "<group>"; };
+ 6510A77C11EC643800410867 /* WebKitWeightWatcher400.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher400.ttf; path = fonts/WebKitWeightWatcher400.ttf; sourceTree = "<group>"; };
+ 6510A77D11EC643800410867 /* WebKitWeightWatcher500.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher500.ttf; path = fonts/WebKitWeightWatcher500.ttf; sourceTree = "<group>"; };
+ 6510A77E11EC643800410867 /* WebKitWeightWatcher600.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher600.ttf; path = fonts/WebKitWeightWatcher600.ttf; sourceTree = "<group>"; };
+ 6510A77F11EC643800410867 /* WebKitWeightWatcher700.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher700.ttf; path = fonts/WebKitWeightWatcher700.ttf; sourceTree = "<group>"; };
+ 6510A78011EC643800410867 /* WebKitWeightWatcher800.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher800.ttf; path = fonts/WebKitWeightWatcher800.ttf; sourceTree = "<group>"; };
+ 6510A78111EC643800410867 /* WebKitWeightWatcher900.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher900.ttf; path = fonts/WebKitWeightWatcher900.ttf; sourceTree = "<group>"; };
+ 65EB859D11EC67CC0034D300 /* ActivateFonts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ActivateFonts.h; sourceTree = "<group>"; };
+ 65EB859F11EC67CC0034D300 /* ActivateFonts.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ActivateFonts.mm; sourceTree = "<group>"; };
8DD76FA10486AA7600D96B5E /* WebKitTestRunner */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = WebKitTestRunner; sourceTree = BUILT_PRODUCTS_DIR; };
BC25184611D15767002EBC01 /* InjectedBundleMain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundleMain.cpp; sourceTree = "<group>"; };
BC25186211D15D54002EBC01 /* InjectedBundle.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InjectedBundle.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -65,6 +101,14 @@
BC7934DD119066EC005EA8E2 /* PlatformWebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformWebView.h; sourceTree = "<group>"; };
BC7934E711906846005EA8E2 /* PlatformWebViewMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformWebViewMac.mm; sourceTree = "<group>"; };
BC8C795B11D2785D004535A1 /* TestControllerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TestControllerMac.mm; sourceTree = "<group>"; };
+ BC952C0B11F3B965003398B4 /* JSWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWrapper.h; sourceTree = "<group>"; };
+ BC952C0C11F3B965003398B4 /* JSWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWrapper.cpp; sourceTree = "<group>"; };
+ BC952C0E11F3B97B003398B4 /* JSWrappable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWrappable.h; sourceTree = "<group>"; };
+ BC952EC511F3C10F003398B4 /* DerivedSources.make */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DerivedSources.make; sourceTree = "<group>"; };
+ BC952ED211F3C29F003398B4 /* LayoutTestController.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LayoutTestController.idl; sourceTree = "<group>"; };
+ BC952ED311F3C318003398B4 /* CodeGeneratorTestRunner.pm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; path = CodeGeneratorTestRunner.pm; sourceTree = "<group>"; };
+ BC952F1D11F3C652003398B4 /* JSLayoutTestController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSLayoutTestController.cpp; path = DerivedSources/WebKitTestRunner/JSLayoutTestController.cpp; sourceTree = BUILT_PRODUCTS_DIR; };
+ BC952F1E11F3C652003398B4 /* JSLayoutTestController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSLayoutTestController.h; path = DerivedSources/WebKitTestRunner/JSLayoutTestController.h; sourceTree = BUILT_PRODUCTS_DIR; };
BCC997A011D3C8F60017BCA2 /* InjectedBundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundle.cpp; sourceTree = "<group>"; };
BCC997A111D3C8F60017BCA2 /* InjectedBundle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedBundle.h; sourceTree = "<group>"; };
BCC997A211D3C8F60017BCA2 /* InjectedBundlePage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundlePage.cpp; sourceTree = "<group>"; };
@@ -104,6 +148,7 @@
08FB7794FE84155DC02AAC07 /* WebKitTestRunner */ = {
isa = PBXGroup;
children = (
+ BC952EC511F3C10F003398B4 /* DerivedSources.make */,
08FB7795FE84155DC02AAC07 /* Source */,
BC25183511D1571D002EBC01 /* InjectedBundle */,
BC793401118F7C8A005EA8E2 /* Configurations */,
@@ -147,16 +192,28 @@
name = Products;
sourceTree = "<group>";
};
+ 65EB859E11EC67CC0034D300 /* mac */ = {
+ isa = PBXGroup;
+ children = (
+ 65EB859F11EC67CC0034D300 /* ActivateFonts.mm */,
+ );
+ path = mac;
+ sourceTree = "<group>";
+ };
BC25183511D1571D002EBC01 /* InjectedBundle */ = {
isa = PBXGroup;
children = (
+ BC952D3A11F3BF1F003398B4 /* Derived Sources */,
+ BC952C0A11F3B939003398B4 /* Bindings */,
+ 65EB859E11EC67CC0034D300 /* mac */,
+ 65EB859D11EC67CC0034D300 /* ActivateFonts.h */,
BCC997A011D3C8F60017BCA2 /* InjectedBundle.cpp */,
BCC997A111D3C8F60017BCA2 /* InjectedBundle.h */,
BC25184611D15767002EBC01 /* InjectedBundleMain.cpp */,
BCC997A211D3C8F60017BCA2 /* InjectedBundlePage.cpp */,
BCC997A311D3C8F60017BCA2 /* InjectedBundlePage.h */,
- BCC9981611D3F51E0017BCA2 /* LayoutTestController.h */,
BCC9981711D3F51E0017BCA2 /* LayoutTestController.cpp */,
+ BCC9981611D3F51E0017BCA2 /* LayoutTestController.h */,
);
path = InjectedBundle;
sourceTree = "<group>";
@@ -165,6 +222,17 @@
isa = PBXGroup;
children = (
BC25186311D15D54002EBC01 /* InjectedBundle-Info.plist */,
+ 6510A77711EC643800410867 /* AHEM____.TTF */,
+ 6510A77811EC643800410867 /* ColorBits.ttf */,
+ 6510A77911EC643800410867 /* WebKitWeightWatcher100.ttf */,
+ 6510A77A11EC643800410867 /* WebKitWeightWatcher200.ttf */,
+ 6510A77B11EC643800410867 /* WebKitWeightWatcher300.ttf */,
+ 6510A77C11EC643800410867 /* WebKitWeightWatcher400.ttf */,
+ 6510A77D11EC643800410867 /* WebKitWeightWatcher500.ttf */,
+ 6510A77E11EC643800410867 /* WebKitWeightWatcher600.ttf */,
+ 6510A77F11EC643800410867 /* WebKitWeightWatcher700.ttf */,
+ 6510A78011EC643800410867 /* WebKitWeightWatcher800.ttf */,
+ 6510A78111EC643800410867 /* WebKitWeightWatcher900.ttf */,
);
name = Resources;
sourceTree = "<group>";
@@ -191,6 +259,27 @@
path = Configurations;
sourceTree = "<group>";
};
+ BC952C0A11F3B939003398B4 /* Bindings */ = {
+ isa = PBXGroup;
+ children = (
+ BC952ED311F3C318003398B4 /* CodeGeneratorTestRunner.pm */,
+ BC952C0E11F3B97B003398B4 /* JSWrappable.h */,
+ BC952C0C11F3B965003398B4 /* JSWrapper.cpp */,
+ BC952C0B11F3B965003398B4 /* JSWrapper.h */,
+ BC952ED211F3C29F003398B4 /* LayoutTestController.idl */,
+ );
+ path = Bindings;
+ sourceTree = "<group>";
+ };
+ BC952D3A11F3BF1F003398B4 /* Derived Sources */ = {
+ isa = PBXGroup;
+ children = (
+ BC952F1D11F3C652003398B4 /* JSLayoutTestController.cpp */,
+ BC952F1E11F3C652003398B4 /* JSLayoutTestController.h */,
+ );
+ name = "Derived Sources";
+ sourceTree = "<group>";
+ };
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@@ -200,7 +289,6 @@
buildPhases = (
8DD76F990486AA7600D96B5E /* Sources */,
8DD76F9B0486AA7600D96B5E /* Frameworks */,
- 8DD76F9E0486AA7600D96B5E /* CopyFiles */,
);
buildRules = (
);
@@ -224,6 +312,7 @@
buildRules = (
);
dependencies = (
+ BC952ED711F3C38B003398B4 /* PBXTargetDependency */,
);
name = InjectedBundle;
productName = InjectedBundle;
@@ -244,6 +333,7 @@
targets = (
8DD76F960486AA7600D96B5E /* WebKitTestRunner */,
BC25186111D15D54002EBC01 /* InjectedBundle */,
+ BC952D7711F3BF5D003398B4 /* Derived Sources */,
);
};
/* End PBXProject section */
@@ -253,11 +343,39 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ 6510A78211EC643800410867 /* AHEM____.TTF in Resources */,
+ 6510A78311EC643800410867 /* ColorBits.ttf in Resources */,
+ 6510A78411EC643800410867 /* WebKitWeightWatcher100.ttf in Resources */,
+ 6510A78511EC643800410867 /* WebKitWeightWatcher200.ttf in Resources */,
+ 6510A78611EC643800410867 /* WebKitWeightWatcher300.ttf in Resources */,
+ 6510A78711EC643800410867 /* WebKitWeightWatcher400.ttf in Resources */,
+ 6510A78811EC643800410867 /* WebKitWeightWatcher500.ttf in Resources */,
+ 6510A78911EC643800410867 /* WebKitWeightWatcher600.ttf in Resources */,
+ 6510A78A11EC643800410867 /* WebKitWeightWatcher700.ttf in Resources */,
+ 6510A78B11EC643800410867 /* WebKitWeightWatcher800.ttf in Resources */,
+ 6510A78C11EC643800410867 /* WebKitWeightWatcher900.ttf in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
+/* Begin PBXShellScriptBuildPhase section */
+ BC952D8211F3BF78003398B4 /* Generate Derived Sources */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Generate Derived Sources";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "mkdir -p \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitTestRunner\"\ncd \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitTestRunner\"\n\nexport WebKitTestRunner=\"${SRCROOT}\"\nexport WebCoreScripts=\"${WEBCORE_PRIVATE_HEADERS_DIR}\"\n\nif [ \"${ACTION}\" = \"build\" -o \"${ACTION}\" = \"install\" -o \"${ACTION}\" = \"installhdrs\" ]; then\n make -f \"${WebKitTestRunner}/DerivedSources.make\" -j `/usr/sbin/sysctl -n hw.availcpu`\nfi\n";
+ };
+/* End PBXShellScriptBuildPhase section */
+
/* Begin PBXSourcesBuildPhase section */
8DD76F990486AA7600D96B5E /* Sources */ = {
isa = PBXSourcesBuildPhase;
@@ -280,6 +398,9 @@
BCC997A411D3C8F60017BCA2 /* InjectedBundle.cpp in Sources */,
BCC997A511D3C8F60017BCA2 /* InjectedBundlePage.cpp in Sources */,
BCC9981811D3F51E0017BCA2 /* LayoutTestController.cpp in Sources */,
+ 65EB85A011EC67CC0034D300 /* ActivateFonts.mm in Sources */,
+ BC952C0D11F3B965003398B4 /* JSWrapper.cpp in Sources */,
+ BC952F1F11F3C652003398B4 /* JSLayoutTestController.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -291,6 +412,11 @@
target = BC25186111D15D54002EBC01 /* InjectedBundle */;
targetProxy = BC25194111D15D94002EBC01 /* PBXContainerItemProxy */;
};
+ BC952ED711F3C38B003398B4 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = BC952D7711F3BF5D003398B4 /* Derived Sources */;
+ targetProxy = BC952ED611F3C38B003398B4 /* PBXContainerItemProxy */;
+ };
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
@@ -337,6 +463,27 @@
};
name = Release;
};
+ BC952D7811F3BF5E003398B4 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ PRODUCT_NAME = "Derived Sources";
+ };
+ name = Debug;
+ };
+ BC952D7911F3BF5E003398B4 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ PRODUCT_NAME = "Derived Sources";
+ ZERO_LINK = NO;
+ };
+ name = Release;
+ };
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
@@ -367,6 +514,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
+ BC952D7D11F3BF6A003398B4 /* Build configuration list for PBXAggregateTarget "Derived Sources" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ BC952D7811F3BF5E003398B4 /* Debug */,
+ BC952D7911F3BF5E003398B4 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
/* End XCConfigurationList section */
};
rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
diff --git a/WebKitTools/WebKitTestRunner/WebKitTestRunnerPrefix.h b/WebKitTools/WebKitTestRunner/WebKitTestRunnerPrefix.h
index ffb6950..9d508ed 100644
--- a/WebKitTools/WebKitTestRunner/WebKitTestRunnerPrefix.h
+++ b/WebKitTools/WebKitTestRunner/WebKitTestRunnerPrefix.h
@@ -27,8 +27,7 @@
#include <Cocoa/Cocoa.h>
#endif
-#include <wtf/Platform.h>
-#if PLATFORM(WIN)
+#if defined(WIN32) || defined(_WIN32)
// If we don't define these, they get defined in windef.h.
// We want to use std::min and std::max
#define max max
diff --git a/WebKitTools/WebKitTestRunner/fonts/AHEM____.TTF b/WebKitTools/WebKitTestRunner/fonts/AHEM____.TTF
new file mode 100644
index 0000000..ac81cb0
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/fonts/AHEM____.TTF
Binary files differ
diff --git a/WebKitTools/WebKitTestRunner/fonts/ColorBits-A.png b/WebKitTools/WebKitTestRunner/fonts/ColorBits-A.png
new file mode 100644
index 0000000..8b9319c
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/fonts/ColorBits-A.png
Binary files differ
diff --git a/WebKitTools/WebKitTestRunner/fonts/ColorBits.ttf b/WebKitTools/WebKitTestRunner/fonts/ColorBits.ttf
new file mode 100644
index 0000000..cd919e8
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/fonts/ColorBits.ttf
Binary files differ
diff --git a/WebKitTools/WebKitTestRunner/fonts/WebKit Layout Tests 2.ttf b/WebKitTools/WebKitTestRunner/fonts/WebKit Layout Tests 2.ttf
new file mode 100644
index 0000000..e732fbc
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/fonts/WebKit Layout Tests 2.ttf
Binary files differ
diff --git a/WebKitTools/WebKitTestRunner/fonts/WebKit Layout Tests.ttf b/WebKitTools/WebKitTestRunner/fonts/WebKit Layout Tests.ttf
new file mode 100644
index 0000000..f9f997e
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/fonts/WebKit Layout Tests.ttf
Binary files differ
diff --git a/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher100.ttf b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher100.ttf
new file mode 100644
index 0000000..22b00de
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher100.ttf
Binary files differ
diff --git a/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher200.ttf b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher200.ttf
new file mode 100644
index 0000000..1ccadba
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher200.ttf
Binary files differ
diff --git a/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher300.ttf b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher300.ttf
new file mode 100644
index 0000000..ab5563d
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher300.ttf
Binary files differ
diff --git a/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher400.ttf b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher400.ttf
new file mode 100644
index 0000000..56d279e
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher400.ttf
Binary files differ
diff --git a/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher500.ttf b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher500.ttf
new file mode 100644
index 0000000..d827d7d
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher500.ttf
Binary files differ
diff --git a/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher600.ttf b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher600.ttf
new file mode 100644
index 0000000..9141596
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher600.ttf
Binary files differ
diff --git a/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher700.ttf b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher700.ttf
new file mode 100644
index 0000000..a2d0505
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher700.ttf
Binary files differ
diff --git a/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher800.ttf b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher800.ttf
new file mode 100644
index 0000000..d0f354b
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher800.ttf
Binary files differ
diff --git a/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher900.ttf b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher900.ttf
new file mode 100644
index 0000000..6b895ca
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/fonts/WebKitWeightWatcher900.ttf
Binary files differ
diff --git a/WebKitTools/WebKitTestRunner/mac/TestControllerMac.mm b/WebKitTools/WebKitTestRunner/mac/TestControllerMac.mm
index 5957e0e..ae4cc2f 100644
--- a/WebKitTools/WebKitTestRunner/mac/TestControllerMac.mm
+++ b/WebKitTools/WebKitTestRunner/mac/TestControllerMac.mm
@@ -30,22 +30,19 @@
namespace WTR {
-void TestController::initializeInjectedBundlePath()
+void TestController::platformInitialize()
{
- uint32_t pathLength = 0;
- _NSGetExecutablePath(0, &pathLength);
- char* path = (char*)malloc(pathLength);
- _NSGetExecutablePath(path, &pathLength);
- char* theRealPath = (char*)malloc(pathLength);
- realpath(path, theRealPath);
-
- NSString *pwd = [[NSString stringWithUTF8String:theRealPath] stringByDeletingLastPathComponent];
- NSString *nsBundlePath = [pwd stringByAppendingPathComponent:@"InjectedBundle.bundle"];
+}
- free(path);
- free(theRealPath);
-
+void TestController::initializeInjectedBundlePath()
+{
+ NSString *nsBundlePath = [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:@"InjectedBundle.bundle"];
m_injectedBundlePath.adopt(WKStringCreateWithCFString((CFStringRef)nsBundlePath));
}
+void TestController::initializeTestPluginPath()
+{
+ m_testPluginPath.adopt(WKStringCreateWithCFString((CFStringRef)[[NSBundle mainBundle] bundlePath]));
+}
+
} // namespace WTR
diff --git a/WebKitTools/WebKitTestRunner/win/InjectedBundleGenerated.vcproj b/WebKitTools/WebKitTestRunner/win/InjectedBundleGenerated.vcproj
new file mode 100755
index 0000000..1148edd
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/win/InjectedBundleGenerated.vcproj
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="InjectedBundleGenerated"
+ ProjectGUID="{4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}"
+ RootNamespace="InjectedBundleGenerated"
+ Keyword="MakeFileProj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="all|Win32"
+ OutputDirectory="$(WebKitOutputDir)\lib"
+ IntermediateDirectory="$(WebKitOutputDir)\obj\$(ProjectName)\$(ConfigurationName)"
+ ConfigurationType="0"
+ >
+ <Tool
+ Name="VCNMakeTool"
+ BuildCommandLine="if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;bash build-generated-files.sh &quot;$(WebKitOutputDir)&quot; &quot;$(WebKitLibrariesDir)&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ ReBuildCommandLine="echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;del /s /q &quot;$(WebKitOutputDir)\obj\InjectedBundle\DerivedSources&quot;&#x0D;&#x0A;set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;bash build-generated-files.sh &quot;$(WebKitOutputDir)&quot; &quot;$(WebKitLibrariesDir)&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ CleanCommandLine="del /s /q &quot;$(WebKitOutputDir)\obj\InjectedBundle\DerivedSources&quot;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
+ Output=""
+ PreprocessorDefinitions=""
+ IncludeSearchPath=""
+ ForcedIncludes=""
+ AssemblySearchPath=""
+ ForcedUsingAssemblies=""
+ CompileAsManaged=""
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\build-generated-files.sh"
+ >
+ </File>
+ <File
+ RelativePath="..\DerivedSources.make"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/WebKitTools/WebKitTestRunner/win/PlatformWebViewWin.cpp b/WebKitTools/WebKitTestRunner/win/PlatformWebViewWin.cpp
index e55bcf7..e602d0e 100644
--- a/WebKitTools/WebKitTestRunner/win/PlatformWebViewWin.cpp
+++ b/WebKitTools/WebKitTestRunner/win/PlatformWebViewWin.cpp
@@ -27,14 +27,40 @@
namespace WTR {
+static LPCWSTR hostWindowClassName = L"WTRWebViewHostWindow";
+
+static void registerWindowClass()
+{
+ static bool initialized;
+ if (initialized)
+ return;
+ initialized = true;
+
+ WNDCLASSEXW wndClass = {0};
+ wndClass.cbSize = sizeof(wndClass);
+ wndClass.style = CS_HREDRAW | CS_VREDRAW;
+ wndClass.lpfnWndProc = DefWindowProcW;
+ wndClass.hCursor = LoadCursor(0, IDC_ARROW);
+ wndClass.hInstance = GetModuleHandle(0);
+ wndClass.lpszClassName = hostWindowClassName;
+
+ RegisterClassExW(&wndClass);
+}
+
PlatformWebView::PlatformWebView(WKPageNamespaceRef namespaceRef)
{
- // Implement
+ registerWindowClass();
+
+ RECT viewRect = {0, 0, 800, 600};
+ m_window = CreateWindowExW(0, hostWindowClassName, L"WebKitTestRunner", WS_OVERLAPPEDWINDOW, 0 /*XOFFSET*/, 0 /*YOFFSET*/, viewRect.right, viewRect.bottom, 0, 0, GetModuleHandle(0), 0);
+ m_view = WKViewCreate(viewRect, namespaceRef, m_window);
}
PlatformWebView::~PlatformWebView()
{
- // Implement
+ if (::IsWindow(m_window))
+ ::DestroyWindow(m_window);
+ WKViewRelease(m_view);
}
void PlatformWebView::resizeTo(unsigned width, unsigned height)
@@ -44,8 +70,7 @@ void PlatformWebView::resizeTo(unsigned width, unsigned height)
WKPageRef PlatformWebView::page()
{
- // Implement
- return 0;
+ return WKViewGetPage(m_view);
}
} // namespace WTR
diff --git a/WebKitTools/WebKitTestRunner/win/TestControllerWin.cpp b/WebKitTools/WebKitTestRunner/win/TestControllerWin.cpp
index 00b2d50..232c396 100644
--- a/WebKitTools/WebKitTestRunner/win/TestControllerWin.cpp
+++ b/WebKitTools/WebKitTestRunner/win/TestControllerWin.cpp
@@ -25,13 +25,36 @@
#include "TestController.h"
+#include <fcntl.h>
+#include <io.h>
#include <WebKit2/WKStringCF.h>
namespace WTR {
+void TestController::platformInitialize()
+{
+ _setmode(1, _O_BINARY);
+ _setmode(2, _O_BINARY);
+}
+
void TestController::initializeInjectedBundlePath()
{
- // Implement
+ CFStringRef exeContainerPath = CFURLCopyFileSystemPath(CFURLCreateCopyDeletingLastPathComponent(0, CFBundleCopyExecutableURL(CFBundleGetMainBundle())), kCFURLWindowsPathStyle);
+ CFMutableStringRef bundlePath = CFStringCreateMutableCopy(0, 0, exeContainerPath);
+#ifndef NDEBUG
+ CFStringAppendCString(bundlePath, "\\InjectedBundle_debug.dll", kCFStringEncodingWindowsLatin1);
+#else
+ CFStringAppendCString(bundlePath, "\\InjectedBundle.dll", kCFStringEncodingWindowsLatin1);
+#endif
+
+ m_injectedBundlePath.adopt(WKStringCreateWithCFString(bundlePath));
+}
+
+void TestController::initializeTestPluginPath()
+{
+ CFStringRef exeContainerPath = CFURLCopyFileSystemPath(CFURLCreateCopyDeletingLastPathComponent(0, CFBundleCopyExecutableURL(CFBundleGetMainBundle())), kCFURLWindowsPathStyle);
+ CFMutableStringRef bundlePath = CFStringCreateMutableCopy(0, 0, exeContainerPath);
+ m_testPluginPath.adopt(WKStringCreateWithCFString(bundlePath));
}
} // namespace WTR
diff --git a/WebKitTools/WebKitTestRunner/win/TestInvocationWin.cpp b/WebKitTools/WebKitTestRunner/win/TestInvocationWin.cpp
index 83199bd..cfeebcc 100644
--- a/WebKitTools/WebKitTestRunner/win/TestInvocationWin.cpp
+++ b/WebKitTools/WebKitTestRunner/win/TestInvocationWin.cpp
@@ -29,7 +29,14 @@ namespace WTR {
void TestInvocation::runUntil(bool& done)
{
- // Implement
+ while (!done) {
+ MSG msg;
+ BOOL result = GetMessage(&msg, 0, 0, 0);
+ if (result == -1)
+ return;
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ }
}
} // namespace WTR
diff --git a/WebKitTools/WebKitTestRunner/win/WebKitTestRunner.sln b/WebKitTools/WebKitTestRunner/win/WebKitTestRunner.sln
index e89e66d..757b7fb 100644
--- a/WebKitTools/WebKitTestRunner/win/WebKitTestRunner.sln
+++ b/WebKitTools/WebKitTestRunner/win/WebKitTestRunner.sln
@@ -2,6 +2,11 @@
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebKitTestRunner", "WebKitTestRunner.vcproj", "{3B99669B-1817-443B-BCBE-835580146668}"
+ ProjectSection(ProjectDependencies) = postProject
+ {CBC3391C-F060-4BF5-A66E-81404168816B} = {CBC3391C-F060-4BF5-A66E-81404168816B}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InjectedBundle", "..\InjectedBundle\win\InjectedBundle.vcproj", "{CBC3391C-F060-4BF5-A66E-81404168816B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -19,6 +24,14 @@ Global
{3B99669B-1817-443B-BCBE-835580146668}.Debug|Win32.Build.0 = Debug|Win32
{3B99669B-1817-443B-BCBE-835580146668}.Release|Win32.ActiveCfg = Release|Win32
{3B99669B-1817-443B-BCBE-835580146668}.Release|Win32.Build.0 = Release|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_All|Win32.Build.0 = Debug_All|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Debug|Win32.Build.0 = Debug|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Release|Win32.ActiveCfg = Release|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/WebKitTools/WebKitTestRunner/win/WebKitTestRunner.vcproj b/WebKitTools/WebKitTestRunner/win/WebKitTestRunner.vcproj
index 4885feb..4802c3a 100644
--- a/WebKitTools/WebKitTestRunner/win/WebKitTestRunner.vcproj
+++ b/WebKitTools/WebKitTestRunner/win/WebKitTestRunner.vcproj
@@ -39,7 +39,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ProjectDir)\.&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\cg&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\WebKitTestRunner\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)\..&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\WebKitTestRunner\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;"
PreprocessorDefinitions="__WIN32__;_CONSOLE"
DisableSpecificWarnings="4146"
ForcedIncludeFiles="WebKitTestRunnerPrefix.h"
@@ -56,9 +56,7 @@
<Tool
Name="VCLinkerTool"
AdditionalOptions="/NXCOMPAT"
- AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebKit2$(WebKitDLLConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib getopt$(LibraryConfigSuffix).lib gdi32.lib ole32.lib oleaut32.lib user32.lib shlwapi.lib oleacc.lib comsuppw.lib"
- AdditionalLibraryDirectories=""
- DelayLoadDLLs=""
+ AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib"
SubSystem="1"
TargetMachine="1"
/>
@@ -113,7 +111,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ProjectDir)\.&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\cg&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\WebKitTestRunner\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)\..&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\WebKitTestRunner\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;"
PreprocessorDefinitions="__WIN32__;_CONSOLE"
DisableSpecificWarnings="4146"
ForcedIncludeFiles="WebKitTestRunnerPrefix.h"
@@ -130,9 +128,7 @@
<Tool
Name="VCLinkerTool"
AdditionalOptions="/NXCOMPAT"
- AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebKit2$(WebKitDLLConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib getopt$(LibraryConfigSuffix).lib gdi32.lib ole32.lib oleaut32.lib user32.lib shlwapi.lib oleacc.lib comsuppw.lib"
- AdditionalLibraryDirectories=""
- DelayLoadDLLs=""
+ AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib"
SubSystem="1"
TargetMachine="1"
/>
@@ -170,7 +166,7 @@
>
<Tool
Name="VCPreBuildEventTool"
- CommandLine="%SystemDrive%\cygwin\bin\which.exe bash&#x0D;&#x0A;if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;cmd /c&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\\ForwardingHeaders&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\*.h&quot; &quot;$(WebKitOutputDir)\include\\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;"
+ CommandLine="%SystemDrive%\cygwin\bin\which.exe bash&#x0D;&#x0A;if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;cmd /c&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebKitTestRunner&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebKitTestRunner\ForwardingHeaders&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebKitTestRunner\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebKitTestRunner\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;"
/>
<Tool
Name="VCCustomBuildTool"
@@ -186,10 +182,10 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ProjectDir)\.&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\cg&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)\..&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\WebKitTestRunner\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;"
PreprocessorDefinitions="__WIN32__;_CONSOLE"
DisableSpecificWarnings="4146"
- ForcedIncludeFiles="Prefix.h"
+ ForcedIncludeFiles="WebKitTestRunnerPrefix.h"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -203,9 +199,7 @@
<Tool
Name="VCLinkerTool"
AdditionalOptions="/NXCOMPAT"
- AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebKit2$(WebKitDLLConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib getopt$(LibraryConfigSuffix).lib gdi32.lib ole32.lib oleaut32.lib user32.lib shlwapi.lib oleacc.lib comsuppw.lib"
- AdditionalLibraryDirectories=""
- DelayLoadDLLs=""
+ AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib"
SubSystem="1"
/>
<Tool
@@ -242,7 +236,7 @@
>
<Tool
Name="VCPreBuildEventTool"
- CommandLine="%SystemDrive%\cygwin\bin\which.exe bash&#x0D;&#x0A;if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;cmd /c&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\\ForwardingHeaders&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\*.h&quot; &quot;$(WebKitOutputDir)\include\\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;"
+ CommandLine="%SystemDrive%\cygwin\bin\which.exe bash&#x0D;&#x0A;if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%&#x0D;&#x0A;cmd /c&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; grep XX$(ProjectName)XX &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;if errorlevel 1 exit 1&#x0D;&#x0A;echo XX$(ProjectName)XX &gt; &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebKitTestRunner&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebKitTestRunner\ForwardingHeaders&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebKitTestRunner\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebKitTestRunner\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;"
/>
<Tool
Name="VCCustomBuildTool"
@@ -258,10 +252,10 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ProjectDir)\.&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)\..\cg&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\Include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitOutputDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)\..&quot;;&quot;$(WebKitOutputDir)\Include&quot;;&quot;$(WebKitOutputDir)\Include\private&quot;;&quot;$(WebKitOutputDir)\Include\WebKitTestRunner\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;"
PreprocessorDefinitions="__WIN32__;_CONSOLE"
DisableSpecificWarnings="4146"
- ForcedIncludeFiles="Prefix.h"
+ ForcedIncludeFiles="WebKitTestRunnerPrefix.h"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -275,9 +269,7 @@
<Tool
Name="VCLinkerTool"
AdditionalOptions="/NXCOMPAT"
- AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebKit2$(WebKitDLLConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib getopt$(LibraryConfigSuffix).lib gdi32.lib ole32.lib oleaut32.lib user32.lib shlwapi.lib oleacc.lib comsuppw.lib"
- AdditionalLibraryDirectories=""
- DelayLoadDLLs=""
+ AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib"
SubSystem="1"
/>
<Tool
@@ -330,38 +322,6 @@
>
</File>
</Filter>
- <Filter
- Name="InjectedBundle"
- >
- <File
- RelativePath="..\InjectedBundle\InjectedBundle.cpp"
- >
- </File>
- <File
- RelativePath="..\InjectedBundle\InjectedBundle.h"
- >
- </File>
- <File
- RelativePath="..\InjectedBundle\InjectedBundleMain.cpp"
- >
- </File>
- <File
- RelativePath="..\InjectedBundle\InjectedBundlePage.cpp"
- >
- </File>
- <File
- RelativePath="..\InjectedBundle\InjectedBundlePage.h"
- >
- </File>
- <File
- RelativePath="..\InjectedBundle\LayoutTestController.cpp"
- >
- </File>
- <File
- RelativePath="..\InjectedBundle\LayoutTestController.h"
- >
- </File>
- </Filter>
<File
RelativePath="..\PlatformWebView.h"
>
diff --git a/WebKitTools/WebKitTestRunner/win/build-generated-files.sh b/WebKitTools/WebKitTestRunner/win/build-generated-files.sh
new file mode 100644
index 0000000..8c599c1
--- /dev/null
+++ b/WebKitTools/WebKitTestRunner/win/build-generated-files.sh
@@ -0,0 +1,42 @@
+# Copyright (C) 2010 Apple 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:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. 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.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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.
+
+# Calls to `cygpath -ms` below are needed to remove spaces from paths, which
+# confuse GNU make. See <http://webkit.org/b/8173>.
+
+WebKitOutputDir=$(cygpath -u "$(cygpath -ms "${1}")")
+WebKitLibrariesDir=$(cygpath -u "$(cygpath -ms "${2}")")
+DerivedSources="${WebKitOutputDir}/obj/InjectedBundle/DerivedSources"
+
+export WebKitTestRunner=$(cygpath -u "$(cygpath -ms "$(realpath ..)")")
+
+if [ -e "${WebKitOutputDir}/obj/WebCore/scripts" ]; then
+ export WebCoreScripts="${WebKitOutputDir}/obj/WebCore/scripts"
+else
+ export WebCoreScripts="${WebKitLibrariesDir}/tools/scripts"
+fi
+
+mkdir -p "${DerivedSources}"
+cd "${DerivedSources}"
+
+make -f "${WebKitTestRunner}/DerivedSources.make"