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

Side by Side Diff: snapshot/win/system_snapshot_win_test.cc

Issue 1357833002: win: Get Crashpad compiling under VS2015 (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: include Created 5 years, 3 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 | « minidump/minidump_file_writer_test.cc ('k') | test/win/win_child_process.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Crashpad Authors. All rights reserved. 1 // Copyright 2015 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 std::string daylight_name; 116 std::string daylight_name;
117 117
118 system_snapshot().TimeZone(&dst_status, 118 system_snapshot().TimeZone(&dst_status,
119 &standard_offset_seconds, 119 &standard_offset_seconds,
120 &daylight_offset_seconds, 120 &daylight_offset_seconds,
121 &standard_name, 121 &standard_name,
122 &daylight_name); 122 &daylight_name);
123 123
124 // |standard_offset_seconds| gives seconds east of UTC, and |timezone| gives 124 // |standard_offset_seconds| gives seconds east of UTC, and |timezone| gives
125 // seconds west of UTC. 125 // seconds west of UTC.
126 #if _MSC_VER >= 1900
127 long timezone = 0;
128 _get_timezone(&timezone);
129 #endif
126 EXPECT_EQ(-timezone, standard_offset_seconds); 130 EXPECT_EQ(-timezone, standard_offset_seconds);
127 131
128 // In contemporary usage, most time zones have an integer hour offset from 132 // In contemporary usage, most time zones have an integer hour offset from
129 // UTC, although several are at a half-hour offset, and two are at 15-minute 133 // UTC, although several are at a half-hour offset, and two are at 15-minute
130 // offsets. Throughout history, other variations existed. See 134 // offsets. Throughout history, other variations existed. See
131 // http://www.timeanddate.com/time/time-zones-interesting.html. 135 // http://www.timeanddate.com/time/time-zones-interesting.html.
132 EXPECT_EQ(0, standard_offset_seconds % (15 * 60)) 136 EXPECT_EQ(0, standard_offset_seconds % (15 * 60))
133 << "standard_offset_seconds " << standard_offset_seconds; 137 << "standard_offset_seconds " << standard_offset_seconds;
134 138
135 if (dst_status == SystemSnapshot::kDoesNotObserveDaylightSavingTime) { 139 if (dst_status == SystemSnapshot::kDoesNotObserveDaylightSavingTime) {
(...skipping 12 matching lines...) Expand all
148 FAIL() << "dst_delta_seconds " << dst_delta_seconds; 152 FAIL() << "dst_delta_seconds " << dst_delta_seconds;
149 } 153 }
150 154
151 EXPECT_NE(standard_name, daylight_name); 155 EXPECT_NE(standard_name, daylight_name);
152 } 156 }
153 } 157 }
154 158
155 } // namespace 159 } // namespace
156 } // namespace test 160 } // namespace test
157 } // namespace crashpad 161 } // namespace crashpad
OLDNEW
« no previous file with comments | « minidump/minidump_file_writer_test.cc ('k') | test/win/win_child_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698