| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_PNACL_HEADER_TEST_H_ | 5 #ifndef CHROME_TEST_NACL_PNACL_HEADER_TEST_H_ |
| 6 #define CHROME_TEST_NACL_PNACL_HEADER_TEST_H_ | 6 #define CHROME_TEST_NACL_PNACL_HEADER_TEST_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 | 42 |
| 43 private: | 43 private: |
| 44 bool found_pnacl_header_; | 44 bool found_pnacl_header_; |
| 45 | 45 |
| 46 DISALLOW_COPY_AND_ASSIGN(TestDispatcherHostDelegate); | 46 DISALLOW_COPY_AND_ASSIGN(TestDispatcherHostDelegate); |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 class PnaclHeaderTest : public InProcessBrowserTest { | 49 class PnaclHeaderTest : public InProcessBrowserTest { |
| 50 public: | 50 public: |
| 51 PnaclHeaderTest(); | 51 PnaclHeaderTest(); |
| 52 virtual ~PnaclHeaderTest(); | 52 ~PnaclHeaderTest() override; |
| 53 | 53 |
| 54 // Run a simple test that checks that the NaCl plugin sends the right | 54 // Run a simple test that checks that the NaCl plugin sends the right |
| 55 // headers when doing |expected_noncors| same origin pexe load requests | 55 // headers when doing |expected_noncors| same origin pexe load requests |
| 56 // and |expected_cors| cross origin pexe load requests. | 56 // and |expected_cors| cross origin pexe load requests. |
| 57 void RunLoadTest(const std::string& url, | 57 void RunLoadTest(const std::string& url, |
| 58 int expected_noncors, | 58 int expected_noncors, |
| 59 int expected_cors); | 59 int expected_cors); |
| 60 | 60 |
| 61 private: | 61 private: |
| 62 void StartServer(); | 62 void StartServer(); |
| 63 | 63 |
| 64 scoped_ptr<net::test_server::HttpResponse> WatchForPexeFetch( | 64 scoped_ptr<net::test_server::HttpResponse> WatchForPexeFetch( |
| 65 const net::test_server::HttpRequest& request); | 65 const net::test_server::HttpRequest& request); |
| 66 | 66 |
| 67 int noncors_loads_; | 67 int noncors_loads_; |
| 68 int cors_loads_; | 68 int cors_loads_; |
| 69 TestDispatcherHostDelegate test_delegate_; | 69 TestDispatcherHostDelegate test_delegate_; |
| 70 DISALLOW_COPY_AND_ASSIGN(PnaclHeaderTest); | 70 DISALLOW_COPY_AND_ASSIGN(PnaclHeaderTest); |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 #endif // CHROME_TEST_NACL_PNACL_HEADER_TEST_H_ | 73 #endif // CHROME_TEST_NACL_PNACL_HEADER_TEST_H_ |
| OLD | NEW |