Sha256: e9aeb3e87590790f7262b9e15f3c622e12e74c7175253021f931c7d7006ed001

Contents?: true

Size: 957 Bytes

Versions: 2

Compression:

Stored size: 957 Bytes

Contents

// ==========================================================================
// Project:   SproutCore - JavaScript Application Framework
// Copyright: ©2006-2010 Apple Inc. and contributors.
// License:   Licensed under MIT license (see license.js)
// ==========================================================================

/*global module test equals context ok same Q$ htmlbody */

var pane;

module("SC.Pane#layout", {
  setup: function() {
    pane = SC.Pane.create({
      layout: { top: 0, left: 0, width: 1, height: 1}
    });
    pane.append();
  },
  
  teardown: function() {
    pane.remove();
  }
});

test("make sure that a call to adjust actually adjusts the view's size", function() {  
  SC.RunLoop.begin();
  pane.adjust({ width: 100, height: 50 });
  SC.RunLoop.end();

  equals(pane.$()[0].style.width, '100px', 'width should have been adjusted');
  equals(pane.$()[0].style.height, '50px', 'height should have been adjusted');
});

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
spade-0.0.1 sproutcore/frameworks/core_foundation/tests/views/pane/layout.js
sproutcore-1.5.0.pre.5 lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/pane/layout.js