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

Side by Side Diff: ash/wm/video_detector_unittest.cc

Issue 174803002: Move root_window.* to window_event_dispatcher.* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/wm/video_detector.cc ('k') | ash/wm/window_cycle_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/wm/video_detector.h" 5 #include "ash/wm/video_detector.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/test/ash_test_base.h" 8 #include "ash/test/ash_test_base.h"
9 #include "ash/wm/window_state.h" 9 #include "ash/wm/window_state.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "third_party/skia/include/core/SkColor.h" 13 #include "third_party/skia/include/core/SkColor.h"
14 #include "ui/aura/client/aura_constants.h" 14 #include "ui/aura/client/aura_constants.h"
15 #include "ui/aura/root_window.h"
16 #include "ui/aura/test/test_windows.h" 15 #include "ui/aura/test/test_windows.h"
17 #include "ui/aura/window.h" 16 #include "ui/aura/window.h"
17 #include "ui/aura/window_event_dispatcher.h"
18 #include "ui/gfx/rect.h" 18 #include "ui/gfx/rect.h"
19 #include "ui/wm/public/window_types.h" 19 #include "ui/wm/public/window_types.h"
20 20
21 namespace ash { 21 namespace ash {
22 namespace test { 22 namespace test {
23 23
24 // Implementation that just counts the number of times we've been told that a 24 // Implementation that just counts the number of times we've been told that a
25 // video is playing. 25 // video is playing.
26 class TestVideoDetectorObserver : public VideoDetectorObserver { 26 class TestVideoDetectorObserver : public VideoDetectorObserver {
27 public: 27 public:
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 AdvanceTime(base::TimeDelta::FromSeconds(2)); 328 AdvanceTime(base::TimeDelta::FromSeconds(2));
329 for (int i = 0; i < VideoDetector::kMinFramesPerSecond; ++i) 329 for (int i = 0; i < VideoDetector::kMinFramesPerSecond; ++i)
330 detector_->OnWindowPaintScheduled(window.get(), kUpdateRegion); 330 detector_->OnWindowPaintScheduled(window.get(), kUpdateRegion);
331 EXPECT_EQ(1, observer_->num_invocations()); 331 EXPECT_EQ(1, observer_->num_invocations());
332 EXPECT_EQ(0, observer_->num_fullscreens()); 332 EXPECT_EQ(0, observer_->num_fullscreens());
333 EXPECT_EQ(1, observer_->num_not_fullscreens()); 333 EXPECT_EQ(1, observer_->num_not_fullscreens());
334 } 334 }
335 335
336 } // namespace test 336 } // namespace test
337 } // namespace ash 337 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/video_detector.cc ('k') | ash/wm/window_cycle_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698