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

Side by Side Diff: content/browser/web_contents/aura/window_slider_unittest.cc

Issue 1050713002: aura: Remove layerless windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: layerless: rebase Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "content/browser/web_contents/aura/window_slider.h" 5 #include "content/browser/web_contents/aura/window_slider.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "ui/aura/test/aura_test_base.h" 10 #include "ui/aura/test/aura_test_base.h"
(...skipping 20 matching lines...) Expand all
31 CHECK(!details.dispatcher_destroyed); 31 CHECK(!details.dispatcher_destroyed);
32 } 32 }
33 33
34 void ChangeSliderOwnerDuringScrollCallback(scoped_ptr<aura::Window>* window, 34 void ChangeSliderOwnerDuringScrollCallback(scoped_ptr<aura::Window>* window,
35 WindowSlider* slider, 35 WindowSlider* slider,
36 ui::EventType type, 36 ui::EventType type,
37 const gfx::Vector2dF& delta) { 37 const gfx::Vector2dF& delta) {
38 if (type != ui::ET_GESTURE_SCROLL_UPDATE) 38 if (type != ui::ET_GESTURE_SCROLL_UPDATE)
39 return; 39 return;
40 aura::Window* new_window = new aura::Window(NULL); 40 aura::Window* new_window = new aura::Window(NULL);
41 new_window->Init(aura::WINDOW_LAYER_TEXTURED); 41 new_window->Init(ui::LAYER_TEXTURED);
42 new_window->Show(); 42 new_window->Show();
43 slider->ChangeOwner(new_window); 43 slider->ChangeOwner(new_window);
44 (*window)->parent()->AddChild(new_window); 44 (*window)->parent()->AddChild(new_window);
45 window->reset(new_window); 45 window->reset(new_window);
46 } 46 }
47 47
48 void ConfirmSlideDuringScrollCallback(WindowSlider* slider, 48 void ConfirmSlideDuringScrollCallback(WindowSlider* slider,
49 ui::EventType type, 49 ui::EventType type,
50 const gfx::Vector2dF& delta) { 50 const gfx::Vector2dF& delta) {
51 static float total_delta_x = 0; 51 static float total_delta_x = 0;
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 animator->Step(start_time2 + duration); 630 animator->Step(start_time2 + duration);
631 // The animation for the second slide should now be completed. 631 // The animation for the second slide should now be completed.
632 EXPECT_TRUE(slider_delegate.slide_completed()); 632 EXPECT_TRUE(slider_delegate.slide_completed());
633 slider_delegate.Reset(); 633 slider_delegate.Reset();
634 634
635 window.reset(); 635 window.reset();
636 EXPECT_TRUE(slider_delegate.slider_destroyed()); 636 EXPECT_TRUE(slider_delegate.slider_destroyed());
637 } 637 }
638 638
639 } // namespace content 639 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698