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

Side by Side Diff: chrome/test/webdriver/server.cc

Issue 7612017: Integrates SET_ONLINE and APPCACHE_STATUS atoms. Other commands for BrowserConnection (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 9 years, 4 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium 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 <signal.h> 5 #include <signal.h>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 7
8 #if defined(OS_WIN) 8 #if defined(OS_WIN)
9 #include <windows.h> 9 #include <windows.h>
10 #endif 10 #endif
(...skipping 11 matching lines...) Expand all
22 #include "base/string_split.h" 22 #include "base/string_split.h"
23 #include "base/string_util.h" 23 #include "base/string_util.h"
24 #include "base/synchronization/waitable_event.h" 24 #include "base/synchronization/waitable_event.h"
25 #include "base/test/test_timeouts.h" 25 #include "base/test/test_timeouts.h"
26 #include "base/threading/platform_thread.h" 26 #include "base/threading/platform_thread.h"
27 #include "base/utf_string_conversions.h" 27 #include "base/utf_string_conversions.h"
28 #include "chrome/common/chrome_constants.h" 28 #include "chrome/common/chrome_constants.h"
29 #include "chrome/common/chrome_paths.h" 29 #include "chrome/common/chrome_paths.h"
30 #include "chrome/common/chrome_switches.h" 30 #include "chrome/common/chrome_switches.h"
31 #include "chrome/test/webdriver/commands/alert_commands.h" 31 #include "chrome/test/webdriver/commands/alert_commands.h"
32 #include "chrome/test/webdriver/commands/appcache_status_command.h"
33 #include "chrome/test/webdriver/commands/browser_connection_commands.h"
32 #include "chrome/test/webdriver/commands/cookie_commands.h" 34 #include "chrome/test/webdriver/commands/cookie_commands.h"
33 #include "chrome/test/webdriver/commands/create_session.h" 35 #include "chrome/test/webdriver/commands/create_session.h"
34 #include "chrome/test/webdriver/commands/execute_async_script_command.h" 36 #include "chrome/test/webdriver/commands/execute_async_script_command.h"
35 #include "chrome/test/webdriver/commands/execute_command.h" 37 #include "chrome/test/webdriver/commands/execute_command.h"
36 #include "chrome/test/webdriver/commands/find_element_commands.h" 38 #include "chrome/test/webdriver/commands/find_element_commands.h"
37 #include "chrome/test/webdriver/commands/navigate_commands.h" 39 #include "chrome/test/webdriver/commands/navigate_commands.h"
38 #include "chrome/test/webdriver/commands/mouse_commands.h" 40 #include "chrome/test/webdriver/commands/mouse_commands.h"
39 #include "chrome/test/webdriver/commands/screenshot_command.h" 41 #include "chrome/test/webdriver/commands/screenshot_command.h"
40 #include "chrome/test/webdriver/commands/session_with_id.h" 42 #include "chrome/test/webdriver/commands/session_with_id.h"
41 #include "chrome/test/webdriver/commands/set_timeout_commands.h" 43 #include "chrome/test/webdriver/commands/set_timeout_commands.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 dispatcher->Add<WindowHandleCommand>( "/session/*/window_handle"); 131 dispatcher->Add<WindowHandleCommand>( "/session/*/window_handle");
130 dispatcher->Add<WindowHandlesCommand>("/session/*/window_handles"); 132 dispatcher->Add<WindowHandlesCommand>("/session/*/window_handles");
131 dispatcher->Add<SetAsyncScriptTimeoutCommand>( 133 dispatcher->Add<SetAsyncScriptTimeoutCommand>(
132 "/session/*/timeouts/async_script"); 134 "/session/*/timeouts/async_script");
133 dispatcher->Add<ImplicitWaitCommand>( "/session/*/timeouts/implicit_wait"); 135 dispatcher->Add<ImplicitWaitCommand>( "/session/*/timeouts/implicit_wait");
134 136
135 // Cookie functions. 137 // Cookie functions.
136 dispatcher->Add<CookieCommand>( "/session/*/cookie"); 138 dispatcher->Add<CookieCommand>( "/session/*/cookie");
137 dispatcher->Add<NamedCookieCommand>("/session/*/cookie/*"); 139 dispatcher->Add<NamedCookieCommand>("/session/*/cookie/*");
138 140
141 dispatcher->Add<BrowserConnectionCommand>("/session/*/browser_connection");
142 dispatcher->Add<AppCacheStatusCommand>("/session/*/application_cache/status");
143
139 // Since the /session/* is a wild card that would match the above URIs, this 144 // Since the /session/* is a wild card that would match the above URIs, this
140 // line MUST be after all other webdriver command callbacks. 145 // line MUST be after all other webdriver command callbacks.
141 dispatcher->Add<SessionWithID>("/session/*"); 146 dispatcher->Add<SessionWithID>("/session/*");
142 147
143 if (forbid_other_requests) 148 if (forbid_other_requests)
144 dispatcher->ForbidAllOtherRequests(); 149 dispatcher->ForbidAllOtherRequests();
145 } 150 }
146 151
147 } // namespace webdriver 152 } // namespace webdriver
148 153
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 240
236 // Run until we receive command to shutdown. 241 // Run until we receive command to shutdown.
237 shutdown_event.Wait(); 242 shutdown_event.Wait();
238 243
239 // We should not reach here since the service should never quit. 244 // We should not reach here since the service should never quit.
240 // TODO(jmikhail): register a listener for SIGTERM and break the 245 // TODO(jmikhail): register a listener for SIGTERM and break the
241 // message loop gracefully. 246 // message loop gracefully.
242 mg_stop(ctx); 247 mg_stop(ctx);
243 return (EXIT_SUCCESS); 248 return (EXIT_SUCCESS);
244 } 249 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698