| 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> |
| 11 | 11 |
| 12 #import "base/mac/scoped_nsautorelease_pool.h" | 12 #import "base/mac/scoped_nsautorelease_pool.h" |
| 13 #include "base/strings/sys_string_conversions.h" | 13 #include "base/strings/sys_string_conversions.h" |
| 14 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
| 15 #include "chrome/browser/ui/browser.h" | 15 #include "chrome/browser/ui/browser.h" |
| 16 #include "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 16 #include "chrome/browser/ui/cocoa/cocoa_test_helper.h" |
| 17 #include "chrome/test/base/browser_with_test_window_test.h" | 17 #include "chrome/test/base/browser_with_test_window_test.h" |
| 18 #include "chrome/test/base/testing_profile.h" | 18 #include "chrome/test/base/testing_profile.h" |
| 19 #include "content/public/browser/web_ui.h" | 19 #include "content/public/browser/web_ui.h" |
| 20 #include "content/public/browser/web_ui_message_handler.h" | 20 #include "content/public/browser/web_ui_message_handler.h" |
| 21 #include "testing/gmock/include/gmock/gmock.h" | 21 #include "testing/gmock/include/gmock/gmock.h" |
| 22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
| 23 #include "ui/gfx/size.h" | 23 #include "ui/gfx/geometry/size.h" |
| 24 #include "ui/web_dialogs/web_dialog_delegate.h" | 24 #include "ui/web_dialogs/web_dialog_delegate.h" |
| 25 #include "url/gurl.h" | 25 #include "url/gurl.h" |
| 26 | 26 |
| 27 using content::WebContents; | 27 using content::WebContents; |
| 28 using content::WebUIMessageHandler; | 28 using content::WebUIMessageHandler; |
| 29 using ui::WebDialogDelegate; | 29 using ui::WebDialogDelegate; |
| 30 | 30 |
| 31 namespace { | 31 namespace { |
| 32 | 32 |
| 33 class MockDelegate : public WebDialogDelegate { | 33 class MockDelegate : public WebDialogDelegate { |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |