Chromium Code Reviews| 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/file_path.h" | 8 #include "base/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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 77 | 77 |
| 78 // Load a URL and listen to automation events with a given handler. | 78 // Load a URL and listen to automation events with a given handler. |
| 79 // Returns true if the test glue function correctly. (The handler should | 79 // Returns true if the test glue function correctly. (The handler should |
| 80 // seperately indicate if the test failed.) | 80 // seperately indicate if the test failed.) |
| 81 bool RunJavascriptTest(const GURL& url, TestMessageHandler* handler); | 81 bool RunJavascriptTest(const GURL& url, TestMessageHandler* handler); |
| 82 | 82 |
| 83 // Run a simple test that checks that a nexe loads correctly. Useful for | 83 // Run a simple test that checks that a nexe loads correctly. Useful for |
| 84 // setting up other tests, such as checking that UMA data was logged. | 84 // setting up other tests, such as checking that UMA data was logged. |
| 85 void RunLoadTest(const FilePath::StringType& test_file); | 85 void RunLoadTest(const FilePath::StringType& test_file); |
| 86 | 86 |
| 87 // Run a test that was written using the nacl_integration test jig. | |
|
Mark Seaborn
2012/09/11 22:10:06
'nacl_integration' refers to the step that runs Sc
Nick Bray (chromium)
2012/09/12 01:19:13
Done.
| |
| 88 void RunNaClIntegrationTest(const FilePath::StringType& test_file); | |
|
Mark Seaborn
2012/09/11 22:10:06
Nit: test_file isn't just a filename, it contains
Nick Bray (chromium)
2012/09/12 01:19:13
Done.
| |
| 89 | |
| 87 private: | 90 private: |
| 88 bool StartTestServer(); | 91 bool StartTestServer(); |
| 89 | 92 |
| 90 scoped_ptr<net::TestServer> test_server_; | 93 scoped_ptr<net::TestServer> test_server_; |
| 91 }; | 94 }; |
| 92 | 95 |
| 93 class NaClBrowserTestNewlib : public NaClBrowserTestBase { | 96 class NaClBrowserTestNewlib : public NaClBrowserTestBase { |
| 94 public: | 97 public: |
| 95 virtual FilePath::StringType Variant() OVERRIDE; | 98 virtual FilePath::StringType Variant() OVERRIDE; |
| 96 }; | 99 }; |
| 97 | 100 |
| 98 class NaClBrowserTestGLibc : public NaClBrowserTestBase { | 101 class NaClBrowserTestGLibc : public NaClBrowserTestBase { |
| 99 public: | 102 public: |
| 100 virtual FilePath::StringType Variant() OVERRIDE; | 103 virtual FilePath::StringType Variant() OVERRIDE; |
| 101 }; | 104 }; |
| 102 | 105 |
| 103 #define NACL_BROWSER_TEST_F(suite, name, body) \ | 106 #define NACL_BROWSER_TEST_F(suite, name, body) \ |
| 104 IN_PROC_BROWSER_TEST_F(suite##Newlib, name) \ | 107 IN_PROC_BROWSER_TEST_F(suite##Newlib, name) \ |
| 105 body \ | 108 body \ |
| 106 IN_PROC_BROWSER_TEST_F(suite##GLibc, name) \ | 109 IN_PROC_BROWSER_TEST_F(suite##GLibc, name) \ |
| 107 body | 110 body |
| 108 | 111 |
| 109 #endif // CHROME_TEST_NACL_NACL_BROWSERTEST_UTIL_H_ | 112 #endif // CHROME_TEST_NACL_NACL_BROWSERTEST_UTIL_H_ |
| OLD | NEW |