15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Copyright (c) 2012 The Chromium Authors. All rights reserved.
25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// found in the LICENSE file.
45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
55821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#ifndef PAPPI_TESTS_TEST_TCP_SOCKET_PRIVATE_TRUSTED_H_
65821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define PAPPI_TESTS_TEST_TCP_SOCKET_PRIVATE_TRUSTED_H_
75821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
85821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include <string>
95821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "ppapi/c/pp_stdint.h"
115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "ppapi/tests/test_case.h"
125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// This class is necessary to test the portions of TCP socket which are
145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// not exposed to NaCl yet. In particular, functionality related to
155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// X509 Certificates is tested here.
165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)class TestTCPSocketPrivateTrusted : public TestCase {
175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) public:
185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  explicit TestTCPSocketPrivateTrusted(TestingInstance* instance);
195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  // TestCase implementation.
215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  virtual bool Init();
225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  virtual void RunTests(const std::string& filter);
235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) private:
255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  std::string TestGetServerCertificate();
265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  std::string host_;
285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  uint16_t port_;
295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  uint16_t ssl_port_;
305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)};
315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif  // PAPPI_TESTS_TEST_TCP_SOCKET_PRIVATE_TRUSTED_H_
33