| 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 #ifndef CHROME_BROWSER_UI_TAB_MODAL_CONFIRM_DIALOG_BROWSERTEST_H_ | 5 #ifndef CHROME_BROWSER_UI_TAB_MODAL_CONFIRM_DIALOG_BROWSERTEST_H_ |
| 6 #define CHROME_BROWSER_UI_TAB_MODAL_CONFIRM_DIALOG_BROWSERTEST_H_ | 6 #define CHROME_BROWSER_UI_TAB_MODAL_CONFIRM_DIALOG_BROWSERTEST_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" |
| 10 #include "chrome/browser/ui/tab_modal_confirm_dialog.h" |
| 8 #include "chrome/test/base/in_process_browser_test.h" | 11 #include "chrome/test/base/in_process_browser_test.h" |
| 9 #include "content/public/test/test_browser_thread.h" | |
| 10 | |
| 11 #if defined(OS_MACOSX) | |
| 12 class TabModalConfirmDialogMac; | |
| 13 typedef TabModalConfirmDialogMac TabModalConfirmDialog; | |
| 14 #elif defined(TOOLKIT_GTK) | |
| 15 #include "chrome/browser/ui/gtk/tab_modal_confirm_dialog_gtk.h" | |
| 16 typedef TabModalConfirmDialogGtk TabModalConfirmDialog; | |
| 17 #else | |
| 18 #include "chrome/browser/ui/views/tab_modal_confirm_dialog_views.h" | |
| 19 typedef TabModalConfirmDialogViews TabModalConfirmDialog; | |
| 20 #endif | |
| 21 | 12 |
| 22 class MockTabModalConfirmDialogDelegate; | 13 class MockTabModalConfirmDialogDelegate; |
| 23 class TabContents; | |
| 24 class TabModalConfirmDialogDelegate; | |
| 25 | 14 |
| 26 class TabModalConfirmDialogTest : public InProcessBrowserTest { | 15 class TabModalConfirmDialogTest : public InProcessBrowserTest { |
| 27 public: | 16 public: |
| 28 TabModalConfirmDialogTest(); | 17 TabModalConfirmDialogTest(); |
| 29 | 18 |
| 30 virtual void SetUpOnMainThread() OVERRIDE; | 19 virtual void SetUpOnMainThread() OVERRIDE; |
| 31 virtual void CleanUpOnMainThread() OVERRIDE; | 20 virtual void CleanUpOnMainThread() OVERRIDE; |
| 32 | 21 |
| 33 protected: | 22 protected: |
| 34 void CloseDialog(bool accept); | |
| 35 | |
| 36 // Owned by |dialog_|. | 23 // Owned by |dialog_|. |
| 37 MockTabModalConfirmDialogDelegate* delegate_; | 24 MockTabModalConfirmDialogDelegate* delegate_; |
| 38 | 25 |
| 39 private: | |
| 40 TabModalConfirmDialog* CreateTestDialog( | |
| 41 TabModalConfirmDialogDelegate* delegate, TabContents* tab_contents); | |
| 42 | |
| 43 // Deletes itself. | 26 // Deletes itself. |
| 44 TabModalConfirmDialog* dialog_; | 27 TabModalConfirmDialog* dialog_; |
| 45 | 28 |
| 29 private: |
| 46 DISALLOW_COPY_AND_ASSIGN(TabModalConfirmDialogTest); | 30 DISALLOW_COPY_AND_ASSIGN(TabModalConfirmDialogTest); |
| 47 }; | 31 }; |
| 48 | 32 |
| 49 #endif // CHROME_BROWSER_UI_TAB_MODAL_CONFIRM_DIALOG_BROWSERTEST_H_ | 33 #endif // CHROME_BROWSER_UI_TAB_MODAL_CONFIRM_DIALOG_BROWSERTEST_H_ |
| OLD | NEW |