Update Mono to 078d5147836 (#543)
* Update Mono to 078d5147836 * Update driver.c to match updated Mono version * Rebuild Mono binaries * Update dependency resolution baseline to match updated Mono BCL * Add E2E test for new RuntimeInformation values
This commit is contained in:
parent
3d787d7988
commit
2478c164b5
|
|
@ -55,6 +55,14 @@
|
|||
</form>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>Get runtime OS</legend>
|
||||
<form id="getRuntimeInformation">
|
||||
<button type="submit" disabled>Get</button>
|
||||
<input id="getRuntimeInformationResult" readonly />
|
||||
</form>
|
||||
</fieldset>
|
||||
|
||||
<p id="loadingIndicator">Loading...</p>
|
||||
|
||||
<script type="blazor-boot"></script>
|
||||
|
|
@ -111,6 +119,12 @@
|
|||
el('callJsNoBoxingResult').value = result;
|
||||
};
|
||||
|
||||
el('getRuntimeInformation').onsubmit = function (evt) {
|
||||
evt.preventDefault();
|
||||
var result = invokeMonoMethod('MonoSanityClient', 'MonoSanityClient', 'Examples', 'GetRuntimeInformation', []);
|
||||
el('getRuntimeInformationResult').value = result;
|
||||
};
|
||||
|
||||
function el(id) {
|
||||
return document.getElementById(id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using WebAssembly;
|
||||
|
||||
|
|
@ -53,5 +54,10 @@ namespace MonoSanityClient
|
|||
|
||||
return $".NET received: {result}";
|
||||
}
|
||||
|
||||
public static string GetRuntimeInformation()
|
||||
=> $"OSDescription: '{RuntimeInformation.OSDescription}';"
|
||||
+ $" OSArchitecture: '{RuntimeInformation.OSArchitecture}';"
|
||||
+ $" IsOSPlatform(WEBASSEMBLY): '{RuntimeInformation.IsOSPlatform(OSPlatform.Create("WEBASSEMBLY"))}'";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,25 +66,18 @@ namespace Microsoft.AspNetCore.Blazor.Build.Test
|
|||
"System.ComponentModel.Composition.dll",
|
||||
"System.Core.dll",
|
||||
"System.Data.dll",
|
||||
"System.Diagnostics.StackTrace.dll",
|
||||
"System.dll",
|
||||
"System.Drawing.dll",
|
||||
"System.Globalization.Extensions.dll",
|
||||
"System.IO.Compression.dll",
|
||||
"System.IO.Compression.FileSystem.dll",
|
||||
"System.Net.Http.dll",
|
||||
"System.Numerics.dll",
|
||||
"System.Runtime.Serialization.dll",
|
||||
"System.Runtime.Serialization.Primitives.dll",
|
||||
"System.Runtime.Serialization.Xml.dll",
|
||||
"System.Security.Cryptography.Algorithms.dll",
|
||||
"System.Security.SecureString.dll",
|
||||
"System.ServiceModel.Internals.dll",
|
||||
"System.Transactions.dll",
|
||||
"System.Web.Services.dll",
|
||||
"System.Xml.dll",
|
||||
"System.Xml.Linq.dll",
|
||||
"System.Xml.XPath.XDocument.dll",
|
||||
}.OrderBy(i => i, StringComparer.Ordinal)
|
||||
.ToArray();
|
||||
|
||||
|
|
|
|||
|
|
@ -126,6 +126,15 @@ namespace Microsoft.AspNetCore.Blazor.E2ETest.Tests
|
|||
Assert.StartsWith(".NET got exception: Division by zero", GetValue(Browser, "callJsNoBoxingResult"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ReturnsExpectedRuntimeInformation()
|
||||
{
|
||||
Browser.FindElement(By.CssSelector("#getRuntimeInformation button")).Click();
|
||||
Assert.Equal(
|
||||
"OSDescription: 'web'; OSArchitecture: 'X86'; IsOSPlatform(WEBASSEMBLY): 'True'",
|
||||
GetValue(Browser, "getRuntimeInformationResult"));
|
||||
}
|
||||
|
||||
private static string GetValue(IWebDriver webDriver, string elementId)
|
||||
{
|
||||
var element = webDriver.FindElement(By.Id(elementId));
|
||||
|
|
|
|||
Loading…
Reference in New Issue