• Ovidio Henriquez's avatar
    bluetooth: web: test: Update gc detach test · 02a8197e
    Ovidio Henriquez authored
    This change updates the gc-detach.html and detach-gc.html tests to use
    promise_test as opposed to async_test. This will help us migrate the
    tests to the wpt/ directory, since we use a wrapper around
    promise_test to dynamically load Chromium-specific modules.
    
    This change also updates gc-detach.html and detach-gc.html to use
    health-thermometer-iframe.html in order to use
    getHealthThermometerDevice rather than setBluetoothFakeAdapter. As a
    result, health-thermometer-iframe.html now contains a
    "RequestAndConnect" message case, and bluetooth-helpers.js does not
    rely on the "Ready" message from the health-thermometer-iframe.html
    anymore.
    
    Additionally, bluetooth-helpers.js now contains a function called
    setUpConnectableHealthThermometerDevice that sets up a
    fake_peripheral without requesting the device for tests that require
    the device to be requested outside of the main frame.
    
    BUG=769412
    
    Change-Id: I310fd68569fb646e9e4e2ffde202b8f953a47e9b
    Reviewed-on: https://chromium-review.googlesource.com/777339
    Commit-Queue: Ovidio Henriquez <odejesush@google.com>
    Reviewed-by: default avatarGiovanni Ortuño Urquidi <ortuno@chromium.org>
    Reviewed-by: default avatarConley Owens <cco3@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#521584}
    02a8197e
bluetooth-helpers.js 28.1 KB