Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unittests #366

Merged
merged 7 commits into from
May 30, 2014
Merged

Unittests #366

merged 7 commits into from
May 30, 2014

Conversation

JanEggers
Copy link
Contributor

i ported the unittests to use xunit

in the spirit of tdd they are red now so good luck @jornh to integrate them.

sadly cef tries to start the subprocess from vs testwindow app and not from the path i specified in the browsersettings which is quite confusing.

@JanEggers
Copy link
Contributor Author

@perlun @jornh anyone ideas why appveyor cant download the packages i got them from the visual studio interface as usual and for me they worked

@jornh
Copy link
Contributor

jornh commented May 24, 2014

Nice stuff Jan! Starting with red is a start - even tough I thought it should be red due to missing features - not the test code 😛

No idea on why it can't download! I assumed it would just "automagically work" with auto-discovery of tests without any setup for me to do like it did for NUnit. So I'm surprised to see it go red because it can't fetch a package. I'll try it out locally when I get a moment.

Maybe we have to give it a nudge somehow; See if it fails on an older dependency, explicitly set up a package source etc. If it keeps failing I can try to get in touch with the AppVeyor folks - it might affect others too.

@jornh
Copy link
Contributor

jornh commented May 25, 2014

Moving discussion from https://github.com/JanEggers/CefSharp/issues/1 over here ...

Yes, copying the xUnit runner to the relevant CefSharp.Test/bin/ dir seems to be it. Now it gets past the file io expection and to this, which sounds like #351 could now be blocking #366 progress:

System.ArgumentException: Cannot pass a GCHandle across AppDomains.
Parameter name: handle
   at System.Runtime.InteropServices.GCHandle.InternalCheckDomain(IntPtr handle)

   at System.Runtime.InteropServices.GCHandle.FromIntPtr(IntPtr value)
   at gcroot<CefSharp::ManagedCefBrowserAdapter ^>.->(gcroot<CefSharp::ManagedCe
fBrowserAdapter ^>* )
   at CefSharp.Internals.ClientAdapter.OnAfterCreated(ClientAdapter* , CefRefPtr
<CefBrowser>* browser)
System.InvalidOperationException: The calling thread cannot access this object b
ecause a different thread owns it.
   at System.Windows.Threading.Dispatcher.VerifyAccess()
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object val
ue)
   at CefSharp.Wpf.WebView.Dispose(Boolean isdisposing)
   at CefSharp.Wpf.WebView.Dispose()
   at CefSharp.Cef.Shutdown()
   at CefSharp.Cef.ParentProcessExitHandler(Object sender, EventArgs e)

@amaitland
Copy link
Member

System.InvalidOperationException: The calling thread cannot access this object because a different thread owns it.

@jornh Need to call WebBrowser = null on the UI thread to resolve that problem.

Change required is in the WIP branch I've been working on which can be found here amaitland@298b570
Feel free to cheery pick if you need to merge it sooner rather than later.

@jornh
Copy link
Contributor

jornh commented May 25, 2014

Cool @amaitland! Thanks a bunch for the 🍒 ... Jan actually mentioned something - but I forgot again. Guess, I'm running low on energy. Better go compile some food ... 😄

@amaitland
Copy link
Member

@jornh No probs! I'll catch you on the flip side, it's sleep time for me 😄

@jornh
Copy link
Contributor

jornh commented May 25, 2014

Sleep well! Right past midnight if you are on Sidney time? http://everytimezone.com/

@amaitland
Copy link
Member

@jornh Pretty much spot on, I'm in Brisbane (same time zone as Sydney) 😄

@JanEggers
Copy link
Contributor Author

@jornh @amaitland : is there a chance to merge this even if its useless atm.

i would rather start a new pr for resolving #351 as it will bring some structural changes with it as we have to rely more on delegates for callbacks as it seems.

jornh added a commit that referenced this pull request May 30, 2014
Unittests converted to xUnit
@jornh jornh merged commit 4d505a8 into cefsharp:master May 30, 2014
@jornh
Copy link
Contributor

jornh commented May 30, 2014

Good point! No reason not to merge it now. It's still a step in the right direction. As long as auto discover of xUnit tests are disabled on appveyor it's not doing any harm. Merging it now.

@jornh jornh added this to the 33.0.0 milestone May 30, 2014
@JanEggers JanEggers deleted the Unittests branch May 30, 2014 16:54
@amaitland
Copy link
Member

Nice to see the PR queue getting smaller, fantastic work guys! 😄

@jornh jornh modified the milestones: 3000, 37.0.0 Oct 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants