| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/chromedriver/performance_logger.h" | 5 #include "chrome/test/chromedriver/performance_logger.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/format_macros.h" | 10 #include "base/format_macros.h" |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 : FakeDevToolsClient(DevToolsClientImpl::kBrowserwideDevToolsClientId), | 253 : FakeDevToolsClient(DevToolsClientImpl::kBrowserwideDevToolsClientId), |
| 254 events_handled_(false) {} | 254 events_handled_(false) {} |
| 255 ~FakeBrowserwideClient() override {} | 255 ~FakeBrowserwideClient() override {} |
| 256 | 256 |
| 257 bool events_handled() const { | 257 bool events_handled() const { |
| 258 return events_handled_; | 258 return events_handled_; |
| 259 } | 259 } |
| 260 | 260 |
| 261 // Overridden from DevToolsClient: | 261 // Overridden from DevToolsClient: |
| 262 Status HandleEventsUntil(const ConditionalFunc& conditional_func, | 262 Status HandleEventsUntil(const ConditionalFunc& conditional_func, |
| 263 const base::TimeDelta& timeout) override { | 263 const Timeout& timeout) override { |
| 264 TriggerEvent("Tracing.tracingComplete"); | 264 TriggerEvent("Tracing.tracingComplete"); |
| 265 events_handled_ = true; | 265 events_handled_ = true; |
| 266 return Status(kOk); | 266 return Status(kOk); |
| 267 } | 267 } |
| 268 | 268 |
| 269 private: | 269 private: |
| 270 bool events_handled_; | 270 bool events_handled_; |
| 271 }; | 271 }; |
| 272 | 272 |
| 273 } // namespace | 273 } // namespace |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 std::string webview; | 377 std::string webview; |
| 378 EXPECT_TRUE(message->GetString("webview", &webview)); | 378 EXPECT_TRUE(message->GetString("webview", &webview)); |
| 379 EXPECT_EQ(DevToolsClientImpl::kBrowserwideDevToolsClientId, webview); | 379 EXPECT_EQ(DevToolsClientImpl::kBrowserwideDevToolsClientId, webview); |
| 380 std::string method; | 380 std::string method; |
| 381 EXPECT_TRUE(message->GetString("message.method", &method)); | 381 EXPECT_TRUE(message->GetString("message.method", &method)); |
| 382 EXPECT_EQ("Tracing.bufferUsage", method); | 382 EXPECT_EQ("Tracing.bufferUsage", method); |
| 383 base::DictionaryValue* actual_params; | 383 base::DictionaryValue* actual_params; |
| 384 EXPECT_TRUE(message->GetDictionary("message.params", &actual_params)); | 384 EXPECT_TRUE(message->GetDictionary("message.params", &actual_params)); |
| 385 EXPECT_TRUE(actual_params->HasKey("error")); | 385 EXPECT_TRUE(actual_params->HasKey("error")); |
| 386 } | 386 } |
| OLD | NEW |