| Index: chrome/test/ppapi/ppapi_test.cc
|
| diff --git a/chrome/test/ppapi/ppapi_test.cc b/chrome/test/ppapi/ppapi_test.cc
|
| index 0f4908096c2971473f0f769e4de0e3a47dcf5d01..056b6ada501c230357e171583a410808e51b9f60 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;
|
| @@ -231,7 +229,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);
|
|
|
|
|