Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/debug/trace_event.h" | 5 #include "base/debug/trace_event.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
| 10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 94 | 94 |
| 95 static bool CompareJsonValues(const std::string& lhs, | 95 static bool CompareJsonValues(const std::string& lhs, |
| 96 const std::string& rhs, | 96 const std::string& rhs, |
| 97 CompareOp op) { | 97 CompareOp op) { |
| 98 switch (op) { | 98 switch (op) { |
| 99 case IS_EQUAL: | 99 case IS_EQUAL: |
| 100 return lhs == rhs; | 100 return lhs == rhs; |
| 101 case IS_NOT_EQUAL: | 101 case IS_NOT_EQUAL: |
| 102 return lhs != rhs; | 102 return lhs != rhs; |
| 103 default: | 103 default: |
| 104 CHECK(0); | 104 NOTREACHED(); |
|
jar (doing other things)
2011/10/23 00:36:28
This is a unit test... so CHECK vs DCHECK is not c
| |
| 105 } | 105 } |
| 106 return false; | 106 return false; |
| 107 } | 107 } |
| 108 | 108 |
| 109 static bool IsKeyValueInDict(const JsonKeyValue* key_value, | 109 static bool IsKeyValueInDict(const JsonKeyValue* key_value, |
| 110 DictionaryValue* dict) { | 110 DictionaryValue* dict) { |
| 111 Value* value = NULL; | 111 Value* value = NULL; |
| 112 std::string value_str; | 112 std::string value_str; |
| 113 if (dict->Get(key_value->key, &value) && | 113 if (dict->Get(key_value->key, &value) && |
| 114 value->GetAsString(&value_str) && | 114 value->GetAsString(&value_str) && |
| (...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 920 | 920 |
| 921 std::string s; | 921 std::string s; |
| 922 EXPECT_TRUE(entry3->GetString("args.arg1", &s)); | 922 EXPECT_TRUE(entry3->GetString("args.arg1", &s)); |
| 923 EXPECT_EQ("val1", s); | 923 EXPECT_EQ("val1", s); |
| 924 EXPECT_TRUE(entry3->GetString("args.arg2", &s)); | 924 EXPECT_TRUE(entry3->GetString("args.arg2", &s)); |
| 925 EXPECT_EQ("val2", s); | 925 EXPECT_EQ("val2", s); |
| 926 } | 926 } |
| 927 | 927 |
| 928 } // namespace debug | 928 } // namespace debug |
| 929 } // namespace base | 929 } // namespace base |
| OLD | NEW |