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

Side by Side Diff: chrome/installer/mac/app/testing/OmahaXMLRequest_test.mm

Issue 2137743002: Added test files for SystemInfo.m and OmahaXMLRequest.m. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added some copyright content to please the trybot lords Created 4 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
« no previous file with comments | « chrome/installer/mac/app/BUILD.gn ('k') | chrome/installer/mac/app/testing/SystemInfo_test.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #import "chrome/installer/mac/app/OmahaXMLRequest.h"
6
7 #include "base/mac/scoped_nsobject.h"
8 #include "base/macros.h"
9 #include "testing/gtest/include/gtest/gtest.h"
10
11 namespace {
12
13 TEST(OmahaXMLRequestTest, CreateReturnsValidXML) {
14 base::scoped_nsobject<NSXMLDocument> xml_body_(
15 [OmahaXMLRequest createXMLRequestBody]);
16 ASSERT_TRUE(xml_body_);
17
18 NSString* requestDTDLocation = [[[[NSBundle mainBundle] bundlePath]
19 stringByAppendingPathComponent:
20 @"../../chrome/installer/mac/app/testing/requestCheck.dtd"]
21 stringByResolvingSymlinksInPath];
22 NSData* requestDTDData = [NSData dataWithContentsOfFile:requestDTDLocation];
23 ASSERT_TRUE(requestDTDData);
24
25 NSError* error;
26 NSXMLDTD* requestXMLChecker =
27 [[NSXMLDTD alloc] initWithData:requestDTDData options:0 error:&error];
28 [requestXMLChecker setName:@"request"];
29 [xml_body_ setDTD:requestXMLChecker];
30 EXPECT_TRUE([xml_body_ validateAndReturnError:&error]);
31 }
32
33 } // namespace
OLDNEW
« no previous file with comments | « chrome/installer/mac/app/BUILD.gn ('k') | chrome/installer/mac/app/testing/SystemInfo_test.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698