Last change
on this file since 533 was
483,
checked in by hendrikvanantwerpen, 11 years ago
|
Added Dojo 1.9.3 release.
|
File size:
659 bytes
|
Line | |
---|
1 | define(["doh", "dojo/_base/declare", "../Selection", "dijit/_WidgetBase"], |
---|
2 | function(doh, declare, Selection, _WidgetBase){ |
---|
3 | doh.register("tests.Selection", [ |
---|
4 | function test_Lifecycle(t){ |
---|
5 | var C = declare("MyWidget", [_WidgetBase, Selection], { |
---|
6 | updateRenderers: function(){ |
---|
7 | } |
---|
8 | }); |
---|
9 | var o = new C(); |
---|
10 | o.set("selectedItem", "1"); |
---|
11 | t.is("1", o.get("selectedItem")); |
---|
12 | t.is(["1"], o.get("selectedItems")); |
---|
13 | o.set("selectedItems", ["2"]); |
---|
14 | t.is("2", o.get("selectedItem")); |
---|
15 | t.is(["2"], o.get("selectedItems")); |
---|
16 | o = new C({selectedItem: "1"}); |
---|
17 | t.is("1", o.get("selectedItem")); |
---|
18 | t.is(["1"], o.get("selectedItems")); |
---|
19 | } |
---|
20 | ]); |
---|
21 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.