Skip to content

Commit e873f8f

Browse files
campersauamaitland
authored andcommitted
Test - Add CefSharp.RenderProcessId javascript binding test
Issue #2984
1 parent 8ad0c76 commit e873f8f

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

CefSharp.Test/JavascriptBinding/IntegrationTestFacts.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
//
33
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
44

5+
using System.Diagnostics;
56
using System.Threading.Tasks;
67
using CefSharp.Example;
78
using CefSharp.Example.JavascriptBinding;
@@ -136,5 +137,25 @@ public async Task JsBindingGlobalObjectNameCustomValueExecuteIsObjectCachedSucce
136137
Assert.True(result.Success);
137138
}
138139
}
140+
141+
[Theory]
142+
[InlineData("CefSharp.RenderProcessId")]
143+
[InlineData("cefSharp.renderProcessId")]
144+
public async Task JsBindingRenderProcessId(string script)
145+
{
146+
using (var browser = new ChromiumWebBrowser(CefExample.BindingApiCustomObjectNameTestUrl))
147+
{
148+
await browser.LoadPageAsync();
149+
150+
var result = await browser.EvaluateScriptAsync(script);
151+
152+
Assert.True(result.Success);
153+
154+
using (var process = Process.GetProcessById(Assert.IsType<int>(result.Result)))
155+
{
156+
Assert.Equal("CefSharp.BrowserSubprocess", process.ProcessName);
157+
}
158+
}
159+
}
139160
}
140161
}

0 commit comments

Comments
 (0)