summaryrefslogtreecommitdiffstats
path: root/chrome/test/automation
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-24 09:34:14 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-24 09:34:14 +0000
commit4cc8eb5b72b445d6ec8ad965588f2014012947a2 (patch)
tree6dba80504dacb24991ba037397f2563aa9cf9a26 /chrome/test/automation
parent309d7a28aa6c938f60ac7a543ab4a73827d29562 (diff)
downloadchromium_src-4cc8eb5b72b445d6ec8ad965588f2014012947a2.zip
chromium_src-4cc8eb5b72b445d6ec8ad965588f2014012947a2.tar.gz
chromium_src-4cc8eb5b72b445d6ec8ad965588f2014012947a2.tar.bz2
Get rid of WaitForWindowCountToChange.
The function had confusing semantics, was marked to be removed, and could induce flakiness in tests which used it. WaitForWindowCountToBecome is much better replacement for it. Review URL: http://codereview.chromium.org/49007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12348 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/automation')
-rw-r--r--chrome/test/automation/automation_proxy.cc14
-rw-r--r--chrome/test/automation/automation_proxy.h10
2 files changed, 0 insertions, 24 deletions
diff --git a/chrome/test/automation/automation_proxy.cc b/chrome/test/automation/automation_proxy.cc
index 35d44f8..3a8f406 100644
--- a/chrome/test/automation/automation_proxy.cc
+++ b/chrome/test/automation/automation_proxy.cc
@@ -251,20 +251,6 @@ bool AutomationProxy::GetBrowserWindowCount(int* num_windows) {
return succeeded;
}
-bool AutomationProxy::WaitForWindowCountToChange(int count, int* new_count,
- int wait_timeout) {
- const TimeTicks start = TimeTicks::Now();
- const TimeDelta timeout = TimeDelta::FromMilliseconds(wait_timeout);
- while (TimeTicks::Now() - start < timeout) {
- bool succeeded = GetBrowserWindowCount(new_count);
- if (!succeeded) return false;
- if (count != *new_count) return true;
- PlatformThread::Sleep(automation::kSleepTime);
- }
- // Window count never changed.
- return false;
-}
-
bool AutomationProxy::WaitForWindowCountToBecome(int count,
int wait_timeout) {
const TimeTicks start = TimeTicks::Now();
diff --git a/chrome/test/automation/automation_proxy.h b/chrome/test/automation/automation_proxy.h
index e80259f..138edd0 100644
--- a/chrome/test/automation/automation_proxy.h
+++ b/chrome/test/automation/automation_proxy.h
@@ -89,16 +89,6 @@ class AutomationProxy : public IPC::Channel::Listener,
// true on success. False likely indicates an IPC error.
bool GetBrowserWindowCount(int* num_windows);
- // Block the thread until the window count changes.
- // First parameter is the original window count.
- // The second parameter is updated with the number of window tabs.
- // The third parameter specifies the timeout length for the wait loop.
- // Returns false if the window count does not change before time out.
- // TODO(evanm): this function has a confusing name and semantics; it should
- // be deprecated for WaitForWindowCountToBecome.
- bool WaitForWindowCountToChange(int count, int* new_counter,
- int wait_timeout);
-
// Block the thread until the window count becomes the provided value.
// Returns true on success.
bool WaitForWindowCountToBecome(int target_count, int wait_timeout);