blob: 2509d8d3187a4ced8b04d2b50632a413d4f46980 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<script src="/js-test-resources/js-test.js"></script>
<script>
description("Tests that navigator.serviceWorker always returns the same object.");
jsTestIsAsync = true;
shouldBeUndefined("navigator.serviceWorker.foo");
navigator.serviceWorker.foo = 1;
shouldBe("navigator.serviceWorker.foo", "1");
gc();
shouldBe("navigator.serviceWorker.foo", "1");
setTimeout(function() {
gc();
shouldBe("navigator.serviceWorker.foo", "1");
finishJSTest();
}, 0);
</script>
</body>
</html>