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.
5 #ifndef PPAPI_TEST_TEST_VAR_DEPRECATED_H_
6 #define PPAPI_TEST_TEST_VAR_DEPRECATED_H_
10 #include "ppapi/c/dev/ppb_var_deprecated.h"
11 #include "ppapi/cpp/private/var_private.h"
12 #include "ppapi/tests/test_case.h"
14 class TestVarDeprecated
: public TestCase
{
16 explicit TestVarDeprecated(TestingInstance
* instance
) : TestCase(instance
) {}
18 // TestCase implementation.
20 virtual void RunTests(const std::string
& filter
);
22 void set_var_from_page(const pp::VarPrivate
& v
) { var_from_page_
= v
; }
25 // Test case protected overrides.
26 virtual pp::deprecated::ScriptableObject
* CreateTestObject();
29 std::string
TestBasicString();
30 std::string
TestInvalidAndEmpty();
31 std::string
TestInvalidUtf8();
32 std::string
TestNullInputInUtf8Conversion();
33 std::string
TestValidUtf8();
34 std::string
TestUtf8WithEmbeddedNulls();
35 std::string
TestVarToUtf8ForWrongType();
36 std::string
TestHasPropertyAndMethod();
37 std::string
TestPassReference();
39 // Used by the tests that access the C API directly.
40 const PPB_Var_Deprecated
* var_interface_
;
42 // Saves the var from when a value is set on the test from the page.
43 pp::VarPrivate var_from_page_
;
46 #endif // PPAPI_TEST_TEST_VAR_DEPRECATED_H_