Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Unified Diff: ash/wm/video_detector_unittest.cc

Issue 2095193002: clang-format all of //ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/video_detector.cc ('k') | ash/wm/window_animations.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/video_detector_unittest.cc
diff --git a/ash/wm/video_detector_unittest.cc b/ash/wm/video_detector_unittest.cc
index ca9539c2398be002cd086aec3965d4197f3dcfca..113752994c50f41245ec643b3d7c3c5da6294653 100644
--- a/ash/wm/video_detector_unittest.cc
+++ b/ash/wm/video_detector_unittest.cc
@@ -28,9 +28,8 @@ namespace test {
// video is playing.
class TestVideoDetectorObserver : public VideoDetectorObserver {
public:
- TestVideoDetectorObserver() : num_invocations_(0),
- num_fullscreens_(0),
- num_not_fullscreens_(0) {}
+ TestVideoDetectorObserver()
+ : num_invocations_(0), num_fullscreens_(0), num_not_fullscreens_(0) {}
int num_invocations() const { return num_invocations_; }
int num_fullscreens() const { return num_fullscreens_; }
@@ -106,10 +105,9 @@ TEST_F(VideoDetectorTest, Basic) {
CreateTestWindowInShell(SK_ColorRED, 12345, window_bounds));
// Send enough updates, but make them be too small to trigger detection.
- gfx::Rect update_region(
- gfx::Point(),
- gfx::Size(VideoDetector::kMinUpdateWidth - 1,
- VideoDetector::kMinUpdateHeight));
+ gfx::Rect update_region(gfx::Point(),
+ gfx::Size(VideoDetector::kMinUpdateWidth - 1,
+ VideoDetector::kMinUpdateHeight));
for (int i = 0; i < VideoDetector::kMinFramesPerSecond; ++i)
detector_->OnDelegatedFrameDamage(window.get(), update_region);
EXPECT_EQ(0, observer_->num_invocations());
@@ -117,9 +115,8 @@ TEST_F(VideoDetectorTest, Basic) {
// Send not-quite-enough adaquately-sized updates.
observer_->reset_stats();
AdvanceTime(base::TimeDelta::FromSeconds(2));
- update_region.set_size(
- gfx::Size(VideoDetector::kMinUpdateWidth,
- VideoDetector::kMinUpdateHeight));
+ update_region.set_size(gfx::Size(VideoDetector::kMinUpdateWidth,
+ VideoDetector::kMinUpdateHeight));
for (int i = 0; i < VideoDetector::kMinFramesPerSecond - 1; ++i)
detector_->OnDelegatedFrameDamage(window.get(), update_region);
EXPECT_EQ(0, observer_->num_invocations());
@@ -173,10 +170,9 @@ TEST_F(VideoDetectorTest, Shutdown) {
gfx::Rect window_bounds(gfx::Point(), gfx::Size(1024, 768));
std::unique_ptr<aura::Window> window(
CreateTestWindowInShell(SK_ColorRED, 12345, window_bounds));
- gfx::Rect update_region(
- gfx::Point(),
- gfx::Size(VideoDetector::kMinUpdateWidth,
- VideoDetector::kMinUpdateHeight));
+ gfx::Rect update_region(gfx::Point(),
+ gfx::Size(VideoDetector::kMinUpdateWidth,
+ VideoDetector::kMinUpdateHeight));
// It should not detect video during the shutdown.
Shell::GetInstance()->OnAppTerminating();
@@ -196,10 +192,9 @@ TEST_F(VideoDetectorTest, WindowNotVisible) {
// We shouldn't report video that's played in a hidden window.
window->Hide();
- gfx::Rect update_region(
- gfx::Point(),
- gfx::Size(VideoDetector::kMinUpdateWidth,
- VideoDetector::kMinUpdateHeight));
+ gfx::Rect update_region(gfx::Point(),
+ gfx::Size(VideoDetector::kMinUpdateWidth,
+ VideoDetector::kMinUpdateHeight));
for (int i = 0; i < VideoDetector::kMinFramesPerSecond; ++i)
detector_->OnDelegatedFrameDamage(window.get(), update_region);
EXPECT_EQ(0, observer_->num_invocations());
@@ -237,10 +232,9 @@ TEST_F(VideoDetectorTest, MultipleWindows) {
// Even if there's video playing in both, the observer should only receive a
// single notification.
- gfx::Rect update_region(
- gfx::Point(),
- gfx::Size(VideoDetector::kMinUpdateWidth,
- VideoDetector::kMinUpdateHeight));
+ gfx::Rect update_region(gfx::Point(),
+ gfx::Size(VideoDetector::kMinUpdateWidth,
+ VideoDetector::kMinUpdateHeight));
for (int i = 0; i < VideoDetector::kMinFramesPerSecond; ++i)
detector_->OnDelegatedFrameDamage(window1.get(), update_region);
for (int i = 0; i < VideoDetector::kMinFramesPerSecond; ++i)
@@ -256,10 +250,9 @@ TEST_F(VideoDetectorTest, RepeatedNotifications) {
std::unique_ptr<aura::Window> window(
CreateTestWindowInShell(SK_ColorRED, 12345, window_bounds));
- gfx::Rect update_region(
- gfx::Point(),
- gfx::Size(VideoDetector::kMinUpdateWidth,
- VideoDetector::kMinUpdateHeight));
+ gfx::Rect update_region(gfx::Point(),
+ gfx::Size(VideoDetector::kMinUpdateWidth,
+ VideoDetector::kMinUpdateHeight));
for (int i = 0; i < VideoDetector::kMinFramesPerSecond; ++i)
detector_->OnDelegatedFrameDamage(window.get(), update_region);
EXPECT_EQ(1, observer_->num_invocations());
@@ -291,10 +284,9 @@ TEST_F(VideoDetectorTest, FullscreenWindow) {
window_state->OnWMEvent(&toggle_fullscreen_event);
ASSERT_TRUE(window_state->IsFullscreen());
window->Focus();
- const gfx::Rect kUpdateRegion(
- gfx::Point(),
- gfx::Size(VideoDetector::kMinUpdateWidth,
- VideoDetector::kMinUpdateHeight));
+ const gfx::Rect kUpdateRegion(gfx::Point(),
+ gfx::Size(VideoDetector::kMinUpdateWidth,
+ VideoDetector::kMinUpdateHeight));
for (int i = 0; i < VideoDetector::kMinFramesPerSecond; ++i)
detector_->OnDelegatedFrameDamage(window.get(), kUpdateRegion);
EXPECT_EQ(1, observer_->num_invocations());
« no previous file with comments | « ash/wm/video_detector.cc ('k') | ash/wm/window_animations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698