| Index: chrome/test/chromedriver/chrome/mobile_emulation_override_manager_unittest.cc
|
| diff --git a/chrome/test/chromedriver/chrome/mobile_emulation_override_manager_unittest.cc b/chrome/test/chromedriver/chrome/mobile_emulation_override_manager_unittest.cc
|
| index 099442f155df05216594c1ba47fbdbbbebbcbeac..c8cf20cd063c3aa68a69ed9229d56af0b0b5e800 100644
|
| --- a/chrome/test/chromedriver/chrome/mobile_emulation_override_manager_unittest.cc
|
| +++ b/chrome/test/chromedriver/chrome/mobile_emulation_override_manager_unittest.cc
|
| @@ -2,59 +2,17 @@
|
| // 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/device_metrics.h"
|
| #include "chrome/test/chromedriver/chrome/mobile_emulation_override_manager.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(¶ms);
|
| - }
|
| - 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 AssertDeviceMetricsCommand(const Command& command,
|
| - const DeviceMetrics& device_metrics) {
|
| + const DeviceMetrics& device_metrics) {
|
| ASSERT_EQ("Page.setDeviceMetricsOverride", command.method);
|
| int width, height;
|
| double device_scale_factor, font_scale_factor;
|
|
|