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

Unified Diff: chrome/test/chromedriver/chrome/geolocation_override_manager_unittest.cc

Issue 883083002: [chromedriver] Add Network Conditions Override Manager and tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix warning Created 5 years, 9 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 | « chrome/chrome_tests.gypi ('k') | chrome/test/chromedriver/chrome/javascript_dialog_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/chrome/geolocation_override_manager_unittest.cc
diff --git a/chrome/test/chromedriver/chrome/geolocation_override_manager_unittest.cc b/chrome/test/chromedriver/chrome/geolocation_override_manager_unittest.cc
index 955ced76f96e52d48e2511e00f2b37d39c70825d..574d861a4185eab65b7f4d260bfaf2a2f5a90f4b 100644
--- a/chrome/test/chromedriver/chrome/geolocation_override_manager_unittest.cc
+++ b/chrome/test/chromedriver/chrome/geolocation_override_manager_unittest.cc
@@ -2,57 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include <string>
-#include <vector>
-
-#include "base/compiler_specific.h"
#include "base/values.h"
#include "chrome/test/chromedriver/chrome/geolocation_override_manager.h"
#include "chrome/test/chromedriver/chrome/geoposition.h"
+#include "chrome/test/chromedriver/chrome/recorder_devtools_client.h"
#include "chrome/test/chromedriver/chrome/status.h"
-#include "chrome/test/chromedriver/chrome/stub_devtools_client.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
-struct Command {
- Command() {}
- Command(const std::string& method, const base::DictionaryValue& params)
- : method(method) {
- this->params.MergeDictionary(&params);
- }
- Command(const Command& command) {
- *this = command;
- }
- Command& operator=(const Command& command) {
- method = command.method;
- params.Clear();
- params.MergeDictionary(&command.params);
- return *this;
- }
- ~Command() {}
-
- std::string method;
- base::DictionaryValue params;
-};
-
-class RecorderDevToolsClient : public StubDevToolsClient {
- public:
- RecorderDevToolsClient() {}
- ~RecorderDevToolsClient() override {}
-
- // Overridden from StubDevToolsClient:
- Status SendCommandAndGetResult(
- const std::string& method,
- const base::DictionaryValue& params,
- scoped_ptr<base::DictionaryValue>* result) override {
- commands_.push_back(Command(method, params));
- return Status(kOk);
- }
-
- std::vector<Command> commands_;
-};
-
void AssertGeolocationCommand(const Command& command,
const Geoposition& geoposition) {
ASSERT_EQ("Page.setGeolocationOverride", command.method);
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/test/chromedriver/chrome/javascript_dialog_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698