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

Side by Side Diff: chrome/test/chromedriver/chrome/web_view_impl_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: Created 4 years, 10 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 <list> 5 #include <list>
6 #include <string> 6 #include <string>
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 const std::string& method, 46 const std::string& method,
47 const base::DictionaryValue& params, 47 const base::DictionaryValue& params,
48 scoped_ptr<base::DictionaryValue>* result) override { 48 scoped_ptr<base::DictionaryValue>* result) override {
49 if (status_.IsError()) 49 if (status_.IsError())
50 return status_; 50 return status_;
51 result->reset(result_.DeepCopy()); 51 result->reset(result_.DeepCopy());
52 return Status(kOk); 52 return Status(kOk);
53 } 53 }
54 void AddListener(DevToolsEventListener* listener) override {} 54 void AddListener(DevToolsEventListener* listener) override {}
55 Status HandleEventsUntil(const ConditionalFunc& conditional_func, 55 Status HandleEventsUntil(const ConditionalFunc& conditional_func,
56 const base::TimeDelta& timeout) override { 56 const Timeout& timeout) override {
57 return Status(kOk); 57 return Status(kOk);
58 } 58 }
59 Status HandleReceivedEvents() override { return Status(kOk); } 59 Status HandleReceivedEvents() override { return Status(kOk); }
60 60
61 private: 61 private:
62 const std::string id_; 62 const std::string id_;
63 Status status_; 63 Status status_;
64 base::DictionaryValue result_; 64 base::DictionaryValue result_;
65 }; 65 };
66 66
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 205
206 TEST(ParseCallFunctionResult, ScriptError) { 206 TEST(ParseCallFunctionResult, ScriptError) {
207 scoped_ptr<base::Value> result; 207 scoped_ptr<base::Value> result;
208 base::DictionaryValue dict; 208 base::DictionaryValue dict;
209 dict.SetInteger("status", 1); 209 dict.SetInteger("status", 1);
210 dict.SetInteger("value", 1); 210 dict.SetInteger("value", 1);
211 Status status = internal::ParseCallFunctionResult(dict, &result); 211 Status status = internal::ParseCallFunctionResult(dict, &result);
212 ASSERT_EQ(1, status.code()); 212 ASSERT_EQ(1, status.code());
213 ASSERT_FALSE(result); 213 ASSERT_FALSE(result);
214 } 214 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698