aboutsummaryrefslogtreecommitdiff
path: root/tools/addon-sdk-1.12/test/fixtures
diff options
context:
space:
mode:
Diffstat (limited to 'tools/addon-sdk-1.12/test/fixtures')
-rw-r--r--tools/addon-sdk-1.12/test/fixtures/addon-install-unit-test@mozilla.com.xpibin0 -> 1596 bytes
-rw-r--r--tools/addon-sdk-1.12/test/fixtures/chrome-worker/addEventListener.js8
-rw-r--r--tools/addon-sdk-1.12/test/fixtures/chrome-worker/jsctypes.js8
-rw-r--r--tools/addon-sdk-1.12/test/fixtures/chrome-worker/onerror.js8
-rw-r--r--tools/addon-sdk-1.12/test/fixtures/chrome-worker/onmessage.js10
-rw-r--r--tools/addon-sdk-1.12/test/fixtures/chrome-worker/setTimeout.js10
-rw-r--r--tools/addon-sdk-1.12/test/fixtures/chrome-worker/xhr.js13
-rw-r--r--tools/addon-sdk-1.12/test/fixtures/es5.js8
-rw-r--r--tools/addon-sdk-1.12/test/fixtures/loader/cycles/a.js7
-rw-r--r--tools/addon-sdk-1.12/test/fixtures/loader/cycles/b.js7
-rw-r--r--tools/addon-sdk-1.12/test/fixtures/loader/cycles/c.js7
-rw-r--r--tools/addon-sdk-1.12/test/fixtures/loader/cycles/main.js14
-rw-r--r--tools/addon-sdk-1.12/test/fixtures/sandbox-complex-character.js5
-rw-r--r--tools/addon-sdk-1.12/test/fixtures/sandbox-normal.js7
14 files changed, 112 insertions, 0 deletions
diff --git a/tools/addon-sdk-1.12/test/fixtures/addon-install-unit-test@mozilla.com.xpi b/tools/addon-sdk-1.12/test/fixtures/addon-install-unit-test@mozilla.com.xpi
new file mode 100644
index 0000000..c7cfccd
--- /dev/null
+++ b/tools/addon-sdk-1.12/test/fixtures/addon-install-unit-test@mozilla.com.xpi
Binary files differ
diff --git a/tools/addon-sdk-1.12/test/fixtures/chrome-worker/addEventListener.js b/tools/addon-sdk-1.12/test/fixtures/chrome-worker/addEventListener.js
new file mode 100644
index 0000000..a251701
--- /dev/null
+++ b/tools/addon-sdk-1.12/test/fixtures/chrome-worker/addEventListener.js
@@ -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/.
+ */
+
+'use strict';
+
+postMessage('Hello');
diff --git a/tools/addon-sdk-1.12/test/fixtures/chrome-worker/jsctypes.js b/tools/addon-sdk-1.12/test/fixtures/chrome-worker/jsctypes.js
new file mode 100644
index 0000000..8d5ea9a
--- /dev/null
+++ b/tools/addon-sdk-1.12/test/fixtures/chrome-worker/jsctypes.js
@@ -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/.
+ */
+
+'use strict';
+
+postMessage(typeof ctypes.open);
diff --git a/tools/addon-sdk-1.12/test/fixtures/chrome-worker/onerror.js b/tools/addon-sdk-1.12/test/fixtures/chrome-worker/onerror.js
new file mode 100644
index 0000000..7310a70
--- /dev/null
+++ b/tools/addon-sdk-1.12/test/fixtures/chrome-worker/onerror.js
@@ -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/.
+ */
+
+'use strict';
+
+throw new Error('ok');
diff --git a/tools/addon-sdk-1.12/test/fixtures/chrome-worker/onmessage.js b/tools/addon-sdk-1.12/test/fixtures/chrome-worker/onmessage.js
new file mode 100644
index 0000000..42962f9
--- /dev/null
+++ b/tools/addon-sdk-1.12/test/fixtures/chrome-worker/onmessage.js
@@ -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/.
+ */
+
+'use strict';
+
+onmessage = function (event) {
+ postMessage(event.data);
+};
diff --git a/tools/addon-sdk-1.12/test/fixtures/chrome-worker/setTimeout.js b/tools/addon-sdk-1.12/test/fixtures/chrome-worker/setTimeout.js
new file mode 100644
index 0000000..1a137f1
--- /dev/null
+++ b/tools/addon-sdk-1.12/test/fixtures/chrome-worker/setTimeout.js
@@ -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/.
+ */
+
+'use strict';
+
+setTimeout(function () {
+ postMessage('ok');
+}, 0);
diff --git a/tools/addon-sdk-1.12/test/fixtures/chrome-worker/xhr.js b/tools/addon-sdk-1.12/test/fixtures/chrome-worker/xhr.js
new file mode 100644
index 0000000..7f76289
--- /dev/null
+++ b/tools/addon-sdk-1.12/test/fixtures/chrome-worker/xhr.js
@@ -0,0 +1,13 @@
+/* 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/.
+ */
+
+'use strict';
+
+let xhr = XMLHttpRequest();
+xhr.open("GET", "data:text/plain,ok", true);
+xhr.onload = function () {
+ postMessage(xhr.responseText);
+};
+xhr.send(null);
diff --git a/tools/addon-sdk-1.12/test/fixtures/es5.js b/tools/addon-sdk-1.12/test/fixtures/es5.js
new file mode 100644
index 0000000..746cae3
--- /dev/null
+++ b/tools/addon-sdk-1.12/test/fixtures/es5.js
@@ -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/. */
+
+"use strict";
+exports.frozen = Object.freeze({});
+exports.sealed = Object.seal({});
+exports.inextensible = Object.preventExtensions({});
diff --git a/tools/addon-sdk-1.12/test/fixtures/loader/cycles/a.js b/tools/addon-sdk-1.12/test/fixtures/loader/cycles/a.js
new file mode 100644
index 0000000..f6e13cc
--- /dev/null
+++ b/tools/addon-sdk-1.12/test/fixtures/loader/cycles/a.js
@@ -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/. */
+
+'use strict';
+
+exports.b = require('b');
diff --git a/tools/addon-sdk-1.12/test/fixtures/loader/cycles/b.js b/tools/addon-sdk-1.12/test/fixtures/loader/cycles/b.js
new file mode 100644
index 0000000..69e23f1
--- /dev/null
+++ b/tools/addon-sdk-1.12/test/fixtures/loader/cycles/b.js
@@ -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/. */
+
+'use strict';
+
+exports.a = require('a');
diff --git a/tools/addon-sdk-1.12/test/fixtures/loader/cycles/c.js b/tools/addon-sdk-1.12/test/fixtures/loader/cycles/c.js
new file mode 100644
index 0000000..ce34b3c
--- /dev/null
+++ b/tools/addon-sdk-1.12/test/fixtures/loader/cycles/c.js
@@ -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/. */
+
+'use strict';
+
+exports.main = require('main');
diff --git a/tools/addon-sdk-1.12/test/fixtures/loader/cycles/main.js b/tools/addon-sdk-1.12/test/fixtures/loader/cycles/main.js
new file mode 100644
index 0000000..6d13200
--- /dev/null
+++ b/tools/addon-sdk-1.12/test/fixtures/loader/cycles/main.js
@@ -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/. */
+
+'use strict';
+
+var a = require('a');
+var b = require('b');
+var c = require('c');
+
+exports.a = a;
+exports.b = b;
+exports.c = c;
+exports.main = exports;
diff --git a/tools/addon-sdk-1.12/test/fixtures/sandbox-complex-character.js b/tools/addon-sdk-1.12/test/fixtures/sandbox-complex-character.js
new file mode 100644
index 0000000..6ae6769
--- /dev/null
+++ b/tools/addon-sdk-1.12/test/fixtures/sandbox-complex-character.js
@@ -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/. */
+
+var chars = 'გამარჯობა';
diff --git a/tools/addon-sdk-1.12/test/fixtures/sandbox-normal.js b/tools/addon-sdk-1.12/test/fixtures/sandbox-normal.js
new file mode 100644
index 0000000..5425298
--- /dev/null
+++ b/tools/addon-sdk-1.12/test/fixtures/sandbox-normal.js
@@ -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/. */
+
+var a = 1;
+this.b = 2;
+function f() { return 4; }