sku-pg
Version:
Skulpt is a Javascript implementation of Python 2.x. Python that runs in your browser!
67 lines (59 loc) • 1.78 kB
HTML
<html>
<!--
Copyright 2011 The Closure Library Authors. All Rights Reserved.
Use of this source code is governed by the Apache License, Version 2.0.
See the COPYING file for details.
-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Closure Unit Tests - goog.storage.mechanism.PrefixedMechanism</title>
<script src="../../base.js"></script>
<script>
goog.require('goog.storage.mechanism.iterableMechanismTester');
goog.require('goog.storage.mechanism.mechanismSeparationTester');
goog.require('goog.storage.mechanism.mechanismSharingTester');
goog.require('goog.storage.mechanism.mechanismTester');
goog.require('goog.storage.mechanism.HTML5LocalStorage');
goog.require('goog.storage.mechanism.PrefixedMechanism');
goog.require('goog.testing.jsunit');
</script>
</head>
<body>
<script>
var submechanism = null;
function setUp() {
submechanism = new goog.storage.mechanism.HTML5LocalStorage();
if (submechanism.isAvailable()) {
mechanism = new goog.storage.mechanism.PrefixedMechanism(
submechanism, 'test');
mechanism_shared = new goog.storage.mechanism.PrefixedMechanism(
submechanism, 'test');
mechanism_separate = new goog.storage.mechanism.PrefixedMechanism(
submechanism, 'test2');
}
}
function tearDown() {
if (!!mechanism) {
mechanism.clear();
mechanism = null;
}
if (!!mechanism_shared) {
mechanism_shared.clear();
mechanism_shared = null;
}
if (!!mechanism_separate) {
mechanism_separate.clear();
mechanism_separate = null;
}
}
function testAvailability() {
if (submechanism.isAvailable()) {
assertNotNull(mechanism);
assertNotNull(mechanism_shared);
assertNotNull(mechanism_separate);
}
}
</script>
</body>
</html>