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

Side by Side Diff: chrome/browser/autofill/autofill_xml_parser_unittest.cc

Issue 2255007: New libjingle integrated to chrome. (Closed)
Patch Set: - Created 10 years, 6 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "chrome/browser/autofill/autofill_xml_parser.h" 8 #include "chrome/browser/autofill/autofill_xml_parser.h"
9 #include "chrome/browser/autofill/field_types.h" 9 #include "chrome/browser/autofill/field_types.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 #include "third_party/libjingle/files/talk/xmllite/xmlparser.h" 11 #include "third_party/libjingle/source/talk/xmllite/xmlparser.h"
12 12
13 namespace { 13 namespace {
14 14
15 TEST(AutoFillQueryXmlParserTest, BasicQuery) { 15 TEST(AutoFillQueryXmlParserTest, BasicQuery) {
16 // An XML string representing a basic query response. 16 // An XML string representing a basic query response.
17 std::string xml = "<autofillqueryresponse>" 17 std::string xml = "<autofillqueryresponse>"
18 "<field autofilltype=\"0\" />" 18 "<field autofilltype=\"0\" />"
19 "<field autofilltype=\"1\" />" 19 "<field autofilltype=\"1\" />"
20 "<field autofilltype=\"3\" />" 20 "<field autofilltype=\"3\" />"
21 "<field autofilltype=\"2\" />" 21 "<field autofilltype=\"2\" />"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 xml = ""; 184 xml = "";
185 parse_handler.reset(new AutoFillUploadXmlParser(&positive, &negative)); 185 parse_handler.reset(new AutoFillUploadXmlParser(&positive, &negative));
186 parser.reset(new buzz::XmlParser(parse_handler.get())); 186 parser.reset(new buzz::XmlParser(parse_handler.get()));
187 parser->Parse(xml.c_str(), xml.length(), true); 187 parser->Parse(xml.c_str(), xml.length(), true);
188 EXPECT_TRUE(!parse_handler->succeeded()); 188 EXPECT_TRUE(!parse_handler->succeeded());
189 EXPECT_DOUBLE_EQ(0, positive); 189 EXPECT_DOUBLE_EQ(0, positive);
190 EXPECT_DOUBLE_EQ(0, negative); 190 EXPECT_DOUBLE_EQ(0, negative);
191 } 191 }
192 192
193 } // namespace 193 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/autofill/autofill_xml_parser.cc ('k') | chrome/browser/autofill/form_structure.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698