(function($) {
  var $browser, $breadcrumbs, $browserContainer;

  module('Browser', {
    setup: function() {
      $.fx.off = true;
      $browser = $('<div>').addClass('browser-test').appendTo('#qunit-fixture');
      $breadcrumbs = $('<div>').attr('id', 'breadcrumbs').appendTo($browser);
      $browserContainer = $('<div>').addClass('container').appendTo($browser);
      ok($browserContainer.cloudBrowser(), 'Browser initialized');
      equal($breadcrumbs.find('ul').size(), 1, 'Breadcrumbs initialized');
    }
  });

  // Browser tests
  test('Add panel', function() {
    ok($browserContainer.cloudBrowser('addPanel', { title: 'testPanel123' }), 'Add panel');
    equal($browser.find('.panel').size(), 1, 'Browser has 1 panel');
    equal($breadcrumbs.find('ul li').size(), 1, 'Browser has 1 breadcrumb');
    equal($breadcrumbs.find('ul li:first span').html(), 'testPanel123', 'Panel has correct title');
  });

  test('Add a second panel', function() {
    ok($browserContainer.cloudBrowser('addPanel', { title: 'testPanel123' }), 'Add first panel');
    ok($browserContainer.cloudBrowser('addPanel', { title: 'testPanel456' }), 'Add second panel');
    equal($browser.find('.panel').size(), 2, 'Browser has 2 panels');
    equal($breadcrumbs.find('ul li').size(), 2, 'Browser has 2 breadcrumbs');
    equal($breadcrumbs.find('ul li:last span').html(), 'testPanel456', 'New panel has correct title');
    equal($breadcrumbs.find('ul li:first span').html(), 'testPanel123', 'First panel still has correct title');
  });

  test('Select panel', function() {
    ok($browserContainer.cloudBrowser('addPanel', { title: 'testPanel123' }), 'Add first panel');
    ok($browserContainer.cloudBrowser('addPanel', { title: 'testPanel456' }), 'Add second panel');
    ok($browserContainer.cloudBrowser('addPanel', { title: 'testPanel789' }), 'Add third panel');

    stop();
    $browserContainer.cloudBrowser('selectPanel', {
      panel: $browser.find('.panel:first').next(),
      complete: function() {
        start();
        ok(true, 'Select second panel');
      }
    });  

    equal($browser.find('.panel').size(), 2, 'Browser has 2 panels');
    equal($breadcrumbs.find('ul li:first span').html(), 'testPanel123', 'First panel still has correct title');
    equal($breadcrumbs.find('ul li:last span').html(), 'testPanel456', 'Second panel still has correct title');
    equal($breadcrumbs.find('ul li').size(), 2, 'Browser has 2 breadcrumbs');

    stop();
    $browserContainer.cloudBrowser('selectPanel', {
      panel: $browser.find('.panel:first'),
      complete: function() {
        start();
        ok(true, 'Select first panel');
      }
    });  

    equal($browser.find('.panel').size(), 1, 'Browser has 1 panel');
    equal($breadcrumbs.find('ul li:first span').html(), 'testPanel123', 'First panel still has correct title');
    equal($breadcrumbs.find('ul li').size(), 1, 'Browser has 1 breadcrumb');
  });
}(jQuery)); 

@@ -2928,16 +2928,1430 @@
 );%0A  %7D);
+%0A%0A  test('Remove all panels', function() %7B%0A    ok($browserContainer.cloudBrowser('addPanel', %7B title: 'testPanel123' %7D), 'Add first panel');%0A    ok($browserContainer.cloudBrowser('addPanel', %7B title: 'testPanel456' %7D), 'Add second panel');%0A    ok($browserContainer.cloudBrowser('addPanel', %7B title: 'testPanel789' %7D), 'Add third panel');%0A    equal($browserContainer.find('.panel').size(), 3, 'Correct # of panels');%0A    ok($browserContainer.cloudBrowser('removeAllPanels'), 'Remove all panels');%0A    equal($browserContainer.find('.panel').size(), 0, 'All panels removed');%0A    ok($browserContainer.cloudBrowser('addPanel', %7B title: 'testPanel123' %7D), 'Add 1 panel');%0A    equal($browserContainer.find('.panel').size(), 1, 'Correct # of panels');%0A  %7D);%0A%0A  test('Maximize panel', function() %7B%0A    ok($browserContainer.cloudBrowser('addPanel', %7B title: 'testPanel123' %7D), 'Add first panel');%0A    ok($browserContainer.cloudBrowser('addPanel', %7B title: 'testPanel456' %7D), 'Add second panel');%0A    equal($browserContainer.find('.panel').size(), 2, 'Correct # of panels');%0A    ok($browserContainer.cloudBrowser('toggleMaximizePanel', %7B panel: $browserContainer.find('.panel:first')%7D), 'Maximize first panel');%0A    ok($browserContainer.find('.panel:first').hasClass('maximized'), 'First panel has maximized style');%0A    ok(!$browserContainer.find('.panel:last').hasClass('maximized'), 'Last panel has correct style');%0A  %7D);
 %0A%7D(jQuer

Add more browser tests