michael@0: // This is a sample WebappRT chrome test. It's just a browser-chrome mochitest. michael@0: michael@0: Cu.import("resource://webapprt/modules/WebappRT.jsm"); michael@0: michael@0: function test() { michael@0: waitForExplicitFinish(); michael@0: ok(true, "true is true!"); michael@0: loadWebapp("sample.webapp", undefined, function onLoad() { michael@0: is(document.documentElement.getAttribute("title"), michael@0: WebappRT.config.app.manifest.name, michael@0: "Window title should be webapp name"); michael@0: let msg = gAppBrowser.contentDocument.getElementById("msg"); michael@0: var observer = new MutationObserver(function (mutations) { michael@0: ok(/^Webapp getSelf OK:/.test(msg.textContent), michael@0: "The webapp should have successfully installed and updated its msg"); michael@0: finish(); michael@0: }); michael@0: observer.observe(msg, { childList: true }); michael@0: }); michael@0: }