Home | History | Annotate | Download | only in tests
      1 // Copyright 2014 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 PAPPI_TESTS_TEST_FILE_MAPPING_H_
      6 #define PAPPI_TESTS_TEST_FILE_MAPPING_H_
      7 
      8 #include <string>
      9 
     10 #include "ppapi/tests/test_case.h"
     11 
     12 struct PPB_FileMapping_0_1;
     13 
     14 class TestFileMapping : public TestCase {
     15  public:
     16   explicit TestFileMapping(TestingInstance* instance)
     17       : TestCase(instance),
     18         file_mapping_if_(NULL) {
     19   }
     20   virtual ~TestFileMapping() {}
     21 
     22  private:
     23   // TestCase implementation.
     24   virtual bool Init();
     25   virtual void RunTests(const std::string& filter);
     26 
     27   std::string MapAndCheckResults(uint32_t prot, uint32_t flags);
     28 
     29   std::string TestBadParameters();
     30   std::string TestMap();
     31   std::string TestPartialRegions();
     32 
     33   // TODO(dmichael): Use unversioned struct when it goes stable.
     34   const PPB_FileMapping_0_1* file_mapping_if_;
     35 };
     36 
     37 #endif  // PAPPI_TESTS_TEST_FILE_MAPPING_H_
     38