public void StressTestGeckoFxBrowserMemory() { var aboutMemory = new UnitTestBrowser(); var uiThreadContext = TaskScheduler.FromCurrentSynchronizationContext(); var unused = Task.Factory.StartNew(() => StartUnitTest(aboutMemory), new CancellationToken(), TaskCreationOptions.LongRunning, uiThreadContext); Application.Run(aboutMemory); }
private async void StartUnitTest(UnitTestBrowser browserWindow) { try { await DoStressTest(browserWindow.wbUnitTest); } catch (Exception) { //Ignore } finally { // Dont close this for now because we can examine memory in the window //browserWindow.Close(); } }