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

Side by Side Diff: chrome/test/chromedriver/chrome/recorder_devtools_client.h

Issue 883083002: [chromedriver] Add Network Conditions Override Manager and tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing scoping bug; switching throughput and latency fields to doubles Created 5 years, 10 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
OLDNEW
(Empty)
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_TEST_CHROMEDRIVER_CHROME_RECORDER_DEVTOOLS_CLIENT_H_
6 #define CHROME_TEST_CHROMEDRIVER_CHROME_RECORDER_DEVTOOLS_CLIENT_H_
7
8 #include <vector>
9
10 #include "base/values.h"
11 #include "chrome/test/chromedriver/chrome/stub_devtools_client.h"
12
13 namespace base {
14 class DictionaryValue;
15 }
16
17 class Status;
18
19 struct Command {
20 Command() {}
21 Command(const std::string& method, const base::DictionaryValue& params)
22 : method(method) {
23 this->params.MergeDictionary(&params);
24 }
25 Command(const Command& command) {
26 *this = command;
27 }
28 Command& operator=(const Command& command) {
29 method = command.method;
30 params.Clear();
31 params.MergeDictionary(&command.params);
32 return *this;
33 }
34 ~Command() {}
35
36 std::string method;
37 base::DictionaryValue params;
38 };
39
40 class RecorderDevToolsClient : public StubDevToolsClient {
41 public:
42 RecorderDevToolsClient();
43 ~RecorderDevToolsClient() override;
44
45 // Overridden from StubDevToolsClient:
46 Status SendCommandAndGetResult(
47 const std::string& method,
48 const base::DictionaryValue& params,
49 scoped_ptr<base::DictionaryValue>* result) override;
50
51 std::vector<Command> commands_;
52 };
53
54 #endif // CHROME_TEST_CHROMEDRIVER_CHROME_RECORDER_DEVTOOLS_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698