зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
c9dc8c56a0
Коммит
1660053cf2
|
@ -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";
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче