Revision 4038be686e4912ac1779f73f9fca8d9cbfbb1ec0 authored by Ovidio Henriquez on 07 March 2018, 21:13:41 UTC, committed by Blink WPT Bot on 08 March 2018, 10:10:32 UTC
This change refactors the Web Bluetooth test API to use the
DeviceUUIDs helper class defined in BluetoothDevice. Additionally,
this change finishes the implementation of SimulateGATTServicesChanged,
and as a result, tests are updated to set the next discovery response
before calling this interface.

BUG=719826

Change-Id: I0f986eb7afe6fbf7ebaa80ac4b633d46a027b80d
Reviewed-on: https://chromium-review.googlesource.com/939984
Commit-Queue: Ovidio Henriquez <odejesush@chromium.org>
Reviewed-by: Giovanni Ortuño Urquidi <ortuno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541577}
1 parent 08d063d
Raw File
drm-keystatuses.https.html
<!doctype html>
<html>
  <head>
    <meta charset=utf-8>
    <meta name="timeout" content="long">
    <title>Encrypted Media Extensions: Verify MediaKeySession.keyStatuses with multiple sessions, DRM</title>
    <link rel="help" href="https://w3c.github.io/encrypted-media/">

    <!-- Web Platform Test Harness scripts -->
    <script src=/resources/testharness.js></script>
    <script src=/resources/testharnessreport.js></script>

    <!-- Helper scripts for Encrypted Media Extensions tests  -->
    <script src=/encrypted-media/util/utils.js></script>
    <script src=/encrypted-media/util/fetch.js></script>
    <script src=/encrypted-media/util/testmediasource.js></script>
    <script src=/encrypted-media/util/utf8.js></script>

    <!-- Content metadata -->
    <script src=/encrypted-media/content/content-metadata.js></script>

    <!-- Message handler for DRM -->
    <script src=/encrypted-media/util/drm-messagehandler.js></script>

    <!-- The script for this specific test -->
    <script src=/encrypted-media/scripts/keystatuses.js></script>

  </head>
  <body>
    <div id='log'></div>

    <script>
        var keysystem = getSupportedKeySystem();
        getSupportedContent( keysystem ).then( function( contents ) {
            // Select a content item with multiple keys and initData that retrieves all keys
            var contentitem = contents.filter( function( item ) {
                return item.keys && item.keys.length > 1 && item.initDataType && item.associatedInitData;
            } )[ 0 ];

            var handler = new MessageHandler( keysystem, contentitem );
            var config = {  keysystem:          keysystem,
                            content:            contentitem,
                            messagehandler:     handler.messagehandler,
                            initDataType:       contentitem.initDataType,
                            initData:           base64DecodeToUnit8Array( getProprietaryInitDatas(contentitem).initDatas[ 0 ] )
                        };

            runTest(config);

        } );
    </script>
  </body>
</html>
back to top