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

Side by Side Diff: chrome/test/chromedriver/performance_logger_unittest.cc

Issue 1669453002: [chromedriver] Apply page load timeout to slow cross-process navigations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pure virtual Created 4 years, 8 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
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/performance_logger.cc ('k') | chrome/test/chromedriver/session_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698