summaryrefslogtreecommitdiffstats
path: root/addon-sdk/source/test/modules
diff options
context:
space:
mode:
Diffstat (limited to 'addon-sdk/source/test/modules')
-rw-r--r--addon-sdk/source/test/modules/add.js9
-rw-r--r--addon-sdk/source/test/modules/async1.js14
-rw-r--r--addon-sdk/source/test/modules/async2.js8
-rw-r--r--addon-sdk/source/test/modules/badExportAndReturn.js10
-rw-r--r--addon-sdk/source/test/modules/badFirst.js9
-rw-r--r--addon-sdk/source/test/modules/badSecond.js8
-rw-r--r--addon-sdk/source/test/modules/blue.js9
-rw-r--r--addon-sdk/source/test/modules/castor.js10
-rw-r--r--addon-sdk/source/test/modules/cheetah.js9
-rw-r--r--addon-sdk/source/test/modules/color.js7
-rw-r--r--addon-sdk/source/test/modules/dupe.js15
-rw-r--r--addon-sdk/source/test/modules/dupeNested.js15
-rw-r--r--addon-sdk/source/test/modules/dupeSetExports.js8
-rw-r--r--addon-sdk/source/test/modules/exportsEquals.js5
-rw-r--r--addon-sdk/source/test/modules/green.js10
-rw-r--r--addon-sdk/source/test/modules/lion.js7
-rw-r--r--addon-sdk/source/test/modules/orange.js10
-rw-r--r--addon-sdk/source/test/modules/pollux.js10
-rw-r--r--addon-sdk/source/test/modules/red.js16
-rw-r--r--addon-sdk/source/test/modules/setExports.js5
-rw-r--r--addon-sdk/source/test/modules/subtract.js9
-rw-r--r--addon-sdk/source/test/modules/tiger.js8
-rw-r--r--addon-sdk/source/test/modules/traditional1.js12
-rw-r--r--addon-sdk/source/test/modules/traditional2.js6
-rw-r--r--addon-sdk/source/test/modules/types/cat.js5
25 files changed, 0 insertions, 234 deletions
diff --git a/addon-sdk/source/test/modules/add.js b/addon-sdk/source/test/modules/add.js
deleted file mode 100644
index 54729340d..000000000
--- a/addon-sdk/source/test/modules/add.js
+++ /dev/null
@@ -1,9 +0,0 @@
-/* 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;
- };
-});
diff --git a/addon-sdk/source/test/modules/async1.js b/addon-sdk/source/test/modules/async1.js
deleted file mode 100644
index b7b60fdc2..000000000
--- a/addon-sdk/source/test/modules/async1.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/* 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
- };
-});
diff --git a/addon-sdk/source/test/modules/async2.js b/addon-sdk/source/test/modules/async2.js
deleted file mode 100644
index 802fb2504..000000000
--- a/addon-sdk/source/test/modules/async2.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/* 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;
-});
diff --git a/addon-sdk/source/test/modules/badExportAndReturn.js b/addon-sdk/source/test/modules/badExportAndReturn.js
deleted file mode 100644
index 35a5359f6..000000000
--- a/addon-sdk/source/test/modules/badExportAndReturn.js
+++ /dev/null
@@ -1,10 +0,0 @@
-/* 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';
-});
-
diff --git a/addon-sdk/source/test/modules/badFirst.js b/addon-sdk/source/test/modules/badFirst.js
deleted file mode 100644
index fdb03bd4d..000000000
--- a/addon-sdk/source/test/modules/badFirst.js
+++ /dev/null
@@ -1,9 +0,0 @@
-/* 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'
- };
-});
diff --git a/addon-sdk/source/test/modules/badSecond.js b/addon-sdk/source/test/modules/badSecond.js
deleted file mode 100644
index 8321a8542..000000000
--- a/addon-sdk/source/test/modules/badSecond.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/* 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;
diff --git a/addon-sdk/source/test/modules/blue.js b/addon-sdk/source/test/modules/blue.js
deleted file mode 100644
index 14ab14933..000000000
--- a/addon-sdk/source/test/modules/blue.js
+++ /dev/null
@@ -1,9 +0,0 @@
-/* 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'
- };
-});
diff --git a/addon-sdk/source/test/modules/castor.js b/addon-sdk/source/test/modules/castor.js
deleted file mode 100644
index 9209623b5..000000000
--- a/addon-sdk/source/test/modules/castor.js
+++ /dev/null
@@ -1,10 +0,0 @@
-/* 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;
- };
-});
diff --git a/addon-sdk/source/test/modules/cheetah.js b/addon-sdk/source/test/modules/cheetah.js
deleted file mode 100644
index 37d12bfc1..000000000
--- a/addon-sdk/source/test/modules/cheetah.js
+++ /dev/null
@@ -1,9 +0,0 @@
-/* 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';
- };
-});
diff --git a/addon-sdk/source/test/modules/color.js b/addon-sdk/source/test/modules/color.js
deleted file mode 100644
index 0d946bd99..000000000
--- a/addon-sdk/source/test/modules/color.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* 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'
-});
diff --git a/addon-sdk/source/test/modules/dupe.js b/addon-sdk/source/test/modules/dupe.js
deleted file mode 100644
index f87fa555a..000000000
--- a/addon-sdk/source/test/modules/dupe.js
+++ /dev/null
@@ -1,15 +0,0 @@
-/* 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'
- };
-});
diff --git a/addon-sdk/source/test/modules/dupeNested.js b/addon-sdk/source/test/modules/dupeNested.js
deleted file mode 100644
index 703948ca7..000000000
--- a/addon-sdk/source/test/modules/dupeNested.js
+++ /dev/null
@@ -1,15 +0,0 @@
-/* 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'
- };
-});
diff --git a/addon-sdk/source/test/modules/dupeSetExports.js b/addon-sdk/source/test/modules/dupeSetExports.js
deleted file mode 100644
index 12a1be22b..000000000
--- a/addon-sdk/source/test/modules/dupeSetExports.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/* 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");
diff --git a/addon-sdk/source/test/modules/exportsEquals.js b/addon-sdk/source/test/modules/exportsEquals.js
deleted file mode 100644
index e176316f4..000000000
--- a/addon-sdk/source/test/modules/exportsEquals.js
+++ /dev/null
@@ -1,5 +0,0 @@
-/* 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;
diff --git a/addon-sdk/source/test/modules/green.js b/addon-sdk/source/test/modules/green.js
deleted file mode 100644
index ce2d134b9..000000000
--- a/addon-sdk/source/test/modules/green.js
+++ /dev/null
@@ -1,10 +0,0 @@
-/* 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
- };
-});
diff --git a/addon-sdk/source/test/modules/lion.js b/addon-sdk/source/test/modules/lion.js
deleted file mode 100644
index 9c3ac3bfe..000000000
--- a/addon-sdk/source/test/modules/lion.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/* 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';
-});
diff --git a/addon-sdk/source/test/modules/orange.js b/addon-sdk/source/test/modules/orange.js
deleted file mode 100644
index 900a32b08..000000000
--- a/addon-sdk/source/test/modules/orange.js
+++ /dev/null
@@ -1,10 +0,0 @@
-/* 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
- };
-});
diff --git a/addon-sdk/source/test/modules/pollux.js b/addon-sdk/source/test/modules/pollux.js
deleted file mode 100644
index 61cf66f9c..000000000
--- a/addon-sdk/source/test/modules/pollux.js
+++ /dev/null
@@ -1,10 +0,0 @@
-/* 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;
- };
-});
diff --git a/addon-sdk/source/test/modules/red.js b/addon-sdk/source/test/modules/red.js
deleted file mode 100644
index c47b8e924..000000000
--- a/addon-sdk/source/test/modules/red.js
+++ /dev/null
@@ -1,16 +0,0 @@
-/* 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');
- */
-});
diff --git a/addon-sdk/source/test/modules/setExports.js b/addon-sdk/source/test/modules/setExports.js
deleted file mode 100644
index 495c301cd..000000000
--- a/addon-sdk/source/test/modules/setExports.js
+++ /dev/null
@@ -1,5 +0,0 @@
-/* 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);
diff --git a/addon-sdk/source/test/modules/subtract.js b/addon-sdk/source/test/modules/subtract.js
deleted file mode 100644
index 06e1053ab..000000000
--- a/addon-sdk/source/test/modules/subtract.js
+++ /dev/null
@@ -1,9 +0,0 @@
-/* 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;
- }
-});
diff --git a/addon-sdk/source/test/modules/tiger.js b/addon-sdk/source/test/modules/tiger.js
deleted file mode 100644
index 80479d019..000000000
--- a/addon-sdk/source/test/modules/tiger.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/* 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;
-});
diff --git a/addon-sdk/source/test/modules/traditional1.js b/addon-sdk/source/test/modules/traditional1.js
deleted file mode 100644
index 28af8ef30..000000000
--- a/addon-sdk/source/test/modules/traditional1.js
+++ /dev/null
@@ -1,12 +0,0 @@
-/* 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;
diff --git a/addon-sdk/source/test/modules/traditional2.js b/addon-sdk/source/test/modules/traditional2.js
deleted file mode 100644
index 67b64eecb..000000000
--- a/addon-sdk/source/test/modules/traditional2.js
+++ /dev/null
@@ -1,6 +0,0 @@
-/* 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;
diff --git a/addon-sdk/source/test/modules/types/cat.js b/addon-sdk/source/test/modules/types/cat.js
deleted file mode 100644
index 41513d682..000000000
--- a/addon-sdk/source/test/modules/types/cat.js
+++ /dev/null
@@ -1,5 +0,0 @@
-/* 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';