| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_TEST_UI_NPAPI_TEST_HELPER_H_ | 5 #ifndef CHROME_TEST_UI_NPAPI_TEST_HELPER_H_ |
| 6 #define CHROME_TEST_UI_NPAPI_TEST_HELPER_H_ | 6 #define CHROME_TEST_UI_NPAPI_TEST_HELPER_H_ |
| 7 | 7 |
| 8 #include "chrome/test/ui/ui_test.h" | 8 #include "chrome/test/ui/ui_test.h" |
| 9 | 9 |
| 10 namespace npapi_test { |
| 11 extern const char kTestCompleteCookie[]; |
| 12 extern const char kTestCompleteSuccess[]; |
| 13 const int kLongWaitTimeout = 30 * 1000; |
| 14 const int kShortWaitTimeout = 5 * 1000; |
| 15 } // namespace npapi_test. |
| 16 |
| 10 // Base class for NPAPI tests. It provides common functionality between | 17 // Base class for NPAPI tests. It provides common functionality between |
| 11 // regular NPAPI plugins and pepper NPAPI plugins. The base classes provide the | 18 // regular NPAPI plugins and pepper NPAPI plugins. The base classes provide the |
| 12 // name of the plugin they need test in the constructor. This base class will | 19 // name of the plugin they need test in the constructor. This base class will |
| 13 // copy the plugin (assuming it has been built) to the plugins directory | 20 // copy the plugin (assuming it has been built) to the plugins directory |
| 14 // so it is loaded when chromium is launched. | 21 // so it is loaded when chromium is launched. |
| 15 class NPAPITesterBase : public UITest { | 22 class NPAPITesterBase : public UITest { |
| 16 protected: | 23 protected: |
| 17 explicit NPAPITesterBase(const std::string& test_plugin_name); | 24 explicit NPAPITesterBase(const std::string& test_plugin_name); |
| 18 virtual void SetUp(); | 25 virtual void SetUp(); |
| 19 virtual void TearDown(); | 26 virtual void TearDown(); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 44 protected: | 51 protected: |
| 45 virtual void SetUp(); | 52 virtual void SetUp(); |
| 46 }; | 53 }; |
| 47 | 54 |
| 48 // Helper class for NPAPI plugin UI tests which use incognito mode. | 55 // Helper class for NPAPI plugin UI tests which use incognito mode. |
| 49 class NPAPIIncognitoTester : public NPAPITester { | 56 class NPAPIIncognitoTester : public NPAPITester { |
| 50 protected: | 57 protected: |
| 51 virtual void SetUp(); | 58 virtual void SetUp(); |
| 52 }; | 59 }; |
| 53 | 60 |
| 54 // Helper class pepper NPAPI tests. | |
| 55 class PepperTester : public NPAPITesterBase { | |
| 56 protected: | |
| 57 PepperTester(); | |
| 58 virtual void SetUp(); | |
| 59 }; | |
| 60 | |
| 61 #endif // CHROME_TEST_UI_NPAPI_TEST_HELPER_H_ | 61 #endif // CHROME_TEST_UI_NPAPI_TEST_HELPER_H_ |
| OLD | NEW |