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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 #include <string> | 10 #include <string> |
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 browser_info->major_version <= 30 && | 460 browser_info->major_version <= 30 && |
461 browser_info->is_android; | 461 browser_info->is_android; |
462 if (!is_kitkat_webview) { | 462 if (!is_kitkat_webview) { |
463 // Page.getNavigationHistory isn't implemented in WebView for KitKat and | 463 // Page.getNavigationHistory isn't implemented in WebView for KitKat and |
464 // older Android releases. | 464 // older Android releases. |
465 status = web_view->GetUrl(&url); | 465 status = web_view->GetUrl(&url); |
466 if (status.IsError()) | 466 if (status.IsError()) |
467 return status; | 467 return status; |
468 } | 468 } |
469 } | 469 } |
470 if (!session->GetCurrentFrameId().empty()) { | |
471 // TODO(samuong): remove this after we release ChromeDriver 2.21. | |
472 LOG(WARNING) | |
473 << "As of ChromeDriver 2.21, GetCurrentUrl now returns the " | |
474 "URL of the top-level browsing context, not the current frame. " | |
475 "See https://code.google.com/p/chromedriver/issues/detail?id=1249 " | |
476 "for details and workarounds."; | |
477 } | |
478 value->reset(new base::StringValue(url)); | 470 value->reset(new base::StringValue(url)); |
479 return Status(kOk); | 471 return Status(kOk); |
480 } | 472 } |
481 | 473 |
482 Status ExecuteGoBack( | 474 Status ExecuteGoBack( |
483 Session* session, | 475 Session* session, |
484 WebView* web_view, | 476 WebView* web_view, |
485 const base::DictionaryValue& params, | 477 const base::DictionaryValue& params, |
486 scoped_ptr<base::Value>* value) { | 478 scoped_ptr<base::Value>* value) { |
487 Status status = web_view->TraverseHistory(-1); | 479 Status status = web_view->TraverseHistory(-1); |
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1061 return status; | 1053 return status; |
1062 } | 1054 } |
1063 | 1055 |
1064 Status ExecuteTakeHeapSnapshot( | 1056 Status ExecuteTakeHeapSnapshot( |
1065 Session* session, | 1057 Session* session, |
1066 WebView* web_view, | 1058 WebView* web_view, |
1067 const base::DictionaryValue& params, | 1059 const base::DictionaryValue& params, |
1068 scoped_ptr<base::Value>* value) { | 1060 scoped_ptr<base::Value>* value) { |
1069 return web_view->TakeHeapSnapshot(value); | 1061 return web_view->TakeHeapSnapshot(value); |
1070 } | 1062 } |
OLD | NEW |