diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-24 20:11:33 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-24 20:11:33 +0000 |
commit | 66791d2e106c85b5af82e176409e7caf682989bd (patch) | |
tree | 484301f60b9cc72359d6cc75a1f8a9724f9ced38 /chrome/test/automation | |
parent | ea81ac968e926f50d62f24494479e8c12741d84d (diff) | |
download | chromium_src-66791d2e106c85b5af82e176409e7caf682989bd.zip chromium_src-66791d2e106c85b5af82e176409e7caf682989bd.tar.gz chromium_src-66791d2e106c85b5af82e176409e7caf682989bd.tar.bz2 |
Platform cleanup in automation code.
Review URL: http://codereview.chromium.org/27098
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10281 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/automation')
-rw-r--r-- | chrome/test/automation/automation_handle_tracker.cc | 4 | ||||
-rw-r--r-- | chrome/test/automation/automation_proxy.cc | 10 |
2 files changed, 8 insertions, 6 deletions
diff --git a/chrome/test/automation/automation_handle_tracker.cc b/chrome/test/automation/automation_handle_tracker.cc index e81d322..a0f2a29 100644 --- a/chrome/test/automation/automation_handle_tracker.cc +++ b/chrome/test/automation/automation_handle_tracker.cc @@ -10,9 +10,9 @@ AutomationResourceProxy::AutomationResourceProxy( AutomationHandleTracker* tracker, AutomationMessageSender* sender, AutomationHandle handle) - : tracker_(tracker), + : handle_(handle), + tracker_(tracker), sender_(sender), - handle_(handle), is_valid_(true) { tracker_->Add(this); } diff --git a/chrome/test/automation/automation_proxy.cc b/chrome/test/automation/automation_proxy.cc index 8d0f87d..634d1e0 100644 --- a/chrome/test/automation/automation_proxy.cc +++ b/chrome/test/automation/automation_proxy.cc @@ -7,6 +7,8 @@ #include "chrome/test/automation/automation_proxy.h" #include "base/logging.h" +#include "base/platform_thread.h" +#include "base/process_util.h" #include "base/ref_counted.h" #include "chrome/test/automation/automation_constants.h" #include "chrome/test/automation/automation_messages.h" @@ -192,7 +194,7 @@ void AutomationProxy::InitializeChannelID() { static int channel_counter = 0; std::wostringstream buf; - buf << L"ChromeTestingInterface:" << GetCurrentProcessId() << + buf << L"ChromeTestingInterface:" << base::GetCurrentProcId() << L"." << ++channel_counter; channel_id_ = buf.str(); } @@ -291,7 +293,7 @@ bool AutomationProxy::WaitForWindowCountToChange(int count, int* new_count, bool succeeded = GetBrowserWindowCount(new_count); if (!succeeded) return false; if (count != *new_count) return true; - Sleep(automation::kSleepTime); + PlatformThread::Sleep(automation::kSleepTime); } // Window count never changed. return false; @@ -310,7 +312,7 @@ bool AutomationProxy::WaitForWindowCountToBecome(int count, } else if (count == new_count) { return true; } - Sleep(automation::kSleepTime); + PlatformThread::Sleep(automation::kSleepTime); } // Window count never reached the value we sought. return false; @@ -471,7 +473,7 @@ TabProxy* AutomationProxy::CreateExternalTab(HWND parent, IPC::Message* response = NULL; int handle = 0; - bool succeeded = + bool succeeded = Send(new AutomationMsg_CreateExternalTab(0, parent, dimensions, style, external_tab_container, &handle)); |