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

Unified Diff: chrome/browser/component_updater/test/update_response_unittest.cc

Issue 101043010: Added support for multiple urls in the component updater. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/component_updater/test/update_response_unittest.cc
diff --git a/chrome/browser/component_updater/test/update_response_unittest.cc b/chrome/browser/component_updater/test/update_response_unittest.cc
index 248c028b23196be1bea78589bc3b70f31630e196..a881d733a8aeba5655e934f2f5fc29c4d1e6fed3 100644
--- a/chrome/browser/component_updater/test/update_response_unittest.cc
+++ b/chrome/browser/component_updater/test/update_response_unittest.cc
@@ -66,6 +66,23 @@ const char* valid_xml_with_invalid_sizes =
" </app>"
"</response>";
+const char* kInvalidValidXmlMissingCodebase =
+"<?xml version='1.0' encoding='UTF-8'?>"
+"<response protocol='3.0'>"
+" <app appid='12345'>"
+" <updatecheck status='ok'>"
+" <urls>"
+" <url codebasediff='http://diff.example.com/'/>"
+" </urls>"
+" <manifest version='1.2.3.4' prodversionmin='2.0.143.0'>"
+" <packages>"
+" <package namediff='extension_1_2_3_4.crx'/>"
+" </packages>"
+" </manifest>"
+" </updatecheck>"
+" </app>"
+"</response>";
+
const char* kMissingAppId =
"<?xml version='1.0'?>"
"<response protocol='3.0'>"
@@ -214,6 +231,10 @@ TEST(ComponentUpdaterUpdateResponseTest, TestParser) {
EXPECT_TRUE(parser.results().list.empty());
EXPECT_FALSE(parser.errors().empty());
+ EXPECT_TRUE(parser.Parse(kInvalidValidXmlMissingCodebase));
+ EXPECT_TRUE(parser.results().list.empty());
+ EXPECT_FALSE(parser.errors().empty());
+
// Parse some valid XML, and check that all params came out as expected
EXPECT_TRUE(parser.Parse(kValidXml));
EXPECT_TRUE(parser.errors().empty());
« no previous file with comments | « chrome/browser/component_updater/test/crx_downloader_unittest.cc ('k') | chrome/browser/component_updater/update_response.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698