summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/active-controls/protected
diff options
context:
space:
mode:
authorwei <>2006-10-21 02:46:12 +0000
committerwei <>2006-10-21 02:46:12 +0000
commit68eb20ae56e35cc48982be6f15c0738a276c3684 (patch)
tree520ce7d2d4f72ae3bd326b586be6f0cc1a38afb6 /tests/FunctionalTests/active-controls/protected
parent5d6b7068de8768d56c4731cc7301438b69354d57 (diff)
update ajax callback to be quequed
Diffstat (limited to 'tests/FunctionalTests/active-controls/protected')
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/DelayedCallback.page7
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/DelayedCallback.php21
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.page45
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.php11
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/Sessioned/config.xml4
5 files changed, 88 insertions, 0 deletions
diff --git a/tests/FunctionalTests/active-controls/protected/pages/DelayedCallback.page b/tests/FunctionalTests/active-controls/protected/pages/DelayedCallback.page
new file mode 100644
index 00000000..b8fba648
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/DelayedCallback.page
@@ -0,0 +1,7 @@
+<com:TForm>
+<h1>Delayed Callback Test</h1>
+<com:TActiveButton ID="button1" Text="Delayed 4000" OnCallback="callback1" />
+<com:TActiveButton ID="button2" Text="Delayed 2000" OnCallback="callback2" />
+<com:TActiveLabel ID="status" />
+<com:TJavascriptLogger />
+</com:TForm> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/DelayedCallback.php b/tests/FunctionalTests/active-controls/protected/pages/DelayedCallback.php
new file mode 100644
index 00000000..7e9195dc
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/DelayedCallback.php
@@ -0,0 +1,21 @@
+<?php
+
+class DelayedCallback extends TPage
+{
+ function callback1($sender, $param)
+ {
+ $ms = 4;
+ sleep($ms);
+ $this->status->Text="Callback 1 returned after {$ms}s";
+ }
+
+ function callback2($sender, $param)
+ {
+ $ms = 2;
+ sleep($ms);
+ $this->status->Text="Callback 2 delayed {$ms}s";
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.page b/tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.page
new file mode 100644
index 00000000..c68be7ca
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.page
@@ -0,0 +1,45 @@
+<com:THead />
+<com:TForm>
+
+<com:TActiveButton ID="button1" Text="Click Me!" OnCallback="button1_oncallback" />
+<com:TActiveLabel ID="label1" />
+
+<com:TActiveRatingList RepeatColumns="2" RepeatDirection="Vertical">
+ <com:TListItem Text="1 Star" />
+ <com:TListItem Text="2 Stars" />
+ <com:TListItem Text="3 Stars" />
+ <com:TListItem Text="4 Stars" />
+ <com:TListItem Text="5 Stars" />
+ <com:TListItem Text="6 Stars" />
+ <com:TListItem Text="7 Stars" />
+ <com:TListItem Text="8 Stars" />
+ <com:TListItem Text="9 Stars" />
+ <com:TListItem Text="10 Stars" />
+ <prop:ClientSide
+ OnLoading="Element.show('status')"
+ OnComplete="Element.hide('status')" />
+</com:TActiveRatingList>
+<br />
+
+<com:TActiveRatingList ID="list4" Rating="3.5" Attributes.title="3.5 Stars" ReadOnly="true">
+ <com:TListItem Text="1 Star" />
+ <com:TListItem Text="2 Stars" />
+ <com:TListItem Text="3 Stars" />
+ <com:TListItem Text="4 Stars" />
+ <com:TListItem Text="5 Stars" />
+</com:TActiveRatingList>
+
+<br />
+
+ <div id="status" style="margin:1em; padding:0.5em;
+ text-align:center;
+ background-color:#900;
+ color:white; display: none;
+ position: absolute; right: 0; top: 0">
+ Loading...
+ </div>
+
+
+<com:TJavascriptLogger />
+
+</com:TForm> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.php b/tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.php
new file mode 100644
index 00000000..3291189c
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/Sessioned/PageStateTest.php
@@ -0,0 +1,11 @@
+<?php
+
+class PageStateTest extends TPage
+{
+ function button1_oncallback($sender, $param)
+ {
+ $this->label1->Text .= " button1 clicked ";
+ }
+}
+
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/Sessioned/config.xml b/tests/FunctionalTests/active-controls/protected/pages/Sessioned/config.xml
new file mode 100644
index 00000000..754e9bc5
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/Sessioned/config.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <pages StatePersisterClass="System.Web.UI.TSessionPageStatePersister" />
+</configuration> \ No newline at end of file