summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation/testing_automation_provider_win.cc
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-27 16:26:05 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-27 16:26:05 +0000
commita0eca45b109d89137269cb9b5004e8a51309a6b2 (patch)
treef41edc2d88c5d944f86021725f4ed87eece0a86b /chrome/browser/automation/testing_automation_provider_win.cc
parentbd1fc4c8a20ca6728df62cb8bf865a294832f07a (diff)
downloadchromium_src-a0eca45b109d89137269cb9b5004e8a51309a6b2.zip
chromium_src-a0eca45b109d89137269cb9b5004e8a51309a6b2.tar.gz
chromium_src-a0eca45b109d89137269cb9b5004e8a51309a6b2.tar.bz2
GTTF: Continue moving test automation code out of AutomationProvider.
TEST=ui_tests, chrome_frame_tests BUG=52097 Review URL: http://codereview.chromium.org/3201019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57687 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation/testing_automation_provider_win.cc')
-rw-r--r--chrome/browser/automation/testing_automation_provider_win.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/chrome/browser/automation/testing_automation_provider_win.cc b/chrome/browser/automation/testing_automation_provider_win.cc
index c48b372..8cd2a72 100644
--- a/chrome/browser/automation/testing_automation_provider_win.cc
+++ b/chrome/browser/automation/testing_automation_provider_win.cc
@@ -6,6 +6,8 @@
#include <windows.h>
+#include "base/string_util.h"
+#include "base/utf_string_conversions.h"
#include "chrome/browser/automation/automation_browser_tracker.h"
#include "chrome/browser/automation/automation_window_tracker.h"
#include "chrome/browser/browser_window.h"
@@ -78,3 +80,11 @@ void TestingAutomationProvider::SetWindowVisible(int handle,
}
}
+void TestingAutomationProvider::GetWindowTitle(int handle, string16* text) {
+ gfx::NativeWindow window = window_tracker_->GetResource(handle);
+ std::wstring result;
+ int length = ::GetWindowTextLength(window) + 1;
+ ::GetWindowText(window, WriteInto(&result, length), length);
+ text->assign(WideToUTF16(result));
+}
+