Last change
on this file since 532 was
483,
checked in by hendrikvanantwerpen, 11 years ago
|
Added Dojo 1.9.3 release.
|
File size:
753 bytes
|
Line | |
---|
1 | define(["doh","dojo/_base/declare","dijit/_WidgetBase","dojox/dtl/_Templated"], function(doh, declare, _WidgetBase, _Templated) { |
---|
2 | var Test = declare([_WidgetBase, _Templated], { |
---|
3 | templateString: "<div>foo</div>" |
---|
4 | }); |
---|
5 | doh.register("dojox.dtl.tests._Templated", [ |
---|
6 | function test_create(t) { |
---|
7 | var ui = Test(); |
---|
8 | t.is("foo", ui.domNode.innerHTML); |
---|
9 | ui.destroy(); |
---|
10 | }, |
---|
11 | |
---|
12 | function test_create_multiple(t) { |
---|
13 | var root = document.createElement("div"); |
---|
14 | var ui1 = Test(); |
---|
15 | var ui2 = Test(); |
---|
16 | ui1.placeAt(root, "last"); |
---|
17 | ui2.placeAt(root, "last"); |
---|
18 | t.is("foo", ui1.domNode.innerHTML); |
---|
19 | t.is("foo", ui2.domNode.innerHTML); |
---|
20 | t.is(2, root.children.length, "root should have two children"); |
---|
21 | ui1.destroy(); |
---|
22 | ui2.destroy(); |
---|
23 | } |
---|
24 | ]); |
---|
25 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.