Skip to content

Commit 138cbca

Browse files
committed
Javascript Binding - Fix failing .Net Core Test case
- Add condition to calling Register() - Add license disclaimer Follow up to #3467
1 parent 893d032 commit 138cbca

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

CefSharp.Test/JavascriptBinding/JavaScriptObjectRepositoryFacts.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Copyright © 2021 The CefSharp Authors. All rights reserved.
2+
//
3+
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
4+
15
using CefSharp.Internals;
26
using Xunit;
37

@@ -27,7 +31,11 @@ public void CanRegisterJavascriptObjectBindWhenNamespaceIsNull()
2731
{
2832
var javascriptObjectRepository = new JavascriptObjectRepository();
2933
var name = nameof(NoNamespaceClass);
30-
javascriptObjectRepository.Register(name, new NoNamespaceClass(), false, new BindingOptions() { });
34+
#if NETCOREAPP
35+
javascriptObjectRepository.Register(name, new NoNamespaceClass(), new BindingOptions());
36+
#else
37+
javascriptObjectRepository.Register(name, new NoNamespaceClass(), false, new BindingOptions());
38+
#endif
3139
Assert.True(javascriptObjectRepository.IsBound(name));
3240

3341
var result = ((IJavascriptObjectRepositoryInternal)javascriptObjectRepository).TryCallMethod(1, "getExampleString", new object[0]);

0 commit comments

Comments
 (0)