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

Side by Side Diff: chrome/common/extensions/update_manifest_unittest.cc

Issue 454873005: Move UpdateManifest to //extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months 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 | Annotate | Revision Log
OLDNEW
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/memory/scoped_vector.h" 5 #include "base/memory/scoped_vector.h"
6 #include "chrome/common/extensions/update_manifest.h" 6 #include "extensions/common/update_manifest.h"
7 #include "libxml/globals.h"
7 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
8 #include "libxml/globals.h"
9 9
10 static const char* kValidXml = 10 static const char* kValidXml =
11 "<?xml version='1.0' encoding='UTF-8'?>" 11 "<?xml version='1.0' encoding='UTF-8'?>"
12 "<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>" 12 "<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>"
13 " <app appid='12345'>" 13 " <app appid='12345'>"
14 " <updatecheck codebase='http://example.com/extension_1.2.3.4.crx'" 14 " <updatecheck codebase='http://example.com/extension_1.2.3.4.crx'"
15 " version='1.2.3.4' prodversionmin='2.0.143.0' />" 15 " version='1.2.3.4' prodversionmin='2.0.143.0' />"
16 " </app>" 16 " </app>"
17 "</gupdate>"; 17 "</gupdate>";
18 18
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 EXPECT_EQ(firstResult->extension_id, "12345"); 178 EXPECT_EQ(firstResult->extension_id, "12345");
179 EXPECT_EQ(firstResult->version, ""); 179 EXPECT_EQ(firstResult->version, "");
180 180
181 // Parse xml with one error and one success <app> tag. 181 // Parse xml with one error and one success <app> tag.
182 EXPECT_TRUE(parser.Parse(kTwoAppsOneError)); 182 EXPECT_TRUE(parser.Parse(kTwoAppsOneError));
183 EXPECT_FALSE(parser.errors().empty()); 183 EXPECT_FALSE(parser.errors().empty());
184 EXPECT_EQ(1u, parser.results().list.size()); 184 EXPECT_EQ(1u, parser.results().list.size());
185 firstResult = &parser.results().list.at(0); 185 firstResult = &parser.results().list.at(0);
186 EXPECT_EQ(firstResult->extension_id, "bbbbbbbb"); 186 EXPECT_EQ(firstResult->extension_id, "bbbbbbbb");
187 } 187 }
OLDNEW
« no previous file with comments | « chrome/common/extensions/update_manifest.cc ('k') | chrome/utility/extensions/extensions_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698