Media Session IDL tests

dictionary MediaConfiguration {
  VideoConfiguration video;
  AudioConfiguration audio;
};

dictionary MediaDecodingConfiguration : MediaConfiguration {
  required MediaDecodingType type;
};

dictionary MediaEncodingConfiguration : MediaConfiguration {
  required MediaEncodingType type;
};

enum MediaDecodingType {
  "file",
  "media-source",
};

dictionary VideoConfiguration {
  required DOMString contentType;
  required unsigned long width;
  required unsigned long height;
  required unsigned long bitrate;
  required double framerate;
};

dictionary AudioConfiguration {
  required DOMString contentType;
  DOMString channels;
  unsigned long bitrate;
  unsigned long samplerate;
};

interface MediaCapabilitiesInfo {
  readonly attribute boolean supported;
  readonly attribute boolean smooth;
  readonly attribute boolean powerEfficient;
};

[Exposed=(Window)]
partial interface Navigator {
  [SameObject] readonly attribute MediaCapabilities mediaCapabilities;
};

[Exposed=(Worker)]
partial interface WorkerNavigator {
  [SameObject] readonly attribute MediaCapabilities mediaCapabilities;
};

[Exposed=(Window, Worker)]
interface MediaCapabilities {
  Promise decodingInfo(MediaDecodingConfiguration configuration);
  Promise encodingInfo(MediaEncodingConfiguration configuration);
};