File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
CefSharp.Test/JavascriptBinding Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 2
2
//
3
3
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
4
4
5
+ using System . Diagnostics ;
5
6
using System . Threading . Tasks ;
6
7
using CefSharp . Example ;
7
8
using CefSharp . Example . JavascriptBinding ;
@@ -136,5 +137,25 @@ public async Task JsBindingGlobalObjectNameCustomValueExecuteIsObjectCachedSucce
136
137
Assert . True ( result . Success ) ;
137
138
}
138
139
}
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
+ }
139
160
}
140
161
}
You can’t perform that action at this time.
0 commit comments