Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ public bool IsMappedPath (string virtualPath)
if (!checkPath.StartsWith(_resourceRoot, StringComparison.OrdinalIgnoreCase))
return false;

return GetResourcePathMapping(checkPath) != null;
var result = GetResourcePathMapping(checkPath) != null;
return result;
}

public override bool FileExists (string virtualPath)
Expand Down Expand Up @@ -201,7 +202,7 @@ private ResourceVirtualFile GetResourceVirtualFile (string virtualPath)
if (mapping != null)
{
var resourceRootPath = CombineVirtualPath(_resourceRoot, mapping.VirtualPath);
var directoryRelativePath = MakeRelativeVirtualPath(resourceRootPath, appRelativeVirtualPath).Replace('/', '\\');
var directoryRelativePath = MakeRelativeVirtualPath(resourceRootPath, appRelativeVirtualPath).Replace('/', Path.DirectorySeparatorChar);
var directory = Path.GetFullPath(Path.Combine(GetProjectRoot(), mapping.RelativeFileSystemPath));
var filePath = Path.Combine(directory, directoryRelativePath);

Expand Down Expand Up @@ -232,7 +233,7 @@ private ResourceVirtualDirectory GetResourceVirtualDirectory (string virtualDir)
{
displayName = mapping.VirtualPath.TrimEnd('/');
var resourceRootPath = CombineVirtualPath(_resourceRoot, mapping.VirtualPath);
var directoryRelativePath = MakeRelativeVirtualPath(resourceRootPath, appRelativeVirtualPath).Replace('/', '\\');
var directoryRelativePath = MakeRelativeVirtualPath(resourceRootPath, appRelativeVirtualPath).Replace('/', Path.DirectorySeparatorChar);
var mappedRootDirectory = Path.GetFullPath(Path.Combine(GetProjectRoot(), mapping.RelativeFileSystemPath));
var absolutePath = Path.Combine(mappedRootDirectory, directoryRelativePath);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,8 @@
<ProjectReference Include="..\Web.Compatibility\ObjectBinding.Web.Compatibility.csproj" />
<ProjectReference Include="..\Web\ObjectBinding.Web.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="CoreForms.Web" />
</ItemGroup>
<Import Project="..\..\..\Build\Shared.build.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@
asyncJavaScriptTimeout="00:00:10"
headless="true"
webApplicationRoot="http://localhost:60402/"
screenshotDirectory=".\WebTestingOutput"
logsDirectory=".\WebTestingOutput"
screenshotDirectory="./WebTestingOutput"
logsDirectory="./WebTestingOutput"
closeBrowserWindowsOnSetUpAndTearDown="false"
cleanUpUnmatchedDownloadedFiles="false"
requestErrorDetectionStrategy="AspNet">
<hosting name="AspNetCore" type="AspNetCore" port="60402" hostname="localhost" useHttps="false"/>
<testSiteLayout rootPath=".\..\..\..\..\Web.Development.WebTesting.TestSite" processPath="bin\Remotion.ObjectBinding.Web.Development.WebTesting.TestSite.exe">
<testSiteLayout rootPath="./../../../../Web.Development.WebTesting.TestSite" processPath="dotnet" processArguments="exec bin/Remotion.ObjectBinding.Web.Development.WebTesting.TestSite.dll">
<resources>
<add path="..\..\ObjectBinding\Sample\res" />
<add path="..\..\ObjectBinding\Web\res" />
<add path="..\..\ObjectBinding\Web.ClientScript\bin" />
<add path="..\..\ObjectBinding\Web.Development.WebTesting.TestSite.Shared" />
<add path="..\..\Web\Core\res" />
<add path="..\..\Web\ClientScript\bin" />
<add path="../../ObjectBinding/Sample/res" />
<add path="../../ObjectBinding/Web/Res" />
<add path="../../ObjectBinding/Web.ClientScript/bin" />
<add path="../../ObjectBinding/Web.Development.WebTesting.TestSite.Shared" />
<add path="../../Web/Core/Res" />
<add path="../../Web/ClientScript/bin" />
</resources>
</testSiteLayout>
<chrome disableSecurityWarningsBehavior="Ignore" />
Expand All @@ -50,7 +50,7 @@
</layout>
</appender>
<appender name="FileAppender" type="log4net.Appender.FileAppender">
<file value=".\WebTestingOutput\ObjectBinding.WebTestingFramework.log" />
<file value="./WebTestingOutput/ObjectBinding.WebTestingFramework.log" />
<appendToFile value="true" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ protected override void OnLoad (EventArgs e)

private void LoadUserControl ()
{
var control = LoadControl(CurrentFunction.UserControl);
var control = LoadControl(CurrentFunction.UserControl);
_dataEditControl = (IDataEditControl)control;
_dataEditControl.ID = "DataEditControl";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,43 @@
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>

<appSettings>
<add key="ValidationSettings:UnobtrusiveValidationMode" value="None" />
</appSettings>
<appSettings>
<add key="ValidationSettings:UnobtrusiveValidationMode" value="None" />
</appSettings>

<system.web>
<globalization culture="de-AT" uiCulture="en-US" />
<compilation debug="true">
<assemblies>
<add assembly="System.Drawing.Primitives" />
<add assembly="System.ComponentModel.Primitives" />
</assemblies>
</compilation>
<httpModules>
<add name="Session" type="System.Web.SessionState.SessionStateModule" />
</httpModules>
<httpRuntime requestValidationMode="2.0" />
<pages validateRequest="false">
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="CoreForms.Web.Extensions" />
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="CoreForms.Web.Extensions" />
<add tagPrefix="asp" namespace="System.Web.UI.WebControls.Expressions"
assembly="CoreForms.Web.Extensions" />
<add tagPrefix="remotion" namespace="Remotion.Web.UI.Controls" assembly="Remotion.Web" />
<add tagPrefix="remotion" namespace="Remotion.ObjectBinding.Web.UI.Controls"
assembly="Remotion.ObjectBinding.Web" />
<add tagPrefix="testsite"
namespace="Remotion.ObjectBinding.Web.Development.WebTesting.TestSite.Shared.Controls"
assembly="Remotion.ObjectBinding.Web.Development.WebTesting.TestSite.Shared" />
</controls>
</pages>
<httpHandlers>
<add verb="*" path="*.wxe" type="Remotion.Web.ExecutionEngine.WxeHandler, Remotion.Web" />
</httpHandlers>
</system.web>

<system.web>
<globalization culture="de-AT" uiCulture="en-US"/>
<compilation debug="true">
<assemblies>
<add assembly="System.Drawing.Primitives"/>
</assemblies>
</compilation>
<httpModules>
<add name="Session" type="System.Web.SessionState.SessionStateModule"/>
</httpModules>
<httpRuntime requestValidationMode="2.0" />
<pages validateRequest="false">
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="CoreForms.Web.Extensions"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="CoreForms.Web.Extensions"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls.Expressions" assembly="CoreForms.Web.Extensions"/>
<add tagPrefix="remotion" namespace="Remotion.Web.UI.Controls" assembly="Remotion.Web" />
<add tagPrefix="remotion" namespace="Remotion.ObjectBinding.Web.UI.Controls" assembly="Remotion.ObjectBinding.Web" />
<add tagPrefix="testsite" namespace="Remotion.ObjectBinding.Web.Development.WebTesting.TestSite.Shared.Controls"
assembly="Remotion.ObjectBinding.Web.Development.WebTesting.TestSite.Shared" />
</controls>
</pages>
<httpHandlers>
<add verb="*" path="*.wxe" type="Remotion.Web.ExecutionEngine.WxeHandler, Remotion.Web" />
</httpHandlers>
</system.web>

</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@
"ObjectBinding.Web.Development.WebTesting.TestSite": {
"commandName": "Project",
"dotnetRunMessages": "true",
"launchBrowser": true,
"launchBrowser": false,
"launchUrl": "index.html",
"applicationUrl": "https://localhost:50543;http://localhost:50500",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
"ASPNETCORE_ENVIRONMENT": "Development",
"DOTNET_ROOT": "/usr/share/dotnet"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,14 @@ private static void RegisterResourceVirtualPathProvider ()
s_resourceVirtualPathProvider = new ResourceVirtualPathProvider(
new[]
{
new ResourcePathMapping("Remotion.ObjectBinding.Sample/Image", @$"..\..\ObjectBinding\Sample\res\Image"),
new ResourcePathMapping("Remotion.ObjectBinding.Web/Html", @$"..\..\ObjectBinding\Web.ClientScript\bin\{configuration}\dist"),
new ResourcePathMapping("Remotion.ObjectBinding.Web/Themes", @"..\..\ObjectBinding\Web\res\Themes"),
new ResourcePathMapping("Remotion.ObjectBinding.Web.Development.WebTesting.TestSite.Shared", @"..\..\ObjectBinding\Web.Development.WebTesting.TestSite.Shared"),
new ResourcePathMapping("Remotion.Web/Html", @$"..\..\Web\ClientScript\bin\{configuration}\dist"),
new ResourcePathMapping("Remotion.Web/Image", @"..\..\Web\Core\res\Image"),
new ResourcePathMapping("Remotion.Web/Themes", @"..\..\Web\Core\res\Themes"),
new ResourcePathMapping("Remotion.Web/UI", @"..\..\Web\Core\res\UI"),
new ResourcePathMapping("Remotion.ObjectBinding.Sample/Image", @$"../../ObjectBinding/Sample/res/Image"),
new ResourcePathMapping("Remotion.ObjectBinding.Web/Html", @$"../../ObjectBinding/Web.ClientScript/bin/{configuration}/dist"),
new ResourcePathMapping("Remotion.ObjectBinding.Web/Themes", @"../../ObjectBinding/Web/Res/Themes"),
new ResourcePathMapping("Remotion.ObjectBinding.Web.Development.WebTesting.TestSite.Shared", @"../../ObjectBinding/Web.Development.WebTesting.TestSite.Shared"),
new ResourcePathMapping("Remotion.Web/Html", @$"../../Web/ClientScript/bin/{configuration}/dist"),
new ResourcePathMapping("Remotion.Web/Image", @"../../Web/Core/Res/Image"),
new ResourcePathMapping("Remotion.Web/Themes", @"../../Web/Core/Res/Themes"),
new ResourcePathMapping("Remotion.Web/UI", @"../../Web/Core/Res/UI"),
},
FileExtensionHandlerMapping.Default);
s_resourceVirtualPathProvider.Register();
Expand Down
20 changes: 10 additions & 10 deletions Remotion/ObjectBinding/Web.IntegrationTests/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@
asyncJavaScriptTimeout="00:00:10"
headless="true"
webApplicationRoot="http://localhost:60402/"
screenshotDirectory=".\WebTestingOutput"
logsDirectory=".\WebTestingOutput"
screenshotDirectory="./WebTestingOutput"
logsDirectory="./WebTestingOutput"
closeBrowserWindowsOnSetUpAndTearDown="false"
cleanUpUnmatchedDownloadedFiles="false"
requestErrorDetectionStrategy="AspNet">
<hosting name="AspNetCore" type="AspNetCore" port="60402" hostname="localhost" useHttps="false"/>
<testSiteLayout rootPath=".\..\..\..\..\Web.Development.WebTesting.TestSite" processPath="bin\Remotion.ObjectBinding.Web.Development.WebTesting.TestSite.exe">
<testSiteLayout rootPath="./../../../../Web.Development.WebTesting.TestSite" processPath="dotnet" processArguments="exec bin/Remotion.ObjectBinding.Web.Development.WebTesting.TestSite.dll">
<resources>
<add path="..\..\ObjectBinding\Sample\res" />
<add path="..\..\ObjectBinding\Web\res" />
<add path="..\..\ObjectBinding\Web.ClientScript\bin" />
<add path="..\..\ObjectBinding\Web.Development.WebTesting.TestSite.Shared" />
<add path="..\..\Web\Core\res" />
<add path="..\..\Web\ClientScript\bin" />
<add path="../../ObjectBinding/Sample/res" />
<add path="../../ObjectBinding/Web/Res" />
<add path="../../ObjectBinding/Web.ClientScript/bin" />
<add path="../../ObjectBinding/Web.Development.WebTesting.TestSite.Shared" />
<add path="../../Web/Core/Res" />
<add path="../../Web/ClientScript/bin" />
</resources>
</testSiteLayout>
<remoteDriver enabled="false" url="http://localhost:4444" />
Expand All @@ -45,7 +45,7 @@
</layout>
</appender>
<appender name="FileAppender" type="log4net.Appender.FileAppender">
<file value=".\WebTestingOutput\ObjectBinding.WebTestingFramework.log" />
<file value="./WebTestingOutput/ObjectBinding.WebTestingFramework.log" />
<appendToFile value="true" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
Expand Down
1 change: 1 addition & 0 deletions Remotion/Web/Core/Web.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<ItemGroup>
<PackageReference Include="Remotion.ThirdPartyDependency.RobotoFonts" />
<PackageReference Include="Remotion.ThirdPartyDependency.System.Web" />
<PackageReference Include="System.CodeDom" />
</ItemGroup>
<Target Name="EnsureClientScriptResourcesAreIncluded" BeforeTargets="Pack">
<Error Text="Client script resources were not found." Condition="'@(_clientScriptResources)' == ''"/>
Expand Down
14 changes: 7 additions & 7 deletions Remotion/Web/Development.WebTesting.IntegrationTests/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@
asyncJavaScriptTimeout="00:00:10"
headless="true"
webApplicationRoot="http://localhost:60401/"
screenshotDirectory=".\WebTestingOutput"
logsDirectory=".\WebTestingOutput"
screenshotDirectory="./WebTestingOutput"
logsDirectory="./WebTestingOutput"
closeBrowserWindowsOnSetUpAndTearDown="false"
cleanUpUnmatchedDownloadedFiles="false"
requestErrorDetectionStrategy="Remotion.Web.Development.WebTesting.IntegrationTests.DiagnosticInformationCollectingRequestErrorDetectionStrategy, Remotion.Web.Development.WebTesting.IntegrationTests">
<hosting name="AspNetCore" type="AspNetCore" port="60401" hostname="localhost" useHttps="false"/>
<testSiteLayout rootPath=".\..\..\..\..\Development.WebTesting.TestSite" processPath="bin\Remotion.Web.Development.WebTesting.TestSite.exe">
<testSiteLayout rootPath="./../../../../Development.WebTesting.TestSite" processPath="dotnet" processArguments="exec bin/Remotion.Web.Development.WebTesting.TestSite.dll">
<resources>
<add path="..\..\Web\Core\res" />
<add path="..\..\Web\ClientScript\bin" />
<add path="..\..\Web\Development.WebTesting.TestSite.Shared" />
<add path="../../Web/Core/Res" />
<add path="../../Web/ClientScript/bin" />
<add path="../../Web/Development.WebTesting.TestSite.Shared" />
</resources>
</testSiteLayout>
<chrome disableSecurityWarningsBehavior="Automatic" />
Expand All @@ -47,7 +47,7 @@
</layout>
</appender>
<appender name="FileAppender" type="log4net.Appender.FileAppender">
<file value=".\WebTestingOutput\Web.Development.WebTesting.IntegrationTests.log" />
<file value="./WebTestingOutput/Web.Development.WebTesting.IntegrationTests.log" />
<appendToFile value="true" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
Expand Down
1 change: 0 additions & 1 deletion Remotion/Web/Development.WebTesting.TestSite/Global.asax

This file was deleted.

1 change: 1 addition & 0 deletions Remotion/Web/Development.WebTesting.TestSite/global.asax
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<%@ Application Codebehind="global.asax.cs" Inherits="Remotion.Web.Development.WebTesting.TestSite.Global" Language="C#" %>
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ private static void RegisterResourceVirtualPathProvider ()
_resourceVirtualPathProvider = new ResourceVirtualPathProvider(
new[]
{
new ResourcePathMapping("Remotion.Web/Html", @$"..\..\Web\ClientScript\bin\{configuration}\dist"),
new ResourcePathMapping("Remotion.Web/Image", @"..\..\Web\Core\res\Image"),
new ResourcePathMapping("Remotion.Web/Themes", @"..\..\Web\Core\res\Themes"),
new ResourcePathMapping("Remotion.Web/UI", @"..\..\Web\Core\res\UI"),
new ResourcePathMapping("Remotion.Web.Development.WebTesting.TestSite.Shared", @"..\..\Web\Development.WebTesting.TestSite.Shared")
new ResourcePathMapping("Remotion.Web/Html", @$"../../Web/ClientScript/bin/{configuration}/dist"),
new ResourcePathMapping("Remotion.Web/Image", @"../../Web/Core/Res/Image"),
new ResourcePathMapping("Remotion.Web/Themes", @"../../Web/Core/Res/Themes"),
new ResourcePathMapping("Remotion.Web/UI", @"../../Web/Core/Res/UI"),
new ResourcePathMapping("Remotion.Web.Development.WebTesting.TestSite.Shared", @"../../Web/Development.WebTesting.TestSite.Shared")
},
fileExtensionHandlerMapping.ToArray());
_resourceVirtualPathProvider.Register();
Expand Down
2 changes: 2 additions & 0 deletions Remotion/Web/Development.WebTesting/Utilities/ProcessUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ private static extern int NtQueryInformationProcess (
public static int GetParentProcessID ([NotNull] Process target)
{
ArgumentNullException.ThrowIfNull(target);
if (!OperatingSystem.IsWindows())
return -1;

// Query the process information
var info = new ParentInfo();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<PackageReference Include="Microsoft.Extensions.Options.DataAnnotations" />
<PackageReference Include="Microsoft.Maui.Graphics.Skia" />
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" />
<PackageReference Include="System.Configuration.ConfigurationManager" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\..\SharedSource\Core\Utilities\ArgumentUtility.cs" Link="SharedSource\Utilities\ArgumentUtility.cs" />
Expand Down
14 changes: 7 additions & 7 deletions Remotion/Web/IntegrationTests/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@
asyncJavaScriptTimeout="00:00:10"
headless="true"
webApplicationRoot="http://localhost:60401/"
screenshotDirectory=".\WebTestingOutput"
logsDirectory=".\WebTestingOutput"
screenshotDirectory="./WebTestingOutput"
logsDirectory="./WebTestingOutput"
closeBrowserWindowsOnSetUpAndTearDown="false"
cleanUpUnmatchedDownloadedFiles="false"
requestErrorDetectionStrategy="Remotion.Web.Development.WebTesting.IntegrationTests.DiagnosticInformationCollectingRequestErrorDetectionStrategy, Remotion.Web.Development.WebTesting.IntegrationTests">
<hosting name="AspNetCore" type="AspNetCore" port="60401" hostname="localhost" useHttps="false"/>
<testSiteLayout rootPath=".\..\..\..\..\Development.WebTesting.TestSite" processPath="bin\Remotion.Web.Development.WebTesting.TestSite.exe">
<testSiteLayout rootPath="./../../../../Development.WebTesting.TestSite" processPath="dotnet" processArguments="bin/Remotion.Web.Development.WebTesting.TestSite.dll">
<resources>
<add path="..\..\Web\Core\res" />
<add path="..\..\Web\ClientScript\bin" />
<add path="..\..\Web\Development.WebTesting.TestSite.Shared" />
<add path="../../Web/Core/Res" />
<add path="../../Web/ClientScript/bin" />
<add path="../../Web/Development.WebTesting.TestSite.Shared" />
</resources>
</testSiteLayout>
<remoteDriver enabled="false" url="http://localhost:4444" />
Expand All @@ -44,7 +44,7 @@
</layout>
</appender>
<appender name="FileAppender" type="log4net.Appender.FileAppender">
<file value=".\WebTestingOutput\Web.IntegrationTests.log" />
<file value="./WebTestingOutput/Web.IntegrationTests.log" />
<appendToFile value="true" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
Expand Down