Skip to content

Commit 22fcd87

Browse files
committed
In JavaScriptEngineSwitcher.Msie added support of MSIE JavaScript Engine version 3.0.2
1 parent 14751ea commit 22fcd87

File tree

7 files changed

+54
-28
lines changed

7 files changed

+54
-28
lines changed

src/JavaScriptEngineSwitcher.Msie/JavaScriptEngineSwitcher.Msie.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<Description>JavaScriptEngineSwitcher.Msie contains adapter `MsieJsEngine` (wrapper for the MSIE JavaScript Engine for .Net (http://github.com/Taritsyn/MsieJavaScriptEngine)). For correct working of the MSIE JavaScript Engine it is recommended to install Internet Explorer 9+ or Microsoft Edge on the machine.</Description>
1414
<PackageIconUrl>https://raw.githubusercontent.com/Taritsyn/JavaScriptEngineSwitcher/master/Icons/JavaScriptEngineSwitcher_Msie_Logo128x128.png</PackageIconUrl>
1515
<PackageTags>JavaScriptEngineSwitcher;JavaScript;ECMAScript;MSIE;IE;Chakra</PackageTags>
16-
<PackageReleaseNotes>MSIE JavaScript Engine was updated to version 3.0.1.</PackageReleaseNotes>
16+
<PackageReleaseNotes>MSIE JavaScript Engine was updated to version 3.0.2.</PackageReleaseNotes>
1717
</PropertyGroup>
1818

1919
<Import Project="../../build/common.props" />
@@ -22,7 +22,7 @@
2222
<Import Project="../../build/nuget-metadata.props" />
2323

2424
<ItemGroup>
25-
<PackageReference Include="MsieJavaScriptEngine" Version="3.0.1" />
25+
<PackageReference Include="MsieJavaScriptEngine" Version="3.0.2" />
2626
<PackageReference Include="ResxToCs.MSBuild" Version="1.0.0-alpha6" PrivateAssets="All" />
2727

2828
<ProjectReference Include="../JavaScriptEngineSwitcher.Core/JavaScriptEngineSwitcher.Core.csproj" />

src/JavaScriptEngineSwitcher.Msie/readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
=============
2020
RELEASE NOTES
2121
=============
22-
MSIE JavaScript Engine was updated to version 3.0.1.
22+
MSIE JavaScript Engine was updated to version 3.0.2.
2323

2424
=============
2525
DOCUMENTATION
Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,10 @@
1-
using System;
2-
using Xunit;
3-
4-
namespace JavaScriptEngineSwitcher.Tests.ChakraCore
1+
namespace JavaScriptEngineSwitcher.Tests.ChakraCore
52
{
63
public class InteropTests : InteropTestsBase
74
{
85
protected override string EngineName
96
{
107
get { return "ChakraCoreJsEngine"; }
118
}
12-
13-
[Fact]
14-
public void EmbeddedInstanceOfDelegateHasFunctionPrototype()
15-
{
16-
// Arrange
17-
var someFunc = new Func<int>(() => 42);
18-
19-
const string input = "Object.getPrototypeOf(embeddedFunc) === Function.prototype";
20-
21-
// Act
22-
bool output;
23-
24-
using (var jsEngine = CreateJsEngine())
25-
{
26-
jsEngine.EmbedHostObject("embeddedFunc", someFunc);
27-
output = jsEngine.Evaluate<bool>(input);
28-
}
29-
30-
// Assert
31-
Assert.True(output);
32-
}
339
}
3410
}

test/JavaScriptEngineSwitcher.Tests/InteropTestsBase.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,27 @@ public virtual void EmbeddingOfInstanceOfDelegateWithoutResultIsCorrect()
585585
Assert.Equal(targetLogOutput, logOutput);
586586
}
587587

588+
[Fact]
589+
public virtual void EmbeddedInstanceOfDelegateHasFunctionPrototype()
590+
{
591+
// Arrange
592+
var someFunc = new Func<int>(() => 42);
593+
594+
const string input = "Object.getPrototypeOf(embeddedFunc) === Function.prototype";
595+
596+
// Act
597+
bool output;
598+
599+
using (var jsEngine = CreateJsEngine())
600+
{
601+
jsEngine.EmbedHostObject("embeddedFunc", someFunc);
602+
output = jsEngine.Evaluate<bool>(input);
603+
}
604+
605+
// Assert
606+
Assert.True(output);
607+
}
608+
588609
#endregion
589610

590611
#region Removal

test/JavaScriptEngineSwitcher.Tests/Msie/InteropTests.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,19 @@ protected override string EngineName
66
{
77
get { return "MsieJsEngine"; }
88
}
9+
10+
11+
#region Embedding of objects
12+
13+
#region Delegates
14+
15+
#if !NETCOREAPP
16+
public override void EmbeddedInstanceOfDelegateHasFunctionPrototype()
17+
{ }
18+
#endif
19+
20+
#endregion
21+
22+
#endregion
923
}
1024
}

test/JavaScriptEngineSwitcher.Tests/V8/InteropTests.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@ protected override string EngineName
77
{
88
get { return "V8JsEngine"; }
99
}
10+
11+
12+
#region Embedding of objects
13+
14+
#region Delegates
15+
16+
public override void EmbeddedInstanceOfDelegateHasFunctionPrototype()
17+
{ }
18+
19+
#endregion
20+
21+
#endregion
1022
}
1123
}
1224
#endif

test/JavaScriptEngineSwitcher.Tests/Vroom/InteropTests.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ public override void EmbeddingOfInstanceOfDelegateWithTwoParametersIsCorrect()
4141
public override void EmbeddingOfInstanceOfDelegateWithoutResultIsCorrect()
4242
{ }
4343

44+
public override void EmbeddedInstanceOfDelegateHasFunctionPrototype()
45+
{ }
46+
4447
#endregion
4548

4649
#endregion

0 commit comments

Comments
 (0)