Diff
Modified: trunk/Tools/ChangeLog (184032 => 184033)
--- trunk/Tools/ChangeLog 2015-05-09 00:18:43 UTC (rev 184032)
+++ trunk/Tools/ChangeLog 2015-05-09 00:33:37 UTC (rev 184033)
@@ -1,3 +1,21 @@
+2015-05-07 Sam Weinig <[email protected]>
+
+ [Content Extensions] Add simple tester that takes an extension and compiles it
+ https://bugs.webkit.org/show_bug.cgi?id=144781
+
+ Reviewed by Dan Bates.
+
+ * ContentExtensionTester: Added.
+ * ContentExtensionTester/Configurations: Added.
+ * ContentExtensionTester/Configurations/Base.xcconfig: Copied from Source/bmalloc/Configurations/Base.xcconfig.
+ * ContentExtensionTester/Configurations/ContentExtensionTester.xcconfig: Copied from Source/bmalloc/Configurations/bmalloc.xcconfig.
+ * ContentExtensionTester/Configurations/DebugRelease.xcconfig: Copied from Source/bmalloc/Configurations/DebugRelease.xcconfig.
+ * ContentExtensionTester/ContentExtensionTester.xcodeproj: Added.
+ * ContentExtensionTester/ContentExtensionTester.xcodeproj/project.pbxproj: Added.
+ * ContentExtensionTester/Makefile: Copied from Tools/TestWebKitAPI/Makefile.
+ * ContentExtensionTester/main.m: Added.
+ * Scripts/run-content-extension-tester: Copied from Tools/Scripts/run-webkit-tests.
+
2015-05-08 Alexey Proskuryakov <[email protected]>
Build fix.
Copied: trunk/Tools/ContentExtensionTester/Configurations/Base.xcconfig (from rev 183966, trunk/Source/bmalloc/Configurations/Base.xcconfig) (0 => 184033)
--- trunk/Tools/ContentExtensionTester/Configurations/Base.xcconfig (rev 0)
+++ trunk/Tools/ContentExtensionTester/Configurations/Base.xcconfig 2015-05-09 00:33:37 UTC (rev 184033)
@@ -0,0 +1,85 @@
+// Copyright (C) 2015 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. ``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
+// 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 "../../../../Internal/Configurations/HaveInternalSDK.xcconfig"
+
+USE_INTERNAL_SDK = $(USE_INTERNAL_SDK_$(CONFIGURATION));
+USE_INTERNAL_SDK_Production = YES;
+USE_INTERNAL_SDK_Debug = $(HAVE_INTERNAL_SDK);
+USE_INTERNAL_SDK_Release = $(HAVE_INTERNAL_SDK);
+
+CLANG_CXX_LANGUAGE_STANDARD = gnu++0x;
+CLANG_CXX_LIBRARY = libc++;
+CLANG_WARN_BOOL_CONVERSION = YES;
+CLANG_WARN_CONSTANT_CONVERSION = YES;
+CLANG_WARN_CXX0X_EXTENSIONS = NO;
+CLANG_WARN_EMPTY_BODY = YES;
+CLANG_WARN_ENUM_CONVERSION = YES;
+CLANG_WARN_INT_CONVERSION = YES;
+CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+DEBUG_INFORMATION_FORMAT = dwarf-with-dsym;
+GCC_C_LANGUAGE_STANDARD = gnu99;
+GCC_DEBUGGING_SYMBOLS = default;
+GCC_ENABLE_CPP_EXCEPTIONS = NO;
+GCC_ENABLE_CPP_RTTI = NO;
+GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+GCC_ENABLE_SYMBOL_SEPARATION = NO;
+GCC_FAST_OBJC_DISPATCH = YES;
+GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+GCC_OBJC_CALL_CXX_CDTORS = YES;
+GCC_PRECOMPILE_PREFIX_HEADER = YES;
+GCC_PREPROCESSOR_DEFINITIONS = $(DEBUG_DEFINES) $(inherited);
+GCC_STRICT_ALIASING = YES;
+GCC_THREADSAFE_STATICS = NO;
+GCC_TREAT_WARNINGS_AS_ERRORS = YES;
+GCC_WARN_64_TO_32_BIT_CONVERSION_ = YES;
+GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;
+GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
+GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+GCC_WARN_ABOUT_RETURN_TYPE = YES;
+GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
+GCC_WARN_SIGN_COMPARE = YES;
+GCC_WARN_UNDECLARED_SELECTOR = YES;
+GCC_WARN_UNINITIALIZED_AUTOS = YES;
+GCC_WARN_UNUSED_FUNCTION = YES;
+GCC_WARN_UNUSED_VARIABLE = YES;
+LINKER_DISPLAYS_MANGLED_NAMES = YES;
+WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough;
+
+TARGET_MAC_OS_X_VERSION_MAJOR = $(MAC_OS_X_VERSION_MAJOR);
+
+// DEBUG_DEFINES, GCC_OPTIMIZATION_LEVEL, STRIP_INSTALLED_PRODUCT and DEAD_CODE_STRIPPING vary between the debug and normal variants.
+// We set up the values for each variant here, and have the Debug configuration in the Xcode project use the _debug variant.
+DEBUG_DEFINES_debug = ;
+DEBUG_DEFINES_normal = NDEBUG;
+DEBUG_DEFINES = $(DEBUG_DEFINES_$(CURRENT_VARIANT));
+
+GCC_OPTIMIZATION_LEVEL = $(GCC_OPTIMIZATION_LEVEL_$(CURRENT_VARIANT));
+GCC_OPTIMIZATION_LEVEL_normal = 3;
+GCC_OPTIMIZATION_LEVEL_debug = 0;
+
+SDKROOT = macosx.internal;
+
+OTHER_CFLAGS = $(ASAN_OTHER_CFLAGS);
+OTHER_CPLUSPLUSFLAGS = $(ASAN_OTHER_CPLUSPLUSFLAGS);
+OTHER_LDFLAGS = $(ASAN_OTHER_LDFLAGS);
Copied: trunk/Tools/ContentExtensionTester/Configurations/ContentExtensionTester.xcconfig (from rev 183966, trunk/Source/bmalloc/Configurations/bmalloc.xcconfig) (0 => 184033)
--- trunk/Tools/ContentExtensionTester/Configurations/ContentExtensionTester.xcconfig (rev 0)
+++ trunk/Tools/ContentExtensionTester/Configurations/ContentExtensionTester.xcconfig 2015-05-09 00:33:37 UTC (rev 184033)
@@ -0,0 +1,24 @@
+// Copyright (C) 2015 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. ``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
+// 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.
+
+PRODUCT_NAME = $(TARGET_NAME);
Copied: trunk/Tools/ContentExtensionTester/Configurations/DebugRelease.xcconfig (from rev 183966, trunk/Source/bmalloc/Configurations/DebugRelease.xcconfig) (0 => 184033)
--- trunk/Tools/ContentExtensionTester/Configurations/DebugRelease.xcconfig (rev 0)
+++ trunk/Tools/ContentExtensionTester/Configurations/DebugRelease.xcconfig 2015-05-09 00:33:37 UTC (rev 184033)
@@ -0,0 +1,39 @@
+// Copyright (C) 2015 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. ``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
+// 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 "Base.xcconfig"
+
+_ONLY_ACTIVE_ARCH_ = YES;
+
+MACOSX_DEPLOYMENT_TARGET = $(MACOSX_DEPLOYMENT_TARGET_$(PLATFORM_NAME)_$(TARGET_MAC_OS_X_VERSION_MAJOR));
+MACOSX_DEPLOYMENT_TARGET_macosx_1090 = 10.9;
+MACOSX_DEPLOYMENT_TARGET_macosx_101000 = 10.10;
+MACOSX_DEPLOYMENT_TARGET_macosx_101100 = 10.11;
+
+GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES;
+DEBUG_INFORMATION_FORMAT = dwarf;
+
+SDKROOT[sdk=iphone*] = $(SDKROOT);
+SDKROOT = $(SDKROOT_$(PLATFORM_NAME)_$(USE_INTERNAL_SDK));
+SDKROOT_macosx_ = macosx;
+SDKROOT_macosx_YES = macosx.internal;
Property changes: trunk/Tools/ContentExtensionTester/ContentExtensionTester.xcodeproj
Added: svn:ignore
xcuserdata
Added: trunk/Tools/ContentExtensionTester/ContentExtensionTester.xcodeproj/project.pbxproj (0 => 184033)
--- trunk/Tools/ContentExtensionTester/ContentExtensionTester.xcodeproj/project.pbxproj (rev 0)
+++ trunk/Tools/ContentExtensionTester/ContentExtensionTester.xcodeproj/project.pbxproj 2015-05-09 00:33:37 UTC (rev 184033)
@@ -0,0 +1,200 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 7C4AB3AC1AF02798003FC8D1 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7C4AB3AB1AF02798003FC8D1 /* WebKit.framework */; };
+ 7CB6844B1AFA7978002B305C /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 7CB6844A1AFA7978002B305C /* main.m */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ 7C4AB39F1AF0276C003FC8D1 /* CopyFiles */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = /usr/share/man/man1/;
+ dstSubfolderSpec = 0;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 1;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 7C2227511AFC4D9C008C3338 /* Base.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = "<group>"; };
+ 7C2227521AFC4D9C008C3338 /* ContentExtensionTester.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ContentExtensionTester.xcconfig; sourceTree = "<group>"; };
+ 7C2227531AFC4D9C008C3338 /* DebugRelease.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = DebugRelease.xcconfig; sourceTree = "<group>"; };
+ 7C4AB3A11AF0276C003FC8D1 /* ContentExtensionTester */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = ContentExtensionTester; sourceTree = BUILT_PRODUCTS_DIR; };
+ 7C4AB3AB1AF02798003FC8D1 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
+ 7CB6844A1AFA7978002B305C /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = SOURCE_ROOT; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 7C4AB39E1AF0276C003FC8D1 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 7C4AB3AC1AF02798003FC8D1 /* WebKit.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 7C2227501AFC4D0A008C3338 /* Configurations */ = {
+ isa = PBXGroup;
+ children = (
+ 7C2227511AFC4D9C008C3338 /* Base.xcconfig */,
+ 7C2227521AFC4D9C008C3338 /* ContentExtensionTester.xcconfig */,
+ 7C2227531AFC4D9C008C3338 /* DebugRelease.xcconfig */,
+ );
+ path = Configurations;
+ sourceTree = "<group>";
+ };
+ 7C4AB3981AF0276C003FC8D1 = {
+ isa = PBXGroup;
+ children = (
+ 7C4AB3AB1AF02798003FC8D1 /* WebKit.framework */,
+ 7C4AB3A31AF0276C003FC8D1 /* ContentExtensionTester */,
+ 7C2227501AFC4D0A008C3338 /* Configurations */,
+ 7C4AB3A21AF0276C003FC8D1 /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ 7C4AB3A21AF0276C003FC8D1 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 7C4AB3A11AF0276C003FC8D1 /* ContentExtensionTester */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 7C4AB3A31AF0276C003FC8D1 /* ContentExtensionTester */ = {
+ isa = PBXGroup;
+ children = (
+ 7CB6844A1AFA7978002B305C /* main.m */,
+ );
+ path = ContentExtensionTester;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 7C4AB3A01AF0276C003FC8D1 /* ContentExtensionTester */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 7C4AB3A81AF0276C003FC8D1 /* Build configuration list for PBXNativeTarget "ContentExtensionTester" */;
+ buildPhases = (
+ 7C4AB39D1AF0276C003FC8D1 /* Sources */,
+ 7C4AB39E1AF0276C003FC8D1 /* Frameworks */,
+ 7C4AB39F1AF0276C003FC8D1 /* CopyFiles */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = ContentExtensionTester;
+ productName = ContentExtensionTester;
+ productReference = 7C4AB3A11AF0276C003FC8D1 /* ContentExtensionTester */;
+ productType = "com.apple.product-type.tool";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 7C4AB3991AF0276C003FC8D1 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0700;
+ ORGANIZATIONNAME = "Sam Weinig";
+ TargetAttributes = {
+ 7C4AB3A01AF0276C003FC8D1 = {
+ CreatedOnToolsVersion = 7.0;
+ };
+ };
+ };
+ buildConfigurationList = 7C4AB39C1AF0276C003FC8D1 /* Build configuration list for PBXProject "ContentExtensionTester" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = 7C4AB3981AF0276C003FC8D1;
+ productRefGroup = 7C4AB3A21AF0276C003FC8D1 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 7C4AB3A01AF0276C003FC8D1 /* ContentExtensionTester */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 7C4AB39D1AF0276C003FC8D1 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 7CB6844B1AFA7978002B305C /* main.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+ 7C4AB3A61AF0276C003FC8D1 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7C2227531AFC4D9C008C3338 /* DebugRelease.xcconfig */;
+ buildSettings = {
+ DEBUG_DEFINES = "$(DEBUG_DEFINES_debug)";
+ GCC_OPTIMIZATION_LEVEL = "$(GCC_OPTIMIZATION_LEVEL_debug)";
+ };
+ name = Debug;
+ };
+ 7C4AB3A71AF0276C003FC8D1 /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7C2227531AFC4D9C008C3338 /* DebugRelease.xcconfig */;
+ buildSettings = {
+ };
+ name = Release;
+ };
+ 7C4AB3A91AF0276C003FC8D1 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7C2227521AFC4D9C008C3338 /* ContentExtensionTester.xcconfig */;
+ buildSettings = {
+ };
+ name = Debug;
+ };
+ 7C4AB3AA1AF0276C003FC8D1 /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7C2227521AFC4D9C008C3338 /* ContentExtensionTester.xcconfig */;
+ buildSettings = {
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 7C4AB39C1AF0276C003FC8D1 /* Build configuration list for PBXProject "ContentExtensionTester" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 7C4AB3A61AF0276C003FC8D1 /* Debug */,
+ 7C4AB3A71AF0276C003FC8D1 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 7C4AB3A81AF0276C003FC8D1 /* Build configuration list for PBXNativeTarget "ContentExtensionTester" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 7C4AB3A91AF0276C003FC8D1 /* Debug */,
+ 7C4AB3AA1AF0276C003FC8D1 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 7C4AB3991AF0276C003FC8D1 /* Project object */;
+}
Copied: trunk/Tools/ContentExtensionTester/Makefile (from rev 183966, trunk/Tools/TestWebKitAPI/Makefile) (0 => 184033)
--- trunk/Tools/ContentExtensionTester/Makefile (rev 0)
+++ trunk/Tools/ContentExtensionTester/Makefile 2015-05-09 00:33:37 UTC (rev 184033)
@@ -0,0 +1,2 @@
+SCRIPTS_PATH = ../Scripts
+include ../../Makefile.shared
Added: trunk/Tools/ContentExtensionTester/main.m (0 => 184033)
--- trunk/Tools/ContentExtensionTester/main.m (rev 0)
+++ trunk/Tools/ContentExtensionTester/main.m 2015-05-09 00:33:37 UTC (rev 184033)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2015 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.
+ */
+
+#import <Foundation/Foundation.h>
+#import <WebKit/_WKUserContentExtensionStorePrivate.h>
+
+static void run(bool* done)
+{
+ while (!*done)
+ [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantPast]];
+}
+
+int main(int argc, const char* argv[])
+{
+ @autoreleasepool {
+ if (argc < 2) {
+ NSLog(@"Not enough arguments.");
+ return -1;
+ }
+
+ [[_WKUserContentExtensionStore defaultStore] _removeAllContentExtensions];
+
+ NSString *path = [NSString stringWithUTF8String:argv[1]];
+ NSString *jsonString = [[NSString alloc] initWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil];
+
+ __block bool doneCompiling = false;
+ [[_WKUserContentExtensionStore defaultStore] compileContentExtensionForIdentifier:@"TestExtension" encodedContentExtension:jsonString completionHandler:^(_WKUserContentFilter *filter __attribute__((unused)), NSError *error) {
+ if (error)
+ printf("Failed to compile extension at %s with error %s", path.UTF8String , error.description.UTF8String);
+ else
+ printf("Succeeded in compiling extension at %s", path.UTF8String);
+
+ doneCompiling = true;
+ }];
+
+ run(&doneCompiling);
+ }
+
+ return 0;
+}
Copied: trunk/Tools/Scripts/run-content-extension-tester (from rev 183966, trunk/Tools/Scripts/run-webkit-tests) (0 => 184033)
--- trunk/Tools/Scripts/run-content-extension-tester (rev 0)
+++ trunk/Tools/Scripts/run-content-extension-tester 2015-05-09 00:33:37 UTC (rev 184033)
@@ -0,0 +1,39 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2015 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 FindBin;
+use lib $FindBin::Bin;
+use webkitdirs;
+
+printHelpAndExitForRunAndDebugWebKitAppIfNeeded();
+
+setConfiguration();
+
+if (!isAppleMacWebKit()) {
+ exit 1;
+}
+
+exit exitStatus(runMacWebKitApp(File::Spec->catfile(productDir(), "ContentExtensionTester")));