| OLD | NEW |
| 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/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 | 79 |
| 80 } // namespace | 80 } // namespace |
| 81 | 81 |
| 82 class WebDialogBrowserTest : public InProcessBrowserTest { | 82 class WebDialogBrowserTest : public InProcessBrowserTest { |
| 83 public: | 83 public: |
| 84 WebDialogBrowserTest() {} | 84 WebDialogBrowserTest() {} |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 // Windows has some issues resizing windows. An off by one problem, and a | 87 // Windows has some issues resizing windows. An off by one problem, and a |
| 88 // minimum size that seems too big. See http://crbug.com/52602. | 88 // minimum size that seems too big. See http://crbug.com/52602. |
| 89 #if defined(OS_WIN) | 89 // On Mac with toolkit_views, this test compiles but crashes at |
| 90 // CreateWindowWithParent. See http://crbug.com/447086. |
| 91 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 90 #define MAYBE_SizeWindow DISABLED_SizeWindow | 92 #define MAYBE_SizeWindow DISABLED_SizeWindow |
| 91 #else | 93 #else |
| 92 #define MAYBE_SizeWindow SizeWindow | 94 #define MAYBE_SizeWindow SizeWindow |
| 93 #endif | 95 #endif |
| 94 IN_PROC_BROWSER_TEST_F(WebDialogBrowserTest, MAYBE_SizeWindow) { | 96 IN_PROC_BROWSER_TEST_F(WebDialogBrowserTest, MAYBE_SizeWindow) { |
| 95 ui::test::TestWebDialogDelegate delegate( | 97 ui::test::TestWebDialogDelegate delegate( |
| 96 (GURL(chrome::kChromeUIChromeURLsURL))); | 98 (GURL(chrome::kChromeUIChromeURLsURL))); |
| 97 delegate.set_size(kInitialWidth, kInitialHeight); | 99 delegate.set_size(kInitialWidth, kInitialHeight); |
| 98 | 100 |
| 99 TestWebDialogView* view = | 101 TestWebDialogView* view = |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 EXPECT_EQ(min_size, actual_bounds.size()); | 183 EXPECT_EQ(min_size, actual_bounds.size()); |
| 182 | 184 |
| 183 // And that the render view is also non-zero. | 185 // And that the render view is also non-zero. |
| 184 rwhv_bounds = | 186 rwhv_bounds = |
| 185 view->web_contents()->GetRenderWidgetHostView()->GetViewBounds(); | 187 view->web_contents()->GetRenderWidgetHostView()->GetViewBounds(); |
| 186 EXPECT_LT(0, rwhv_bounds.width()); | 188 EXPECT_LT(0, rwhv_bounds.width()); |
| 187 EXPECT_LT(0, rwhv_bounds.height()); | 189 EXPECT_LT(0, rwhv_bounds.height()); |
| 188 | 190 |
| 189 view->GetWidget()->CloseNow(); | 191 view->GetWidget()->CloseNow(); |
| 190 } | 192 } |
| OLD | NEW |