mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 08:18:41 +09:00
import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo
This commit is contained in:
commit
dcd9973243
150858 changed files with 23884658 additions and 0 deletions
9
addon-sdk/source/test/modules/add.js
Normal file
9
addon-sdk/source/test/modules/add.js
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
define('modules/add', function () {
|
||||
return function (a, b) {
|
||||
return a + b;
|
||||
};
|
||||
});
|
||||
14
addon-sdk/source/test/modules/async1.js
Normal file
14
addon-sdk/source/test/modules/async1.js
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
define(['./traditional2', './async2'], function () {
|
||||
var traditional2 = require('./traditional2');
|
||||
return {
|
||||
name: 'async1',
|
||||
traditional1Name: traditional2.traditional1Name,
|
||||
traditional2Name: traditional2.name,
|
||||
async2Name: require('./async2').name,
|
||||
async2Traditional2Name: require('./async2').traditional2Name
|
||||
};
|
||||
});
|
||||
8
addon-sdk/source/test/modules/async2.js
Normal file
8
addon-sdk/source/test/modules/async2.js
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
define(['./traditional2', 'exports'], function (traditional2, exports) {
|
||||
exports.name = 'async2';
|
||||
exports.traditional2Name = traditional2.name;
|
||||
});
|
||||
10
addon-sdk/source/test/modules/badExportAndReturn.js
Normal file
10
addon-sdk/source/test/modules/badExportAndReturn.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// This is a bad module, it asks for exports but also returns a value from
|
||||
// the define defintion function.
|
||||
define(['exports'], function (exports) {
|
||||
return 'badExportAndReturn';
|
||||
});
|
||||
|
||||
9
addon-sdk/source/test/modules/badFirst.js
Normal file
9
addon-sdk/source/test/modules/badFirst.js
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
define(['./badSecond'], function (badSecond) {
|
||||
return {
|
||||
name: 'badFirst'
|
||||
};
|
||||
});
|
||||
8
addon-sdk/source/test/modules/badSecond.js
Normal file
8
addon-sdk/source/test/modules/badSecond.js
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
var first = require('./badFirst');
|
||||
|
||||
exports.name = 'badSecond';
|
||||
exports.badFirstName = first.name;
|
||||
9
addon-sdk/source/test/modules/blue.js
Normal file
9
addon-sdk/source/test/modules/blue.js
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
define(function () {
|
||||
return {
|
||||
name: 'blue'
|
||||
};
|
||||
});
|
||||
10
addon-sdk/source/test/modules/castor.js
Normal file
10
addon-sdk/source/test/modules/castor.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
define(['exports', './pollux'], function(exports, pollux) {
|
||||
exports.name = 'castor';
|
||||
exports.getPolluxName = function () {
|
||||
return pollux.name;
|
||||
};
|
||||
});
|
||||
9
addon-sdk/source/test/modules/cheetah.js
Normal file
9
addon-sdk/source/test/modules/cheetah.js
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
define(function () {
|
||||
return function () {
|
||||
return 'cheetah';
|
||||
};
|
||||
});
|
||||
7
addon-sdk/source/test/modules/color.js
Normal file
7
addon-sdk/source/test/modules/color.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
define({
|
||||
type: 'color'
|
||||
});
|
||||
15
addon-sdk/source/test/modules/dupe.js
Normal file
15
addon-sdk/source/test/modules/dupe.js
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
define({
|
||||
name: 'dupe'
|
||||
});
|
||||
|
||||
// This is wrong and should not be allowed. Only one call to
|
||||
// define per file.
|
||||
define([], function () {
|
||||
return {
|
||||
name: 'dupe2'
|
||||
};
|
||||
});
|
||||
15
addon-sdk/source/test/modules/dupeNested.js
Normal file
15
addon-sdk/source/test/modules/dupeNested.js
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
|
||||
define(function () {
|
||||
// This is wrong and should not be allowed.
|
||||
define('dupeNested2', {
|
||||
name: 'dupeNested2'
|
||||
});
|
||||
|
||||
return {
|
||||
name: 'dupeNested'
|
||||
};
|
||||
});
|
||||
8
addon-sdk/source/test/modules/dupeSetExports.js
Normal file
8
addon-sdk/source/test/modules/dupeSetExports.js
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
define({name: "dupeSetExports"});
|
||||
|
||||
// so this should cause a failure
|
||||
module.setExports("no no no");
|
||||
5
addon-sdk/source/test/modules/exportsEquals.js
Normal file
5
addon-sdk/source/test/modules/exportsEquals.js
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
module.exports = 4;
|
||||
10
addon-sdk/source/test/modules/green.js
Normal file
10
addon-sdk/source/test/modules/green.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
define('modules/green', ['./color'], function (color) {
|
||||
return {
|
||||
name: 'green',
|
||||
parentType: color.type
|
||||
};
|
||||
});
|
||||
7
addon-sdk/source/test/modules/lion.js
Normal file
7
addon-sdk/source/test/modules/lion.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
define(function(require) {
|
||||
return 'lion';
|
||||
});
|
||||
10
addon-sdk/source/test/modules/orange.js
Normal file
10
addon-sdk/source/test/modules/orange.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
define(['./color'], function (color) {
|
||||
return {
|
||||
name: 'orange',
|
||||
parentType: color.type
|
||||
};
|
||||
});
|
||||
10
addon-sdk/source/test/modules/pollux.js
Normal file
10
addon-sdk/source/test/modules/pollux.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
define(['exports', './castor'], function(exports, castor) {
|
||||
exports.name = 'pollux';
|
||||
exports.getCastorName = function () {
|
||||
return castor.name;
|
||||
};
|
||||
});
|
||||
16
addon-sdk/source/test/modules/red.js
Normal file
16
addon-sdk/source/test/modules/red.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
define(function (require) {
|
||||
// comment fake-outs for require finding.
|
||||
// require('bad1');
|
||||
return {
|
||||
name: 'red',
|
||||
parentType: require('./color').type
|
||||
};
|
||||
|
||||
/*
|
||||
require('bad2');
|
||||
*/
|
||||
});
|
||||
5
addon-sdk/source/test/modules/setExports.js
Normal file
5
addon-sdk/source/test/modules/setExports.js
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
module.setExports(5);
|
||||
9
addon-sdk/source/test/modules/subtract.js
Normal file
9
addon-sdk/source/test/modules/subtract.js
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
define(function () {
|
||||
return function (a, b) {
|
||||
return a - b;
|
||||
}
|
||||
});
|
||||
8
addon-sdk/source/test/modules/tiger.js
Normal file
8
addon-sdk/source/test/modules/tiger.js
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
define(function (require, exports) {
|
||||
exports.name = 'tiger';
|
||||
exports.type = require('./types/cat').type;
|
||||
});
|
||||
12
addon-sdk/source/test/modules/traditional1.js
Normal file
12
addon-sdk/source/test/modules/traditional1.js
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
exports.name = 'traditional1'
|
||||
|
||||
var async1 = require('./async1');
|
||||
|
||||
exports.traditional2Name = async1.traditional2Name;
|
||||
exports.traditional1Name = async1.traditional1Name;
|
||||
exports.async2Name = async1.async2Name;
|
||||
exports.async2Traditional2Name = async1.async2Traditional2Name;
|
||||
6
addon-sdk/source/test/modules/traditional2.js
Normal file
6
addon-sdk/source/test/modules/traditional2.js
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
exports.name = 'traditional2';
|
||||
exports.traditional1Name = require('./traditional1').name;
|
||||
5
addon-sdk/source/test/modules/types/cat.js
Normal file
5
addon-sdk/source/test/modules/types/cat.js
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
exports.type = 'cat';
|
||||
Loading…
Add table
Add a link
Reference in a new issue