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

Side by Side Diff: chrome/browser/ui/views/confirm_bubble_views_unittest.cc

Issue 16374006: Place browser-modal dialogs like web-contents-modal dialogs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes and cleanup. Created 7 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 | Annotate | Revision Log
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 "chrome/browser/ui/views/confirm_bubble_views.h" 5 #include "chrome/browser/ui/views/confirm_bubble_views.h"
6 6
7 #include "chrome/browser/ui/confirm_bubble.h" 7 #include "chrome/browser/ui/confirm_bubble.h"
8 #include "chrome/browser/ui/test/test_confirm_bubble_model.h" 8 #include "chrome/browser/ui/test/test_confirm_bubble_model.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "ui/views/test/views_test_base.h" 10 #include "ui/views/test/views_test_base.h"
(...skipping 10 matching lines...) Expand all
21 scoped_ptr<views::Widget> parent_widget(new Widget); 21 scoped_ptr<views::Widget> parent_widget(new Widget);
22 parent_widget->Init(params); 22 parent_widget->Init(params);
23 parent_widget->Show(); 23 parent_widget->Show();
24 24
25 // Bubble owns the model. 25 // Bubble owns the model.
26 bool model_deleted = false; 26 bool model_deleted = false;
27 TestConfirmBubbleModel* model = 27 TestConfirmBubbleModel* model =
28 new TestConfirmBubbleModel(&model_deleted, NULL, NULL, NULL); 28 new TestConfirmBubbleModel(&model_deleted, NULL, NULL, NULL);
29 ConfirmBubbleViews* bubble = new ConfirmBubbleViews(model); 29 ConfirmBubbleViews* bubble = new ConfirmBubbleViews(model);
30 gfx::NativeView parent = parent_widget->GetNativeView(); 30 gfx::NativeView parent = parent_widget->GetNativeView();
31 views::DialogDelegate::CreateDialogWidget(bubble, NULL, parent)->Show(); 31 CreateBrowserModalDialogViews(bubble, parent)->Show();
32 32
33 // Clean up. 33 // Clean up.
34 bubble->GetWidget()->CloseNow(); 34 bubble->GetWidget()->CloseNow();
35 parent_widget->CloseNow(); 35 parent_widget->CloseNow();
36 EXPECT_TRUE(model_deleted); 36 EXPECT_TRUE(model_deleted);
37 } 37 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698