aboutsummaryrefslogtreecommitdiff
path: root/contexts/data/lib/closure-library/closure/goog/testing/benchmarks/jsbinarysizetoolbar_test.html
blob: 86761531fc898e70832c67c985a6847a6b522294 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!DOCTYPE html>
<html>
<!--
Copyright 2010 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 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>