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

Unified Diff: extensions/renderer/argument_spec_unittest.cc

Issue 2438623002: [Extensions Bindings] Add APIBindingsSystem (Closed)
Patch Set: woot Created 4 years, 2 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: extensions/renderer/argument_spec_unittest.cc
diff --git a/extensions/renderer/argument_spec_unittest.cc b/extensions/renderer/argument_spec_unittest.cc
index 7b03e9b350418d2fbda97f5c75ec8adc3535d7f6..dc71aa094dd966abb30487c86465239342e82270 100644
--- a/extensions/renderer/argument_spec_unittest.cc
+++ b/extensions/renderer/argument_spec_unittest.cc
@@ -130,6 +130,18 @@ TEST_F(ArgumentSpecUnitTest, Test) {
}
{
+ ArgumentSpec spec(*ValueFromString(
+ "{'type': 'string', 'enum': [{'name': 'foo'}, {'name': 'bar'}]}"));
+ ExpectSuccess(spec, "'foo'", "'foo'");
+ ExpectSuccess(spec, "'bar'", "'bar'");
+ ExpectFailure(spec, "['foo']");
+ ExpectFailure(spec, "'fo'");
+ ExpectFailure(spec, "'foobar'");
+ ExpectFailure(spec, "'baz'");
+ ExpectFailure(spec, "''");
+ }
+
+ {
ArgumentSpec spec(*ValueFromString("{'type': 'boolean'}"));
ExpectSuccess(spec, "true", "true");
ExpectSuccess(spec, "false", "false");
« extensions/renderer/argument_spec.cc ('K') | « extensions/renderer/argument_spec.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698