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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 : FakeDevToolsClient(DevToolsClientImpl::kBrowserwideDevToolsClientId), | 251 : FakeDevToolsClient(DevToolsClientImpl::kBrowserwideDevToolsClientId), |
252 events_handled_(false) {} | 252 events_handled_(false) {} |
253 ~FakeBrowserwideClient() override {} | 253 ~FakeBrowserwideClient() override {} |
254 | 254 |
255 bool events_handled() const { | 255 bool events_handled() const { |
256 return events_handled_; | 256 return events_handled_; |
257 } | 257 } |
258 | 258 |
259 // Overridden from DevToolsClient: | 259 // Overridden from DevToolsClient: |
260 Status HandleEventsUntil(const ConditionalFunc& conditional_func, | 260 Status HandleEventsUntil(const ConditionalFunc& conditional_func, |
261 const base::TimeDelta& timeout) override { | 261 const Timeout& timeout) override { |
262 TriggerEvent("Tracing.tracingComplete"); | 262 TriggerEvent("Tracing.tracingComplete"); |
263 events_handled_ = true; | 263 events_handled_ = true; |
264 return Status(kOk); | 264 return Status(kOk); |
265 } | 265 } |
266 | 266 |
267 private: | 267 private: |
268 bool events_handled_; | 268 bool events_handled_; |
269 }; | 269 }; |
270 | 270 |
271 } // namespace | 271 } // namespace |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 std::string webview; | 374 std::string webview; |
375 EXPECT_TRUE(message->GetString("webview", &webview)); | 375 EXPECT_TRUE(message->GetString("webview", &webview)); |
376 EXPECT_EQ(DevToolsClientImpl::kBrowserwideDevToolsClientId, webview); | 376 EXPECT_EQ(DevToolsClientImpl::kBrowserwideDevToolsClientId, webview); |
377 std::string method; | 377 std::string method; |
378 EXPECT_TRUE(message->GetString("message.method", &method)); | 378 EXPECT_TRUE(message->GetString("message.method", &method)); |
379 EXPECT_EQ("Tracing.bufferUsage", method); | 379 EXPECT_EQ("Tracing.bufferUsage", method); |
380 base::DictionaryValue* actual_params; | 380 base::DictionaryValue* actual_params; |
381 EXPECT_TRUE(message->GetDictionary("message.params", &actual_params)); | 381 EXPECT_TRUE(message->GetDictionary("message.params", &actual_params)); |
382 EXPECT_TRUE(actual_params->HasKey("error")); | 382 EXPECT_TRUE(actual_params->HasKey("error")); |
383 } | 383 } |
OLD | NEW |