UNPKG

@qooxdoo/framework

Version:

The JS Framework for Coders

46 lines (34 loc) 1.14 kB
/* ************************************************************************ qooxdoo - the new era of web development http://qooxdoo.org Copyright: 2007-2012 1&1 Internet AG, Germany, http://www.1und1.de License: MIT: https://opensource.org/licenses/MIT See the LICENSE file in the project's top-level directory for details. Authors: * Martin Wittemann (wittemann) ************************************************************************ */ qx.Class.define("qx.test.bom.PageVisibility", { extend: qx.dev.unit.TestCase, include: [qx.dev.unit.MMock], members: { setUp() { this.__visibility = new qx.bom.PageVisibility(); }, testVisibilityState() { var possible = ["hidden", "visible", "prerender", "unloaded"]; var value = this.__visibility.getVisibilityState(); this.assertInArray(value, possible); }, testHidden() { this.assertBoolean(this.__visibility.isHidden()); }, testGetInstance() { this.assertEquals( qx.bom.PageVisibility.getInstance(), qx.bom.PageVisibility.getInstance() ); } } });