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

Unified Diff: ash/wm/window_modality_controller_unittest.cc

Issue 11795004: Continue threading context through unit tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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
Index: ash/wm/window_modality_controller_unittest.cc
diff --git a/ash/wm/window_modality_controller_unittest.cc b/ash/wm/window_modality_controller_unittest.cc
index 65927afa9c1920d8795e104e6848b7fb823d10ea..d7def40f16b8aff02703be451072bae1ecf962e6 100644
--- a/ash/wm/window_modality_controller_unittest.cc
+++ b/ash/wm/window_modality_controller_unittest.cc
@@ -362,9 +362,10 @@ TEST_F(WindowModalityControllerTest, TouchEvent) {
// |child| window.
// - Focus should follow the active window.
TEST_F(WindowModalityControllerTest, ChildModal) {
- views::test::ChildModalParent* delegate = new views::test::ChildModalParent;
- views::Widget* widget = views::Widget::CreateWindowWithBounds(
- delegate, gfx::Rect(0, 0, 400, 400));
+ views::test::ChildModalParent* delegate =
+ new views::test::ChildModalParent(CurrentContext());
+ views::Widget* widget = views::Widget::CreateWindowWithContextAndBounds(
+ delegate, CurrentContext(), gfx::Rect(0, 0, 400, 400));
widget->Show();
aura::Window* parent = widget->GetNativeView();
@@ -421,9 +422,10 @@ TEST_F(WindowModalityControllerTest, ChildModal) {
// Same as |ChildModal| test, but using |EventGenerator| rather than bypassing
// it by calling |ActivateWindow|.
TEST_F(WindowModalityControllerTest, ChildModalEventGenerator) {
- views::test::ChildModalParent* delegate = new views::test::ChildModalParent;
- views::Widget* widget = views::Widget::CreateWindowWithBounds(
- delegate, gfx::Rect(0, 0, 400, 400));
+ views::test::ChildModalParent* delegate =
+ new views::test::ChildModalParent(CurrentContext());
+ views::Widget* widget = views::Widget::CreateWindowWithContextAndBounds(
+ delegate, CurrentContext(), gfx::Rect(0, 0, 400, 400));
widget->Show();
aura::Window* parent = widget->GetNativeView();

Powered by Google App Engine
This is Rietveld 408576698