michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: "use strict"; michael@0: michael@0: var m = require("main"); michael@0: var self = require("sdk/self"); michael@0: michael@0: exports.testReplace = function(test) { michael@0: var input = "Hello World"; michael@0: var output = m.replaceMom(input); michael@0: test.assertEqual(output, "Hello Mom"); michael@0: var callbacks = { quit: function() {} }; michael@0: michael@0: // Make sure it doesn't crash... michael@0: m.main({ staticArgs: {} }, callbacks); michael@0: }; michael@0: michael@0: exports.testID = function(test) { michael@0: // The ID is randomly generated during tests, so we cannot compare it against michael@0: // anything in particular. Just assert that it is not empty. michael@0: test.assert(self.id.length > 0); michael@0: test.assertEqual(self.data.url("sample.html"), michael@0: "resource://reading-data-example-at-jetpack-dot-mozillalabs-dot-com/reading-data/data/sample.html"); michael@0: };