Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-abort-readyState-shouldNotDispatchEvent.html |
| diff --git a/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-abort-readyState-shouldNotDispatchEvent.html b/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-abort-readyState-shouldNotDispatchEvent.html |
| index ff4b711af0ab4c518597372f7fe4b1d647c01ba9..8c177712aed500ba8b826a1800c19dc96f689e3f 100644 |
| --- a/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-abort-readyState-shouldNotDispatchEvent.html |
| +++ b/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-abort-readyState-shouldNotDispatchEvent.html |
| @@ -37,12 +37,15 @@ function testAbortDoNotDispatchEvent(num) |
| ++finishedTests; |
| this.onreadystatechange = catchReadystateEventAbort; |
| this.abort(); |
| - if (this.readyState == 0) |
| + // Following https://github.com/whatwg/xhr/issues/54, abort() should |
| + // set readyState to UNSENT only when it (readyState) is DONE. |
| + if ((num != 0 && this.readyState == num) || |
|
tyoshino (SeeGerritForStatus)
2016/11/22 08:46:54
shouldn't this be
num != XMLHttpRequest.DONE && t
sof
2016/11/22 08:58:33
It would be unnatural & unwanted for there to be a
tyoshino (SeeGerritForStatus)
2016/11/22 09:29:53
Got it. But this would log PASS when num is XMLHtt
sof
2016/11/22 10:14:14
I've teased apart the testing of the pass conditio
tyoshino (SeeGerritForStatus)
2016/11/22 11:18:32
Yes. Thanks!
|
| + (num == XMLHttpRequest.DONE && this.readyState == 0)) |
| log("PASS"); |
| else |
| log("FAILED"); |
| } |
| - |
| + |
| if (finishedTests == abortToDo.length && window.testRunner) |
| testRunner.notifyDone(); |
| } |