comparison _test/Test/Web/View.pm @ 263:0f59b2de72af

*fixed IMPL::DOM::Schema circular module references *modified IMPL::Object::Singleton, added auto-activation *code cleanups, docs
author sergey
date Wed, 09 Jan 2013 05:17:44 +0400
parents b8c724f6de36
children c6d0f889ef87
comparison
equal deleted inserted replaced
262:4ac39b9e2ca4 263:0f59b2de72af
129 129
130 my $factory = $doc->RequireControl('My/Org/Panel'); 130 my $factory = $doc->RequireControl('My/Org/Panel');
131 131
132 assert(defined $factory); 132 assert(defined $factory);
133 133
134 134 # control factory shares document scope to perform an initialization on demand
135 assert($factory->context->stash != $doc->context->stash); 135 assert($factory->context->stash == $doc->context->stash);
136 136
137 assert($factory == $doc->RequireControl('My/Org/Panel'), "Control should be loaded only once"); 137 assert($factory == $doc->RequireControl('My/Org/Panel'), "Control should be loaded only once");
138 138
139 my $ctl = $factory->new('information', { visualClass => 'simple', data => ['one','two','hello world'] } ); 139 my $ctl = $factory->new('information', { visualClass => 'simple', data => ['one','two','hello world'] } );
140 140
205 $loader->template('My/Org/TextPreview'); 205 $loader->template('My/Org/TextPreview');
206 AssertMemoryLeak(sub { 206 AssertMemoryLeak(sub {
207 my $doc = $loader->document('simple'); 207 my $doc = $loader->document('simple');
208 my $factory = $doc->RequireControl('My/Org/Panel'); 208 my $factory = $doc->RequireControl('My/Org/Panel');
209 my $ctl = $doc->childNodes($factory->new('information', { visualClass => 'complex' }) ); 209 my $ctl = $doc->childNodes($factory->new('information', { visualClass => 'complex' }) );
210 }); 210 },'dump');
211 211
212 $loader->template('complex'); 212 $loader->template('complex');
213 AssertMemoryLeak(sub { 213 AssertMemoryLeak(sub {
214 my $doc = $loader->document('complex'); 214 my $doc = $loader->document('complex');
215 $doc->Render(); 215 $doc->Render();