[wasm][debugger][tests] Split tests into separate files (#19647)
commitc0c18ce34b93858ccac8c1c5ac3941a12f141531
authorAnkit Jain <radical@gmail.com>
Mon, 27 Apr 2020 23:31:46 +0000 (27 19:31 -0400)
committerGitHub <noreply@github.com>
Mon, 27 Apr 2020 23:31:46 +0000 (27 19:31 -0400)
treeb9dea6b58fa6a15944272179cdf85746353b838a
parente76b77a6b2f9a57be0648ef65ca0f952fae5672b
[wasm][debugger][tests] Split tests into separate files (#19647)

* [wasm][debugger][tests] Move helper methods to base class

* [wasm][debugger][tests] Extract EvaluateOnCallFrame tests to new file

* [wasm][debugger][tests] Extract Array tests to a new file

* [wasm][debugger][tests] Extract CallFunctionOn tests to a new file

* [wasm][debugger][tests] Extract Delegate tests to a new file

* [wasm][debugger] Don't inherit from another test class

.. as that ends up running all the tests of the base class too.

* [wasm][debugger][tests] Improve retries in TestHarnessStartup

Sometimes `/json/list` seems to return an empty array (`[ ]`). Treat
that also as a case for retry.

* [wasm][debugger][tests] Bump timeout from 2s to 5s

* [wasm][debugger][tests] Launch chrome in incognito mode

* debugging

* [wasm][debugger] TestHarnessStartup - don't share `ProcessStartInfo`

.. instances. Instead, create one for every use.
We seem to run into cases where the `get_Environment` is modifying it's
`_environmentVariables` field, concurrently from multiple threads,
causing exceptions like:

```
System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at System.Diagnostics.Process.CreateEnvp(ProcessStartInfo psi)
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
   at WebAssembly.Net.Debugging.TestHarnessStartup.LaunchAndServe(ProcessStartInfo psi, HttpContext context, Func`2 extract_conn_url) in /Users/radical/dev/w1/sdks/wasm/ProxyDriver/TestHarnessStartup.cs:line 82
   at WebAssembly.Net.Debugging.TestHarnessStartup.<>c__DisplayClass10_0.<<Configure>b__1>d.MoveNext() in /Users/radical/dev/w1/sdks/wasm/ProxyDriver/TestHarnessStartup.cs:line 167
```

* [wasm][debugger] Fix regression in debug.html

Fixes https://github.com/mono/mono/issues/19653 .
sdks/wasm/DebuggerTestSuite/ArrayTests.cs [new file with mode: 0644]
sdks/wasm/DebuggerTestSuite/CallFunctionOnTests.cs [new file with mode: 0644]
sdks/wasm/DebuggerTestSuite/DelegateTests.cs [new file with mode: 0644]
sdks/wasm/DebuggerTestSuite/EvaluateOnCallFrameTests.cs [new file with mode: 0644]
sdks/wasm/DebuggerTestSuite/Support.cs
sdks/wasm/DebuggerTestSuite/Tests.cs
sdks/wasm/ProxyDriver/TestHarnessStartup.cs
sdks/wasm/debug.html