Bug 1156566 - Polyfill Array.includes() in test_gmpProvider.js, so that test passes when it uplifts out of Nightly. r=preemptive-bustage-fix

This commit is contained in:
Chris Pearce 2015-05-21 14:00:57 +12:00
Родитель c9dc8c56a0
Коммит 1660053cf2
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -249,6 +249,14 @@ function createMockPluginFilesIfNeeded(aFile, aPluginId) {
createFile(aPluginId.substring(4) + ".info");
}
// Array.includes() is only in Nightly channel, so polyfill so we don't fail
// on other branches.
if (![].includes) {
Array.prototype.includes = function(element) {
return Object(this).indexOf(element) != -1;
}
}
add_task(function* test_pluginRegistration() {
const TEST_VERSION = "1.2.3.4";