test_var.h 1013 B

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright (c) 2012 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. #ifndef PPAPI_TESTS_TEST_VAR_H_
  5. #define PPAPI_TESTS_TEST_VAR_H_
  6. #include <string>
  7. #include "ppapi/c/ppb_var.h"
  8. #include "ppapi/cpp/var.h"
  9. #include "ppapi/tests/test_case.h"
  10. class TestVar : public TestCase {
  11. public:
  12. explicit TestVar(TestingInstance* instance) : TestCase(instance) {}
  13. private:
  14. // TestCase implementation.
  15. virtual bool Init();
  16. virtual void RunTests(const std::string& filter);
  17. std::string TestBasicString();
  18. std::string TestInvalidAndEmpty();
  19. std::string TestInvalidUtf8();
  20. std::string TestNullInputInUtf8Conversion();
  21. std::string TestValidUtf8();
  22. std::string TestUtf8WithEmbeddedNulls();
  23. std::string TestVarToUtf8ForWrongType();
  24. std::string TestHasPropertyAndMethod();
  25. // Used by the tests that access the C API directly.
  26. const PPB_Var* var_interface_;
  27. };
  28. #endif // PPAPI_TESTS_TEST_VAR_H_