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

Side by Side Diff: chrome/browser/ui/views/extensions/extension_install_dialog_view_browsertest.cc

Issue 666533007: Move JavaScriptDialogManager, JavascriptAppModalDialogViews to components/app_modal_dialogs (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/extensions/extension_install_dialog_view.h" 5 #include "chrome/browser/ui/views/extensions/extension_install_dialog_view.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/extensions/extension_browsertest.h" 8 #include "chrome/browser/extensions/extension_browsertest.h"
9 #include "chrome/browser/extensions/extension_icon_manager.h" 9 #include "chrome/browser/extensions/extension_icon_manager.h"
10 #include "chrome/browser/extensions/extension_install_prompt.h" 10 #include "chrome/browser/extensions/extension_install_prompt.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 } 161 }
162 162
163 bool ScrollbarTest::IsScrollbarVisible() { 163 bool ScrollbarTest::IsScrollbarVisible() {
164 ExtensionInstallDialogView* dialog = new ExtensionInstallDialogView( 164 ExtensionInstallDialogView* dialog = new ExtensionInstallDialogView(
165 profile(), 165 profile(),
166 web_contents(), 166 web_contents(),
167 delegate(), 167 delegate(),
168 prompt()); 168 prompt());
169 169
170 // Create the modal view around the install dialog view. 170 // Create the modal view around the install dialog view.
171 views::Widget* modal = 171 views::Widget* modal = CreateAppModalDialogViews(
172 CreateBrowserModalDialogViews(dialog, 172 dialog, web_contents()->GetTopLevelNativeWindow());
173 web_contents()->GetTopLevelNativeWindow());
174 modal->Show(); 173 modal->Show();
175 content::RunAllBlockingPoolTasksUntilIdle(); 174 content::RunAllBlockingPoolTasksUntilIdle();
176 175
177 // Check if the vertical scrollbar is visible. 176 // Check if the vertical scrollbar is visible.
178 return dialog->scroll_view()->vertical_scroll_bar()->visible(); 177 return dialog->scroll_view()->vertical_scroll_bar()->visible();
179 } 178 }
180 179
181 // Tests that a scrollbar _is_ shown for an excessively long extension 180 // Tests that a scrollbar _is_ shown for an excessively long extension
182 // install prompt. 181 // install prompt.
183 IN_PROC_BROWSER_TEST_F(ScrollbarTest, LongPromptScrollbar) { 182 IN_PROC_BROWSER_TEST_F(ScrollbarTest, LongPromptScrollbar) {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 MockExtensionInstallPromptDelegate delegate; 259 MockExtensionInstallPromptDelegate delegate;
261 scoped_ptr<ExtensionInstallDialogView> dialog( 260 scoped_ptr<ExtensionInstallDialogView> dialog(
262 new ExtensionInstallDialogView( 261 new ExtensionInstallDialogView(
263 profile(), web_contents(), &delegate, prompt())); 262 profile(), web_contents(), &delegate, prompt()));
264 dialog.reset(); 263 dialog.reset();
265 264
266 EXPECT_EQ(1, delegate.abort_count()); 265 EXPECT_EQ(1, delegate.abort_count());
267 EXPECT_EQ(0, delegate.proceed_count()); 266 EXPECT_EQ(0, delegate.proceed_count());
268 } 267 }
269 } 268 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698