Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_COCOA_COCOA_TEST_HELPER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_COCOA_TEST_HELPER_H_ |
|
Robert Sesek
2016/12/09 18:58:46
Please also update the include guards to have _TES
| |
| 6 #define CHROME_BROWSER_UI_COCOA_COCOA_TEST_HELPER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_COCOA_TEST_HELPER_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #import "ui/gfx/test/ui_cocoa_test_helper.h" | 10 #import "ui/gfx/test/ui_cocoa_test_helper.h" |
| 11 | 11 |
| 12 // A test class that all tests that depend on AppKit should inherit from. | 12 // A test class that all tests that depend on AppKit should inherit from. |
| 13 // Sets up paths correctly, and makes sure that any windows created in the test | 13 // Sets up paths correctly, and makes sure that any windows created in the test |
| 14 // are closed down properly by the test. If you need to inherit from a | 14 // are closed down properly by the test. If you need to inherit from a |
| 15 // different test class, but need to set up the AppKit runtime environment, you | 15 // different test class, but need to set up the AppKit runtime environment, you |
| 16 // can call BootstrapCocoa directly from your test class. You will have to deal | 16 // can call BootstrapCocoa directly from your test class. You will have to deal |
| 17 // with windows on your own though. Note that NSApp is initialized by | 17 // with windows on your own though. Note that NSApp is initialized by |
| 18 // ChromeTestSuite. | 18 // ChromeTestSuite. |
| 19 class CocoaTest : public ui::CocoaTest { | 19 class CocoaTest : public ui::CocoaTest { |
| 20 public: | 20 public: |
| 21 // Sets up paths correctly for unit tests. If you can't inherit from | 21 // Sets up paths correctly for unit tests. If you can't inherit from |
| 22 // CocoaTest but are going to be using any AppKit features directly, or | 22 // CocoaTest but are going to be using any AppKit features directly, or |
| 23 // indirectly, you should be calling this from the c'tor or SetUp methods of | 23 // indirectly, you should be calling this from the c'tor or SetUp methods of |
| 24 // your test class. Note that NSApp is initialized by ChromeTestSuite. | 24 // your test class. Note that NSApp is initialized by ChromeTestSuite. |
| 25 static void BootstrapCocoa(); | 25 static void BootstrapCocoa(); |
| 26 | 26 |
| 27 CocoaTest(); | 27 CocoaTest(); |
| 28 }; | 28 }; |
| 29 | 29 |
| 30 #endif // CHROME_BROWSER_UI_COCOA_COCOA_TEST_HELPER_H_ | 30 #endif // CHROME_BROWSER_UI_COCOA_COCOA_TEST_HELPER_H_ |
| OLD | NEW |