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

Side by Side Diff: remoting/host/policy_watcher_unittest.cc

Issue 2539363004: Make base::Value::TYPE a scoped enum. (Closed)
Patch Set: Rebase Created 4 years 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 unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « remoting/host/pairing_registry_delegate_win.cc ('k') | remoting/host/setup/me2me_native_messaging_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698