diff options
author | therzok <marius.ungureanu@xamarin.com> | 2019-09-18 05:48:55 +0300 |
---|---|---|
committer | Sandy Armstrong <sandy@xamarin.com> | 2019-09-18 19:23:09 +0300 |
commit | 08570e16e627fc68ad8a7167128c4fa27379bd72 (patch) | |
tree | 426ddb3052ba6f017f6036b39b6a24cda1736f38 /main | |
parent | 572630de408abc0b1a85fb41d4a2a5ff975c06a1 (diff) |
Fix leaktests to use new way of toggling on legacy editor support
Diffstat (limited to 'main')
-rw-r--r-- | main/tests/StressTest/UserInterfaceTests/Properties.cs | 7 | ||||
-rw-r--r-- | main/tests/UserInterfaceTests/TestService.cs | 11 |
2 files changed, 10 insertions, 8 deletions
diff --git a/main/tests/StressTest/UserInterfaceTests/Properties.cs b/main/tests/StressTest/UserInterfaceTests/Properties.cs index 62eea0c8c2..1a8e7fb1db 100644 --- a/main/tests/StressTest/UserInterfaceTests/Properties.cs +++ b/main/tests/StressTest/UserInterfaceTests/Properties.cs @@ -5,11 +5,6 @@ namespace MonoDevelop.StressTest { public static class Properties { - const string useNewEditorProperty = "MonoDevelop.Ide.Editor.DefaultSourceEditorOptions.Instance.EnableNewEditor"; - - public static bool UseNewEditor { - get => TestService.Session.GetGlobalValue<bool> (useNewEditorProperty); - set => TestService.Session.SetGlobalValue (useNewEditorProperty, value); - } + public static bool UseNewEditor { get; set; } = true; } } diff --git a/main/tests/UserInterfaceTests/TestService.cs b/main/tests/UserInterfaceTests/TestService.cs index 863100afd0..c9c1fe9090 100644 --- a/main/tests/UserInterfaceTests/TestService.cs +++ b/main/tests/UserInterfaceTests/TestService.cs @@ -27,6 +27,7 @@ using System; using MonoDevelop.Components.AutoTest; using System.Collections.Generic; +using MonoDevelop.StressTest; namespace UserInterfaceTests { @@ -39,12 +40,18 @@ namespace UserInterfaceTests Session = new AutoTestClientSession (); profilePath = profilePath ?? Util.CreateTmpDir ("profile"); - Session.StartApplication (file: file, args: args, environment: new Dictionary<string, string> { + + var env = new Dictionary<string, string> { { "MONODEVELOP_PROFILE", profilePath }, { "VISUALSTUDIO_PROFILE", profilePath }, { "MONODEVELOP_LOG_FILE", logFile }, { "MONODEVELOP_FILE_LOG_LEVEL", "UpToInfo" }, - }); + }; + + if (!Properties.UseNewEditor) + env.Add ("MD_FEATURES_ENABLED", "AlwaysUseLegacyEditor"); + + Session.StartApplication (file: file, args: args, environment: env); Session.SetGlobalValue ("MonoDevelop.Core.Instrumentation.InstrumentationService.Enabled", true); Session.GlobalInvoke ("MonoDevelop.Ide.IdeApp.Workbench.GrabDesktopFocus"); |