mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-04 10:22:55 +00:00
Javascript Binding - Fix failing .Net Core Test case
- Add condition to calling Register() - Add license disclaimer Follow up to #3467
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
// Copyright © 2021 The CefSharp Authors. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
using CefSharp.Internals;
|
||||
using Xunit;
|
||||
|
||||
@@ -27,7 +31,11 @@ namespace CefSharp.Test.JavascriptBinding
|
||||
{
|
||||
var javascriptObjectRepository = new JavascriptObjectRepository();
|
||||
var name = nameof(NoNamespaceClass);
|
||||
javascriptObjectRepository.Register(name, new NoNamespaceClass(), false, new BindingOptions() { });
|
||||
#if NETCOREAPP
|
||||
javascriptObjectRepository.Register(name, new NoNamespaceClass(), new BindingOptions());
|
||||
#else
|
||||
javascriptObjectRepository.Register(name, new NoNamespaceClass(), false, new BindingOptions());
|
||||
#endif
|
||||
Assert.True(javascriptObjectRepository.IsBound(name));
|
||||
|
||||
var result = ((IJavascriptObjectRepositoryInternal)javascriptObjectRepository).TryCallMethod(1, "getExampleString", new object[0]);
|
||||
|
||||
Reference in New Issue
Block a user