New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 763179 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Sep 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Unify TimeTicks in TabletPowerButtonControllerTest

Project Member Reported by warx@chromium.org, Sep 8 2017

Issue description

Now in TabletPowerButtonControllerTest test code, we have two timings:

void PressPowerButton() {
  tablet_controller_->OnPowerButtonEvent(true, base::TimeTicks::Now());
}
void ReleasePowerButton() {
  tablet_controller_->OnPowerButtonEvent(true, base::TimeTicks::Now());
}

And for several tests that are testing timing related issues, we have: power_manager_client_->SendPowerButtonEvent(true, tick_clock_->NowTicks()), which is using the base::SimpleTestTickClock's timing.

We should unify them, just using |tick_clock_|'s timing in the test.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Sep 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3fbcbf521f2ca3170793a9f6400d0975b41baf67

commit 3fbcbf521f2ca3170793a9f6400d0975b41baf67
Author: Qiang Xu <warx@chromium.org>
Date: Sat Sep 09 01:18:01 2017

cros: Unify TimeTicks in TabletPowerButtonControllTest

changes:
(1) Eliminate base::TimeTicks::Now() in TabletPowerButtonControllTest.
(2) Remove LockStateController ctor parameter.
(3) Move |tick_clock_| instance to PowerButtonController in preparation
for the tests of screenshot hotkey.
(4) Press{Release}PowerButton use power_button_controller now.
(5) Several other cleanup

Bug= 763179 
TEST=ash_unittests

Change-Id: I7fe3ad54187f30a53c336a0779e39f92e4607df1
Reviewed-on: https://chromium-review.googlesource.com/658407
Commit-Queue: Qiang(Joe) Xu <warx@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Cr-Commit-Position: refs/heads/master@{#500770}
[modify] https://crrev.com/3fbcbf521f2ca3170793a9f6400d0975b41baf67/ash/shell.cc
[modify] https://crrev.com/3fbcbf521f2ca3170793a9f6400d0975b41baf67/ash/shell_test_api.cc
[modify] https://crrev.com/3fbcbf521f2ca3170793a9f6400d0975b41baf67/ash/system/power/tablet_power_button_controller.cc
[modify] https://crrev.com/3fbcbf521f2ca3170793a9f6400d0975b41baf67/ash/system/power/tablet_power_button_controller.h
[modify] https://crrev.com/3fbcbf521f2ca3170793a9f6400d0975b41baf67/ash/system/power/tablet_power_button_controller_unittest.cc
[modify] https://crrev.com/3fbcbf521f2ca3170793a9f6400d0975b41baf67/ash/wm/power_button_controller.cc
[modify] https://crrev.com/3fbcbf521f2ca3170793a9f6400d0975b41baf67/ash/wm/power_button_controller.h

Comment 2 by warx@chromium.org, Sep 9 2017

Status: Fixed (was: Assigned)

Comment 3 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Comment 4 by dchan@chromium.org, Jan 23 2018

Status: Fixed (was: Archived)

Sign in to add a comment