diff options
author | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-13 21:38:37 +0000 |
---|---|---|
committer | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-13 21:38:37 +0000 |
commit | 7e712a839266bd3d046e8420c67c739968940c6c (patch) | |
tree | 06e60cb855cc4acddb199cfc322e42769b679976 /chrome/test/ppapi/ppapi_test.cc | |
parent | a39ca1650e8ee83553a2c91c6712a71647fa2ff1 (diff) | |
download | chromium_src-7e712a839266bd3d046e8420c67c739968940c6c.zip chromium_src-7e712a839266bd3d046e8420c67c739968940c6c.tar.gz chromium_src-7e712a839266bd3d046e8420c67c739968940c6c.tar.bz2 |
Revert 146656 - Switch to TimeDelta interfaces in chrome automation test infrastructure.
BUG=108171
Review URL: https://chromiumcodereview.appspot.com/10736064
TBR=tedvessenes@gmail.com
Review URL: https://chromiumcodereview.appspot.com/10781003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146658 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/ppapi/ppapi_test.cc')
-rw-r--r-- | chrome/test/ppapi/ppapi_test.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/chrome/test/ppapi/ppapi_test.cc b/chrome/test/ppapi/ppapi_test.cc index 89772bb..bef0daf 100644 --- a/chrome/test/ppapi/ppapi_test.cc +++ b/chrome/test/ppapi/ppapi_test.cc @@ -60,13 +60,14 @@ bool IsAudioOutputAvailable() { PPAPITestBase::TestFinishObserver::TestFinishObserver( RenderViewHost* render_view_host, - base::TimeDelta timeout) + int timeout_s) : finished_(false), waiting_(false), - timeout_(timeout) { + timeout_s_(timeout_s) { registrar_.Add(this, content::NOTIFICATION_DOM_OPERATION_RESPONSE, content::Source<RenderViewHost>(render_view_host)); - timer_.Start(FROM_HERE, timeout, this, &TestFinishObserver::OnTimeout); + timer_.Start(FROM_HERE, base::TimeDelta::FromSeconds(timeout_s), + this, &TestFinishObserver::OnTimeout); } bool PPAPITestBase::TestFinishObserver::WaitForFinish() { @@ -90,7 +91,8 @@ void PPAPITestBase::TestFinishObserver::Observe( TrimString(dom_op_details->json, "\"", &response); if (response == "...") { timer_.Stop(); - timer_.Start(FROM_HERE, timeout_, this, &TestFinishObserver::OnTimeout); + timer_.Start(FROM_HERE, base::TimeDelta::FromSeconds(timeout_s_), + this, &TestFinishObserver::OnTimeout); } else { result_ = response; finished_ = true; @@ -230,8 +232,7 @@ void PPAPITestBase::RunTestURL(const GURL& test_url) { // any other value indicates completion (in this case it will start with // "PASS" or "FAIL"). This keeps us from timing out on waits for long tests. TestFinishObserver observer( - chrome::GetActiveWebContents(browser())->GetRenderViewHost(), - base::TimeDelta::FromMilliseconds(kTimeoutMs)); + chrome::GetActiveWebContents(browser())->GetRenderViewHost(), kTimeoutMs); ui_test_utils::NavigateToURL(browser(), test_url); |