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

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

Issue 10353007: Extract a minimal subset of WebDialogUI/WebDialogDelegate from src/chrome -> src/ui/web_dialogs Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 179
180 view->MoveContents(web_contents, set_bounds); 180 view->MoveContents(web_contents, set_bounds);
181 ui_test_utils::RunMessageLoop(); // TestWebDialogView will quit. 181 ui_test_utils::RunMessageLoop(); // TestWebDialogView will quit.
182 actual_bounds = view->GetWidget()->GetClientAreaScreenBounds(); 182 actual_bounds = view->GetWidget()->GetClientAreaScreenBounds();
183 EXPECT_LT(0, actual_bounds.width()); 183 EXPECT_LT(0, actual_bounds.width());
184 EXPECT_LT(0, actual_bounds.height()); 184 EXPECT_LT(0, actual_bounds.height());
185 } 185 }
186 186
187 // This is timing out about 5~10% of runs. See crbug.com/86059. 187 // This is timing out about 5~10% of runs. See crbug.com/86059.
188 IN_PROC_BROWSER_TEST_F(WebDialogBrowserTest, DISABLED_WebContentRendered) { 188 IN_PROC_BROWSER_TEST_F(WebDialogBrowserTest, DISABLED_WebContentRendered) {
189 WebDialogDelegate* delegate = new test::TestWebDialogDelegate( 189 web_dialogs::WebDialogDelegate* delegate = new test::TestWebDialogDelegate(
190 GURL(chrome::kChromeUIChromeURLsURL)); 190 GURL(chrome::kChromeUIChromeURLsURL));
191 191
192 TestWebDialogView* view = 192 TestWebDialogView* view =
193 new TestWebDialogView(browser()->profile(), browser(), delegate); 193 new TestWebDialogView(browser()->profile(), browser(), delegate);
194 WebContents* web_contents = browser()->GetSelectedWebContents(); 194 WebContents* web_contents = browser()->GetSelectedWebContents();
195 ASSERT_TRUE(web_contents != NULL); 195 ASSERT_TRUE(web_contents != NULL);
196 views::Widget::CreateWindowWithParent( 196 views::Widget::CreateWindowWithParent(
197 view, web_contents->GetView()->GetTopLevelNativeWindow()); 197 view, web_contents->GetView()->GetTopLevelNativeWindow());
198 EXPECT_TRUE(view->initialized_); 198 EXPECT_TRUE(view->initialized_);
199 199
200 view->InitDialog(); 200 view->InitDialog();
201 view->GetWidget()->Show(); 201 view->GetWidget()->Show();
202 202
203 // TestWebDialogView::OnTabMainFrameRender() will Quit(). 203 // TestWebDialogView::OnTabMainFrameRender() will Quit().
204 MessageLoopForUI::current()->Run(); 204 MessageLoopForUI::current()->Run();
205 205
206 EXPECT_TRUE(view->painted()); 206 EXPECT_TRUE(view->painted());
207 207
208 view->GetWidget()->Close(); 208 view->GetWidget()->Close();
209 } 209 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698