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

Side by Side Diff: chrome/browser/views/html_dialog_view_browsertest.cc

Issue 4110010: Cloud Print Dialog work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Direct paths for prefs. Created 10 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/views/html_dialog_view.cc ('k') | chrome/browser/views/select_file_dialog.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/test/ui/ui_test.h" 5 #include "chrome/test/ui/ui_test.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "chrome/browser/browser_thread.h" 9 #include "chrome/browser/browser_thread.h"
10 #include "chrome/browser/dom_ui/html_dialog_ui.h" 10 #include "chrome/browser/dom_ui/html_dialog_ui.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 size->set_height(40); 51 size->set_height(40);
52 } 52 }
53 virtual std::string GetDialogArgs() const { 53 virtual std::string GetDialogArgs() const {
54 return std::string(); 54 return std::string();
55 } 55 }
56 virtual void OnDialogClosed(const std::string& json_retval) { } 56 virtual void OnDialogClosed(const std::string& json_retval) { }
57 virtual void OnCloseContents(TabContents* source, bool* out_close_dialog) { 57 virtual void OnCloseContents(TabContents* source, bool* out_close_dialog) {
58 if (out_close_dialog) 58 if (out_close_dialog)
59 *out_close_dialog = true; 59 *out_close_dialog = true;
60 } 60 }
61 virtual bool ShouldShowDialogTitle() const { return true; }
61 }; 62 };
62 63
63 } // namespace 64 } // namespace
64 65
65 class HtmlDialogBrowserTest : public InProcessBrowserTest { 66 class HtmlDialogBrowserTest : public InProcessBrowserTest {
66 public: 67 public:
67 HtmlDialogBrowserTest() {} 68 HtmlDialogBrowserTest() {}
68 69
69 #if defined(OS_WIN) 70 #if defined(OS_WIN)
70 class WindowChangedObserver : public base::MessagePumpForUI::Observer { 71 class WindowChangedObserver : public base::MessagePumpForUI::Observer {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 set_bounds.set_height(0); 196 set_bounds.set_height(0);
196 197
197 html_view->MoveContents(tab_contents, set_bounds); 198 html_view->MoveContents(tab_contents, set_bounds);
198 ui_test_utils::RunMessageLoop(); 199 ui_test_utils::RunMessageLoop();
199 html_view->GetWidget()->GetBounds(&actual_bounds, false); 200 html_view->GetWidget()->GetBounds(&actual_bounds, false);
200 EXPECT_LT(0, actual_bounds.width()); 201 EXPECT_LT(0, actual_bounds.width());
201 EXPECT_LT(0, actual_bounds.height()); 202 EXPECT_LT(0, actual_bounds.height());
202 203
203 MessageLoopForUI::current()->RemoveObserver(WindowChangedObserver::Get()); 204 MessageLoopForUI::current()->RemoveObserver(WindowChangedObserver::Get());
204 } 205 }
OLDNEW
« no previous file with comments | « chrome/browser/views/html_dialog_view.cc ('k') | chrome/browser/views/select_file_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698