• jrw's avatar
    Updated remoting.xhr API to use promises. · 5b7c9e08
    jrw authored
    Removed access to the native XHR object used by the API.
    
    This is a larger change than one might expect for two reasons: First,
    because the native XHR object only allows the response content to be
    retrieved while the onreadystatechange handler is executing, and
    second, because the unit test for dns_blackhole_checker.js relied on
    synchronous semantics which cannot be duplicated with promises because
    when a promise is resolved, its "then" handlers are not called until
    the next event cycle.
    
    Review URL: https://codereview.chromium.org/1003433002
    
    Cr-Commit-Position: refs/heads/master@{#321608}
    5b7c9e08
xhr_unittest.js 6.37 KB