test-main.js 596 B

123456789101112131415161718192021
  1. /* This Source Code Form is subject to the terms of the Mozilla Public
  2. * License, v. 2.0. If a copy of the MPL was not distributed with this
  3. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  4. var m = require("main");
  5. var self = require("sdk/self");
  6. exports.testMain = function(test) {
  7. var callbacks = { quit: function() {
  8. test.pass();
  9. test.done();
  10. } };
  11. test.waitUntilDone();
  12. // Make sure it doesn't crash...
  13. m.main({ staticArgs: {quitWhenDone: true} }, callbacks);
  14. };
  15. exports.testData = function(test) {
  16. test.assert(self.data.load("panel.js").length > 0);
  17. };