Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "chrome/test/chromedriver/window_commands.h" | 5 #include "chrome/test/chromedriver/window_commands.h" |
| 6 | 6 |
| 7 #include <list> | 7 #include <list> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 226 } | 226 } |
| 227 | 227 |
| 228 nav_status = web_view->WaitForPendingNavigations( | 228 nav_status = web_view->WaitForPendingNavigations( |
| 229 session->GetCurrentFrameId(), session->page_load_timeout, true); | 229 session->GetCurrentFrameId(), session->page_load_timeout, true); |
| 230 | 230 |
| 231 if (status.IsOk() && nav_status.IsError() && | 231 if (status.IsOk() && nav_status.IsError() && |
| 232 nav_status.code() != kUnexpectedAlertOpen) | 232 nav_status.code() != kUnexpectedAlertOpen) |
| 233 return nav_status; | 233 return nav_status; |
| 234 if (status.code() == kUnexpectedAlertOpen) | 234 if (status.code() == kUnexpectedAlertOpen) |
| 235 return Status(kOk); | 235 return Status(kOk); |
| 236 | |
| 237 if (status.IsOk() && session->auto_reporting_enabled) { | |
|
chrisgao (Use stgao instead)
2014/01/09 22:11:55
We already check for errors in method ExecuteSessi
samuong
2014/01/16 00:29:28
Done.
| |
| 238 std::string message = session->GetFirstBrowserError(); | |
| 239 if (!message.empty()) | |
| 240 status = Status(kUnknownError, message); | |
| 241 } | |
| 242 | |
| 236 return status; | 243 return status; |
| 237 } | 244 } |
| 238 | 245 |
| 239 Status ExecuteGet( | 246 Status ExecuteGet( |
| 240 Session* session, | 247 Session* session, |
| 241 WebView* web_view, | 248 WebView* web_view, |
| 242 const base::DictionaryValue& params, | 249 const base::DictionaryValue& params, |
| 243 scoped_ptr<base::Value>* value) { | 250 scoped_ptr<base::Value>* value) { |
| 244 std::string url; | 251 std::string url; |
| 245 if (!params.GetString("url", &url)) | 252 if (!params.GetString("url", &url)) |
| (...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 864 return status; | 871 return status; |
| 865 } | 872 } |
| 866 | 873 |
| 867 Status ExecuteTakeHeapSnapshot( | 874 Status ExecuteTakeHeapSnapshot( |
| 868 Session* session, | 875 Session* session, |
| 869 WebView* web_view, | 876 WebView* web_view, |
| 870 const base::DictionaryValue& params, | 877 const base::DictionaryValue& params, |
| 871 scoped_ptr<base::Value>* value) { | 878 scoped_ptr<base::Value>* value) { |
| 872 return web_view->TakeHeapSnapshot(value); | 879 return web_view->TakeHeapSnapshot(value); |
| 873 } | 880 } |
| OLD | NEW |