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

Unified Diff: ash/wm/video_detector_unittest.cc

Issue 1867223004: Convert //ash from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 8 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/toplevel_window_event_handler_unittest.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 2ee7a0cda9143b9379819b43df05ca2234367a61..02d23c1ffaaaf2e9c3e5417236cec32aa4a7aad3 100644
--- a/ash/wm/video_detector_unittest.cc
+++ b/ash/wm/video_detector_unittest.cc
@@ -4,12 +4,13 @@
#include "ash/wm/video_detector.h"
+#include <memory>
+
#include "ash/shell.h"
#include "ash/test/ash_test_base.h"
#include "ash/wm/window_state.h"
#include "ash/wm/wm_event.h"
#include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/aura/client/aura_constants.h"
@@ -90,7 +91,7 @@ class VideoDetectorTest : public AshTestBase {
VideoDetector* detector_; // not owned
- scoped_ptr<TestVideoDetectorObserver> observer_;
+ std::unique_ptr<TestVideoDetectorObserver> observer_;
base::TimeTicks now_;
@@ -100,7 +101,7 @@ class VideoDetectorTest : public AshTestBase {
TEST_F(VideoDetectorTest, Basic) {
gfx::Rect window_bounds(gfx::Point(), gfx::Size(1024, 768));
- scoped_ptr<aura::Window> window(
+ std::unique_ptr<aura::Window> window(
CreateTestWindowInShell(SK_ColorRED, 12345, window_bounds));
// Send enough updates, but make them be too small to trigger detection.
@@ -169,7 +170,7 @@ TEST_F(VideoDetectorTest, Basic) {
TEST_F(VideoDetectorTest, Shutdown) {
gfx::Rect window_bounds(gfx::Point(), gfx::Size(1024, 768));
- scoped_ptr<aura::Window> window(
+ std::unique_ptr<aura::Window> window(
CreateTestWindowInShell(SK_ColorRED, 12345, window_bounds));
gfx::Rect update_region(
gfx::Point(),
@@ -185,7 +186,7 @@ TEST_F(VideoDetectorTest, Shutdown) {
TEST_F(VideoDetectorTest, WindowNotVisible) {
gfx::Rect window_bounds(gfx::Point(), gfx::Size(1024, 768));
- scoped_ptr<aura::Window> window(
+ std::unique_ptr<aura::Window> window(
CreateTestWindowInShell(SK_ColorRED, 12345, window_bounds));
// Reparent the window to the root to make sure that visibility changes aren't
@@ -228,9 +229,9 @@ TEST_F(VideoDetectorTest, WindowNotVisible) {
TEST_F(VideoDetectorTest, MultipleWindows) {
// Create two windows.
gfx::Rect window_bounds(gfx::Point(), gfx::Size(1024, 768));
- scoped_ptr<aura::Window> window1(
+ std::unique_ptr<aura::Window> window1(
CreateTestWindowInShell(SK_ColorRED, 12345, window_bounds));
- scoped_ptr<aura::Window> window2(
+ std::unique_ptr<aura::Window> window2(
CreateTestWindowInShell(SK_ColorBLUE, 23456, window_bounds));
// Even if there's video playing in both, the observer should only receive a
@@ -251,7 +252,7 @@ TEST_F(VideoDetectorTest, MultipleWindows) {
// Test that the observer receives repeated notifications.
TEST_F(VideoDetectorTest, RepeatedNotifications) {
gfx::Rect window_bounds(gfx::Point(), gfx::Size(1024, 768));
- scoped_ptr<aura::Window> window(
+ std::unique_ptr<aura::Window> window(
CreateTestWindowInShell(SK_ColorRED, 12345, window_bounds));
gfx::Rect update_region(
@@ -282,7 +283,7 @@ TEST_F(VideoDetectorTest, FullscreenWindow) {
UpdateDisplay("1024x768,1024x768");
const gfx::Rect kLeftBounds(gfx::Point(), gfx::Size(1024, 768));
- scoped_ptr<aura::Window> window(
+ std::unique_ptr<aura::Window> window(
CreateTestWindowInShell(SK_ColorRED, 12345, kLeftBounds));
wm::WindowState* window_state = wm::GetWindowState(window.get());
const wm::WMEvent toggle_fullscreen_event(wm::WM_EVENT_TOGGLE_FULLSCREEN);
@@ -304,7 +305,7 @@ TEST_F(VideoDetectorTest, FullscreenWindow) {
window_state->OnWMEvent(&toggle_fullscreen_event);
ASSERT_FALSE(window_state->IsFullscreen());
const gfx::Rect kRightBounds(gfx::Point(1024, 0), gfx::Size(1024, 768));
- scoped_ptr<aura::Window> other_window(
+ std::unique_ptr<aura::Window> other_window(
CreateTestWindowInShell(SK_ColorBLUE, 6789, kRightBounds));
wm::WindowState* other_window_state = wm::GetWindowState(other_window.get());
other_window_state->OnWMEvent(&toggle_fullscreen_event);
« no previous file with comments | « ash/wm/toplevel_window_event_handler_unittest.cc ('k') | ash/wm/window_animations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698