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

Side by Side Diff: ash/rotator/screen_rotation_animator_unittest.cc

Issue 2910413002: cros: Do not cache |root_window| in ScreenRotationAnimator. (Closed)
Patch Set: Tie ScreenRotationAnimator to |root_window|. Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/rotator/screen_rotation_animator.h" 5 #include "ash/rotator/screen_rotation_animator.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/display/window_tree_host_manager.h" 8 #include "ash/display/window_tree_host_manager.h"
9 #include "ash/public/cpp/config.h" 9 #include "ash/public/cpp/config.h"
10 #include "ash/rotator/screen_rotation_animator_observer.h" 10 #include "ash/rotator/screen_rotation_animator_observer.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 Shell::Get()->display_manager()->SetDisplayRotation( 44 Shell::Get()->display_manager()->SetDisplayRotation(
45 display_id, rotation, 45 display_id, rotation,
46 display::Display::RotationSource::ROTATION_SOURCE_USER); 46 display::Display::RotationSource::ROTATION_SOURCE_USER);
47 } 47 }
48 48
49 OverviewButtonTray* GetTray() { 49 OverviewButtonTray* GetTray() {
50 return StatusAreaWidgetTestHelper::GetStatusAreaWidget() 50 return StatusAreaWidgetTestHelper::GetStatusAreaWidget()
51 ->overview_button_tray(); 51 ->overview_button_tray();
52 } 52 }
53 53
54 aura::Window* GetRootWindow(int64_t display_id) {
55 return Shell::Get()->window_tree_host_manager()->GetRootWindowForDisplayId(
56 display_id);
57 }
58
54 class AnimationObserver : public ScreenRotationAnimatorObserver { 59 class AnimationObserver : public ScreenRotationAnimatorObserver {
55 public: 60 public:
56 AnimationObserver() {} 61 AnimationObserver() {}
57 62
58 bool notified() const { return notified_; } 63 bool notified() const { return notified_; }
59 64
60 void OnScreenRotationAnimationFinished( 65 void OnScreenRotationAnimationFinished(
61 ScreenRotationAnimator* animator) override { 66 ScreenRotationAnimator* animator) override {
62 notified_ = true; 67 notified_ = true;
63 } 68 }
64 69
65 private: 70 private:
66 bool notified_ = false; 71 bool notified_ = false;
67 72
68 DISALLOW_COPY_AND_ASSIGN(AnimationObserver); 73 DISALLOW_COPY_AND_ASSIGN(AnimationObserver);
69 }; 74 };
70 75
71 class TestScreenRotationAnimator : public ScreenRotationAnimator { 76 class TestScreenRotationAnimator : public ScreenRotationAnimator {
72 public: 77 public:
73 TestScreenRotationAnimator(int64_t display_id, 78 TestScreenRotationAnimator(aura::Window* root_window,
74 const base::Closure& before_callback, 79 const base::Closure& before_callback,
75 const base::Closure& after_callback); 80 const base::Closure& after_callback);
76 ~TestScreenRotationAnimator() override {} 81 ~TestScreenRotationAnimator() override {}
77 82
78 private: 83 private:
79 CopyCallback CreateAfterCopyCallbackBeforeRotation( 84 CopyCallback CreateAfterCopyCallbackBeforeRotation(
80 std::unique_ptr<ScreenRotationRequest> rotation_request) override; 85 std::unique_ptr<ScreenRotationRequest> rotation_request) override;
81 CopyCallback CreateAfterCopyCallbackAfterRotation( 86 CopyCallback CreateAfterCopyCallbackAfterRotation(
82 std::unique_ptr<ScreenRotationRequest> rotation_request) override; 87 std::unique_ptr<ScreenRotationRequest> rotation_request) override;
83 88
84 void IntersectBefore(CopyCallback next_callback, 89 void IntersectBefore(CopyCallback next_callback,
85 std::unique_ptr<cc::CopyOutputResult> result); 90 std::unique_ptr<cc::CopyOutputResult> result);
86 void IntersectAfter(CopyCallback next_callback, 91 void IntersectAfter(CopyCallback next_callback,
87 std::unique_ptr<cc::CopyOutputResult> result); 92 std::unique_ptr<cc::CopyOutputResult> result);
88 93
89 base::Closure intersect_before_callback_; 94 base::Closure intersect_before_callback_;
90 base::Closure intersect_after_callback_; 95 base::Closure intersect_after_callback_;
91 96
92 DISALLOW_COPY_AND_ASSIGN(TestScreenRotationAnimator); 97 DISALLOW_COPY_AND_ASSIGN(TestScreenRotationAnimator);
93 }; 98 };
94 99
95 TestScreenRotationAnimator::TestScreenRotationAnimator( 100 TestScreenRotationAnimator::TestScreenRotationAnimator(
96 int64_t display_id, 101 aura::Window* root_window,
97 const base::Closure& before_callback, 102 const base::Closure& before_callback,
98 const base::Closure& after_callback) 103 const base::Closure& after_callback)
99 : ScreenRotationAnimator(display_id), 104 : ScreenRotationAnimator(root_window),
100 intersect_before_callback_(before_callback), 105 intersect_before_callback_(before_callback),
101 intersect_after_callback_(after_callback) {} 106 intersect_after_callback_(after_callback) {}
102 107
103 ScreenRotationAnimator::CopyCallback 108 ScreenRotationAnimator::CopyCallback
104 TestScreenRotationAnimator::CreateAfterCopyCallbackBeforeRotation( 109 TestScreenRotationAnimator::CreateAfterCopyCallbackBeforeRotation(
105 std::unique_ptr<ScreenRotationRequest> rotation_request) { 110 std::unique_ptr<ScreenRotationRequest> rotation_request) {
106 CopyCallback next_callback = 111 CopyCallback next_callback =
107 ScreenRotationAnimator::CreateAfterCopyCallbackBeforeRotation( 112 ScreenRotationAnimator::CreateAfterCopyCallbackBeforeRotation(
108 std::move(rotation_request)); 113 std::move(rotation_request));
109 return base::Bind(&TestScreenRotationAnimator::IntersectBefore, 114 return base::Bind(&TestScreenRotationAnimator::IntersectBefore,
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 void ScreenRotationAnimatorSlowAnimationTest::SetUp() { 171 void ScreenRotationAnimatorSlowAnimationTest::SetUp() {
167 AshTestBase::SetUp(); 172 AshTestBase::SetUp();
168 173
169 display_ = display::Screen::GetScreen()->GetPrimaryDisplay(); 174 display_ = display::Screen::GetScreen()->GetPrimaryDisplay();
170 if (Shell::GetAshConfig() == Config::MASH) { 175 if (Shell::GetAshConfig() == Config::MASH) {
171 ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() != 176 ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() !=
172 display_id()); 177 display_id());
173 return; 178 return;
174 } 179 }
175 180
176 animator_ = base::MakeUnique<ScreenRotationAnimator>(display_.id()); 181 animator_ =
182 base::MakeUnique<ScreenRotationAnimator>(GetRootWindow(display_.id()));
177 test_api_ = 183 test_api_ =
178 base::MakeUnique<test::ScreenRotationAnimatorTestApi>(animator_.get()); 184 base::MakeUnique<test::ScreenRotationAnimatorTestApi>(animator_.get());
179 test_api()->DisableAnimationTimers(); 185 test_api()->DisableAnimationTimers();
180 non_zero_duration_mode_ = 186 non_zero_duration_mode_ =
181 base::MakeUnique<ui::ScopedAnimationDurationScaleMode>( 187 base::MakeUnique<ui::ScopedAnimationDurationScaleMode>(
182 ui::ScopedAnimationDurationScaleMode::SLOW_DURATION); 188 ui::ScopedAnimationDurationScaleMode::SLOW_DURATION);
183 } 189 }
184 190
185 class ScreenRotationAnimatorSmoothAnimationTest : public test::AshTestBase { 191 class ScreenRotationAnimatorSmoothAnimationTest : public test::AshTestBase {
186 public: 192 public:
187 ScreenRotationAnimatorSmoothAnimationTest() {} 193 ScreenRotationAnimatorSmoothAnimationTest() {}
188 ~ScreenRotationAnimatorSmoothAnimationTest() override {} 194 ~ScreenRotationAnimatorSmoothAnimationTest() override {}
189 195
190 // AshTestBase: 196 // AshTestBase:
191 void SetUp() override; 197 void SetUp() override;
192 198
193 void RemoveSecondaryDisplay(const std::string& specs); 199 void RemoveSecondaryDisplay(const std::string& specs);
194 void QuitWaitForCopyCallback(); 200 void QuitWaitForCopyCallback();
195 201
196 protected: 202 protected:
197 int64_t display_id() const { return display_.id(); } 203 int64_t display_id() const { return display_.id(); }
198 204
199 TestScreenRotationAnimator* animator() { return animator_.get(); } 205 TestScreenRotationAnimator* animator() { return animator_.get(); }
200 206
201 void SetScreenRotationAnimator(int64_t display_id, 207 void SetScreenRotationAnimator(aura::Window* root_window,
202 const base::Closure& before_callback, 208 const base::Closure& before_callback,
203 const base::Closure& after_callback); 209 const base::Closure& after_callback);
204 210
205 test::ScreenRotationAnimatorTestApi* test_api() { return test_api_.get(); } 211 test::ScreenRotationAnimatorTestApi* test_api() { return test_api_.get(); }
206 212
207 void WaitForCopyCallback(); 213 void WaitForCopyCallback();
208 214
209 std::unique_ptr<base::RunLoop> run_loop_; 215 std::unique_ptr<base::RunLoop> run_loop_;
210 216
211 private: 217 private:
(...skipping 26 matching lines...) Expand all
238 ash_test_helper()->reset_commandline(); 244 ash_test_helper()->reset_commandline();
239 245
240 display_ = display::Screen::GetScreen()->GetPrimaryDisplay(); 246 display_ = display::Screen::GetScreen()->GetPrimaryDisplay();
241 if (Shell::GetAshConfig() == Config::MASH) { 247 if (Shell::GetAshConfig() == Config::MASH) {
242 ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() != 248 ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() !=
243 display_id()); 249 display_id());
244 return; 250 return;
245 } 251 }
246 252
247 run_loop_ = base::MakeUnique<base::RunLoop>(); 253 run_loop_ = base::MakeUnique<base::RunLoop>();
248 SetScreenRotationAnimator(display_.id(), run_loop_->QuitWhenIdleClosure(), 254 SetScreenRotationAnimator(GetRootWindow(display_.id()),
255 run_loop_->QuitWhenIdleClosure(),
249 run_loop_->QuitWhenIdleClosure()); 256 run_loop_->QuitWhenIdleClosure());
250 non_zero_duration_mode_ = 257 non_zero_duration_mode_ =
251 base::MakeUnique<ui::ScopedAnimationDurationScaleMode>( 258 base::MakeUnique<ui::ScopedAnimationDurationScaleMode>(
252 ui::ScopedAnimationDurationScaleMode::SLOW_DURATION); 259 ui::ScopedAnimationDurationScaleMode::SLOW_DURATION);
253 } 260 }
254 261
255 void ScreenRotationAnimatorSmoothAnimationTest::SetScreenRotationAnimator( 262 void ScreenRotationAnimatorSmoothAnimationTest::SetScreenRotationAnimator(
256 int64_t display_id, 263 aura::Window* root_window,
257 const base::Closure& before_callback, 264 const base::Closure& before_callback,
258 const base::Closure& after_callback) { 265 const base::Closure& after_callback) {
259 animator_ = base::MakeUnique<TestScreenRotationAnimator>( 266 animator_ = base::MakeUnique<TestScreenRotationAnimator>(
260 display_id, before_callback, after_callback); 267 root_window, before_callback, after_callback);
261 test_api_ = 268 test_api_ =
262 base::MakeUnique<test::ScreenRotationAnimatorTestApi>(animator_.get()); 269 base::MakeUnique<test::ScreenRotationAnimatorTestApi>(animator_.get());
263 test_api()->DisableAnimationTimers(); 270 test_api()->DisableAnimationTimers();
264 } 271 }
265 272
266 void ScreenRotationAnimatorSmoothAnimationTest::WaitForCopyCallback() { 273 void ScreenRotationAnimatorSmoothAnimationTest::WaitForCopyCallback() {
267 run_loop_.reset(new base::RunLoop()); 274 run_loop_.reset(new base::RunLoop());
268 run_loop_->Run(); 275 run_loop_->Run();
269 } 276 }
270 277
271 TEST_F(ScreenRotationAnimatorSlowAnimationTest, ShouldNotifyObserver) { 278 TEST_F(ScreenRotationAnimatorSlowAnimationTest, ShouldNotifyObserver) {
272 // TODO(wutao): needs GetDisplayInfo http://crbug.com/622480. 279 // TODO(wutao): needs GetDisplayInfo http://crbug.com/622480.
273 if (Shell::GetAshConfig() == Config::MASH) { 280 if (Shell::GetAshConfig() == Config::MASH) {
274 ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() != 281 ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() !=
275 display_id()); 282 display_id());
276 return; 283 return;
277 } 284 }
278 285
279 SetDisplayRotation(display_id(), display::Display::ROTATE_0); 286 SetDisplayRotation(display_id(), display::Display::ROTATE_0);
280 AnimationObserver observer; 287 AnimationObserver observer;
281 animator()->AddScreenRotationAnimatorObserver(&observer); 288 animator()->AddScreenRotationAnimatorObserver(&observer);
282 EXPECT_FALSE(observer.notified()); 289 EXPECT_FALSE(observer.notified());
283 290
284 animator()->Rotate(display::Display::ROTATE_90, 291 animator()->Rotate(display_id(), display::Display::ROTATE_90,
285 display::Display::RotationSource::ROTATION_SOURCE_USER); 292 display::Display::RotationSource::ROTATION_SOURCE_USER);
286 EXPECT_FALSE(observer.notified()); 293 EXPECT_FALSE(observer.notified());
287 294
288 test_api()->CompleteAnimations(); 295 test_api()->CompleteAnimations();
289 EXPECT_TRUE(observer.notified()); 296 EXPECT_TRUE(observer.notified());
290 EXPECT_FALSE(test_api()->HasActiveAnimations()); 297 EXPECT_FALSE(test_api()->HasActiveAnimations());
291 animator()->RemoveScreenRotationAnimatorObserver(&observer); 298 animator()->RemoveScreenRotationAnimatorObserver(&observer);
292 } 299 }
293 300
294 TEST_F(ScreenRotationAnimatorSlowAnimationTest, ShouldNotifyObserverOnce) { 301 TEST_F(ScreenRotationAnimatorSlowAnimationTest, ShouldNotifyObserverOnce) {
295 // TODO(wutao): needs GetDisplayInfo http://crbug.com/622480. 302 // TODO(wutao): needs GetDisplayInfo http://crbug.com/622480.
296 if (Shell::GetAshConfig() == Config::MASH) { 303 if (Shell::GetAshConfig() == Config::MASH) {
297 ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() != 304 ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() !=
298 display_id()); 305 display_id());
299 return; 306 return;
300 } 307 }
301 308
302 SetDisplayRotation(display_id(), display::Display::ROTATE_0); 309 SetDisplayRotation(display_id(), display::Display::ROTATE_0);
303 AnimationObserver observer; 310 AnimationObserver observer;
304 animator()->AddScreenRotationAnimatorObserver(&observer); 311 animator()->AddScreenRotationAnimatorObserver(&observer);
305 EXPECT_FALSE(observer.notified()); 312 EXPECT_FALSE(observer.notified());
306 313
307 animator()->Rotate(display::Display::ROTATE_90, 314 animator()->Rotate(display_id(), display::Display::ROTATE_90,
308 display::Display::RotationSource::ROTATION_SOURCE_USER); 315 display::Display::RotationSource::ROTATION_SOURCE_USER);
309 EXPECT_FALSE(observer.notified()); 316 EXPECT_FALSE(observer.notified());
310 317
311 animator()->Rotate(display::Display::ROTATE_180, 318 animator()->Rotate(display_id(), display::Display::ROTATE_180,
312 display::Display::RotationSource::ROTATION_SOURCE_USER); 319 display::Display::RotationSource::ROTATION_SOURCE_USER);
313 EXPECT_FALSE(observer.notified()); 320 EXPECT_FALSE(observer.notified());
314 321
315 test_api()->CompleteAnimations(); 322 test_api()->CompleteAnimations();
316 EXPECT_TRUE(observer.notified()); 323 EXPECT_TRUE(observer.notified());
317 EXPECT_FALSE(test_api()->HasActiveAnimations()); 324 EXPECT_FALSE(test_api()->HasActiveAnimations());
318 animator()->RemoveScreenRotationAnimatorObserver(&observer); 325 animator()->RemoveScreenRotationAnimatorObserver(&observer);
319 } 326 }
320 327
321 TEST_F(ScreenRotationAnimatorSlowAnimationTest, RotatesToDifferentRotation) { 328 TEST_F(ScreenRotationAnimatorSlowAnimationTest, RotatesToDifferentRotation) {
322 // TODO(wutao): needs GetDisplayInfo http://crbug.com/622480. 329 // TODO(wutao): needs GetDisplayInfo http://crbug.com/622480.
323 if (Shell::GetAshConfig() == Config::MASH) { 330 if (Shell::GetAshConfig() == Config::MASH) {
324 ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() != 331 ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() !=
325 display_id()); 332 display_id());
326 return; 333 return;
327 } 334 }
328 335
329 SetDisplayRotation(display_id(), display::Display::ROTATE_0); 336 SetDisplayRotation(display_id(), display::Display::ROTATE_0);
330 animator()->Rotate(display::Display::ROTATE_90, 337 animator()->Rotate(display_id(), display::Display::ROTATE_90,
331 display::Display::RotationSource::ROTATION_SOURCE_USER); 338 display::Display::RotationSource::ROTATION_SOURCE_USER);
332 EXPECT_TRUE(test_api()->HasActiveAnimations()); 339 EXPECT_TRUE(test_api()->HasActiveAnimations());
333 340
334 test_api()->CompleteAnimations(); 341 test_api()->CompleteAnimations();
335 EXPECT_FALSE(test_api()->HasActiveAnimations()); 342 EXPECT_FALSE(test_api()->HasActiveAnimations());
336 } 343 }
337 344
338 TEST_F(ScreenRotationAnimatorSlowAnimationTest, 345 TEST_F(ScreenRotationAnimatorSlowAnimationTest,
339 ShouldNotRotateTheSameRotation) { 346 ShouldNotRotateTheSameRotation) {
340 // TODO(wutao): needs GetDisplayInfo http://crbug.com/622480. 347 // TODO(wutao): needs GetDisplayInfo http://crbug.com/622480.
341 if (Shell::GetAshConfig() == Config::MASH) { 348 if (Shell::GetAshConfig() == Config::MASH) {
342 ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() != 349 ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() !=
343 display_id()); 350 display_id());
344 return; 351 return;
345 } 352 }
346 353
347 SetDisplayRotation(display_id(), display::Display::ROTATE_0); 354 SetDisplayRotation(display_id(), display::Display::ROTATE_0);
348 animator()->Rotate(display::Display::ROTATE_0, 355 animator()->Rotate(display_id(), display::Display::ROTATE_0,
349 display::Display::RotationSource::ROTATION_SOURCE_USER); 356 display::Display::RotationSource::ROTATION_SOURCE_USER);
350 EXPECT_FALSE(test_api()->HasActiveAnimations()); 357 EXPECT_FALSE(test_api()->HasActiveAnimations());
351 } 358 }
352 359
353 // Simulates the situation that if there is a new rotation request during 360 // Simulates the situation that if there is a new rotation request during
354 // animation, it should stop the animation immediately and add the new rotation 361 // animation, it should stop the animation immediately and add the new rotation
355 // request to the |last_pending_request_|. 362 // request to the |last_pending_request_|.
356 TEST_F(ScreenRotationAnimatorSlowAnimationTest, RotatesDuringRotation) { 363 TEST_F(ScreenRotationAnimatorSlowAnimationTest, RotatesDuringRotation) {
357 // TODO(wutao): needs GetDisplayInfo http://crbug.com/622480. 364 // TODO(wutao): needs GetDisplayInfo http://crbug.com/622480.
358 if (Shell::GetAshConfig() == Config::MASH) { 365 if (Shell::GetAshConfig() == Config::MASH) {
359 ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() != 366 ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() !=
360 display_id()); 367 display_id());
361 return; 368 return;
362 } 369 }
363 370
364 SetDisplayRotation(display_id(), display::Display::ROTATE_0); 371 SetDisplayRotation(display_id(), display::Display::ROTATE_0);
365 animator()->Rotate(display::Display::ROTATE_90, 372 animator()->Rotate(display_id(), display::Display::ROTATE_90,
366 display::Display::RotationSource::ROTATION_SOURCE_USER); 373 display::Display::RotationSource::ROTATION_SOURCE_USER);
367 animator()->Rotate(display::Display::ROTATE_180, 374 animator()->Rotate(display_id(), display::Display::ROTATE_180,
368 display::Display::RotationSource::ROTATION_SOURCE_USER); 375 display::Display::RotationSource::ROTATION_SOURCE_USER);
369 EXPECT_TRUE(test_api()->HasActiveAnimations()); 376 EXPECT_TRUE(test_api()->HasActiveAnimations());
370 377
371 test_api()->CompleteAnimations(); 378 test_api()->CompleteAnimations();
372 EXPECT_FALSE(test_api()->HasActiveAnimations()); 379 EXPECT_FALSE(test_api()->HasActiveAnimations());
373 EXPECT_EQ(display::Display::ROTATE_180, GetDisplayRotation(display_id())); 380 EXPECT_EQ(display::Display::ROTATE_180, GetDisplayRotation(display_id()));
374 } 381 }
375 382
376 // If there are multiple requests queued during animation, it should process the 383 // If there are multiple requests queued during animation, it should process the
377 // last request and finish the rotation animation. 384 // last request and finish the rotation animation.
378 TEST_F(ScreenRotationAnimatorSlowAnimationTest, ShouldCompleteAnimations) { 385 TEST_F(ScreenRotationAnimatorSlowAnimationTest, ShouldCompleteAnimations) {
379 // TODO(wutao): needs GetDisplayInfo http://crbug.com/622480. 386 // TODO(wutao): needs GetDisplayInfo http://crbug.com/622480.
380 if (Shell::GetAshConfig() == Config::MASH) { 387 if (Shell::GetAshConfig() == Config::MASH) {
381 ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() != 388 ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() !=
382 display_id()); 389 display_id());
383 return; 390 return;
384 } 391 }
385 392
386 SetDisplayRotation(display_id(), display::Display::ROTATE_0); 393 SetDisplayRotation(display_id(), display::Display::ROTATE_0);
387 animator()->Rotate(display::Display::ROTATE_90, 394 animator()->Rotate(display_id(), display::Display::ROTATE_90,
388 display::Display::RotationSource::ROTATION_SOURCE_USER); 395 display::Display::RotationSource::ROTATION_SOURCE_USER);
389 EXPECT_TRUE(test_api()->HasActiveAnimations()); 396 EXPECT_TRUE(test_api()->HasActiveAnimations());
390 397
391 animator()->Rotate(display::Display::ROTATE_180, 398 animator()->Rotate(display_id(), display::Display::ROTATE_180,
392 display::Display::RotationSource::ROTATION_SOURCE_USER); 399 display::Display::RotationSource::ROTATION_SOURCE_USER);
393 EXPECT_TRUE(test_api()->HasActiveAnimations()); 400 EXPECT_TRUE(test_api()->HasActiveAnimations());
394 401
395 animator()->Rotate(display::Display::ROTATE_270, 402 animator()->Rotate(display_id(), display::Display::ROTATE_270,
396 display::Display::RotationSource::ROTATION_SOURCE_USER); 403 display::Display::RotationSource::ROTATION_SOURCE_USER);
397 EXPECT_TRUE(test_api()->HasActiveAnimations()); 404 EXPECT_TRUE(test_api()->HasActiveAnimations());
398 405
399 test_api()->CompleteAnimations(); 406 test_api()->CompleteAnimations();
400 EXPECT_FALSE(test_api()->HasActiveAnimations()); 407 EXPECT_FALSE(test_api()->HasActiveAnimations());
401 EXPECT_EQ(display::Display::ROTATE_270, GetDisplayRotation(display_id())); 408 EXPECT_EQ(display::Display::ROTATE_270, GetDisplayRotation(display_id()));
402 } 409 }
403 410
404 // Test that slow screen rotation animation will not interrupt hide animation. 411 // Test that slow screen rotation animation will not interrupt hide animation.
405 // The OverviewButton should be hidden. 412 // The OverviewButton should be hidden.
(...skipping 12 matching lines...) Expand all
418 // Long duration for hide animation, to allow it to be interrupted. 425 // Long duration for hide animation, to allow it to be interrupted.
419 ui::ScopedAnimationDurationScaleMode hide_duration( 426 ui::ScopedAnimationDurationScaleMode hide_duration(
420 ui::ScopedAnimationDurationScaleMode::SLOW_DURATION); 427 ui::ScopedAnimationDurationScaleMode::SLOW_DURATION);
421 GetTray()->SetVisible(false); 428 GetTray()->SetVisible(false);
422 429
423 // ScreenRotationAnimator copies the current layers, and deletes them upon 430 // ScreenRotationAnimator copies the current layers, and deletes them upon
424 // completion. Allow its animation to complete first. 431 // completion. Allow its animation to complete first.
425 ui::ScopedAnimationDurationScaleMode rotate_duration( 432 ui::ScopedAnimationDurationScaleMode rotate_duration(
426 ui::ScopedAnimationDurationScaleMode::ZERO_DURATION); 433 ui::ScopedAnimationDurationScaleMode::ZERO_DURATION);
427 SetDisplayRotation(display_id(), display::Display::ROTATE_0); 434 SetDisplayRotation(display_id(), display::Display::ROTATE_0);
428 animator()->Rotate(display::Display::ROTATE_90, 435 animator()->Rotate(display_id(), display::Display::ROTATE_90,
429 display::Display::RotationSource::ROTATION_SOURCE_USER); 436 display::Display::RotationSource::ROTATION_SOURCE_USER);
430 437
431 EXPECT_FALSE(GetTray()->visible()); 438 EXPECT_FALSE(GetTray()->visible());
432 } 439 }
433 440
434 // Test enable smooth screen rotation code path. 441 // Test enable smooth screen rotation code path.
435 TEST_F(ScreenRotationAnimatorSmoothAnimationTest, 442 TEST_F(ScreenRotationAnimatorSmoothAnimationTest,
436 RotatesToDifferentRotationWithCopyCallback) { 443 RotatesToDifferentRotationWithCopyCallback) {
437 // TODO(wutao): needs GetDisplayInfo http://crbug.com/622480. 444 // TODO(wutao): needs GetDisplayInfo http://crbug.com/622480.
438 if (Shell::GetAshConfig() == Config::MASH) { 445 if (Shell::GetAshConfig() == Config::MASH) {
439 ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() != 446 ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() !=
440 display_id()); 447 display_id());
441 return; 448 return;
442 } 449 }
443 450
451 const int64_t display_id = display_manager()->GetDisplayAt(0).id();
444 SetScreenRotationAnimator( 452 SetScreenRotationAnimator(
445 display_manager()->GetDisplayAt(0).id(), run_loop_->QuitWhenIdleClosure(), 453 GetRootWindow(display_id), run_loop_->QuitWhenIdleClosure(),
446 base::Bind( 454 base::Bind(
447 &ScreenRotationAnimatorSmoothAnimationTest::QuitWaitForCopyCallback, 455 &ScreenRotationAnimatorSmoothAnimationTest::QuitWaitForCopyCallback,
448 base::Unretained(this))); 456 base::Unretained(this)));
449 SetDisplayRotation(display_id(), display::Display::ROTATE_0); 457 SetDisplayRotation(display_id, display::Display::ROTATE_0);
450 animator()->Rotate(display::Display::ROTATE_90, 458 animator()->Rotate(display_id, display::Display::ROTATE_90,
451 display::Display::RotationSource::ROTATION_SOURCE_USER); 459 display::Display::RotationSource::ROTATION_SOURCE_USER);
452 WaitForCopyCallback(); 460 WaitForCopyCallback();
453 EXPECT_TRUE(test_api()->HasActiveAnimations()); 461 EXPECT_TRUE(test_api()->HasActiveAnimations());
454 462
455 test_api()->CompleteAnimations(); 463 test_api()->CompleteAnimations();
456 EXPECT_FALSE(test_api()->HasActiveAnimations()); 464 EXPECT_FALSE(test_api()->HasActiveAnimations());
465 EXPECT_EQ(display::Display::ROTATE_90, GetDisplayRotation(display_id));
457 } 466 }
458 467
459 // If the external secondary display is removed before the first copy request 468 // If the rotating external secondary display is removed before the first copy
460 // callback called, it should not crash. 469 // request callback called, it should stop rotating.
461 TEST_F(ScreenRotationAnimatorSmoothAnimationTest, 470 TEST_F(ScreenRotationAnimatorSmoothAnimationTest,
462 RemoveExternalSecondaryDisplayBeforeFirstCopyCallback) { 471 RemoveExternalSecondaryDisplayBeforeFirstCopyCallback) {
463 // TODO(wutao): needs GetDisplayInfo http://crbug.com/622480. 472 // TODO(wutao): needs GetDisplayInfo http://crbug.com/622480.
464 if (Shell::GetAshConfig() == Config::MASH) { 473 if (Shell::GetAshConfig() == Config::MASH) {
465 ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() != 474 ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() !=
466 display_id()); 475 display_id());
467 return; 476 return;
468 } 477 }
469 478
470 UpdateDisplay("640x480,800x600"); 479 UpdateDisplay("640x480,800x600");
471 EXPECT_EQ(2U, display_manager()->GetNumDisplays()); 480 EXPECT_EQ(2U, display_manager()->GetNumDisplays());
472 481
473 const unsigned int primary_display_id = 482 const int64_t primary_display_id = display_manager()->GetDisplayAt(0).id();
474 display_manager()->GetDisplayAt(0).id(); 483 const int64_t secondary_display_id = display_manager()->GetDisplayAt(1).id();
484
475 SetScreenRotationAnimator( 485 SetScreenRotationAnimator(
476 display_manager()->GetDisplayAt(1).id(), 486 GetRootWindow(secondary_display_id),
477 base::Bind( 487 base::Bind(
478 &ScreenRotationAnimatorSmoothAnimationTest::RemoveSecondaryDisplay, 488 &ScreenRotationAnimatorSmoothAnimationTest::RemoveSecondaryDisplay,
479 base::Unretained(this), "640x480"), 489 base::Unretained(this), "640x480"),
480 run_loop_->QuitWhenIdleClosure()); 490 run_loop_->QuitWhenIdleClosure());
481 SetDisplayRotation(display_manager()->GetDisplayAt(1).id(), 491 SetDisplayRotation(secondary_display_id, display::Display::ROTATE_0);
482 display::Display::ROTATE_0); 492 animator()->Rotate(secondary_display_id, display::Display::ROTATE_90,
483 animator()->Rotate(display::Display::ROTATE_90,
484 display::Display::RotationSource::ROTATION_SOURCE_USER); 493 display::Display::RotationSource::ROTATION_SOURCE_USER);
485 WaitForCopyCallback(); 494 WaitForCopyCallback();
486 EXPECT_EQ(1U, display_manager()->GetNumDisplays()); 495 EXPECT_EQ(1U, display_manager()->GetNumDisplays());
487 EXPECT_EQ(primary_display_id, display_manager()->GetDisplayAt(0).id()); 496 EXPECT_EQ(primary_display_id, display_manager()->GetDisplayAt(0).id());
488 } 497 }
489 498
490 // If the external primary display is removed before the first copy request 499 // If the rotating external primary display is removed before the first copy
491 // callback called, it should not crash. 500 // request callback called, it should stop rotating.
492 TEST_F(ScreenRotationAnimatorSmoothAnimationTest, 501 TEST_F(ScreenRotationAnimatorSmoothAnimationTest,
493 RemoveExternalPrimaryDisplayBeforeFirstCopyCallback) { 502 RemoveExternalPrimaryDisplayBeforeFirstCopyCallback) {
494 // TODO(wutao): needs GetDisplayInfo http://crbug.com/622480. 503 // TODO(wutao): needs GetDisplayInfo http://crbug.com/622480.
495 if (Shell::GetAshConfig() == Config::MASH) { 504 if (Shell::GetAshConfig() == Config::MASH) {
496 ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() != 505 ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() !=
497 display_id()); 506 display_id());
498 return; 507 return;
499 } 508 }
500 509
501 UpdateDisplay("640x480,800x600"); 510 UpdateDisplay("640x480,800x600");
502 EXPECT_EQ(2U, display_manager()->GetNumDisplays()); 511 EXPECT_EQ(2U, display_manager()->GetNumDisplays());
503 512
504 Shell::Get()->window_tree_host_manager()->SetPrimaryDisplayId( 513 Shell::Get()->window_tree_host_manager()->SetPrimaryDisplayId(
505 display_manager()->GetDisplayAt(1).id()); 514 display_manager()->GetDisplayAt(1).id());
506 const unsigned int secondary_display_id = 515 const int64_t primary_display_id = display_manager()->GetDisplayAt(1).id();
507 display_manager()->GetDisplayAt(0).id(); 516 const int64_t secondary_display_id = display_manager()->GetDisplayAt(0).id();
508 SetScreenRotationAnimator( 517 SetScreenRotationAnimator(
509 display_manager()->GetDisplayAt(1).id(), 518 GetRootWindow(primary_display_id),
510 base::Bind( 519 base::Bind(
511 &ScreenRotationAnimatorSmoothAnimationTest::RemoveSecondaryDisplay, 520 &ScreenRotationAnimatorSmoothAnimationTest::RemoveSecondaryDisplay,
512 base::Unretained(this), "640x480"), 521 base::Unretained(this), "640x480"),
513 run_loop_->QuitWhenIdleClosure()); 522 run_loop_->QuitWhenIdleClosure());
514 SetDisplayRotation(display_manager()->GetDisplayAt(1).id(), 523 SetDisplayRotation(primary_display_id, display::Display::ROTATE_0);
515 display::Display::ROTATE_0); 524 animator()->Rotate(primary_display_id, display::Display::ROTATE_90,
516 animator()->Rotate(display::Display::ROTATE_90,
517 display::Display::RotationSource::ROTATION_SOURCE_USER); 525 display::Display::RotationSource::ROTATION_SOURCE_USER);
518 WaitForCopyCallback(); 526 WaitForCopyCallback();
519 EXPECT_EQ(1U, display_manager()->GetNumDisplays()); 527 EXPECT_EQ(1U, display_manager()->GetNumDisplays());
520 EXPECT_EQ(secondary_display_id, display_manager()->GetDisplayAt(0).id()); 528 EXPECT_EQ(secondary_display_id, display_manager()->GetDisplayAt(0).id());
521 } 529 }
522 530
523 // If the external secondary display is removed before the second copy request 531 // If the rotating external secondary display is removed before the second copy
524 // callback called, it should not crash. 532 // request callback called, it should stop rotating.
525 TEST_F(ScreenRotationAnimatorSmoothAnimationTest, 533 TEST_F(ScreenRotationAnimatorSmoothAnimationTest,
526 RemoveExternalSecondaryDisplayBeforeSecondCopyCallback) { 534 RemoveExternalSecondaryDisplayBeforeSecondCopyCallback) {
527 // TODO(wutao): needs GetDisplayInfo http://crbug.com/622480. 535 // TODO(wutao): needs GetDisplayInfo http://crbug.com/622480.
528 if (Shell::GetAshConfig() == Config::MASH) { 536 if (Shell::GetAshConfig() == Config::MASH) {
529 ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() != 537 ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() !=
530 display_id()); 538 display_id());
531 return; 539 return;
532 } 540 }
533 541
534 UpdateDisplay("640x480,800x600"); 542 UpdateDisplay("640x480,800x600");
535 EXPECT_EQ(2U, display_manager()->GetNumDisplays()); 543 EXPECT_EQ(2U, display_manager()->GetNumDisplays());
536 544
537 const unsigned int primary_display_id = 545 const int64_t primary_display_id = display_manager()->GetDisplayAt(0).id();
538 display_manager()->GetDisplayAt(0).id(); 546 const int64_t secondary_display_id = display_manager()->GetDisplayAt(1).id();
539 SetScreenRotationAnimator( 547 SetScreenRotationAnimator(
540 display_manager()->GetDisplayAt(1).id(), run_loop_->QuitWhenIdleClosure(), 548 GetRootWindow(secondary_display_id), run_loop_->QuitWhenIdleClosure(),
541 base::Bind( 549 base::Bind(
542 &ScreenRotationAnimatorSmoothAnimationTest::RemoveSecondaryDisplay, 550 &ScreenRotationAnimatorSmoothAnimationTest::RemoveSecondaryDisplay,
543 base::Unretained(this), "640x480")); 551 base::Unretained(this), "640x480"));
544 SetDisplayRotation(display_manager()->GetDisplayAt(1).id(), 552 SetDisplayRotation(secondary_display_id, display::Display::ROTATE_0);
545 display::Display::ROTATE_0); 553 animator()->Rotate(secondary_display_id, display::Display::ROTATE_90,
546 animator()->Rotate(display::Display::ROTATE_90,
547 display::Display::RotationSource::ROTATION_SOURCE_USER); 554 display::Display::RotationSource::ROTATION_SOURCE_USER);
548 WaitForCopyCallback(); 555 WaitForCopyCallback();
549 EXPECT_EQ(1U, display_manager()->GetNumDisplays()); 556 EXPECT_EQ(1U, display_manager()->GetNumDisplays());
550 EXPECT_EQ(primary_display_id, display_manager()->GetDisplayAt(0).id()); 557 EXPECT_EQ(primary_display_id, display_manager()->GetDisplayAt(0).id());
551 } 558 }
552 559
553 // If the external primary display is removed before the second copy request 560 // If the rotating external primary display is removed before the second copy
554 // callback called, it should not crash. 561 // request callback called, it should stop rotating.
555 TEST_F(ScreenRotationAnimatorSmoothAnimationTest, 562 TEST_F(ScreenRotationAnimatorSmoothAnimationTest,
556 RemoveExternalPrimaryDisplayBeforeSecondCopyCallback) { 563 RemoveExternalPrimaryDisplayBeforeSecondCopyCallback) {
557 // TODO(wutao): needs GetDisplayInfo http://crbug.com/622480. 564 // TODO(wutao): needs GetDisplayInfo http://crbug.com/622480.
558 if (Shell::GetAshConfig() == Config::MASH) { 565 if (Shell::GetAshConfig() == Config::MASH) {
559 ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() != 566 ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() !=
560 display_id()); 567 display_id());
561 return; 568 return;
562 } 569 }
563 570
564 UpdateDisplay("640x480,800x600"); 571 UpdateDisplay("640x480,800x600");
565 EXPECT_EQ(2U, display_manager()->GetNumDisplays()); 572 EXPECT_EQ(2U, display_manager()->GetNumDisplays());
566 573
567 Shell::Get()->window_tree_host_manager()->SetPrimaryDisplayId( 574 Shell::Get()->window_tree_host_manager()->SetPrimaryDisplayId(
568 display_manager()->GetDisplayAt(1).id()); 575 display_manager()->GetDisplayAt(1).id());
569 const unsigned int secondary_display_id = 576 const int64_t primary_display_id = display_manager()->GetDisplayAt(1).id();
570 display_manager()->GetDisplayAt(0).id(); 577 const int64_t secondary_display_id = display_manager()->GetDisplayAt(0).id();
571 SetScreenRotationAnimator( 578 SetScreenRotationAnimator(
572 display_manager()->GetDisplayAt(1).id(), run_loop_->QuitWhenIdleClosure(), 579 GetRootWindow(primary_display_id), run_loop_->QuitWhenIdleClosure(),
573 base::Bind( 580 base::Bind(
574 &ScreenRotationAnimatorSmoothAnimationTest::RemoveSecondaryDisplay, 581 &ScreenRotationAnimatorSmoothAnimationTest::RemoveSecondaryDisplay,
575 base::Unretained(this), "640x480")); 582 base::Unretained(this), "640x480"));
576 SetDisplayRotation(display_manager()->GetDisplayAt(1).id(), 583 SetDisplayRotation(primary_display_id, display::Display::ROTATE_0);
577 display::Display::ROTATE_0); 584 animator()->Rotate(primary_display_id, display::Display::ROTATE_90,
578 animator()->Rotate(display::Display::ROTATE_90,
579 display::Display::RotationSource::ROTATION_SOURCE_USER); 585 display::Display::RotationSource::ROTATION_SOURCE_USER);
580 WaitForCopyCallback(); 586 WaitForCopyCallback();
581 EXPECT_EQ(1U, display_manager()->GetNumDisplays()); 587 EXPECT_EQ(1U, display_manager()->GetNumDisplays());
582 EXPECT_EQ(secondary_display_id, display_manager()->GetDisplayAt(0).id()); 588 EXPECT_EQ(secondary_display_id, display_manager()->GetDisplayAt(0).id());
583 } 589 }
584 590
591 // If the external primary display is removed while rotating the secondary
592 // display. It should stop rotating the secondary display because the
593 // |root_window| changed.
594 TEST_F(ScreenRotationAnimatorSmoothAnimationTest,
595 RemoveExternalPrimaryDisplayDuringAnimationChangedRootWindow) {
596 // TODO(wutao): needs GetDisplayInfo http://crbug.com/622480.
597 if (Shell::GetAshConfig() == Config::MASH) {
598 ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() !=
599 display_id());
600 return;
601 }
602
603 UpdateDisplay("640x480,800x600");
604 EXPECT_EQ(2U, display_manager()->GetNumDisplays());
605
606 Shell::Get()->window_tree_host_manager()->SetPrimaryDisplayId(
607 display_manager()->GetDisplayAt(1).id());
608 const int64_t secondary_display_id = display_manager()->GetDisplayAt(0).id();
609 SetScreenRotationAnimator(
610 GetRootWindow(secondary_display_id),
611 base::Bind(
612 &ScreenRotationAnimatorSmoothAnimationTest::RemoveSecondaryDisplay,
613 base::Unretained(this), "640x480"),
614 run_loop_->QuitWhenIdleClosure());
615 SetDisplayRotation(secondary_display_id, display::Display::ROTATE_0);
616 animator()->Rotate(secondary_display_id, display::Display::ROTATE_90,
617 display::Display::RotationSource::ROTATION_SOURCE_USER);
618 WaitForCopyCallback();
619 EXPECT_EQ(1U, display_manager()->GetNumDisplays());
620 EXPECT_EQ(secondary_display_id, display_manager()->GetDisplayAt(0).id());
621 EXPECT_EQ(display::Display::ROTATE_0,
622 GetDisplayRotation(secondary_display_id));
623 }
624
585 // Test that smooth screen rotation animation will not interrupt hide animation. 625 // Test that smooth screen rotation animation will not interrupt hide animation.
586 // The OverviewButton should be hidden. 626 // The OverviewButton should be hidden.
587 TEST_F(ScreenRotationAnimatorSmoothAnimationTest, 627 TEST_F(ScreenRotationAnimatorSmoothAnimationTest,
588 OverviewButtonTrayHideAnimationAlwaysCompletes) { 628 OverviewButtonTrayHideAnimationAlwaysCompletes) {
589 // TODO(wutao): needs GetDisplayInfo http://crbug.com/622480. 629 // TODO(wutao): needs GetDisplayInfo http://crbug.com/622480.
590 if (Shell::GetAshConfig() == Config::MASH) { 630 if (Shell::GetAshConfig() == Config::MASH) {
591 ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() != 631 ASSERT_TRUE(ShellPort::Get()->GetDisplayInfo(display_id()).id() !=
592 display_id()); 632 display_id());
593 return; 633 return;
594 } 634 }
595 635
596 Shell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager( 636 Shell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager(
597 true); 637 true);
598 638
599 // Long duration for hide animation, to allow it to be interrupted. 639 // Long duration for hide animation, to allow it to be interrupted.
600 ui::ScopedAnimationDurationScaleMode hide_duration( 640 ui::ScopedAnimationDurationScaleMode hide_duration(
601 ui::ScopedAnimationDurationScaleMode::SLOW_DURATION); 641 ui::ScopedAnimationDurationScaleMode::SLOW_DURATION);
602 GetTray()->SetVisible(false); 642 GetTray()->SetVisible(false);
603 643
604 // Allow ScreenRotationAnimator animation to complete first. 644 // Allow ScreenRotationAnimator animation to complete first.
605 ui::ScopedAnimationDurationScaleMode rotate_duration( 645 ui::ScopedAnimationDurationScaleMode rotate_duration(
606 ui::ScopedAnimationDurationScaleMode::ZERO_DURATION); 646 ui::ScopedAnimationDurationScaleMode::ZERO_DURATION);
647 int64_t display_id = display_manager()->GetDisplayAt(0).id();
607 SetScreenRotationAnimator( 648 SetScreenRotationAnimator(
608 display_manager()->GetDisplayAt(0).id(), run_loop_->QuitWhenIdleClosure(), 649 GetRootWindow(display_id), run_loop_->QuitWhenIdleClosure(),
609 base::Bind( 650 base::Bind(
610 &ScreenRotationAnimatorSmoothAnimationTest::QuitWaitForCopyCallback, 651 &ScreenRotationAnimatorSmoothAnimationTest::QuitWaitForCopyCallback,
611 base::Unretained(this))); 652 base::Unretained(this)));
612 SetDisplayRotation(display_id(), display::Display::ROTATE_0); 653 SetDisplayRotation(display_id, display::Display::ROTATE_0);
613 animator()->Rotate(display::Display::ROTATE_90, 654 animator()->Rotate(display_id, display::Display::ROTATE_90,
614 display::Display::RotationSource::ROTATION_SOURCE_USER); 655 display::Display::RotationSource::ROTATION_SOURCE_USER);
615 WaitForCopyCallback(); 656 WaitForCopyCallback();
616 657
617 GetTray()->layer()->GetAnimator()->StopAnimating(); 658 GetTray()->layer()->GetAnimator()->StopAnimating();
618 EXPECT_FALSE(GetTray()->visible()); 659 EXPECT_FALSE(GetTray()->visible());
619 } 660 }
620 661
621 } // namespace ash 662 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698