Chromium Code Reviews| Index: chrome/test/webdriver/automation.cc |
| diff --git a/chrome/test/webdriver/automation.cc b/chrome/test/webdriver/automation.cc |
| index cbc8e0e95609f9fc1c55c3372ad2f419b1fcec50..4170ce6feacc52335f78b1bc8a9603ff2313f07e 100644 |
| --- a/chrome/test/webdriver/automation.cc |
| +++ b/chrome/test/webdriver/automation.cc |
| @@ -17,6 +17,7 @@ |
| #include "base/logging.h" |
| #include "base/path_service.h" |
| #include "base/utf_string_conversions.h" |
| +#include "base/scoped_temp_dir.h" |
|
kkania
2011/03/16 18:19:10
i don't think you need this here anymore
Joe
2011/03/17 00:15:25
Done.
|
| #include "base/values.h" |
| #include "chrome/common/automation_constants.h" |
| #include "chrome/common/chrome_constants.h" |
| @@ -232,6 +233,20 @@ void Automation::SendWebKeyEvent(int tab_id, |
| automation(), windex, tab_index, key_event); |
| } |
| +void Automation::GetScreenShot(int tab_id, |
| + const FilePath& path, |
| + bool* success) { |
| + int windex = 0, tab_index = 0; |
| + |
| + if (!GetIndicesForTab(tab_id, &windex, &tab_index)) { |
| + *success = false; |
| + return; |
| + } |
| + |
| + *success = SendGetScreenShotJSONRequest( |
| + automation(), windex, tab_index, path); |
| +} |
| + |
| void Automation::NavigateToURL(int tab_id, |
| const std::string& url, |
| bool* success) { |