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/memory/scoped_vector.h" | |
6 #include "components/update_client/update_response.h" | 5 #include "components/update_client/update_response.h" |
7 #include "testing/gtest/include/gtest/gtest.h" | 6 #include "testing/gtest/include/gtest/gtest.h" |
8 | 7 |
9 namespace update_client { | 8 namespace update_client { |
10 | 9 |
11 const char* kValidXml = | 10 const char* kValidXml = |
12 "<?xml version='1.0' encoding='UTF-8'?>" | 11 "<?xml version='1.0' encoding='UTF-8'?>" |
13 "<response protocol='3.0'>" | 12 "<response protocol='3.0'>" |
14 " <app appid='12345'>" | 13 " <app appid='12345'>" |
15 " <updatecheck status='ok'>" | 14 " <updatecheck status='ok'>" |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 | 306 |
308 // Parse xml with one error and one success <app> tag. | 307 // Parse xml with one error and one success <app> tag. |
309 EXPECT_TRUE(parser.Parse(kTwoAppsOneError)); | 308 EXPECT_TRUE(parser.Parse(kTwoAppsOneError)); |
310 EXPECT_FALSE(parser.errors().empty()); | 309 EXPECT_FALSE(parser.errors().empty()); |
311 EXPECT_EQ(1u, parser.results().list.size()); | 310 EXPECT_EQ(1u, parser.results().list.size()); |
312 firstResult = &parser.results().list[0]; | 311 firstResult = &parser.results().list[0]; |
313 EXPECT_EQ(firstResult->extension_id, "bbbbbbbb"); | 312 EXPECT_EQ(firstResult->extension_id, "bbbbbbbb"); |
314 } | 313 } |
315 | 314 |
316 } // namespace update_client | 315 } // namespace update_client |
OLD | NEW |