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:
Steve Sanderson 2018-04-11 14:00:03 +01:00 committed by GitHub
parent 3d787d7988
commit 2478c164b5
4 changed files with 29 additions and 7 deletions

View File

@ -55,6 +55,14 @@
</form> </form>
</fieldset> </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> <p id="loadingIndicator">Loading...</p>
<script type="blazor-boot"></script> <script type="blazor-boot"></script>
@ -111,6 +119,12 @@
el('callJsNoBoxingResult').value = result; 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) { function el(id) {
return document.getElementById(id); return document.getElementById(id);
} }

View File

@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System; using System;
using System.Runtime.InteropServices;
using System.Text; using System.Text;
using WebAssembly; using WebAssembly;
@ -53,5 +54,10 @@ namespace MonoSanityClient
return $".NET received: {result}"; return $".NET received: {result}";
} }
public static string GetRuntimeInformation()
=> $"OSDescription: '{RuntimeInformation.OSDescription}';"
+ $" OSArchitecture: '{RuntimeInformation.OSArchitecture}';"
+ $" IsOSPlatform(WEBASSEMBLY): '{RuntimeInformation.IsOSPlatform(OSPlatform.Create("WEBASSEMBLY"))}'";
} }
} }

View File

@ -66,25 +66,18 @@ namespace Microsoft.AspNetCore.Blazor.Build.Test
"System.ComponentModel.Composition.dll", "System.ComponentModel.Composition.dll",
"System.Core.dll", "System.Core.dll",
"System.Data.dll", "System.Data.dll",
"System.Diagnostics.StackTrace.dll",
"System.dll", "System.dll",
"System.Drawing.dll", "System.Drawing.dll",
"System.Globalization.Extensions.dll",
"System.IO.Compression.dll", "System.IO.Compression.dll",
"System.IO.Compression.FileSystem.dll", "System.IO.Compression.FileSystem.dll",
"System.Net.Http.dll", "System.Net.Http.dll",
"System.Numerics.dll", "System.Numerics.dll",
"System.Runtime.Serialization.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.ServiceModel.Internals.dll",
"System.Transactions.dll", "System.Transactions.dll",
"System.Web.Services.dll", "System.Web.Services.dll",
"System.Xml.dll", "System.Xml.dll",
"System.Xml.Linq.dll", "System.Xml.Linq.dll",
"System.Xml.XPath.XDocument.dll",
}.OrderBy(i => i, StringComparer.Ordinal) }.OrderBy(i => i, StringComparer.Ordinal)
.ToArray(); .ToArray();

View File

@ -126,6 +126,15 @@ namespace Microsoft.AspNetCore.Blazor.E2ETest.Tests
Assert.StartsWith(".NET got exception: Division by zero", GetValue(Browser, "callJsNoBoxingResult")); 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) private static string GetValue(IWebDriver webDriver, string elementId)
{ {
var element = webDriver.FindElement(By.Id(elementId)); var element = webDriver.FindElement(By.Id(elementId));