annotate _test/Test/Web/View.pm @ 194:4d0e1962161c

Replaced tabs with spaces IMPL::Web::View - fixed document model, new features (control classes, document constructor parameters)
author cin
date Tue, 10 Apr 2012 20:08:29 +0400
parents 78a18a2b6266
children 7a920771fd8e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
183
2184fa28b49e IMPL::Web::View::TTLoader tests
cin
parents:
diff changeset
1 package Test::Web::View;
188
029c9610528c Memory leak tests in IMPL::Web::View
cin
parents: 186
diff changeset
2 use IMPL::Profiler::Memory;
183
2184fa28b49e IMPL::Web::View::TTLoader tests
cin
parents:
diff changeset
3 use strict;
2184fa28b49e IMPL::Web::View::TTLoader tests
cin
parents:
diff changeset
4 use warnings;
185
ae8072f2f2a3 IMPL::Web::View::TTDocument tests, fixes
cin
parents: 184
diff changeset
5 use utf8;
183
2184fa28b49e IMPL::Web::View::TTLoader tests
cin
parents:
diff changeset
6
2184fa28b49e IMPL::Web::View::TTLoader tests
cin
parents:
diff changeset
7 use parent qw(IMPL::Test::Unit);
2184fa28b49e IMPL::Web::View::TTLoader tests
cin
parents:
diff changeset
8 __PACKAGE__->PassThroughArgs;
2184fa28b49e IMPL::Web::View::TTLoader tests
cin
parents:
diff changeset
9
185
ae8072f2f2a3 IMPL::Web::View::TTDocument tests, fixes
cin
parents: 184
diff changeset
10 use File::Slurp;
188
029c9610528c Memory leak tests in IMPL::Web::View
cin
parents: 186
diff changeset
11 use Scalar::Util qw(weaken);
185
ae8072f2f2a3 IMPL::Web::View::TTDocument tests, fixes
cin
parents: 184
diff changeset
12
188
029c9610528c Memory leak tests in IMPL::Web::View
cin
parents: 186
diff changeset
13 use IMPL::Test qw(assert test GetCallerSourceLine);
183
2184fa28b49e IMPL::Web::View::TTLoader tests
cin
parents:
diff changeset
14 use IMPL::Web::View::TTLoader();
2184fa28b49e IMPL::Web::View::TTLoader tests
cin
parents:
diff changeset
15
2184fa28b49e IMPL::Web::View::TTLoader tests
cin
parents:
diff changeset
16 use constant {
194
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
17 TTLoader => typeof IMPL::Web::View::TTLoader,
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
18 MProfiler => 'IMPL::Profiler::Memory'
183
2184fa28b49e IMPL::Web::View::TTLoader tests
cin
parents:
diff changeset
19 };
2184fa28b49e IMPL::Web::View::TTLoader tests
cin
parents:
diff changeset
20
188
029c9610528c Memory leak tests in IMPL::Web::View
cin
parents: 186
diff changeset
21 sub AssertMemoryLeak {
194
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
22 my $code = shift;
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
23 my $dump = shift;
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
24
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
25 my $data = MProfiler->Monitor($code);
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
26
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
27 if ($data->isLeak and $dump) {
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
28 write_file("dump.out", { binmode => ':utf8' }, $data->Dump() );
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
29 }
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
30
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
31 assert( not($data->isLeak), "Memory leak detected", GetCallerSourceLine() , @{$data->{objects}} );
188
029c9610528c Memory leak tests in IMPL::Web::View
cin
parents: 186
diff changeset
32 }
029c9610528c Memory leak tests in IMPL::Web::View
cin
parents: 186
diff changeset
33
185
ae8072f2f2a3 IMPL::Web::View::TTDocument tests, fixes
cin
parents: 184
diff changeset
34 sub templatesDir {
194
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
35 $_[0]->GetResourceDir('Resources','TTView');
185
ae8072f2f2a3 IMPL::Web::View::TTDocument tests, fixes
cin
parents: 184
diff changeset
36 }
ae8072f2f2a3 IMPL::Web::View::TTDocument tests, fixes
cin
parents: 184
diff changeset
37
188
029c9610528c Memory leak tests in IMPL::Web::View
cin
parents: 186
diff changeset
38 sub CreateLoader {
194
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
39 my ($this) = @_;
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
40
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
41 my $loader = TTLoader->new(
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
42 {
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
43 INCLUDE_PATH => [
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
44 $this->templatesDir
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
45 ],
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
46 INTERPOLATE => 1,
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
47 POST_CHOMP => 1,
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
48 ENCODING => 'utf-8'
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
49 },
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
50 ext => '.tt',
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
51 initializer => 'global.tt',
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
52 globals => {
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
53 site => {
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
54 name => 'Test Site'
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
55 },
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
56 date => {
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
57 now => sub { localtime(time); }
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
58 },
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
59 dynamic => sub { 'this is a dynamic value' }
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
60 }
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
61 );
188
029c9610528c Memory leak tests in IMPL::Web::View
cin
parents: 186
diff changeset
62 }
029c9610528c Memory leak tests in IMPL::Web::View
cin
parents: 186
diff changeset
63
029c9610528c Memory leak tests in IMPL::Web::View
cin
parents: 186
diff changeset
64 test TTLoaderTests => sub {
194
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
65 my ($this) = @_;
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
66
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
67 my $loader = $this->CreateLoader();
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
68
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
69 # test the loader to be able to find a desired resource
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
70 assert( defined($loader->template('simple') ) );
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
71
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
72 # loader should be initialized on demand
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
73 assert( not $loader->isInitialized );
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
74
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
75 # loader should be able to load a document
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
76 my $doc = $loader->document('simple');
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
77 assert(defined $doc);
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
78
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
79 assert( $loader->isInitialized );
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
80 assert( $loader->context->stash->get('user') eq 'test_user');
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
81
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
82 # document should inherit loader's context
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
83 assert( $doc->context->stash->get('user') eq 'test_user');
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
84
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
85 # document should not have 'this' template variable
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
86 assert( not $doc->templateVars('this') );
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
87
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
88 assert( $doc->context != $loader->context); # document should have an own context
183
2184fa28b49e IMPL::Web::View::TTLoader tests
cin
parents:
diff changeset
89 };
2184fa28b49e IMPL::Web::View::TTLoader tests
cin
parents:
diff changeset
90
185
ae8072f2f2a3 IMPL::Web::View::TTDocument tests, fixes
cin
parents: 184
diff changeset
91 test TTDocumentTests => sub {
194
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
92 my ($this) = @_;
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
93 my $loader = $this->CreateLoader();
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
94
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
95 my $doc = $loader->document('simple');
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
96
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
97 assert(defined $doc);
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
98 $doc->title('test document');
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
99
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
100 assert($doc->nodeName eq 'document');
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
101 assert($doc->title eq 'test document');
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
102
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
103 assert(not $doc->can('notexists')); # autoloaded property should be ignored
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
104 assert(not defined $doc->notexists); # nonexisting property
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
105 assert($doc->template->version == 10); # static metadata
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
106 assert($doc->templateVars('notexists') eq ''); #nonexisting template variable
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
107 assert($doc->templateVars('user') eq 'test_user'); # global data
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
108 assert($doc->templateVars('templateVar') eq ''); # defined in CTOR block, should be local
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
109 assert($doc->templateVars('dynamic') eq 'this is a dynamic value');
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
110
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
111 my $text = $doc->Render();
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
112 my $expected = read_file($this->GetResourceFile('Resources','TTView.Output','simple.txt'), binmode => ':utf8');
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
113
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
114 assert($text eq $expected, "Bad Render() output","Got: $text", "Expected: $expected");
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
115
185
ae8072f2f2a3 IMPL::Web::View::TTDocument tests, fixes
cin
parents: 184
diff changeset
116 };
ae8072f2f2a3 IMPL::Web::View::TTDocument tests, fixes
cin
parents: 184
diff changeset
117
186
6c0fee769b0c IMPL::Web::View::TTControl tests, fixes
cin
parents: 185
diff changeset
118 test TTControlTests => sub {
194
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
119 my ($this) = @_;
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
120
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
121 my $loader = $this->CreateLoader();
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
122
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
123 my $doc = $loader->document('simple');
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
124
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
125 assert(defined $doc);
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
126
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
127 my $factory = $doc->require('My/Org/Panel');
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
128
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
129 assert(defined $factory);
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
130
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
131
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
132 assert($factory->context->stash != $doc->context->stash);
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
133
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
134 assert($factory == $doc->require('My/Org/Panel'), "Control should be loaded only once");
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
135
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
136 my $ctl = $factory->new('information', { visualClass => 'simple', data => ['one','two','hello world'] } );
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
137
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
138 assert(defined $ctl);
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
139
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
140 assert($ctl->nodeName eq 'information', "Created control should have a name", "Got: ".$ctl->nodeName, "Expected: information");
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
141
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
142 assert($ctl->nodeProperty('visualClass') eq 'simple');
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
143
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
144 assert($factory->instances == 1);
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
145
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
146 $doc->appendChild($ctl);
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
147
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
148 assert($doc->templateVars('dojo.require'));
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
149 assert(ref $doc->templateVars('dojo.require') eq 'ARRAY');
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
150 assert($doc->templateVars('dojo.require')->[0] eq 'dijit.form.Input' );
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
151
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
152 my $text = $ctl->Render();
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
153
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
154 my $expected = read_file($this->GetResourceFile('Resources', 'TTView.Output', 'Panel.txt'), binmode => ':utf8');
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
155 assert($text eq $expected, '$ctl->Render(): Bad output', "Got: $text", "Expected: $expected");
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
156
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
157
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
158
191
78a18a2b6266 IMPL::Web::View improvements (unstable)
cin
parents: 190
diff changeset
159 };
78a18a2b6266 IMPL::Web::View improvements (unstable)
cin
parents: 190
diff changeset
160
78a18a2b6266 IMPL::Web::View improvements (unstable)
cin
parents: 190
diff changeset
161 test TestDocumentLayout => sub {
194
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
162 my ($this) = @_;
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
163
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
164 my $loader = $this->CreateLoader();
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
165
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
166 my $doc = $loader->document(
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
167 'complex',
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
168 {
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
169 data => [qw(one two three)],
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
170 site => {
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
171 name => 'Test Site'
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
172 }
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
173 }
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
174 );
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
175
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
176 assert($doc->layout eq 'Layout/default');
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
177
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
178 assert($doc->templateVars('dojo.require')->[0]);
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
179
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
180 my $text = $doc->Render();
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
181
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
182 my $expected = read_file($this->GetResourceFile('Resources', 'TTView.Output', 'complex.default.txt'), binmode => ':utf8' );
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
183 assert($text eq $expected, '$doc->Render(): Bad output', "Got: $text", "Expected: $expected");
186
6c0fee769b0c IMPL::Web::View::TTControl tests, fixes
cin
parents: 185
diff changeset
184 };
6c0fee769b0c IMPL::Web::View::TTControl tests, fixes
cin
parents: 185
diff changeset
185
188
029c9610528c Memory leak tests in IMPL::Web::View
cin
parents: 186
diff changeset
186 test TestMemoryLeaks => sub {
194
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
187 my ($this) = @_;
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
188
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
189 my $loader = $this->CreateLoader();
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
190 $loader->document('simple'); # force loader initialization
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
191
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
192 AssertMemoryLeak(sub {
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
193 my $doc = $loader->document('simple');
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
194 });
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
195
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
196 AssertMemoryLeak(sub {
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
197 my $doc = $loader->document('simple');
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
198 $doc->Render( { self => $doc } );
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
199 });
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
200
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
201 $loader->template('Layout/default');
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
202 $loader->template('My/Org/Panel');
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
203 $loader->template('My/Org/TextPreview');
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
204 AssertMemoryLeak(sub {
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
205 my $doc = $loader->document('simple');
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
206 my $factory = $doc->require('My/Org/Panel');
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
207 my $ctl = $doc->AppendChild($factory->new('information', { visualClass => 'complex' }) );
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
208 });
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
209
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
210 $loader->template('complex');
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
211 AssertMemoryLeak(sub {
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
212 my $doc = $loader->document('complex');
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
213 $doc->Render();
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
214 },'dump');
4d0e1962161c Replaced tabs with spaces
cin
parents: 191
diff changeset
215
188
029c9610528c Memory leak tests in IMPL::Web::View
cin
parents: 186
diff changeset
216 };
029c9610528c Memory leak tests in IMPL::Web::View
cin
parents: 186
diff changeset
217
183
2184fa28b49e IMPL::Web::View::TTLoader tests
cin
parents:
diff changeset
218 1;