Commit 7bc51702 authored by yukishiino's avatar yukishiino Committed by Commit bot

Fixes WebRTC browsertests.

Blink team is planning to move DOM attributes into prototype chains.
DOM attributes will no longer be accessible as Object properties, e.g.
JSON.stringify will not see DOM attributes.  So WebRTC tests shouldn't
expect that they can stringify DOM attributes.

Fixes tests not to directly stringify DOM objects.

BUG=43394

Review URL: https://codereview.chromium.org/811653007

Cr-Commit-Position: refs/heads/master@{#311472}
parent 56679603
...@@ -13,7 +13,16 @@ ...@@ -13,7 +13,16 @@
function getSources() { function getSources() {
MediaStreamTrack.getSources(function(devices) { MediaStreamTrack.getSources(function(devices) {
document.title = 'Media devices available'; document.title = 'Media devices available';
sendValueToTest(JSON.stringify(devices)); var results = [];
for (var device, i = 0; device = devices[i]; ++i) {
results.push({
'id': device.id,
'kind': device.kind,
'label': device.label,
'facing': device.facing
});
}
sendValueToTest(JSON.stringify(results));
}); });
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment