| Index: chrome/test/ppapi/ppapi_test.cc
|
| diff --git a/chrome/test/ppapi/ppapi_test.cc b/chrome/test/ppapi/ppapi_test.cc
|
| index bef0daf4d2a91cb6d2debc35e285443868ceff5e..89772bb6d9e5ba2b58d552c48c6d1439201f6fac 100644
|
| --- a/chrome/test/ppapi/ppapi_test.cc
|
| +++ b/chrome/test/ppapi/ppapi_test.cc
|
| @@ -60,14 +60,13 @@ bool IsAudioOutputAvailable() {
|
|
|
| PPAPITestBase::TestFinishObserver::TestFinishObserver(
|
| RenderViewHost* render_view_host,
|
| - int timeout_s)
|
| + base::TimeDelta timeout)
|
| : finished_(false),
|
| waiting_(false),
|
| - timeout_s_(timeout_s) {
|
| + timeout_(timeout) {
|
| registrar_.Add(this, content::NOTIFICATION_DOM_OPERATION_RESPONSE,
|
| content::Source<RenderViewHost>(render_view_host));
|
| - timer_.Start(FROM_HERE, base::TimeDelta::FromSeconds(timeout_s),
|
| - this, &TestFinishObserver::OnTimeout);
|
| + timer_.Start(FROM_HERE, timeout, this, &TestFinishObserver::OnTimeout);
|
| }
|
|
|
| bool PPAPITestBase::TestFinishObserver::WaitForFinish() {
|
| @@ -91,8 +90,7 @@ void PPAPITestBase::TestFinishObserver::Observe(
|
| TrimString(dom_op_details->json, "\"", &response);
|
| if (response == "...") {
|
| timer_.Stop();
|
| - timer_.Start(FROM_HERE, base::TimeDelta::FromSeconds(timeout_s_),
|
| - this, &TestFinishObserver::OnTimeout);
|
| + timer_.Start(FROM_HERE, timeout_, this, &TestFinishObserver::OnTimeout);
|
| } else {
|
| result_ = response;
|
| finished_ = true;
|
| @@ -232,7 +230,8 @@ 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(), kTimeoutMs);
|
| + chrome::GetActiveWebContents(browser())->GetRenderViewHost(),
|
| + base::TimeDelta::FromMilliseconds(kTimeoutMs));
|
|
|
| ui_test_utils::NavigateToURL(browser(), test_url);
|
|
|
|
|