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

Unified Diff: mojo/public/cpp/bindings/tests/data_view_unittest.cc

Issue 2259283003: Mojo C++ bindings: share DataView class between chromium and blink variants. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@92_change_traits_param
Patch Set: . Created 4 years, 4 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: mojo/public/cpp/bindings/tests/data_view_unittest.cc
diff --git a/mojo/public/cpp/bindings/tests/data_view_unittest.cc b/mojo/public/cpp/bindings/tests/data_view_unittest.cc
index 7bf58e71610e48eaf8621693b6853087b73f6131..71f60a8fc2f9119c12f313d3b64b7fc603225956 100644
--- a/mojo/public/cpp/bindings/tests/data_view_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/data_view_unittest.cc
@@ -33,13 +33,13 @@ struct DataViewHolder {
std::unique_ptr<DataViewHolder> SerializeTestStruct(TestStructPtr input) {
std::unique_ptr<DataViewHolder> result(new DataViewHolder);
- size_t size = mojo::internal::PrepareToSerialize<TestStructPtr>(
+ size_t size = mojo::internal::PrepareToSerialize<TestStructDataView>(
input, &result->context);
result->buf.reset(new mojo::internal::FixedBufferForTesting(size));
internal::TestStruct_Data* data = nullptr;
- mojo::internal::Serialize<TestStructPtr>(input, result->buf.get(), &data,
- &result->context);
+ mojo::internal::Serialize<TestStructDataView>(input, result->buf.get(), &data,
+ &result->context);
result->data_view.reset(new TestStructDataView(data, &result->context));
return result;
@@ -175,13 +175,13 @@ TEST_F(DataViewTest, InterfaceArray) {
auto data_view_holder = SerializeTestStruct(std::move(obj));
auto& data_view = *data_view_holder->data_view;
- ArrayDataView<TestInterfacePtr> array_data_view;
+ ArrayDataView<TestInterfacePtrDataView> array_data_view;
data_view.GetFInterfaceArrayDataView(&array_data_view);
ASSERT_FALSE(array_data_view.is_null());
ASSERT_EQ(1u, array_data_view.size());
- TestInterfacePtr ptr2 = array_data_view.Take(0);
+ TestInterfacePtr ptr2 = array_data_view.Take<TestInterfacePtr>(0);
ASSERT_TRUE(ptr2);
int32_t result = 0;
ASSERT_TRUE(ptr2->Echo(42, &result));
« no previous file with comments | « mojo/public/cpp/bindings/tests/array_common_test.h ('k') | mojo/public/cpp/bindings/tests/map_common_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698