| 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_NACL_NACL_BROWSERTEST_UTIL_H_ | 5 #ifndef CHROME_TEST_NACL_NACL_BROWSERTEST_UTIL_H_ |
| 6 #define CHROME_TEST_NACL_NACL_BROWSERTEST_UTIL_H_ | 6 #define CHROME_TEST_NACL_NACL_BROWSERTEST_UTIL_H_ |
| 7 | 7 |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/test/base/in_process_browser_test.h" | 10 #include "chrome/test/base/in_process_browser_test.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 bool test_passed_; | 55 bool test_passed_; |
| 56 | 56 |
| 57 DISALLOW_COPY_AND_ASSIGN(LoadTestMessageHandler); | 57 DISALLOW_COPY_AND_ASSIGN(LoadTestMessageHandler); |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 class NaClBrowserTestBase : public InProcessBrowserTest { | 60 class NaClBrowserTestBase : public InProcessBrowserTest { |
| 61 public: | 61 public: |
| 62 NaClBrowserTestBase(); | 62 NaClBrowserTestBase(); |
| 63 virtual ~NaClBrowserTestBase(); | 63 virtual ~NaClBrowserTestBase(); |
| 64 | 64 |
| 65 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; | 65 virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; |
| 66 | 66 |
| 67 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE; | 67 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE; |
| 68 | 68 |
| 69 // What variant are we running - newlib, glibc, pnacl, etc? | 69 // What variant are we running - newlib, glibc, pnacl, etc? |
| 70 // This is used to compute what directory we're pulling data from, but it can | 70 // This is used to compute what directory we're pulling data from, but it can |
| 71 // also be used to affect the behavior of the test. | 71 // also be used to affect the behavior of the test. |
| 72 virtual base::FilePath::StringType Variant() = 0; | 72 virtual base::FilePath::StringType Variant() = 0; |
| 73 | 73 |
| 74 // Where are the files for this class of test located on disk? | 74 // Where are the files for this class of test located on disk? |
| 75 virtual bool GetDocumentRoot(base::FilePath* document_root); | 75 virtual bool GetDocumentRoot(base::FilePath* document_root); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 public: | 120 public: |
| 121 virtual base::FilePath::StringType Variant() OVERRIDE; | 121 virtual base::FilePath::StringType Variant() OVERRIDE; |
| 122 | 122 |
| 123 virtual bool IsAPnaclTest() OVERRIDE; | 123 virtual bool IsAPnaclTest() OVERRIDE; |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 // Class used to test that when --disable-pnacl is specified the PNaCl mime | 126 // Class used to test that when --disable-pnacl is specified the PNaCl mime |
| 127 // type is not available. | 127 // type is not available. |
| 128 class NaClBrowserTestPnaclDisabled : public NaClBrowserTestBase { | 128 class NaClBrowserTestPnaclDisabled : public NaClBrowserTestBase { |
| 129 public: | 129 public: |
| 130 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; | 130 virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; |
| 131 | 131 |
| 132 virtual base::FilePath::StringType Variant() OVERRIDE; | 132 virtual base::FilePath::StringType Variant() OVERRIDE; |
| 133 | 133 |
| 134 virtual bool IsAPnaclTest() OVERRIDE; | 134 virtual bool IsAPnaclTest() OVERRIDE; |
| 135 | 135 |
| 136 virtual bool IsPnaclDisabled() OVERRIDE; | 136 virtual bool IsPnaclDisabled() OVERRIDE; |
| 137 }; | 137 }; |
| 138 | 138 |
| 139 // A NaCl browser test only using static files. | 139 // A NaCl browser test only using static files. |
| 140 class NaClBrowserTestStatic : public NaClBrowserTestBase { | 140 class NaClBrowserTestStatic : public NaClBrowserTestBase { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 166 IN_PROC_BROWSER_TEST_F(suite##Newlib, name) \ | 166 IN_PROC_BROWSER_TEST_F(suite##Newlib, name) \ |
| 167 body \ | 167 body \ |
| 168 IN_PROC_BROWSER_TEST_F(suite##GLibc, name) \ | 168 IN_PROC_BROWSER_TEST_F(suite##GLibc, name) \ |
| 169 body \ | 169 body \ |
| 170 IN_PROC_BROWSER_TEST_F(suite##Pnacl, MAYBE_PNACL(name)) \ | 170 IN_PROC_BROWSER_TEST_F(suite##Pnacl, MAYBE_PNACL(name)) \ |
| 171 body | 171 body |
| 172 | 172 |
| 173 #endif | 173 #endif |
| 174 | 174 |
| 175 #endif // CHROME_TEST_NACL_NACL_BROWSERTEST_UTIL_H_ | 175 #endif // CHROME_TEST_NACL_NACL_BROWSERTEST_UTIL_H_ |
| OLD | NEW |