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

Unified Diff: content/browser/webui/web_ui_mojo_browsertest.cc

Issue 250253002: Mojo: Add String, Float, and Double types to codec.js. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 8 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
« no previous file with comments | « no previous file | content/test/data/web_ui_test_mojo_bindings.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/webui/web_ui_mojo_browsertest.cc
diff --git a/content/browser/webui/web_ui_mojo_browsertest.cc b/content/browser/webui/web_ui_mojo_browsertest.cc
index 368369d73532a00465e138f199dc0ec1d083d4ec..d933169f22348f63be0ce7cf0b9566fe228c8ae1 100644
--- a/content/browser/webui/web_ui_mojo_browsertest.cc
+++ b/content/browser/webui/web_ui_mojo_browsertest.cc
@@ -153,6 +153,11 @@ class EchoBrowserTargetImpl : public BrowserTargetImpl {
builder.set_double_inf(kExpectedDoubleInf);
builder.set_double_nan(kExpectedDoubleNan);
builder.set_name("coming");
+ mojo::Array<mojo::String>::Builder string_array(3);
+ string_array[0] = "one";
+ string_array[1] = "two";
+ string_array[2] = "three";
+ builder.set_string_array(string_array.Finish());
client_->Echo(builder.Finish());
}
@@ -177,6 +182,9 @@ class EchoBrowserTargetImpl : public BrowserTargetImpl {
EXPECT_EQ(kExpectedDoubleInf, arg1.double_inf());
EXPECT_NAN(arg1.double_nan());
EXPECT_EQ(std::string("coming"), arg1.name().To<std::string>());
+ EXPECT_EQ(std::string("one"), arg1.string_array()[0].To<std::string>());
+ EXPECT_EQ(std::string("two"), arg1.string_array()[1].To<std::string>());
+ EXPECT_EQ(std::string("three"), arg1.string_array()[2].To<std::string>());
EXPECT_EQ(-1, arg2.si64());
EXPECT_EQ(-1, arg2.si32());
« no previous file with comments | « no previous file | content/test/data/web_ui_test_mojo_bindings.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698