diff options
Diffstat (limited to 'tests/FunctionalTests/active-controls/protected')
12 files changed, 78 insertions, 18 deletions
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveButtonTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveButtonTest.page index c475f17f..2e192c19 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveButtonTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveButtonTest.page @@ -1,11 +1,11 @@ <com:TForm ID="form1"> - + <h1>TActiveButton Functional Test</h1> - <com:TActiveButton ID="button2" Text="Button 1" + <com:TActiveButton ID="button2" Text="Button 1" OnClick="button2_onclick" OnCallback="button2_oncallback" /> - + <com:TActiveLabel ID="label1" Text="Label 1" /> - + <com:TJavascriptLogger /> - + </com:TForm>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveButtonTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveButtonTest.php index 6282b804..42322ea1 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActiveButtonTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveButtonTest.php @@ -2,11 +2,16 @@ class ActiveButtonTest extends TPage { + function onLoad($param) + { + new TActiveButton; + } + function button2_onclick($sender, $param) { $this->label1->Text = "Button 1 was clicked "; } - + function button2_oncallback($sender, $param) { $this->label1->Text .= "using callback!"; diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveImageButtonTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveImageButtonTest.page new file mode 100644 index 00000000..7696261a --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveImageButtonTest.page @@ -0,0 +1,24 @@ +<com:TForm ID="form1">
+
+ <h1>TActiveImageButton Functional Test</h1>
+
+ This is
+ <com:TActiveImageButton
+ ID="image1"
+ ImageUrl=<%~ report.gif %> OnClick="image1_clicked" />
+ an image.
+
+ <div style="border:1px solid #ccc; padding:1em; border:1em">
+ <com:TActiveLabel ID="label1" Text="Label 1" />
+ </div>
+
+ <com:TActiveButton ID="button1" Text="Change Text" OnClick="change_text" />
+ <com:TActiveButton ID="button2" Text="Change Image"
+ CustomData=<%~ group.gif %>
+ OnClick="change_image" />
+ <com:TActiveButton ID="button3" Text="Change Align" OnClick="change_align" />
+ <com:TActiveButton ID="button4" Text="Change Description" OnClick="change_description" />
+
+ <com:TJavascriptLogger />
+
+</com:TForm>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveImageButtonTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveImageButtonTest.php new file mode 100644 index 00000000..eced2457 --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveImageButtonTest.php @@ -0,0 +1,31 @@ +<?php
+
+class ActiveImageButtonTest extends TPage
+{
+ function change_text($sender, $param)
+ {
+ $this->image1->AlternateText = "Muahahahah";
+ }
+
+ function change_image($sender, $param)
+ {
+ $this->image1->ImageUrl = $sender->CustomData;
+ }
+
+ function change_align($sender, $param)
+ {
+ $this->image1->ImageAlign="absbottom";
+ }
+
+ function change_description($sender, $param)
+ {
+ $this->image1->DescriptionUrl = "maahahhaa";
+ }
+
+ function image1_clicked($sender, $param)
+ {
+ $this->label1->Text = "Image clicked at x={$param->x}, y={$param->y}";
+ }
+}
+
+?>
\ No newline at end of file diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActivePanelTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActivePanelTest.php index 8a0a4316..b29f8920 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/ActivePanelTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/ActivePanelTest.php @@ -5,7 +5,7 @@ class ActivePanelTest extends TPage function callback1_requested($sender, $param) { $this->content1->visible = true; - $this->panel1->render($param->output); + $this->panel1->render($param->NewWriter); } } diff --git a/tests/FunctionalTests/active-controls/protected/pages/AutoCompleteTest.php b/tests/FunctionalTests/active-controls/protected/pages/AutoCompleteTest.php index df314891..21f61abe 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/AutoCompleteTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/AutoCompleteTest.php @@ -9,15 +9,15 @@ class AutoCompleteTest extends TPage { $sender->setDataSource($this->matchCountries($param->getParameter())); $sender->dataBind(); - $sender->flush($param->getOutput()); + $sender->render($param->getNewWriter()); $this->label1->Text = "suggestion for ".$param->getParameter(); } - + public function callback_requested($sender, $param) { $this->label1->Text = "Label 1: ".$this->textbox3->Text; } - + protected function matchCountries($token) { $info = Prado::createComponent('System.I18N.core.CultureInfo', 'en'); @@ -31,9 +31,9 @@ class AutoCompleteTest extends TPage $list[] = $country; $count++; if($count > 10) break; - } + } } - return $list; + return $list; } } diff --git a/tests/FunctionalTests/active-controls/protected/pages/CustomTemplateControlTest.php b/tests/FunctionalTests/active-controls/protected/pages/CustomTemplateControlTest.php index 753de25c..18005a2b 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/CustomTemplateControlTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/CustomTemplateControlTest.php @@ -16,7 +16,7 @@ class CustomTemplateControlTest extends TPage function button2_callback($sender, $param)
{
- $this->placeholder->render($param->output);
+ $this->placeholder->render($param->NewWriter);
$this->label1->Text .= " using callback!";
$this->label1->Text .= "... and this is the textbox text: ". $this->foo->Text;
diff --git a/tests/FunctionalTests/active-controls/protected/pages/NestedActiveControls.php b/tests/FunctionalTests/active-controls/protected/pages/NestedActiveControls.php index 4c6190ee..76b77ff7 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/NestedActiveControls.php +++ b/tests/FunctionalTests/active-controls/protected/pages/NestedActiveControls.php @@ -5,7 +5,7 @@ class NestedActiveControls extends TPage function callback1_requested($sender, $param) { $this->content1->visible = true; - $this->panel1->render($param->output); + $this->panel1->render($param->NewWriter); } function button1_clicked($sender, $param) diff --git a/tests/FunctionalTests/active-controls/protected/pages/PeriodicCallbackTest.page b/tests/FunctionalTests/active-controls/protected/pages/TimeTriggeredCallbackTest.page index bbc12862..36b3bc05 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/PeriodicCallbackTest.page +++ b/tests/FunctionalTests/active-controls/protected/pages/TimeTriggeredCallbackTest.page @@ -1,15 +1,15 @@ <com:TForm ID="form1"> - <h1>TPeriodicCallback + ViewState Tests</h1> + <h1>TTimeTriggeredCallback + ViewState Tests</h1> <com:TActiveButton id="button1" Text="Start Timer" OnCallback="start_timer" /> <com:TActiveButton Text="Stop Timer" OnCallback="stop_timer" /> <div style="margin:1em; padding:1em; border:1px solid #ccc;"> <com:TActiveLabel ID="label1" Text="ViewState Counter : " /> </div> - <com:TPeriodicCallback ID="timer1" Interval="0.1" OnCallback="tick"> + <com:TTimeTriggeredCallback ID="timer1" Interval="0.1" OnCallback="tick"> <prop:ActiveControl.ClientSide OnLoading="$('status').show()" OnComplete="$('status').hide()" /> - </com:TPeriodicCallback> + </com:TTimeTriggeredCallback> <div id="status" style="margin:1em; padding:0.5em; text-align:center; background-color:#900; diff --git a/tests/FunctionalTests/active-controls/protected/pages/PeriodicCallbackTest.php b/tests/FunctionalTests/active-controls/protected/pages/TimeTriggeredCallbackTest.php index 13633a00..788857f8 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/PeriodicCallbackTest.php +++ b/tests/FunctionalTests/active-controls/protected/pages/TimeTriggeredCallbackTest.php @@ -1,6 +1,6 @@ <?php -class PeriodicCallbackTest extends TPage +class TimeTriggeredCallbackTest extends TPage { function start_timer($sender, $param) { diff --git a/tests/FunctionalTests/active-controls/protected/pages/group.gif b/tests/FunctionalTests/active-controls/protected/pages/group.gif Binary files differnew file mode 100644 index 00000000..89c577f7 --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/group.gif diff --git a/tests/FunctionalTests/active-controls/protected/pages/report.gif b/tests/FunctionalTests/active-controls/protected/pages/report.gif Binary files differnew file mode 100644 index 00000000..f7169762 --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/report.gif |