Sha256: dbffe21e993d7185597a1f6dd97dde888ed8e5c4b0534762b9116dfbdc36e796

Contents?: true

Size: 1.71 KB

Versions: 1

Compression:

Stored size: 1.71 KB

Contents

// ==========================================================================
// Project:   SproutCore - JavaScript Application Framework
// Copyright: ©2006-2011 Strobe Inc. and contributors.
//            Portions ©2008-2011 Apple Inc. All rights reserved.
// License:   Licensed under MIT license (see license.js)
// ==========================================================================

/*global module test equals context ok */

module("SC.View#themes");

// TODO: This isn't passing on master. Alex needs to take a look at it.

//var t1 = SC.Theme.addTheme("sc-test-1", SC.BaseTheme.extend({name: 'test-1' }));
//var t2 = SC.Theme.addTheme("sc-test-2", SC.BaseTheme.extend({name: 'test-2' }));

//test("changing themes propagates to child view.", function() {
  //var view = SC.View.create({
    //"childViews": "child".w(),
    //theme: "sc-test-1",
    //child: SC.View.extend({
      
    //})
  //});
  
  //ok(t1 === view.get("theme"), "view's theme should be sc-test-1");
  //ok(t1 === view.child.get("theme"), "view's child's theme should be sc-test-1");
  //view.set('themeName', 'sc-test-2');
  //ok(t2 === view.get("theme"), "view's theme should be sc-test-2");
  //ok(t2 === view.child.get("theme"), "view's child's theme should be sc-test-2");
//});

//test("adding child to parent propagates theme to child view.", function() {
  //var child = SC.View.create({});
  //var view = SC.View.create({
    //theme: "sc-test-1"
  //});
  
  //ok(t1 === view.get("theme"), "view's theme should be sc-test-1");
  //equals(child.get("theme"), SC.Theme.find('sc-base'), "view's child's theme should start at base theme");
  //view.appendChild(child);
  //equals(t1, child.get("theme"), "view's child's theme should be sc-test-1");
//});

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sproutcore-1.5.0.rc.1 lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/theme.js