summaryrefslogtreecommitdiffstats
path: root/addon-sdk/source/test/fixtures.js
diff options
context:
space:
mode:
Diffstat (limited to 'addon-sdk/source/test/fixtures.js')
-rw-r--r--addon-sdk/source/test/fixtures.js41
1 files changed, 41 insertions, 0 deletions
diff --git a/addon-sdk/source/test/fixtures.js b/addon-sdk/source/test/fixtures.js
new file mode 100644
index 000000000..a1790113d
--- /dev/null
+++ b/addon-sdk/source/test/fixtures.js
@@ -0,0 +1,41 @@
+/* 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/. */
+
+const { uri } = module;
+const prefix = uri.substr(0, uri.lastIndexOf("/") + 1) + "fixtures/";
+
+exports.url = (path="") => path && path.includes(":")
+ ? path
+ : prefix + path.replace(/^\.\//, "");
+
+const base64jpeg = "data:image/jpeg;base64,%2F9j%2F4AAQSkZJRgABAQAAAQABAAD%2F" +
+ "2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCg" +
+ "sOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD%2F2wBDAQMDAwQDBAgEBAgQCw" +
+ "kLEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQ" +
+ "EBAQEBAQEBD%2FwAARCAAgACADAREAAhEBAxEB%2F8QAHwAAAQUBAQEBAQ" +
+ "EAAAAAAAAAAAECAwQFBgcICQoL%2F8QAtRAAAgEDAwIEAwUFBAQAAAF9AQ" +
+ "IDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRol" +
+ "JicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eX" +
+ "qDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJ" +
+ "ytLT1NXW19jZ2uHi4%2BTl5ufo6erx8vP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