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

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

Issue 666533007: Move JavaScriptDialogManager, JavascriptAppModalDialogViews to components/app_modal_dialogs (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: similarity=30 Created 6 years, 1 month 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 "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 "chrome/browser/ui/views/chrome_constrained_window_views_client.h" 9 #include "chrome/browser/ui/views/chrome_constrained_window_views_client.h"
10 #include "components/constrained_window/constrained_window_views.h" 10 #include "components/constrained_window/constrained_window_views.h"
(...skipping 14 matching lines...) Expand all
25 scoped_ptr<views::Widget> parent_widget(new Widget); 25 scoped_ptr<views::Widget> parent_widget(new Widget);
26 parent_widget->Init(params); 26 parent_widget->Init(params);
27 parent_widget->Show(); 27 parent_widget->Show();
28 28
29 // Bubble owns the model. 29 // Bubble owns the model.
30 bool model_deleted = false; 30 bool model_deleted = false;
31 TestConfirmBubbleModel* model = 31 TestConfirmBubbleModel* model =
32 new TestConfirmBubbleModel(&model_deleted, NULL, NULL, NULL); 32 new TestConfirmBubbleModel(&model_deleted, NULL, NULL, NULL);
33 ConfirmBubbleViews* bubble = new ConfirmBubbleViews(model); 33 ConfirmBubbleViews* bubble = new ConfirmBubbleViews(model);
34 gfx::NativeWindow parent = parent_widget->GetNativeWindow(); 34 gfx::NativeWindow parent = parent_widget->GetNativeWindow();
35 CreateBrowserModalDialogViews(bubble, parent)->Show(); 35 CreateWindowModalDialogViews(bubble, parent)->Show();
36 36
37 // Clean up. 37 // Clean up.
38 bubble->GetWidget()->CloseNow(); 38 bubble->GetWidget()->CloseNow();
39 parent_widget->CloseNow(); 39 parent_widget->CloseNow();
40 EXPECT_TRUE(model_deleted); 40 EXPECT_TRUE(model_deleted);
41 41
42 SetConstrainedWindowViewsClient(scoped_ptr<ConstrainedWindowViewsClient>()); 42 SetConstrainedWindowViewsClient(scoped_ptr<ConstrainedWindowViewsClient>());
43 } 43 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698