Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / test / nacl / pnacl_header_test.h
blob9134925edd0874bff5f986ec7836dab25b9122db
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.
5 #ifndef CHROME_TEST_NACL_PNACL_HEADER_TEST_H_
6 #define CHROME_TEST_NACL_PNACL_HEADER_TEST_H_
8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/test/base/in_process_browser_test.h"
12 namespace base {
13 class FilePath;
16 namespace net {
17 namespace test_server {
18 struct HttpRequest;
19 class HttpResponse;
23 class PnaclHeaderTest : public InProcessBrowserTest {
24 public:
25 PnaclHeaderTest();
26 virtual ~PnaclHeaderTest();
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);
35 private:
36 void StartServer();
38 scoped_ptr<net::test_server::HttpResponse> WatchForPexeFetch(
39 const net::test_server::HttpRequest& request);
41 int noncors_loads_;
42 int cors_loads_;
43 DISALLOW_COPY_AND_ASSIGN(PnaclHeaderTest);
46 #endif // CHROME_TEST_NACL_PNACL_HEADER_TEST_H_