Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(383)

Unified Diff: ppapi/tests/test_post_message.cc

Issue 16136009: Move PPB_VarArray and PPB_VarDictionary out of dev. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ppapi/tests/test_post_message.cc
diff --git a/ppapi/tests/test_post_message.cc b/ppapi/tests/test_post_message.cc
index 8c67ee5a7c1b8907c89d6d86708ba8145cccba1f..c2424bf9e844bc3ef66ade5eb4dd84d9db2cb14a 100644
--- a/ppapi/tests/test_post_message.cc
+++ b/ppapi/tests/test_post_message.cc
@@ -12,7 +12,9 @@
#include "ppapi/c/pp_var.h"
#include "ppapi/cpp/instance.h"
#include "ppapi/cpp/var.h"
+#include "ppapi/cpp/var_array.h"
#include "ppapi/cpp/var_array_buffer.h"
+#include "ppapi/cpp/var_dictionary.h"
#include "ppapi/tests/pp_thread.h"
#include "ppapi/tests/test_utils.h"
#include "ppapi/tests/testing_instance.h"
@@ -82,8 +84,8 @@ bool VarsEqual(const pp::Var& expected,
if (expected.is_number()) {
return fabs(expected.AsDouble() - actual.AsDouble()) < 1.0e-4;
} else if (expected.is_array()) {
- pp::VarArray_Dev expected_array(expected);
- pp::VarArray_Dev actual_array(actual);
+ pp::VarArray expected_array(expected);
+ pp::VarArray actual_array(actual);
if (expected_array.GetLength() != actual_array.GetLength())
return false;
for (uint32_t i = 0; i < expected_array.GetLength(); ++i) {
@@ -92,8 +94,8 @@ bool VarsEqual(const pp::Var& expected,
}
return true;
} else if (expected.is_dictionary()) {
- pp::VarDictionary_Dev expected_dict(expected);
- pp::VarDictionary_Dev actual_dict(actual);
+ pp::VarDictionary expected_dict(expected);
+ pp::VarDictionary actual_dict(actual);
if (expected_dict.GetKeys().GetLength() !=
actual_dict.GetKeys().GetLength()) {
return false;
@@ -438,7 +440,7 @@ std::string TestPostMessage::TestSendingArray() {
WaitForMessages();
ASSERT_TRUE(ClearListeners());
- pp::VarArray_Dev array;
+ pp::VarArray array;
array.Set(0, pp::Var(kTestBool));
array.Set(1, pp::Var(kTestString));
// Purposely leave index 2 empty.
@@ -481,7 +483,7 @@ std::string TestPostMessage::TestSendingDictionary() {
WaitForMessages();
ASSERT_TRUE(ClearListeners());
- pp::VarDictionary_Dev dictionary;
+ pp::VarDictionary dictionary;
dictionary.Set(pp::Var("foo"), pp::Var(kTestBool));
dictionary.Set(pp::Var("bar"), pp::Var(kTestString));
dictionary.Set(pp::Var("abc"), pp::Var(kTestInt));
@@ -526,7 +528,7 @@ std::string TestPostMessage::TestSendingComplexVar() {
ASSERT_TRUE(ClearListeners());
pp::Var string(kTestString);
- pp::VarDictionary_Dev dictionary;
+ pp::VarDictionary dictionary;
dictionary.Set(pp::Var("foo"), pp::Var(kTestBool));
dictionary.Set(pp::Var("bar"), string);
dictionary.Set(pp::Var("abc"), pp::Var(kTestInt));
@@ -534,7 +536,7 @@ std::string TestPostMessage::TestSendingComplexVar() {
dictionary.Set(pp::Var("dictionary"), dictionary); // Self-reference.
// Reference to array.
- pp::VarArray_Dev array;
+ pp::VarArray array;
array.Set(0, pp::Var(kTestBool));
array.Set(1, string);
// Purposely leave index 2 empty (which will place an undefined var there).
@@ -545,7 +547,7 @@ std::string TestPostMessage::TestSendingComplexVar() {
dictionary.Set(pp::Var("array-ref2"), array);
// Set up a (dictionary -> array -> dictionary) cycle.
- pp::VarArray_Dev array2;
+ pp::VarArray array2;
array2.Set(0, dictionary);
dictionary.Set(pp::Var("array2"), array2);
@@ -558,7 +560,7 @@ std::string TestPostMessage::TestSendingComplexVar() {
ASSERT_EQ(message_data_.size(), 0);
ASSERT_EQ(WaitForMessages(), 1);
ASSERT_TRUE(message_data_.back().is_dictionary());
- pp::VarDictionary_Dev result(message_data_.back());
+ pp::VarDictionary result(message_data_.back());
ASSERT_TRUE(VarsEqual(dictionary, message_data_.back()));
// Break the cycles.

Powered by Google App Engine
This is Rietveld 408576698