Bug 1181883 - Add serializer on MediaDeviceInfo. r=smaug

This commit is contained in:
Jan-Ivar Bruaroey 2015-07-08 20:46:34 -04:00
parent d881889081
commit fe5dd93125
2 changed files with 5 additions and 0 deletions

View File

@ -34,6 +34,9 @@ runTest(() =>
ok(d.label.length !== undefined, "Device label: " + d.label);
is(d.groupId, "", "Don't support groupId yet");
});
var jsoned = JSON.parse(JSON.stringify(devices));
is(jsoned[0].kind, devices[0].kind, "kind survived serializer");
is(jsoned[0].deviceId, devices[0].deviceId, "deviceId survived serializer");
})
// Check deviceId failure paths for video.
.then(() => mustSucceed("unknown plain deviceId on video",

View File

@ -19,4 +19,6 @@ interface MediaDeviceInfo {
readonly attribute MediaDeviceKind kind;
readonly attribute DOMString label;
readonly attribute DOMString groupId;
jsonifier;
};