1// Copyright (c) 2013 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 PPAPI_SHARED_IMPL_UNITTEST_UTILS_H_ 6#define PPAPI_SHARED_IMPL_UNITTEST_UTILS_H_ 7 8#include "ppapi/c/pp_var.h" 9 10namespace ppapi { 11 12// Compares two vars for equality. This is a deep comparison (the entire graph 13// is traversed recursively). The function guarantees that the topology of the 14// two PP_Var graphs being compared is identical, including graphs with cycles. 15// If |test_string_references| is set to true, then incoming references to 16// string vars in the two graphs must be isomorphic. Otherwise only the content 17// of the strings is tested for equality. 18bool TestEqual(const PP_Var& expected, 19 const PP_Var& actual, 20 bool test_string_references); 21 22} // namespace ppapi 23 24#endif // PPAPI_SHARED_IMPL_UNITTEST_UTILS_H_ 25