Sha256: 8a89762f4f33485825f42f019b7b6fee1ccb27c728c249ef970b09c3bc1c6916

Contents?: true

Size: 1.82 KB

Versions: 40

Compression:

Stored size: 1.82 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.");
//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.");
//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

40 entries across 40 versions & 1 rubygems

Version Path
sproutcore-1.6.0.1 lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/theme.js
sproutcore-1.6.0.1-x86-mingw32 lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/theme.js
sproutcore-1.6.0 lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/theme.js
sproutcore-1.6.0-java lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/theme.js
sproutcore-1.6.0.rc.2-x86-mingw32 lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/theme.js
sproutcore-1.6.0.rc.2 lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/theme.js
sproutcore-1.6.0.rc.2-java lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/theme.js
sproutcore-1.6.0.rc.1-x86-mingw32 lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/theme.js
sproutcore-1.6.0.rc.1 lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/theme.js
sproutcore-1.6.0.rc.1-java lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/theme.js
sproutcore-1.6.0.beta.3-x86-mingw32 lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/theme.js
sproutcore-1.6.0.beta.3-java lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/theme.js
sproutcore-1.6.0.beta.3 lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/theme.js
sproutcore-1.6.0.beta.2-x86-mingw32 lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/theme.js
sproutcore-1.6.0.beta.2-java lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/theme.js
sproutcore-1.6.0.beta.2 lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/theme.js
sproutcore-1.6.0.beta.1 lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/theme.js
sproutcore-1.5.0-java lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/theme.js
sproutcore-1.5.0 lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/theme.js
sproutcore-1.5.0.rc.2 lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/theme.js