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

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

Issue 1751563002: Mojo C++ bindings: support mapping mojo string to WTF::String. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync & rebase Created 4 years, 9 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/struct_traits_unittest.cc
diff --git a/mojo/public/cpp/bindings/tests/struct_traits_unittest.cc b/mojo/public/cpp/bindings/tests/struct_traits_unittest.cc
index e1ffacb6a3c9937be79157f20406c7639604b135..cd99785c228e8d6a1ce3187d776b4d2b6d95d5a0 100644
--- a/mojo/public/cpp/bindings/tests/struct_traits_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/struct_traits_unittest.cc
@@ -12,6 +12,7 @@
#include "mojo/public/cpp/bindings/tests/rect_blink.h"
#include "mojo/public/cpp/bindings/tests/rect_chromium.h"
#include "mojo/public/cpp/bindings/tests/struct_with_traits_impl.h"
+#include "mojo/public/cpp/bindings/tests/variant_test_util.h"
#include "mojo/public/interfaces/bindings/tests/struct_with_traits.mojom.h"
#include "mojo/public/interfaces/bindings/tests/test_native_types.mojom-blink.h"
#include "mojo/public/interfaces/bindings/tests/test_native_types.mojom-chromium.h"
@@ -21,19 +22,6 @@ namespace mojo {
namespace test {
namespace {
-// Converts a request of Interface1 to a request of Interface0. Interface0 and
-// Interface1 are expected to be two variants of the same mojom interface.
-// In real-world use cases, users shouldn't need to worry about this. Because it
-// is rare to deal with two variants of the same interface in the same app.
-template <typename Interface0, typename Interface1>
-InterfaceRequest<Interface0> ConvertInterfaceRequest(
- InterfaceRequest<Interface1> request) {
- DCHECK_EQ(0, strcmp(Interface0::Name_, Interface1::Name_));
- InterfaceRequest<Interface0> result;
- result.Bind(request.PassMessagePipe());
- return result;
-}
-
template <typename T>
void DoExpectResult(const T& expected,
const base::Closure& callback,

Powered by Google App Engine
This is Rietveld 408576698