Home | History | Annotate | Download | only in ui
      1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 'use strict';
      6 
      7 base.require('ui.info_bar');
      8 
      9 base.unittest.testSuite('ui.info_bar', function() {
     10   test('instantiate', function() {
     11     var infoBar = new ui.InfoBar();
     12     infoBar.message = 'This is an info';
     13     infoBar.visible = true;
     14     this.addHTMLOutput(infoBar);
     15   });
     16 
     17   test('buttons', function() {
     18     var infoBar = new ui.InfoBar();
     19     infoBar.visible = true;
     20     infoBar.message = 'This is an info bar with buttons';
     21     var didClick = false;
     22     var button = infoBar.addButton('More info...', function() {
     23       didClick = true;
     24     });
     25     button.click();
     26     assertTrue(didClick);
     27     this.addHTMLOutput(infoBar);
     28   });
     29 });
     30