Chromium Code Reviews| Index: extensions/renderer/bindings/api_binding_unittest.cc |
| diff --git a/extensions/renderer/bindings/api_binding_unittest.cc b/extensions/renderer/bindings/api_binding_unittest.cc |
| index 9f43d1aa5b47efda7a9c325969b8ecebefdc6cb6..523ece8584b9e6248535e64c08a0fa2a71c75787 100644 |
| --- a/extensions/renderer/bindings/api_binding_unittest.cc |
| +++ b/extensions/renderer/bindings/api_binding_unittest.cc |
| @@ -606,6 +606,16 @@ TEST_F(APIBindingUnittest, TestProperties) { |
| " 'subprop1': { 'value': 'some value', 'type': 'string' }," |
| " 'subprop2': { 'value': true, 'type': 'boolean' }" |
| " }" |
| + " }," |
| + " 'linuxOnly': {" |
| + " 'value': 'linux'," |
| + " 'type': 'string'," |
| + " 'platforms': ['linux']" |
| + " }," |
| + " 'nonLinuxOnly': {" |
| + " 'value': 'nonlinux'," |
| + " 'type': 'string'," |
| + " 'platforms': ['win', 'mac', 'chromeos']" |
| " }" |
| "}"); |
| InitializeBinding(); |
| @@ -617,6 +627,18 @@ TEST_F(APIBindingUnittest, TestProperties) { |
| GetStringPropertyFromObject(binding_object, context, "prop1")); |
| EXPECT_EQ(R"({"subprop1":"some value","subprop2":true})", |
| GetStringPropertyFromObject(binding_object, context, "prop2")); |
| + |
| +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| + EXPECT_EQ("\"linux\"", |
| + GetStringPropertyFromObject(binding_object, context, "linuxOnly")); |
| + EXPECT_EQ("undefined", GetStringPropertyFromObject(binding_object, context, |
| + "nonLinuxOnly")); |
| +#else |
| + EXPECT_EQ("undefined", |
| + GetStringPropertyFromObject(binding_object, context, "linuxOnly")); |
| + EXPECT_EQ("nonlinux", GetStringPropertyFromObject(binding_object, context, |
|
jbroman
2017/06/29 15:24:21
As the trybots are already indicating, this should
Devlin
2017/06/29 21:00:51
Yep, already done in PS4 :)
|
| + "nonLinuxOnly")); |
| +#endif |
| } |
| TEST_F(APIBindingUnittest, TestRefProperties) { |