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

Unified Diff: tests/try/firefox-linemerges.applescript

Issue 542623003: Fix Try Dart handling of Backspace that joins lines (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added applescript to validate Firefox line-merging fix 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « site/try/src/interaction_manager.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/try/firefox-linemerges.applescript
diff --git a/tests/try/firefox-linemerges.applescript b/tests/try/firefox-linemerges.applescript
new file mode 100644
index 0000000000000000000000000000000000000000..c62c9c6a5256c2f412d5fa11afc5c8d3e16eefc0
--- /dev/null
+++ b/tests/try/firefox-linemerges.applescript
@@ -0,0 +1,98 @@
+-- Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+-- for details. All rights reserved. Use of this source code is governed by a
+-- BSD-style license that can be found in the LICENSE file.
+
+-- This: 'tell application "Firefox" to activate' doesn't seem to bring
+-- application in focus if it's not already open.
+do shell script "open -a Firefox"
+
+delay 3.0
+
+tell application "System Events"
+ --- Open Incognito window to avoid effect of caching of pages.
+ keystroke "p" using {command down, shift down}
+
+ delay 1.0
+
+ keystroke "l" using command down
+
+ keystroke "http://localhost:8080/"
+ -- Simulate Enter key.
+ key code 36
+
+ delay 10.0
+
+ -- Refresh the page to reload the scripts
+ keystroke "r" using command down
+
+ keystroke "l" using command down
+
+ delay 1.0
+
+ -- Simulate Tab key to get to 'Pick an example' dropdown
+ repeat 8 times
ahe 2014/09/05 13:10:44 Fancy stuff :-)
+ key code 48
+ end repeat
+
+ -- Simulate Down then Enter to select Hello, World
+ key code 125
+ key code 36
+
+ delay 1.0
+
+ keystroke "l" using command down
+
+ delay 1.0
+
+ -- Simulate Tab key to get to Code editor.
+ repeat 9 times
+ key code 48
+ end repeat
+
+ -- Simulate sequence of Down keys to get to "print(greeting);" line
+ repeat 8 times
+ key code 125
+ end repeat
+
+ -- Simulate Cmd-Right.
+ key code 124 using command down
+
+ keystroke "print('c');"
+
+ -- Simulate Left*11 to get to the beginning of "print('c');"
+ repeat 11 times
+ key code 123
+ end repeat
+
+ -- Simulate Enter to split lines
+ key code 36
+
+ -- Simulate Delete to join lines
+ key code 51
+
+ -- Simulate Enter to split lines
+ key code 36
+
+ -- Simulate Right*8 to get to right after the c in "print('c');"
+ repeat 8 times
+ key code 124
+ end repeat
+
+ keystroke "d"
+
+ delay 0.1
+ keystroke "a" using command down
+ delay 0.2
+ keystroke "c" using command down
+
+ delay 1
+ set clipboardData to (the clipboard as text)
+
+ if ("print('cd')" is not in (clipboardData as string)) then
+ error "print('cd') is not in clipboardData: "
+ end if
+end tell
+
+tell application "Firefox" to quit
+
+display notification "Test passed" with title "Firefox test" sound name "Glass"
« no previous file with comments | « site/try/src/interaction_manager.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698