From 2287e5527bbc0547c394fdc2314d8abef093b590 Mon Sep 17 00:00:00 2001 From: Garry Newman Date: Mon, 2 Mar 2020 09:30:10 +0000 Subject: [PATCH] Added Friends.OpenWebOverlay test --- Facepunch.Steamworks.Test/FriendsTest.cs | 45 ++++++------------------ 1 file changed, 11 insertions(+), 34 deletions(-) diff --git a/Facepunch.Steamworks.Test/FriendsTest.cs b/Facepunch.Steamworks.Test/FriendsTest.cs index fb13d85..b279d3e 100644 --- a/Facepunch.Steamworks.Test/FriendsTest.cs +++ b/Facepunch.Steamworks.Test/FriendsTest.cs @@ -113,43 +113,20 @@ public async Task GetFriendsAvatars() } } - /* - [TestMethod] - public void FriendListWithoutRefresh() - { - using ( var client = new Facepunch.Steamworks.Client( 252490 ) ) - { - Assert.IsTrue( client.IsValid ); + [TestMethod] + public async Task OpenWebOverlay() + { + if ( SteamUtils.IsOverlayEnabled ) + Console.WriteLine( "Overlay Is Enabled" ); + else + Console.WriteLine( "Overlay Is Not Enabled" ); - foreach ( var friend in client.Friends.All ) - { - Console.WriteLine( "{0}: {1} (Friend:{2}) (Blocked:{3})", friend.Id, friend.Name, friend.IsFriend, friend.IsBlocked ); - } - } - } + SteamFriends.OpenWebOverlay( "https://www/google.com/" ); + + await Task.Delay( 2000 ); + } - - [TestMethod] - public void CachedAvatar() - { - using (var client = new Facepunch.Steamworks.Client(252490)) - { - Assert.IsTrue(client.IsValid); - - var friend = client.Friends.All.First(); - - var image = client.Friends.GetCachedAvatar( Steamworks.Friends.AvatarSize.Medium, friend.Id ); - - if (image != null) - { - Assert.AreEqual(image.Width, 64); - Assert.AreEqual(image.Height, 64); - Assert.AreEqual(image.Data.Length, image.Width * image.Height * 4); - } - } - } - */ public static void DrawImage( Image img ) { var grad = " -:+#";