Updated Branches: refs/heads/master 4b129f7e0 -> 376416a3c
[CB-4568] Disable pop-up messages when running test "XHR to within-package 11kb asset." When fetching a file from the local file system, the result status of XMLHttpRequest should be compared to 0 for success instead of 200. This is because the file and ftp schemes do not use HTTP result codes. FYI:https://developer.mozilla.org/es/docs/XMLHttpRequest/Usar_XMLHttpReq uest Project: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/commit/97b393b1 Tree: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/tree/97b393b1 Diff: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/diff/97b393b1 Branch: refs/heads/master Commit: 97b393b17e50be174fadc1e5c6d6a4c7360e6a4e Parents: 4b129f7 Author: lmnbeyond <[email protected]> Authored: Wed Aug 14 19:54:21 2013 +0800 Committer: Max Woghiren <[email protected]> Committed: Tue Aug 27 11:39:43 2013 -0400 ---------------------------------------------------------------------- benchmarks/autobench.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/blob/97b393b1/benchmarks/autobench.html ---------------------------------------------------------------------- diff --git a/benchmarks/autobench.html b/benchmarks/autobench.html index 9104f05..445a46d 100644 --- a/benchmarks/autobench.html +++ b/benchmarks/autobench.html @@ -127,7 +127,8 @@ function bench() { xhr.open("GET", "../LICENSE", true); xhr.onreadystatechange = function() { if (xhr.readyState == 4) { - if (xhr.status == 200) { + // The result status is being compared to 0 for success instead of 200. This is because the file and ftp schemes do not use HTTP result codes. + if (xhr.status == 0 && xhr.responseText.length > 0) { next(); } else { alert('There was a problem during XHR file read!');
