Sha256: 86795f6e29f85e50c47efea8dcb027afe7638d8e6bed03748cff9644327b2f98

Contents?: true

Size: 1.63 KB

Versions: 10

Compression:

Stored size: 1.63 KB

Contents

// ==========================================================================
// Project:   SproutCore - JavaScript Application Framework
// Copyright: ©2006-2009 Sprout Systems, Inc. and contributors.
//            portions copyright @2009 Apple, Inc.
// License:   Licened under MIT license (see license.js)
// ==========================================================================

/*global module test htmlbody ok equals same */

htmlbody('<style> .sc-static-layout { border: 1px red dotted; } </style>');
(function() {
  var appleURL='http://weblogs.baltimoresun.com/business/consuminginterests/blog/apple-logo1.jpg';

  var pane = SC.ControlTestPane.design()
    .add("image_not_loaded", SC.ImageView, { 
      value: appleURL, layout : {width: 200, height: 300}
    })
    .add("image_loaded", SC.ImageView, { 
      value: appleURL, status:'loaded', layout : {width: 200, height: 300}
    });
    
    pane.show();


    module('SC.ImageView ui', pane.standardSetup());
  
  
    test("Verify that all the rendering properties of an image that is being loaded are correct", function() {
      ok(pane.view('image_not_loaded').get('isVisibleInWindow'), 'image_not_loaded is visible in window');
      ok((pane.view('image_not_loaded').$().attr('src').indexOf('blank.gif')!=-1), "The src should be set to the blank URL.");    
    });
    
    test("Verify that all the rendering properties of an image that is loaded are correct", function() {
      ok(pane.view('image_loaded').get('isVisibleInWindow'), 'image_loaded is visible in window');
      equals(pane.view('image_loaded').$().attr('src'), appleURL, "should be the same url");    
    });
    
})();
  

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
sproutit-sproutcore-1.0.0.20090408130025 frameworks/sproutcore/frameworks/foundation/tests/views/image/ui.js
sproutit-sproutcore-1.0.0.20090416161445 frameworks/sproutcore/frameworks/foundation/tests/views/image/ui.js
sproutit-sproutcore-1.0.0.20090720093355 frameworks/sproutcore/frameworks/foundation/tests/views/image/ui.js
sproutit-sproutcore-1.0.0.20090720202429 frameworks/sproutcore/frameworks/foundation/tests/views/image/ui.js
sproutit-sproutcore-1.0.0.20090721125122 frameworks/sproutcore/frameworks/foundation/tests/views/image/ui.js
sproutit-sproutcore-1.0.126 frameworks/sproutcore/frameworks/foundation/tests/views/image/ui.js
sproutit-sproutcore-1.0.20090721145251 frameworks/sproutcore/frameworks/foundation/tests/views/image/ui.js
sproutit-sproutcore-1.0.20090721145280 frameworks/sproutcore/frameworks/foundation/tests/views/image/ui.js
sproutit-sproutcore-1.0.20090721145281 frameworks/sproutcore/frameworks/foundation/tests/views/image/ui.js
sproutit-sproutcore-1.0.203 frameworks/sproutcore/frameworks/foundation/tests/views/image/ui.js