Revision 273bb41376c98c36e743186b63ec3cffa58a5339 authored by Ovidio Henriquez on 23 March 2018, 15:12:10 UTC, committed by Blink WPT Bot on 23 March 2018, 15:30:21 UTC
This change allows the removal of a descriptor to be simulated by the
Bluetooth test interface. A generated test script was also converted to test the
new interface.

BUG=569709

Change-Id: Id4286a3e44cd04ee1b371938f1ef89f33458269c
Reviewed-on: https://chromium-review.googlesource.com/972334
Reviewed-by: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Conley Owens <cco3@chromium.org>
Commit-Queue: Ovidio Henriquez <odejesush@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545448}
1 parent 2d1fd9e
Raw File
event-timeout.htm
<!doctype html>
<html>
  <head>
    <title>XMLHttpRequest: timeout event</title>
    <script src="/resources/testharness.js"></script>
    <script src="/resources/testharnessreport.js"></script>
    <link rel="help" href="https://xhr.spec.whatwg.org/#handler-xhr-ontimeout" data-tested-assertations="../.." />
    <link rel="help" href="https://xhr.spec.whatwg.org/#event-xhr-timeout" data-tested-assertations="../.." />
    <link rel="help" href="https://xhr.spec.whatwg.org/#the-timeout-attribute" data-tested-assertations="following-sibling::ol/li[2]" />
    <link rel="help" href="https://xhr.spec.whatwg.org/#timeout-error" data-tested-assertations=".." />
    <link rel="help" href="https://xhr.spec.whatwg.org/#infrastructure-for-the-send()-method" data-tested-assertations="following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/.. following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/../following-sibling::dd" />
  </head>
  <body>
    <div id="log"></div>
    <script>
      var test = async_test();
      test.step(function() {
        var client = new XMLHttpRequest();
        client.ontimeout = function() {
          test.step(function() {
            assert_equals(client.readyState, 4);
            test.done();
          });
        };
        client.timeout = 5;
        client.open("GET", "resources/delay.py?ms=20000");
        client.send(null);
        test.step_timeout(() => {
          assert_unreached("ontimeout not called.");
        }, 10);
      });
    </script>
  </body>
</html>
back to top