| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/webdriver/automation.h" | 5 #include "chrome/test/webdriver/automation.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
| 11 #include "chrome/test/automation/browser_proxy.h" |
| 12 #include "chrome/test/automation/tab_proxy.h" |
| 11 #include "chrome/test/test_launcher_utils.h" | 13 #include "chrome/test/test_launcher_utils.h" |
| 12 #include "googleurl/src/gurl.h" | 14 #include "googleurl/src/gurl.h" |
| 13 | 15 |
| 14 namespace webdriver { | 16 namespace webdriver { |
| 15 | 17 |
| 18 Automation::Automation() {} |
| 19 |
| 20 Automation::~Automation() {} |
| 21 |
| 16 void Automation::Init(bool* success) { | 22 void Automation::Init(bool* success) { |
| 17 *success = false; | 23 *success = false; |
| 18 | 24 |
| 19 // Create a temp directory for the new profile. | 25 // Create a temp directory for the new profile. |
| 20 if (!profile_dir_.CreateUniqueTempDir()) { | 26 if (!profile_dir_.CreateUniqueTempDir()) { |
| 21 LOG(ERROR) << "Could not make a temp profile directory"; | 27 LOG(ERROR) << "Could not make a temp profile directory"; |
| 22 return; | 28 return; |
| 23 } | 29 } |
| 24 // TODO(kkania): See if these are still needed. | 30 // TODO(kkania): See if these are still needed. |
| 25 test_launcher_utils::PrepareBrowserCommandLineForTests(&launch_arguments_); | 31 test_launcher_utils::PrepareBrowserCommandLineForTests(&launch_arguments_); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 | 92 |
| 87 void Automation::GetTabTitle(std::string* tab_title, | 93 void Automation::GetTabTitle(std::string* tab_title, |
| 88 bool* success) { | 94 bool* success) { |
| 89 std::wstring wide_title; | 95 std::wstring wide_title; |
| 90 *success = tab_->GetTabTitle(&wide_title); | 96 *success = tab_->GetTabTitle(&wide_title); |
| 91 if (*success) | 97 if (*success) |
| 92 *tab_title = WideToUTF8(wide_title); | 98 *tab_title = WideToUTF8(wide_title); |
| 93 } | 99 } |
| 94 | 100 |
| 95 } // namespace webdriver | 101 } // namespace webdriver |
| OLD | NEW |