Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Side by Side Diff: dart/tests/try/firefox.applescript

Issue 535883002: Use JavaScript to detect if Selection.modify is available. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « dart/site/try/src/settings.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 -- Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 -- Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 -- for details. All rights reserved. Use of this source code is governed by a 2 -- for details. All rights reserved. Use of this source code is governed by a
3 -- BSD-style license that can be found in the LICENSE file. 3 -- BSD-style license that can be found in the LICENSE file.
4 4
5 tell application "Firefox 29" to activate 5 tell application "Firefox 29" to activate
6 6
7 delay 3.0 7 delay 3.0
8 8
9 tell application "System Events" 9 tell application "System Events"
10 keystroke "n" using command down 10 keystroke "n" using command down
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 key code 125 44 key code 125
45 key code 125 45 key code 125
46 key code 125 46 key code 125
47 47
48 -- Simulate Cmd-Right. 48 -- Simulate Cmd-Right.
49 key code 124 using command down 49 key code 124 using command down
50 50
51 -- Simulate Delete 51 -- Simulate Delete
52 key code 51 52 key code 51
53 53
54 delay 0.1
kasperl 2014/09/03 12:55:18 I trust this does what you want.
ahe 2014/09/03 13:10:22 Yes. This is for "manual" testing on my Mac.
55 keystroke "a" using command down
56 delay 0.2
57 keystroke "c" using command down
58
59 delay 0.2
60 set clipboardData to (the clipboard as text)
61
62 if ("main() {" is in (clipboardData as string)) then
63 error "main() { in clipboardData"
64 end if
65
66 if ("main() " is not in (clipboardData as string)) then
67 error "main() is not in clipboardData"
68 end if
69
70 keystroke "l" using command down
71 delay 0.2
72
73 keystroke "http://localhost:8080/"
74 -- Simulate Enter key.
75 key code 36
76
77 delay 5.0
78
79 keystroke "l" using command down
80 -- Simulate Tab key.
81 key code 48
82 key code 48
83 key code 48
84 key code 48
85
86 -- Simulate End key.
87 key code 119
88
89 -- Simulate Home key.
90 key code 115
91
92 -- Simulate Tab key.
93 key code 48
94
54 -- Simulate Cmd-Down. 95 -- Simulate Cmd-Down.
55 -- key code 125 using command down 96 key code 125 using command down
97
98 repeat 204 times
99 -- Simulate Delete
100 key code 51
101 end repeat
102
103 delay 5.0
104 repeat 64 times
105 -- Simulate Delete
106 key code 51
107 end repeat
108
109
110 delay 0.1
111 keystroke "a" using command down
112 delay 0.5
113 keystroke "c" using command down
114
115 delay 0.5
116 set clipboardData to (the clipboard as text)
117
118 if ("/" is not (clipboardData as string)) then
119 error "/ is not clipboardData"
120 end if
56 121
57 end tell 122 end tell
123
124 tell application "Firefox" to quit
125
126 display notification "Test passed" with title "Firefox test" sound name "Glass"
OLDNEW
« no previous file with comments | « dart/site/try/src/settings.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698