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 | 8 |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
11 #include "base/stringprintf.h" | 11 #include "base/stringprintf.h" |
12 #include "base/threading/platform_thread.h" | 12 #include "base/threading/platform_thread.h" |
13 #include "base/time.h" | 13 #include "base/time.h" |
14 #include "base/values.h" | 14 #include "base/values.h" |
15 #include "chrome/test/chromedriver/basic_types.h" | 15 #include "chrome/test/chromedriver/basic_types.h" |
16 #include "chrome/test/chromedriver/chrome.h" | 16 #include "chrome/test/chromedriver/chrome/chrome.h" |
| 17 #include "chrome/test/chromedriver/chrome/js.h" |
| 18 #include "chrome/test/chromedriver/chrome/status.h" |
| 19 #include "chrome/test/chromedriver/chrome/ui_events.h" |
| 20 #include "chrome/test/chromedriver/chrome/web_view.h" |
17 #include "chrome/test/chromedriver/element_util.h" | 21 #include "chrome/test/chromedriver/element_util.h" |
18 #include "chrome/test/chromedriver/js.h" | |
19 #include "chrome/test/chromedriver/session.h" | 22 #include "chrome/test/chromedriver/session.h" |
20 #include "chrome/test/chromedriver/status.h" | |
21 #include "chrome/test/chromedriver/ui_events.h" | |
22 #include "chrome/test/chromedriver/util.h" | 23 #include "chrome/test/chromedriver/util.h" |
23 #include "chrome/test/chromedriver/web_view.h" | |
24 | 24 |
25 namespace { | 25 namespace { |
26 | 26 |
27 Status GetMouseButton(const base::DictionaryValue& params, | 27 Status GetMouseButton(const base::DictionaryValue& params, |
28 MouseButton* button) { | 28 MouseButton* button) { |
29 int button_num; | 29 int button_num; |
30 if (!params.GetInteger("button", &button_num)) { | 30 if (!params.GetInteger("button", &button_num)) { |
31 button_num = 0; // Default to left mouse button. | 31 button_num = 0; // Default to left mouse button. |
32 } else if (button_num < 0 || button_num > 2) { | 32 } else if (button_num < 0 || button_num > 2) { |
33 return Status(kUnknownError, | 33 return Status(kUnknownError, |
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
763 for (std::list<Cookie>::const_iterator it = cookies.begin(); | 763 for (std::list<Cookie>::const_iterator it = cookies.begin(); |
764 it != cookies.end(); ++it) { | 764 it != cookies.end(); ++it) { |
765 status = web_view->DeleteCookie(it->name, url); | 765 status = web_view->DeleteCookie(it->name, url); |
766 if (status.IsError()) | 766 if (status.IsError()) |
767 return status; | 767 return status; |
768 } | 768 } |
769 } | 769 } |
770 | 770 |
771 return Status(kOk); | 771 return Status(kOk); |
772 } | 772 } |
OLD | NEW |