- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / test / nacl / pnacl_header_test.h
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_TEST_NACL_PNACL_HEADER_TEST_H_
6 #define CHROME_TEST_NACL_PNACL_HEADER_TEST_H_
7
8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/test/base/in_process_browser_test.h"
11
12 namespace base {
13 class FilePath;
14 }
15
16 namespace net {
17 namespace test_server {
18 struct HttpRequest;
19 class HttpResponse;
20 }
21 }
22
23 class PnaclHeaderTest : public InProcessBrowserTest {
24  public:
25   PnaclHeaderTest();
26   virtual ~PnaclHeaderTest();
27
28   // Run a simple test that checks that the NaCl plugin sends the right
29   // headers when doing |expected_noncors| same origin pexe load requests
30   // and |expected_cors| cross origin pexe load requests.
31   void RunLoadTest(const std::string& url,
32                    int expected_noncors,
33                    int expected_cors);
34
35   virtual void SetUp() OVERRIDE;
36   virtual void TearDown() OVERRIDE;
37
38  private:
39   scoped_ptr<net::test_server::HttpResponse> WatchForPexeFetch(
40       const net::test_server::HttpRequest& request);
41
42   int noncors_loads_;
43   int cors_loads_;
44   DISALLOW_COPY_AND_ASSIGN(PnaclHeaderTest);
45 };
46
47 #endif  // CHROME_TEST_NACL_PNACL_HEADER_TEST_H_