1 | <!DOCTYPE html> |
---|
2 | <html> |
---|
3 | <head> |
---|
4 | <meta http-equiv="Content-type" content="text/html; charset=utf-8"> |
---|
5 | <title>_TimePicker DOH Test</title> |
---|
6 | |
---|
7 | <script type="text/javascript" src="boilerplate.js"></script> |
---|
8 | |
---|
9 | <script type="text/javascript"> |
---|
10 | require([ |
---|
11 | "doh/runner", |
---|
12 | "dojo/_base/declare", |
---|
13 | "dijit/_TimePicker", |
---|
14 | "dojo/domReady!" |
---|
15 | ], function(doh, declare, _TimePicker){ |
---|
16 | |
---|
17 | doh.register("tests", [ |
---|
18 | function extended_range(){ |
---|
19 | var t1 = _TimePicker({}, "t1"); |
---|
20 | t1.set('value', new Date("December 11, 2011 00:09:30")); |
---|
21 | doh.is(96, t1.timeMenu.children.length, 'num entries 1'); |
---|
22 | }, |
---|
23 | function constraints17250(){ |
---|
24 | var tp = new (declare(_TimePicker, { |
---|
25 | isDisabledDate: function () { |
---|
26 | return this.inherited(arguments); |
---|
27 | } |
---|
28 | }))(); |
---|
29 | |
---|
30 | tp.set('constraints', { |
---|
31 | constructor: null, |
---|
32 | clickableIncrement: 'T01:00:00', |
---|
33 | set: function () { |
---|
34 | throw new Error('Wrong set called'); |
---|
35 | } |
---|
36 | }); |
---|
37 | |
---|
38 | tp.set('value', new Date()); |
---|
39 | doh.is(24, tp.timeMenu.children.length, 'Increment constraints should be copied but other non-constraint properties should not'); |
---|
40 | } |
---|
41 | ]); |
---|
42 | |
---|
43 | doh.run(); |
---|
44 | }); |
---|
45 | </script> |
---|
46 | |
---|
47 | </head> |
---|
48 | <body class="claro"> |
---|
49 | <h1 class="testTitle">dijit._TimePicker automated tests (non-robot)</h1> |
---|
50 | |
---|
51 | <label for="t1">t1:</label> |
---|
52 | <div id="t1" style="height: 200px; width: 150px; overflow: auto;"></div> |
---|
53 | </body> |
---|
54 | </html> |
---|