Bug 1331763 - part2: Test cases; r=cpearce

MozReview-Commit-ID: 6dXLYq4unxa

--HG--
extra : rebase_source : dc3335935881bfcf5c3f9e70a48a35a7acb6eb72
This commit is contained in:
Chun-Min Chang 2017-05-15 13:20:50 +08:00
parent da52aad1f7
commit 5061c392f0
3 changed files with 3 additions and 17 deletions

View File

@ -14,11 +14,6 @@ var manager = new MediaTestManager;
function startTest(test, token)
{
// Three cases:
// 1. setting MediaKeys on an element captured by MediaElementSource should fail, and
// 2. creating a MediaElementSource on a media element with a MediaKeys should fail, and
// 3. capturing a media element with mozCaptureStream that has a MediaKeys should fail.
// Case 1. setting MediaKeys on an element captured by MediaElementSource should fail.
var p1 = new EMEPromise;
var case1token = token + "_case1";

View File

@ -14,12 +14,8 @@ var manager = new MediaTestManager;
function startTest(test, token)
{
// Three cases:
// 1. setting MediaKeys on an element captured by MediaElementSource should fail, and
// 2. creating a MediaElementSource on a media element with a MediaKeys should fail, and
// 3. capturing a media element with mozCaptureStream that has a MediaKeys should fail.
// Case 2. creating a MediaElementSource on a media element with a MediaKeys should fail.
// Case 2. creating a MediaElementSource on a media element should always succeed
// (no matter whether it's restricted content or not), and
var p1 = new EMEPromise;
var case2token = token + "_case2";
let v2 = document.createElement("video");
@ -33,7 +29,7 @@ function startTest(test, token)
} catch (e) {
threw = true;
}
ok(threw, "Should throw an error creating a MediaElementSource on an EME video.");
ok(!threw, "Should always work when creating a MediaElementSource.");
p1.resolve();
});

View File

@ -14,11 +14,6 @@ var manager = new MediaTestManager;
function startTest(test, token)
{
// Three cases:
// 1. setting MediaKeys on an element captured by MediaElementSource should fail, and
// 2. creating a MediaElementSource on a media element with a MediaKeys should fail, and
// 3. capturing a media element with mozCaptureStream that has a MediaKeys should fail.
// Case 3. capturing a media element with mozCaptureStream that has a MediaKeys should fail.
var p1 = new EMEPromise;
var case3token = token + "_case3";