Imported Upstream version 3.8.0

Former-commit-id: 6a76a29bd07d86e57c6c8da45c65ed5447d38a61
This commit is contained in:
Jo Shields
2014-09-04 09:07:35 +01:00
parent a575963da9
commit fe777c5c82
1062 changed files with 12460 additions and 5983 deletions

File diff suppressed because one or more lines are too long

View File

@@ -165,7 +165,6 @@ namespace MonoTests.System.Web.UI.Adapters
pd.SaveStateComplete = RenderPostBackEvent_OnSaveStateComplete;
t.Invoker = new PageInvoker (pd);
string html = t.Run ();
File.WriteAllText("response.html", html);
}
public static void RenderPostBackEvent_OnSaveStateComplete (Page p)

View File

@@ -18,11 +18,6 @@ namespace MonoTests.SystemWeb.Framework
{
internal class MyHost : MarshalByRefObject
{
AutoResetEvent _done;
AutoResetEvent _doNext;
WebTest _currentTest;
Exception _e;
#region MyData
class MyData
{
@@ -30,40 +25,12 @@ namespace MonoTests.SystemWeb.Framework
public Exception exception;
}
#endregion
public MyHost ()
{
_done = new AutoResetEvent (false);
_doNext = new AutoResetEvent (false);
ThreadPool.QueueUserWorkItem (new WaitCallback (param => {
try {
AsyncRun (param);
} catch {}
}), null);
}
public AppDomain AppDomain
{ get { return AppDomain.CurrentDomain; } }
public WebTest Run (WebTest t)
{
_currentTest = t;
_doNext.Set ();
_done.WaitOne ();
if (_e != null) {
Exception e = _e;
_e = null;
throw e;
}
return t;
}
void AsyncRun (object param)
{
for (;;) {
_doNext.WaitOne ();
try {
WebTest t = _currentTest;
HttpWorkerRequest wr = t.Request.CreateWorkerRequest ();
MyData data = GetMyData (wr);
data.currentTest = t;
@@ -74,12 +41,8 @@ namespace MonoTests.SystemWeb.Framework
if (data.exception != null)
RethrowException (data.exception);
} catch (Exception e) {
_e = e;
}
_done.Set ();
}
return t;
}
private static void RethrowException (Exception inner)