CB-10482 Remove references to windows8 from cordova-lib/cli Added Plugman tests for non-default engines handling
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/a3285602 Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/a3285602 Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/a3285602 Branch: refs/heads/master Commit: a3285602b88f4e40f08c178b8b26c918c91d0dce Parents: ecba932 Author: daserge <[email protected]> Authored: Tue Feb 9 23:16:34 2016 +0300 Committer: daserge <[email protected]> Committed: Tue Feb 9 23:16:34 2016 +0300 ---------------------------------------------------------------------- .../spec/ConfigChanges/ConfigChanges.spec.js | 22 +- .../plugins/org.test.configtest/plugin.xml | 16 +- .../windows/CordovaApp_TemporaryKey.pfx | Bin 0 -> 2504 bytes .../fixtures/projects/windows/TestApp.jsproj | 81 + .../fixtures/projects/windows/TestApp.projitems | 34 + .../spec/fixtures/projects/windows/TestApp.sln | 46 + .../projects/windows/www/cordova-2.6.0.js | 8075 ++++++++++++++++++ .../fixtures/projects/windows/www/css/index.css | 115 + .../fixtures/projects/windows/www/img/logo.png | Bin 0 -> 11600 bytes .../projects/windows/www/img/smalllogo.png | Bin 0 -> 2831 bytes .../projects/windows/www/img/splashscreen.png | Bin 0 -> 24855 bytes .../projects/windows/www/img/storelogo.png | Bin 0 -> 4052 bytes .../fixtures/projects/windows/www/index.html | 42 + .../fixtures/projects/windows/www/js/index.js | 49 + .../windows8/CordovaApp_TemporaryKey.pfx | Bin 2504 -> 0 bytes .../fixtures/projects/windows8/TestApp.jsproj | 81 - .../spec/fixtures/projects/windows8/TestApp.sln | 46 - .../projects/windows8/package.appxmanifest | 27 - .../projects/windows8/www/cordova-2.6.0.js | 8075 ------------------ .../projects/windows8/www/css/index.css | 115 - .../fixtures/projects/windows8/www/img/logo.png | Bin 11600 -> 0 bytes .../projects/windows8/www/img/smalllogo.png | Bin 2831 -> 0 bytes .../projects/windows8/www/img/splashscreen.png | Bin 24855 -> 0 bytes .../projects/windows8/www/img/storelogo.png | Bin 4052 -> 0 bytes .../fixtures/projects/windows8/www/index.html | 42 - .../fixtures/projects/windows8/www/js/index.js | 49 - .../src/ConfigChanges/ConfigChanges.js | 8 +- cordova-common/src/PluginInfo/PluginInfo.js | 6 - .../metadata/windows8_parser.spec.js | 184 - .../metadata/windows_parser.spec.js | 168 + cordova-lib/spec-plugman/install.spec.js | 42 +- .../plugin.xml | 28 + .../plugin.xml | 28 + cordova-lib/src/cordova/lazy_load.js | 3 - .../src/cordova/metadata/windows_parser.js | 159 +- cordova-lib/src/cordova/platform.js | 13 - cordova-lib/src/platforms/PlatformApiPoly.js | 6 - cordova-lib/src/platforms/platformsConfig.json | 8 - cordova-lib/src/plugman/install.js | 13 +- cordova-lib/src/plugman/util/default-engines.js | 2 - 40 files changed, 8750 insertions(+), 8833 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/a3285602/cordova-common/spec/ConfigChanges/ConfigChanges.spec.js ---------------------------------------------------------------------- diff --git a/cordova-common/spec/ConfigChanges/ConfigChanges.spec.js b/cordova-common/spec/ConfigChanges/ConfigChanges.spec.js index be83ee1..df54fe1 100644 --- a/cordova-common/spec/ConfigChanges/ConfigChanges.spec.js +++ b/cordova-common/spec/ConfigChanges/ConfigChanges.spec.js @@ -37,7 +37,7 @@ var configChanges = require('../../src/ConfigChanges/ConfigChanges'), android_two_project = path.join(__dirname, '../fixtures/projects/android_two/*'), android_two_no_perms_project = path.join(__dirname, '../fixtures/projects/android_two_no_perms', '*'), ios_config_xml = path.join(__dirname, '../fixtures/projects/ios-config-xml/*'), - windows_testapp_jsproj = path.join(__dirname, '../fixtures/projects/windows8/TestApp.jsproj'), + windows_testapp_jsproj = path.join(__dirname, '../fixtures/projects/windows/TestApp.jsproj'), plugins_dir = path.join(temp, 'cordova', 'plugins'); var mungeutil = require('../../src/ConfigChanges/munge-util'); var PlatformJson = require('../../src/PlatformJson'); @@ -197,22 +197,26 @@ describe('config-changes module', function() { var munge = munger.generate_plugin_config_munge(pluginInfoProvider.get(configplugin), {}); var packageAppxManifest = munge.files['package.appxmanifest']; - var windows80AppxManifest = munge.files['package.windows80.appxmanifest']; var windows81AppxManifest = munge.files['package.windows.appxmanifest']; var winphone81AppxManifest = munge.files['package.phone.appxmanifest']; var windows10AppxManifest = munge.files['package.windows10.appxmanifest']; expect(packageAppxManifest.parents['/Parent/Capabilities'][0].xml).toBe('<Capability Note="should-exist-for-all-appxmanifest-target-files" />'); - expect(windows80AppxManifest.parents['/Parent/Capabilities'][0].xml).toBe('<Capability Note="should-exist-for-win8-only" />'); - expect(windows80AppxManifest.parents['/Parent/Capabilities'][1].xml).toBe('<Capability Note="should-exist-for-win8-and-win81-win-only" />'); - expect(windows80AppxManifest.parents['/Parent/Capabilities'][2].xml).toBe('<Capability Note="should-exist-for-win8-and-win81-both" />'); + + // 1 comes from versions="=8.1.0" + 1 from versions="=8.1.0" device-target="windows" expect(windows81AppxManifest.parents['/Parent/Capabilities'][0].xml).toBe('<Capability Note="should-exist-for-win81-win-and-phone" />'); - expect(windows81AppxManifest.parents['/Parent/Capabilities'][1].xml).toBe('<Capability Note="should-exist-for-win8-and-win81-win-only" />'); - expect(windows81AppxManifest.parents['/Parent/Capabilities'][2].xml).toBe('<Capability Note="should-exist-for-win8-and-win81-both" />'); + expect(windows81AppxManifest.parents['/Parent/Capabilities'][0].count).toBe(2); + expect(windows81AppxManifest.parents['/Parent/Capabilities'][1].xml).toBe('<Capability Note="should-exist-for-win81-win-only" />'); + expect(windows81AppxManifest.parents['/Parent/Capabilities'][2].xml).toBe('<Capability Note="should-exist-for-win10-and-win81-win-and-phone" />'); + + // 1 comes from versions="=8.1.0" + 1 from versions="=8.1.0" device-target="phone" expect(winphone81AppxManifest.parents['/Parent/Capabilities'][0].xml).toBe('<Capability Note="should-exist-for-win81-win-and-phone" />'); + expect(winphone81AppxManifest.parents['/Parent/Capabilities'][0].count).toBe(2); expect(winphone81AppxManifest.parents['/Parent/Capabilities'][1].xml).toBe('<Capability Note="should-exist-for-win81-phone-only" />'); - expect(winphone81AppxManifest.parents['/Parent/Capabilities'][2].xml).toBe('<Capability Note="should-exist-for-win8-and-win81-both" />'); - expect(windows10AppxManifest.parents['/Parent/Capabilities'][0].xml).toBe('<Capability Note="should-exist-in-win10-only" />'); + expect(winphone81AppxManifest.parents['/Parent/Capabilities'][2].xml).toBe('<Capability Note="should-exist-for-win10-and-win81-win-and-phone" />'); + + expect(windows10AppxManifest.parents['/Parent/Capabilities'][0].xml).toBe('<Capability Note="should-exist-for-win10-and-win81-win-and-phone" />'); + expect(windows10AppxManifest.parents['/Parent/Capabilities'][1].xml).toBe('<Capability Note="should-exist-in-win10-only" />'); }); }); }); http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/a3285602/cordova-common/spec/fixtures/plugins/org.test.configtest/plugin.xml ---------------------------------------------------------------------- diff --git a/cordova-common/spec/fixtures/plugins/org.test.configtest/plugin.xml b/cordova-common/spec/fixtures/plugins/org.test.configtest/plugin.xml index fa1ff51..d140297 100644 --- a/cordova-common/spec/fixtures/plugins/org.test.configtest/plugin.xml +++ b/cordova-common/spec/fixtures/plugins/org.test.configtest/plugin.xml @@ -39,20 +39,20 @@ <config-file target="package.appxmanifest" parent="/Parent/Capabilities"> <Capability Note="should-exist-for-all-appxmanifest-target-files" /> </config-file> - <config-file target="package.appxmanifest" parent="/Parent/Capabilities" versions="<=8.0.0"> - <Capability Note="should-exist-for-win8-only" /> - </config-file> <config-file target="package.appxmanifest" parent="/Parent/Capabilities" versions="=8.1.0"> <Capability Note="should-exist-for-win81-win-and-phone" /> </config-file> - <config-file target="package.appxmanifest" parent="/Parent/Capabilities" versions="<=8.1.0" device-target="windows"> - <Capability Note="should-exist-for-win8-and-win81-win-only" /> + <config-file target="package.appxmanifest" parent="/Parent/Capabilities" versions="=8.1.0" device-target="windows"> + <Capability Note="should-exist-for-win81-win-only" /> </config-file> - <config-file target="package.appxmanifest" parent="/Parent/Capabilities" versions="<=8.1.0" device-target="phone"> + <config-file target="package.appxmanifest" parent="/Parent/Capabilities" versions="=8.1.0" device-target="phone"> <Capability Note="should-exist-for-win81-phone-only" /> </config-file> - <config-file target="package.appxmanifest" parent="/Parent/Capabilities" versions="<=8.1.0" device-target="all"> - <Capability Note="should-exist-for-win8-and-win81-both" /> + <config-file target="package.appxmanifest" parent="/Parent/Capabilities" versions="=8.1.0" device-target="all"> + <Capability Note="should-exist-for-win81-win-and-phone" /> + </config-file> + <config-file target="package.appxmanifest" parent="/Parent/Capabilities" versions="<=10.0.0" device-target="all"> + <Capability Note="should-exist-for-win10-and-win81-win-and-phone" /> </config-file> <config-file target="package.appxmanifest" parent="/Parent/Capabilities" versions=">=10.0.0"> <Capability Note="should-exist-in-win10-only" /> http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/a3285602/cordova-common/spec/fixtures/projects/windows/CordovaApp_TemporaryKey.pfx ---------------------------------------------------------------------- diff --git a/cordova-common/spec/fixtures/projects/windows/CordovaApp_TemporaryKey.pfx b/cordova-common/spec/fixtures/projects/windows/CordovaApp_TemporaryKey.pfx new file mode 100644 index 0000000..4df1e37 Binary files /dev/null and b/cordova-common/spec/fixtures/projects/windows/CordovaApp_TemporaryKey.pfx differ http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/a3285602/cordova-common/spec/fixtures/projects/windows/TestApp.jsproj ---------------------------------------------------------------------- diff --git a/cordova-common/spec/fixtures/projects/windows/TestApp.jsproj b/cordova-common/spec/fixtures/projects/windows/TestApp.jsproj new file mode 100644 index 0000000..ff6cf68 --- /dev/null +++ b/cordova-common/spec/fixtures/projects/windows/TestApp.jsproj @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|AnyCPU"> + <Configuration>Debug</Configuration> + <Platform>AnyCPU</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|ARM"> + <Configuration>Debug</Configuration> + <Platform>ARM</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x86"> + <Configuration>Debug</Configuration> + <Platform>x86</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|AnyCPU"> + <Configuration>Release</Configuration> + <Platform>AnyCPU</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|ARM"> + <Configuration>Release</Configuration> + <Platform>ARM</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x86"> + <Configuration>Release</Configuration> + <Platform>x86</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>efffab2f-bfc5-4eda-b545-45ef4995f55a</ProjectGuid> + </PropertyGroup> + <PropertyGroup Condition="'$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '11.0'"> + <VisualStudioVersion>11.0</VisualStudioVersion> + </PropertyGroup> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).Default.props" /> + <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).props" /> + <PropertyGroup> + <TargetPlatformIdentifier>Windows</TargetPlatformIdentifier> + <TargetPlatformVersion>8.0</TargetPlatformVersion> + <DefaultLanguage>en-US</DefaultLanguage> + <PackageCertificateKeyFile>CordovaApp_TemporaryKey.pfx</PackageCertificateKeyFile> + </PropertyGroup> + <ItemGroup> + <AppxManifest Include="package.appxmanifest"> + <SubType>Designer</SubType> + </AppxManifest> + <Content Include="www\cordova-2.6.0.js" /> + <Content Include="www\css\index.css" /> + <Content Include="www\img\logo.png" /> + <Content Include="www\img\smalllogo.png" /> + <Content Include="www\img\splashscreen.png" /> + <Content Include="www\img\storelogo.png" /> + <Content Include="www\index.html" /> + <Content Include="www\js\index.js" /> + <None Include="CordovaApp_TemporaryKey.pfx" /> + </ItemGroup> + <ItemGroup> + <SDKReference Include="Microsoft.WinJS.1.0, Version=1.0" /> + </ItemGroup> + <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).targets" /> + <!-- To modify your build process, add your task inside one of the targets below then uncomment + that target and the DisableFastUpToDateCheck PropertyGroup. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + <PropertyGroup> + <DisableFastUpToDateCheck>true</DisableFastUpToDateCheck> + </PropertyGroup> + --> +</Project> http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/a3285602/cordova-common/spec/fixtures/projects/windows/TestApp.projitems ---------------------------------------------------------------------- diff --git a/cordova-common/spec/fixtures/projects/windows/TestApp.projitems b/cordova-common/spec/fixtures/projects/windows/TestApp.projitems new file mode 100644 index 0000000..c408373 --- /dev/null +++ b/cordova-common/spec/fixtures/projects/windows/TestApp.projitems @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects> + <HasSharedItems>true</HasSharedItems> + <SharedGUID>9ebdb27f-d75b-4d8c-b53f-7be4a1fe89f9</SharedGUID> + </PropertyGroup> + <ItemGroup> + <Content Include="$(MSBuildThisFileDirectory)www\**" /> + </ItemGroup> + <ItemGroup> + <Content Include="$(MSBuildThisFileDirectory)config.xml" /> + </ItemGroup> + <Import Project="CordovaAppDebug.projitems" Condition="Exists('$(MSBuildThisFileDirectory)CordovaAppDebug.projitems') And '$(Configuration)'=='Debug'" /> + <Import Project="CordovaAppRelease.projitems" Condition="Exists('$(MSBuildThisFileDirectory)CordovaAppRelease.projitems') And '$(Configuration)'!='Debug'" /> +</Project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/a3285602/cordova-common/spec/fixtures/projects/windows/TestApp.sln ---------------------------------------------------------------------- diff --git a/cordova-common/spec/fixtures/projects/windows/TestApp.sln b/cordova-common/spec/fixtures/projects/windows/TestApp.sln new file mode 100644 index 0000000..6c1ea33 --- /dev/null +++ b/cordova-common/spec/fixtures/projects/windows/TestApp.sln @@ -0,0 +1,46 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{262852C6-CD72-467D-83FE-5EEB1973A190}") = "TestApp", "TestApp.jsproj", "{EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|ARM = Debug|ARM + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|ARM = Release|ARM + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|ARM.ActiveCfg = Debug|ARM + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|ARM.Build.0 = Debug|ARM + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|ARM.Deploy.0 = Debug|ARM + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x64.ActiveCfg = Debug|x64 + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x64.Build.0 = Debug|x64 + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x64.Deploy.0 = Debug|x64 + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x86.ActiveCfg = Debug|x86 + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x86.Build.0 = Debug|x86 + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Debug|x86.Deploy.0 = Debug|x86 + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|Any CPU.Build.0 = Release|Any CPU + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|Any CPU.Deploy.0 = Release|Any CPU + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|ARM.ActiveCfg = Release|ARM + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|ARM.Build.0 = Release|ARM + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|ARM.Deploy.0 = Release|ARM + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x64.ActiveCfg = Release|x64 + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x64.Build.0 = Release|x64 + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x64.Deploy.0 = Release|x64 + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x86.ActiveCfg = Release|x86 + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x86.Build.0 = Release|x86 + {EFFFAB2F-BFC5-4EDA-B545-45EF4995F55A}.Release|x86.Deploy.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
