summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/features
diff options
context:
space:
mode:
authorwei <>2006-08-05 04:59:37 +0000
committerwei <>2006-08-05 04:59:37 +0000
commit1f5f5acf9011763a8b72748219f8275db527387e (patch)
treecb3ee739c45f9d2331f7ca61538d5e139b82aae9 /tests/FunctionalTests/features
parentc927f9343001b456c1fa25dc541c3f1b005510f8 (diff)
Fixed #271
Diffstat (limited to 'tests/FunctionalTests/features')
-rw-r--r--tests/FunctionalTests/features/protected/pages/FocusControl.page46
-rw-r--r--tests/FunctionalTests/features/protected/pages/FocusControl.php17
2 files changed, 63 insertions, 0 deletions
diff --git a/tests/FunctionalTests/features/protected/pages/FocusControl.page b/tests/FunctionalTests/features/protected/pages/FocusControl.page
new file mode 100644
index 00000000..af414c3a
--- /dev/null
+++ b/tests/FunctionalTests/features/protected/pages/FocusControl.page
@@ -0,0 +1,46 @@
+<com:TContent ID="Content">
+
+<com:TRadioButtonList ID="list">
+ <com:TListItem Text="Button 1" />
+ <com:TListItem Text="Button 2" />
+ <com:TListItem Text="Button 3" Selected="true"/>
+ <com:TListItem Text="Button 4" />
+ <com:TListItem Text="Button 5" />
+</com:TRadioButtonList>
+
+<com:TButton Text="Focus" OnClick="doFocus" />
+
+<p style="height: 400px; background-color: #fc0; font-size: 10em">
+a
+<com:TButton ID="button1" Text="Button 1" />
+</p>
+
+<p style="height: 400px; background-color: #fcc; font-size: 10em">
+b
+<com:TButton ID="button2" Text="Button 2" />
+</p>
+
+<p style="height: 400px; background-color: #ccf; font-size: 10em">
+c
+<com:TButton ID="button3" Text="Button 3" />
+</p>
+
+<p style="height: 400px; background-color: #cf0; font-size: 10em">
+d
+</p>
+
+<p style="height: 400px; background-color: #ffc; font-size: 10em">
+e
+<com:TButton ID="button4" Text="Button 4" />
+</p>
+
+<p style="height: 400px; background-color: #f0f; font-size: 10em">
+f
+</p>
+
+<p style="height: 400px; background-color: #0cf; font-size: 10em">
+g
+<com:TButton ID="button5" Text="Button 5" />
+</p>
+
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/features/protected/pages/FocusControl.php b/tests/FunctionalTests/features/protected/pages/FocusControl.php
new file mode 100644
index 00000000..d78f28c4
--- /dev/null
+++ b/tests/FunctionalTests/features/protected/pages/FocusControl.php
@@ -0,0 +1,17 @@
+<?php
+
+class FocusControl extends TPage
+{
+ function doFocus($sender, $param)
+ {
+ $selected = $this->list->SelectedIndex;
+ if($selected >= 0)
+ {
+ $id = "button".($selected+1);
+ $controlID = $this->{$id}->ClientID;
+ $this->ClientScript->registerFocusControl($controlID);
+ }
+ }
+}
+
+?> \ No newline at end of file