-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix headless screens being null * Remove unused properties
- Loading branch information
Showing
9 changed files
with
40 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using System; | ||
using System.Reactive.Disposables; | ||
using System.Threading; | ||
using Avalonia.Controls; | ||
using Avalonia.Input; | ||
using Avalonia.Layout; | ||
using Avalonia.Threading; | ||
|
||
namespace Avalonia.Headless.UnitTests; | ||
|
||
public class ServicesTests | ||
{ | ||
#if NUNIT | ||
[AvaloniaTest, Timeout(10000)] | ||
#elif XUNIT | ||
[AvaloniaFact(Timeout = 10000)] | ||
#endif | ||
public void Can_Access_Screens() | ||
{ | ||
var window = new Window(); | ||
var screens = window.Screens; | ||
Assert.NotNull(screens); | ||
|
||
var currentScreenFromWindow = screens.ScreenFromWindow(window); | ||
var currentScreenFromVisual = screens.ScreenFromVisual(window); | ||
|
||
Assert.True(ReferenceEquals(currentScreenFromWindow, currentScreenFromVisual)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters