gecko/browser/components/sessionstore/test/browser_645428.js

23 lines
578 B
JavaScript
Raw Normal View History

/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
const NOTIFICATION = "sessionstore-browser-state-restored";
function test() {
waitForExplicitFinish();
2011-08-15 18:20:15 -07:00
function observe(subject, topic, data) {
if (NOTIFICATION == topic) {
finish();
ok(true, "TOPIC received");
}
}
2011-08-15 18:20:15 -07:00
Services.obs.addObserver(observe, NOTIFICATION, false);
registerCleanupFunction(function () {
2011-08-15 18:20:15 -07:00
Services.obs.removeObserver(observe, NOTIFICATION, false);
});
ss.setBrowserState(JSON.stringify({ windows: [] }));
}