Bug 1185814: Disable EME tests on 10.6. r=cpearce

This commit is contained in:
Jean-Yves Avenard 2015-07-21 14:44:03 +10:00
parent 0eadec9177
commit bc99111226
9 changed files with 59 additions and 16 deletions

View File

@ -1,5 +1,16 @@
const KEYSYSTEM_TYPE = "org.w3.clearkey";
function IsMacOSSnowLeopardOrEarlier() {
var re = /Mac OS X (\d+)\.(\d+)/;
var ver = navigator.userAgent.match(re);
if (!ver || ver.length != 3) {
return false;
}
var major = ver[1] | 0;
var minor = ver[2] | 0;
return major == 10 && minor <= 6;
}
function bail(message)
{
return function(err) {

View File

@ -46,8 +46,12 @@ function beginTest() {
manager.runTests(gEMETests, startTest);
}
SimpleTest.waitForExplicitFinish();
SetupEMEPref(beginTest);
if (!IsMacOSSnowLeopardOrEarlier()) {
SimpleTest.waitForExplicitFinish();
SetupEMEPref(beginTest);
} else {
todo(false, "Test disabled on this platform.");
}
</script>
</pre>
</body>

View File

@ -89,8 +89,12 @@ function beginTest() {
manager.runTests(gEMENonMSEFailTests, startTest);
}
SimpleTest.waitForExplicitFinish();
SetupEMEPref(beginTest);
if (!IsMacOSSnowLeopardOrEarlier()) {
SimpleTest.waitForExplicitFinish();
SetupEMEPref(beginTest);
} else {
todo(false, "Test disabled on this platform.");
}
</script>
</pre>
</body>

View File

@ -154,8 +154,12 @@ function beginTest() {
manager.runTests(gEMETests.filter(t => t.sessionCount === 1), startTest);
}
SimpleTest.waitForExplicitFinish();
SetupEMEPref(beginTest);
if (!IsMacOSSnowLeopardOrEarlier()) {
SimpleTest.waitForExplicitFinish();
SetupEMEPref(beginTest);
} else {
todo(false, "Test disabled on this platform.");
}
</script>
</pre>
</body>

View File

@ -111,8 +111,12 @@ function beginTest() {
manager.runTests(gEMETests, startTest);
}
SimpleTest.waitForExplicitFinish();
SetupEMEPref(beginTest);
if (!IsMacOSSnowLeopardOrEarlier()) {
SimpleTest.waitForExplicitFinish();
SetupEMEPref(beginTest);
} else {
todo(false, "Test disabled on this platform.");
}
</script>
</pre>
</body>

View File

@ -292,8 +292,12 @@ function beginTest() {
Promise.all(tests.map(Test)).then(function() { SimpleTest.finish(); });
}
SimpleTest.waitForExplicitFinish();
SetupEMEPref(beginTest);
if (!IsMacOSSnowLeopardOrEarlier()) {
SimpleTest.waitForExplicitFinish();
SetupEMEPref(beginTest);
} else {
todo(false, "Test disabled on this platform.");
}
</script>
</pre>

View File

@ -40,8 +40,12 @@ function beginTest() {
manager.runTests(gEMETests, startTest);
}
SimpleTest.waitForExplicitFinish();
SetupEMEPref(beginTest);
if (!IsMacOSSnowLeopardOrEarlier()) {
SimpleTest.waitForExplicitFinish();
SetupEMEPref(beginTest);
} else {
todo(false, "Test disabled on this platform.");
}
</script>
</pre>
</body>

View File

@ -43,8 +43,12 @@ function beginTest() {
manager.runTests(gEMETests, startTest);
}
SimpleTest.waitForExplicitFinish();
SetupEMEPref(beginTest);
if (!IsMacOSSnowLeopardOrEarlier()) {
SimpleTest.waitForExplicitFinish();
SetupEMEPref(beginTest);
} else {
todo(false, "Test disabled on this platform.");
}
</script>
</pre>
</body>

View File

@ -42,8 +42,12 @@ function beginTest() {
manager.runTests(gEMETests, startTest);
}
SimpleTest.waitForExplicitFinish();
SetupEMEPref(beginTest);
if (!IsMacOSSnowLeopardOrEarlier()) {
SimpleTest.waitForExplicitFinish();
SetupEMEPref(beginTest);
} else {
todo(false, "Test disabled on this platform.");
}
</script>
</pre>
</body>