OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/pickle.h" | 5 #include "base/pickle.h" |
6 #include "base/values.h" | 6 #include "base/values.h" |
7 #include "extensions/common/extension_messages.h" | 7 #include "extensions/common/extension_messages.h" |
8 #include "extensions/common/permissions/api_permission_set.h" | 8 #include "extensions/common/permissions/api_permission_set.h" |
9 #include "extensions/common/permissions/permissions_info.h" | 9 #include "extensions/common/permissions/permissions_info.h" |
10 #include "ipc/ipc_message.h" | 10 #include "ipc/ipc_message.h" |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 value->Append(new base::StringValue("udp-bind::8080")); | 273 value->Append(new base::StringValue("udp-bind::8080")); |
274 value->Append(new base::StringValue("udp-send-to::8888")); | 274 value->Append(new base::StringValue("udp-send-to::8888")); |
275 ASSERT_TRUE(permission->FromValue(value.get(), NULL, NULL)); | 275 ASSERT_TRUE(permission->FromValue(value.get(), NULL, NULL)); |
276 } | 276 } |
277 apis.insert(permission); | 277 apis.insert(permission); |
278 | 278 |
279 EXPECT_NE(apis, expected_apis); | 279 EXPECT_NE(apis, expected_apis); |
280 | 280 |
281 IPC::Message m; | 281 IPC::Message m; |
282 WriteParam(&m, apis); | 282 WriteParam(&m, apis); |
283 PickleIterator iter(m); | 283 base::PickleIterator iter(m); |
284 CHECK(ReadParam(&m, &iter, &expected_apis)); | 284 CHECK(ReadParam(&m, &iter, &expected_apis)); |
285 EXPECT_EQ(apis, expected_apis); | 285 EXPECT_EQ(apis, expected_apis); |
286 } | 286 } |
287 | 287 |
288 } // namespace extensions | 288 } // namespace extensions |
OLD | NEW |