Revision ac4966fa4dcda8e22ade19e03ed6690de7b9cece authored by Henrik Boström on 28 March 2018, 15:48:04 UTC, committed by Chromium WPT Sync on 28 March 2018, 15:48:04 UTC
This exposes RTCRtpSender.getStats() in JavaScript (behind flag) which
implements the stats selection algorithm[1] for senders.

[1] https://w3c.github.io/webrtc-pc/#dfn-stats-selection-algorithm

Bug: 680172
Change-Id: I8117c87f475d1c78fa3301fc2d821f0c3a21281f
Reviewed-on: https://chromium-review.googlesource.com/975306
Commit-Queue: Henrik Boström <hbos@chromium.org>
Reviewed-by: Philip Jägenstedt <foolip@chromium.org>
Reviewed-by: Harald Alvestrand <hta@chromium.org>
Reviewed-by: Taylor Brandstetter <deadbeef@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546493}
1 parent f9c1a50
Raw File
keypath-special-identifiers.htm
<!doctype html>
<meta charset=utf-8>
<title>IndexedDB: Special-cased identifiers in extracting keys from values (ES bindings)</title>
<meta name="help" href="https://w3c.github.io/IndexedDB/#extract-key-from-value">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support.js"></script>
<script>

[
  {
    type: 'String',
    property: 'length',
    instance: 'abc',
  },
  {
    type: 'Array',
    property: 'length',
    instance: ['a', 'b', 'c'],
  },
  {
    type: 'Blob',
    property: 'size',
    instance: new Blob(['abc']),
  },
  {
    type: 'Blob',
    property: 'type',
    instance: new Blob([''], {type:'foo/bar'}),
  },
  {
    type: 'File',
    property: 'name',
    instance: new File([''], 'foo'),
  },
  {
    type: 'File',
    property: 'lastModified',
    instance: new File([''], '', {lastModified: 123}),
  },
  {
    type: 'File',
    property: 'lastModifiedDate',
    instance: new File([''], '', {lastModified: 123}),
  },
].forEach(function(testcase) {
  indexeddb_test(
    (t, db) => {
      db.createObjectStore(
          'store', {autoIncrement: true, keyPath: testcase.property});
    },
    (t, db) => {
      const key = testcase.instance[testcase.property];
      const tx = db.transaction('store', 'readwrite');
      tx.objectStore('store').put(testcase.instance);
      const request = tx.objectStore('store').get(key);
      request.onerror = t.unreached_func('request should not fail');
      request.onsuccess = t.step_func(function() {
        const result = request.result;
        assert_key_equals(result[testcase.property], key,
                          'Property should be used as key');
        t.done();
      });
    },
    'Type: ' + testcase.type + ', identifier: ' + testcase.property
  );
});

</script>
back to top