| 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 #import "chrome/browser/ui/cocoa/web_dialog_window_controller.h" | 5 #import "chrome/browser/ui/cocoa/web_dialog_window_controller.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #import <Cocoa/Cocoa.h> | 10 #import <Cocoa/Cocoa.h> |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 MOCK_METHOD2(OnCloseContents, | 43 MOCK_METHOD2(OnCloseContents, |
| 44 void(WebContents* source, bool* out_close_dialog)); | 44 void(WebContents* source, bool* out_close_dialog)); |
| 45 MOCK_CONST_METHOD0(ShouldShowDialogTitle, bool()); | 45 MOCK_CONST_METHOD0(ShouldShowDialogTitle, bool()); |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 class WebDialogWindowControllerTest : public BrowserWithTestWindowTest { | 48 class WebDialogWindowControllerTest : public BrowserWithTestWindowTest { |
| 49 public: | 49 public: |
| 50 virtual void SetUp() { | 50 virtual void SetUp() { |
| 51 BrowserWithTestWindowTest::SetUp(); | 51 BrowserWithTestWindowTest::SetUp(); |
| 52 CocoaTest::BootstrapCocoa(); | 52 CocoaTest::BootstrapCocoa(); |
| 53 title_ = ASCIIToUTF16("Mock Title"); | 53 title_ = base::ASCIIToUTF16("Mock Title"); |
| 54 size_ = gfx::Size(50, 100); | 54 size_ = gfx::Size(50, 100); |
| 55 gurl_ = GURL(""); | 55 gurl_ = GURL(""); |
| 56 } | 56 } |
| 57 | 57 |
| 58 protected: | 58 protected: |
| 59 base::string16 title_; | 59 base::string16 title_; |
| 60 gfx::Size size_; | 60 gfx::Size size_; |
| 61 GURL gurl_; | 61 GURL gurl_; |
| 62 | 62 |
| 63 // Order here is important. | 63 // Order here is important. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 92 WebDialogWindowController* web_dialog_window_controller = | 92 WebDialogWindowController* web_dialog_window_controller = |
| 93 [[WebDialogWindowController alloc] initWithDelegate:&delegate_ | 93 [[WebDialogWindowController alloc] initWithDelegate:&delegate_ |
| 94 context:profile()]; | 94 context:profile()]; |
| 95 | 95 |
| 96 [web_dialog_window_controller loadDialogContents]; | 96 [web_dialog_window_controller loadDialogContents]; |
| 97 [web_dialog_window_controller showWindow:nil]; | 97 [web_dialog_window_controller showWindow:nil]; |
| 98 [web_dialog_window_controller close]; | 98 [web_dialog_window_controller close]; |
| 99 } | 99 } |
| 100 | 100 |
| 101 } // namespace | 101 } // namespace |
| OLD | NEW |