| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "remoting/host/policy_watcher.h" | 5 #include "remoting/host/policy_watcher.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 667 | 667 |
| 668 TEST_F(PolicyWatcherTest, SchemaTypeCheck) { | 668 TEST_F(PolicyWatcherTest, SchemaTypeCheck) { |
| 669 const policy::Schema* schema = GetPolicySchema(); | 669 const policy::Schema* schema = GetPolicySchema(); |
| 670 ASSERT_TRUE(schema->valid()); | 670 ASSERT_TRUE(schema->valid()); |
| 671 | 671 |
| 672 // Check one, random "string" policy to see if the type propagated correctly | 672 // Check one, random "string" policy to see if the type propagated correctly |
| 673 // from policy_templates.json file. | 673 // from policy_templates.json file. |
| 674 const policy::Schema string_schema = | 674 const policy::Schema string_schema = |
| 675 schema->GetKnownProperty("RemoteAccessHostDomain"); | 675 schema->GetKnownProperty("RemoteAccessHostDomain"); |
| 676 EXPECT_TRUE(string_schema.valid()); | 676 EXPECT_TRUE(string_schema.valid()); |
| 677 EXPECT_EQ(string_schema.type(), base::Value::Type::TYPE_STRING); | 677 EXPECT_EQ(string_schema.type(), base::Value::Type::STRING); |
| 678 | 678 |
| 679 // And check one, random "boolean" policy to see if the type propagated | 679 // And check one, random "boolean" policy to see if the type propagated |
| 680 // correctly from policy_templates.json file. | 680 // correctly from policy_templates.json file. |
| 681 const policy::Schema boolean_schema = | 681 const policy::Schema boolean_schema = |
| 682 schema->GetKnownProperty("RemoteAccessHostRequireCurtain"); | 682 schema->GetKnownProperty("RemoteAccessHostRequireCurtain"); |
| 683 EXPECT_TRUE(boolean_schema.valid()); | 683 EXPECT_TRUE(boolean_schema.valid()); |
| 684 EXPECT_EQ(boolean_schema.type(), base::Value::Type::TYPE_BOOLEAN); | 684 EXPECT_EQ(boolean_schema.type(), base::Value::Type::BOOLEAN); |
| 685 } | 685 } |
| 686 | 686 |
| 687 } // namespace remoting | 687 } // namespace remoting |
| OLD | NEW |