Debian Codegraph @

closure-library/closure/goog/editor/plugins/undoredostate_test.js

raw
1 // Copyright 2008 The Closure Library Authors. All Rights Reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS-IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 goog.provide('goog.editor.plugins.UndoRedoStateTest');
16 goog.setTestOnly('goog.editor.plugins.UndoRedoStateTest');
17
18 goog.require('goog.editor.plugins.UndoRedoState');
19 goog.require('goog.testing.jsunit');
20
21 var asyncState;
22 var syncState;
23
24 function setUp() {
25 asyncState = new goog.editor.plugins.UndoRedoState(true);
26 syncState = new goog.editor.plugins.UndoRedoState(false);
27 }
28
29 function testIsAsynchronous() {
30 assertTrue(
31 'Must return true for asynchronous state', asyncState.isAsynchronous());
32 assertFalse(
33 'Must return false for synchronous state', syncState.isAsynchronous());
34 }