| Index: ppapi/tests/test_view.cc
|
| diff --git a/ppapi/tests/test_view.cc b/ppapi/tests/test_view.cc
|
| index df51199e119c1ed33205d5790095d76504a48ad2..5c523c53ed84b9a6aacf57c8171c1f8c461ad798 100644
|
| --- a/ppapi/tests/test_view.cc
|
| +++ b/ppapi/tests/test_view.cc
|
| @@ -104,11 +104,8 @@ std::string TestView::TestPageHideShow() {
|
|
|
| // Wait until we get a hide event, being careful to handle spurious
|
| // notifications of ViewChanged.
|
| - PP_Time begin_time = pp::Module::Get()->core()->GetTime();
|
| while (WaitUntilViewChanged() &&
|
| - page_visibility_log_[page_visibility_log_.size() - 1] &&
|
| - pp::Module::Get()->core()->GetTime() - begin_time <
|
| - kViewChangeTimeoutSec) {
|
| + page_visibility_log_[page_visibility_log_.size() - 1]) {
|
| }
|
| if (page_visibility_log_[page_visibility_log_.size() - 1]) {
|
| // Didn't get a view changed event that changed visibility (though there
|
| @@ -125,11 +122,8 @@ std::string TestView::TestPageHideShow() {
|
| instance_->ReportProgress("TestPageHideShow:Hidden");
|
|
|
| // Wait until we get a show event.
|
| - begin_time = pp::Module::Get()->core()->GetTime();
|
| while (WaitUntilViewChanged() &&
|
| - !page_visibility_log_[page_visibility_log_.size() - 1] &&
|
| - pp::Module::Get()->core()->GetTime() - begin_time <
|
| - kViewChangeTimeoutSec) {
|
| + !page_visibility_log_[page_visibility_log_.size() - 1]) {
|
| }
|
| ASSERT_TRUE(page_visibility_log_[page_visibility_log_.size() - 1]);
|
|
|
| @@ -152,10 +146,7 @@ std::string TestView::TestSizeChange() {
|
|
|
| instance_->EvalScript(script_stream.str());
|
|
|
| - PP_Time begin_time = pp::Module::Get()->core()->GetTime();
|
| - while (WaitUntilViewChanged() && last_view_.GetRect() != desired_rect &&
|
| - pp::Module::Get()->core()->GetTime() - begin_time <
|
| - kViewChangeTimeoutSec) {
|
| + while (WaitUntilViewChanged() && last_view_.GetRect() != desired_rect) {
|
| }
|
| ASSERT_TRUE(last_view_.GetRect() == desired_rect);
|
|
|
| @@ -192,10 +183,7 @@ std::string TestView::TestClipChange() {
|
| desired_clip.set_y(clip_amount);
|
| desired_clip.set_height(desired_clip.height() - desired_clip.y());
|
|
|
| - PP_Time begin_time = pp::Module::Get()->core()->GetTime();
|
| - while (WaitUntilViewChanged() && last_view_.GetClipRect() != desired_clip &&
|
| - pp::Module::Get()->core()->GetTime() - begin_time <
|
| - kViewChangeTimeoutSec) {
|
| + while (WaitUntilViewChanged() && last_view_.GetClipRect() != desired_clip) {
|
| }
|
| ASSERT_TRUE(last_view_.GetClipRect() == desired_clip);
|
| PASS();
|
| @@ -206,21 +194,15 @@ std::string TestView::TestScrollOffsetChange() {
|
| "document.body.style.height = '5000px';");
|
| instance_->EvalScript("window.scrollTo(5, 1);");
|
|
|
| - PP_Time begin_time = pp::Module::Get()->core()->GetTime();
|
| while (WaitUntilViewChanged() &&
|
| - last_view_.GetScrollOffset() != pp::Point(5, 1) &&
|
| - pp::Module::Get()->core()->GetTime() - begin_time <
|
| - kViewChangeTimeoutSec) {
|
| + last_view_.GetScrollOffset() != pp::Point(5, 1)) {
|
| }
|
| ASSERT_EQ(pp::Point(5, 1), last_view_.GetScrollOffset());
|
|
|
| instance_->EvalScript("window.scrollTo(0, 0);");
|
|
|
| - begin_time = pp::Module::Get()->core()->GetTime();
|
| while (WaitUntilViewChanged() &&
|
| - last_view_.GetScrollOffset() != pp::Point(0, 0) &&
|
| - pp::Module::Get()->core()->GetTime() - begin_time <
|
| - kViewChangeTimeoutSec) {
|
| + last_view_.GetScrollOffset() != pp::Point(0, 0)) {
|
| }
|
| ASSERT_EQ(pp::Point(0, 0), last_view_.GetScrollOffset());
|
|
|
|
|