Fix build break
[chromium-blink-merge.git] / ppapi / tests / test_instance_deprecated.h
blob6ec9b46fc7dc4fcf668984777691d2ec7be20d20
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_TESTS_TEST_INSTANCE_H_
6 #define PPAPI_TESTS_TEST_INSTANCE_H_
8 #include <string>
9 #include <vector>
11 #include "ppapi/tests/test_case.h"
13 class TestInstance : public TestCase {
14 public:
15 TestInstance(TestingInstance* instance);
17 // TestCase implementation.
18 virtual bool Init();
19 virtual void RunTests(const std::string& filter);
21 void set_string(const std::string& s) { string_ = s; }
23 // Leak a reference to the given var, but ignore the leak in the leak checking
24 // that happens at shutdown. This allows us to test the "ForceFree" that
25 // happens on instance shutdown.
26 void LeakReferenceAndIgnore(const pp::Var& leaked);
28 protected:
29 // Test case protected overrides.
30 virtual pp::deprecated::ScriptableObject* CreateTestObject();
32 private:
33 std::string TestExecuteScript();
34 std::string TestRecursiveObjects();
35 std::string TestLeakedObjectDestructors();
37 // Value written by set_string which is called by the ScriptableObject. This
38 // allows us to keep track of what was called.
39 std::string string_;
42 #endif // PPAPI_TESTS_TEST_INSTANCE_H_