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

Side by Side Diff: src/platform/autox/autox.cc

Issue 551133: autox: Rename xtest to autox and package it. (Closed)
Patch Set: remove xtest from wm .gitignore Created 10 years, 11 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
« no previous file with comments | « src/platform/autox/SConstruct ('k') | src/platform/autox/debian/changelog » ('j') | 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) 2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <cstdlib> 5 #include <cstdlib>
6 #include <map> 6 #include <map>
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <unistd.h> 9 #include <unistd.h>
10 #include <utility> 10 #include <utility>
(...skipping 18 matching lines...) Expand all
29 using std::make_pair; 29 using std::make_pair;
30 using std::map; 30 using std::map;
31 using std::set; 31 using std::set;
32 using std::string; 32 using std::string;
33 using std::vector; 33 using std::vector;
34 34
35 // TODO: If this gets significantly more complicated, it really needs to 35 // TODO: If this gets significantly more complicated, it really needs to
36 // be OO-ified. 36 // be OO-ified.
37 37
38 const static char* kUsage = 38 const static char* kUsage =
39 "Usage: xtest SCRIPT-FILE\n" 39 "Usage: autox SCRIPT-FILE\n"
40 "\n" 40 "\n"
41 "SCRIPT-FILE is a JSON file (with trailing commas allowed) consisting\n" 41 "SCRIPT-FILE is a JSON file (with trailing commas allowed) consisting\n"
42 "of a list of input events that should be injected into the X server\n" 42 "of a list of input events that should be injected into the X server\n"
43 "using the XTEST extension. Each event is described by a list containing\n" 43 "using the XTEST extension. Each event is described by a list containing\n"
44 "the following:\n" 44 "the following:\n"
45 "\n" 45 "\n"
46 " COMMAND, ARG1, ARG2, ...\n" 46 " COMMAND, ARG1, ARG2, ...\n"
47 "\n" 47 "\n"
48 "The following commands are available:\n" 48 "The following commands are available:\n"
49 "\n" 49 "\n"
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 FilePath script_path = FilePath(argv[1]); 459 FilePath script_path = FilePath(argv[1]);
460 string script; 460 string script;
461 CHECK(file_util::ReadFileToString(script_path, &script)) 461 CHECK(file_util::ReadFileToString(script_path, &script))
462 << "Unable to read script file \"" << script_path.value() << "\""; 462 << "Unable to read script file \"" << script_path.value() << "\"";
463 Display* display = XOpenDisplay(NULL); 463 Display* display = XOpenDisplay(NULL);
464 CHECK(display) << "Couldn't open connection to X server"; 464 CHECK(display) << "Couldn't open connection to X server";
465 RunScript(script, display); 465 RunScript(script, display);
466 XCloseDisplay(display); 466 XCloseDisplay(display);
467 return 0; 467 return 0;
468 } 468 }
OLDNEW
« no previous file with comments | « src/platform/autox/SConstruct ('k') | src/platform/autox/debian/changelog » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698