diff options
author | Matt A. Tobin <email@mattatobin.com> | 2018-02-03 06:25:10 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2018-02-03 06:25:10 -0500 |
commit | 8b8c65072aedef94610748ce92c2ed3a19fd5517 (patch) | |
tree | 8614d386acf5db7a77b08d19a5854a7d75dab015 /b2g/components/test/mochitest/screenshot_helper.js | |
parent | 8c3a46bd13a0660a3ff1e0379dbf515873a852d2 (diff) | |
download | UXP-8b8c65072aedef94610748ce92c2ed3a19fd5517.tar UXP-8b8c65072aedef94610748ce92c2ed3a19fd5517.tar.gz UXP-8b8c65072aedef94610748ce92c2ed3a19fd5517.tar.lz UXP-8b8c65072aedef94610748ce92c2ed3a19fd5517.tar.xz UXP-8b8c65072aedef94610748ce92c2ed3a19fd5517.zip |
Purge b2g/
Diffstat (limited to 'b2g/components/test/mochitest/screenshot_helper.js')
-rw-r--r-- | b2g/components/test/mochitest/screenshot_helper.js | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/b2g/components/test/mochitest/screenshot_helper.js b/b2g/components/test/mochitest/screenshot_helper.js deleted file mode 100644 index 0320a14c1..000000000 --- a/b2g/components/test/mochitest/screenshot_helper.js +++ /dev/null @@ -1,40 +0,0 @@ -var Cu = Components.utils; -var Ci = Components.interfaces; - -Cu.importGlobalProperties(['File']); - -const { Services } = Cu.import("resource://gre/modules/Services.jsm"); - -// Load a duplicated copy of the jsm to prevent messing with the currently running one -var scope = {}; -Services.scriptloader.loadSubScript("resource://gre/modules/Screenshot.jsm", scope); -const { Screenshot } = scope; - -var index = -1; -function next() { - index++; - if (index >= steps.length) { - assert.ok(false, "Shouldn't get here!"); - return; - } - try { - steps[index](); - } catch(ex) { - assert.ok(false, "Caught exception: " + ex); - } -} - -var steps = [ - function getScreenshot() { - let screenshot = Screenshot.get(); - assert.ok(screenshot instanceof File, - "Screenshot.get() returns a File"); - next(); - }, - - function endOfTest() { - sendAsyncMessage("finish"); - } -]; - -next(); |