UNPKG

sku-pg

Version:

Skulpt is a Javascript implementation of Python 2.x. Python that runs in your browser!

49 lines (41 loc) 1.31 kB
<!DOCTYPE html> <html> <!-- Copyright 2010 The Closure Library Authors. All Rights Reserved. Use of this source code is governed by an Apache 2.0 License. See the COPYING file for details. --> <head> <title>Closure Unit Test - goog._jsbinarysize.toolbar</title> <script src="../../base.js"></script> <script src="jsbinarysizetoolbar.js"></script> <script> goog.require("goog.testing.jsunit"); </script> <link rel="stylesheet" type="text/css" href="../../demos/css/demo.css"> <link rel="stylesheet" type="text/css" href="../../demos/css/menus.css"> <link rel="stylesheet" type="text/css" href="../../demos/css/toolbar.css"> <script> function setUp() { goog.dom.getElement('toolbar').innerHTML = ''; } function tearDown() { goog.dom.getElement('toolbar').innerHTML = ''; } function testDrawToolbar() { drawToolbar(); var toolbarElem = goog.dom.getElement('toolbar').firstChild assertNotNull("Toolbar container was not rendered", toolbarElem); assertEquals("Toolbar does not have expected number of children", 3, toolbarElem.childNodes.length); } </script> </head> <body> <fieldset> <legend>Toolbar should be rendered here <button onclick="drawToolbar()"> render</button></legend> <div id="toolbar"></div> </fieldset> </body> </html>