| 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_TEST_PPAPI_PPAPI_TEST_H_ | 5 #ifndef CHROME_TEST_PPAPI_PPAPI_TEST_H_ |
| 6 #define CHROME_TEST_PPAPI_PPAPI_TEST_H_ | 6 #define CHROME_TEST_PPAPI_PPAPI_TEST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 std::string message_; | 33 std::string message_; |
| 34 | 34 |
| 35 DISALLOW_COPY_AND_ASSIGN(PPAPITestMessageHandler); | 35 DISALLOW_COPY_AND_ASSIGN(PPAPITestMessageHandler); |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 class PPAPITestBase : public InProcessBrowserTest { | 38 class PPAPITestBase : public InProcessBrowserTest { |
| 39 public: | 39 public: |
| 40 PPAPITestBase(); | 40 PPAPITestBase(); |
| 41 | 41 |
| 42 // InProcessBrowserTest: | 42 // InProcessBrowserTest: |
| 43 virtual void SetUp() OVERRIDE; |
| 43 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; | 44 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; |
| 44 virtual void SetUpOnMainThread() OVERRIDE; | 45 virtual void SetUpOnMainThread() OVERRIDE; |
| 45 | 46 |
| 46 virtual std::string BuildQuery(const std::string& base, | 47 virtual std::string BuildQuery(const std::string& base, |
| 47 const std::string& test_case) = 0; | 48 const std::string& test_case) = 0; |
| 48 | 49 |
| 49 // Returns the URL to load for file: tests. | 50 // Returns the URL to load for file: tests. |
| 50 GURL GetTestFileUrl(const std::string& test_case); | 51 GURL GetTestFileUrl(const std::string& test_case); |
| 51 void RunTest(const std::string& test_case); | 52 void RunTest(const std::string& test_case); |
| 52 // Run the test and reload. This can test for clean shutdown, including leaked | 53 // Run the test and reload. This can test for clean shutdown, including leaked |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 const std::string& test_case) OVERRIDE; | 175 const std::string& test_case) OVERRIDE; |
| 175 }; | 176 }; |
| 176 | 177 |
| 177 class PPAPIBrokerInfoBarTest : public OutOfProcessPPAPITest { | 178 class PPAPIBrokerInfoBarTest : public OutOfProcessPPAPITest { |
| 178 public: | 179 public: |
| 179 // PPAPITestBase override: | 180 // PPAPITestBase override: |
| 180 virtual void SetUpOnMainThread() OVERRIDE; | 181 virtual void SetUpOnMainThread() OVERRIDE; |
| 181 }; | 182 }; |
| 182 | 183 |
| 183 #endif // CHROME_TEST_PPAPI_PPAPI_TEST_H_ | 184 #endif // CHROME_TEST_PPAPI_PPAPI_TEST_H_ |
| OLD | NEW |