Skip to content

Commit 0a229fa

Browse files
committed
tests: Add edittext_password_copy test
This test verifies how FP behaves with regard to copying or cutting text from a password text field.
1 parent 8fd8d49 commit 0a229fa

File tree

5 files changed

+36
-0
lines changed

5 files changed

+36
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[
2+
{ "type": "SetClipboardText", "text": "password" },
3+
{ "type": "TextControl", "code": "Paste" },
4+
{ "type": "SetClipboardText", "text": "" },
5+
{ "type": "KeyDown", "key_code": 27 },
6+
{ "type": "TextControl", "code": "SelectAll" },
7+
{ "type": "TextControl", "code": "Copy" },
8+
{ "type": "TextControl", "code": "Paste" },
9+
{ "type": "TextControl", "code": "Paste" },
10+
{ "type": "KeyDown", "key_code": 27 },
11+
{ "type": "SetClipboardText", "text": "password" },
12+
{ "type": "TextControl", "code": "Paste" },
13+
{ "type": "SetClipboardText", "text": "" },
14+
{ "type": "KeyDown", "key_code": 27 },
15+
{ "type": "TextControl", "code": "SelectAll" },
16+
{ "type": "TextControl", "code": "Cut" },
17+
{ "type": "TextControl", "code": "Paste" },
18+
{ "type": "TextControl", "code": "Paste" },
19+
{ "type": "KeyDown", "key_code": 27 }
20+
]
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Text: 'password'
2+
Text: 'password'
3+
Text: 'password'
4+
Text: 'password'
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
var listener = new Object();
2+
listener.onKeyDown = function() {
3+
if (Key.getCode() == 27) {
4+
trace("Text: '" + text.text + "'");
5+
}
6+
};
7+
Key.addListener(listener);
8+
9+
text.password = true;
10+
11+
Selection.setFocus(text);
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
num_ticks = 1

0 commit comments

Comments
 (0)