Skip to content

Commit c77426c

Browse files
committed
Test if XHR can be constructed #14
1 parent b80e25f commit c77426c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

AngleSharp.Scripting.JavaScript.Tests/ScriptEvalTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ public async Task CreateCustomEventViaCustomConstructorWithDetailShouldWork()
6464
Assert.AreEqual("barbaz", result);
6565
}
6666

67+
[Test]
68+
public async Task CreateXmlHttpRequestShouldWork()
69+
{
70+
var result = await EvaluateComplexScriptAsync("var xhr = new XMLHttpRequest(); xhr.open('GET', 'foo');", SetResult("xhr.readyState.toString()"));
71+
Assert.AreEqual("0", result);
72+
}
73+
6774
[Test]
6875
public async Task SetContentOfIFrameElement()
6976
{

0 commit comments

Comments
 (0)