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

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

Issue 7522024: Refactor chromedriver's script execution to reduce amount of custom Value parsing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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
« no previous file with comments | « chrome/test/webdriver/commands/webelement_commands.cc ('k') | chrome/test/webdriver/server.cc » ('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) 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 "chrome/test/webdriver/dispatch.h" 5 #include "chrome/test/webdriver/dispatch.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/format_macros.h" 11 #include "base/format_macros.h"
12 #include "base/json/json_reader.h" 12 #include "base/json/json_reader.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/message_loop_proxy.h" 15 #include "base/message_loop_proxy.h"
16 #include "base/string_split.h" 16 #include "base/string_split.h"
17 #include "base/string_util.h" 17 #include "base/string_util.h"
18 #include "base/stringprintf.h" 18 #include "base/stringprintf.h"
19 #include "base/synchronization/waitable_event.h" 19 #include "base/synchronization/waitable_event.h"
20 #include "base/threading/thread.h" 20 #include "base/threading/thread.h"
21 #include "chrome/test/webdriver/http_response.h" 21 #include "chrome/test/webdriver/http_response.h"
22 #include "chrome/test/webdriver/commands/command.h" 22 #include "chrome/test/webdriver/commands/command.h"
23 #include "chrome/test/webdriver/session_manager.h" 23 #include "chrome/test/webdriver/session_manager.h"
24 #include "chrome/test/webdriver/utility_functions.h"
25 #include "chrome/test/webdriver/webdriver_logging.h" 24 #include "chrome/test/webdriver/webdriver_logging.h"
25 #include "chrome/test/webdriver/webdriver_util.h"
26 26
27 namespace webdriver { 27 namespace webdriver {
28 28
29 namespace { 29 namespace {
30 30
31 // Maximum safe size of HTTP response message. Any larger than this, 31 // Maximum safe size of HTTP response message. Any larger than this,
32 // the message may not be transferred at all. 32 // the message may not be transferred at all.
33 const size_t kMaxHttpMessageSize = 1024 * 1024 * 16; // 16MB 33 const size_t kMaxHttpMessageSize = 1024 * 1024 * 16; // 16MB
34 34
35 bool ForbidsMessageBody(const std::string& request_method, 35 bool ForbidsMessageBody(const std::string& request_method,
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 void Dispatcher::SetNotImplemented(const std::string& pattern) { 331 void Dispatcher::SetNotImplemented(const std::string& pattern) {
332 mg_set_uri_callback(context_, (root_ + pattern).c_str(), 332 mg_set_uri_callback(context_, (root_ + pattern).c_str(),
333 &SendNotImplementedError, NULL); 333 &SendNotImplementedError, NULL);
334 } 334 }
335 335
336 void Dispatcher::ForbidAllOtherRequests() { 336 void Dispatcher::ForbidAllOtherRequests() {
337 mg_set_uri_callback(context_, "*", &SendForbidden, NULL); 337 mg_set_uri_callback(context_, "*", &SendForbidden, NULL);
338 } 338 }
339 339
340 } // namespace webdriver 340 } // namespace webdriver
OLDNEW
« no previous file with comments | « chrome/test/webdriver/commands/webelement_commands.cc ('k') | chrome/test/webdriver/server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698