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

Side by Side Diff: base/platform_file_unittest.cc

Issue 7205001: Mark TouchGetInfoPlatformFile as Flaky on Mac OS X. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/file_util.h" 5 #include "base/file_util.h"
6 #include "base/platform_file.h" 6 #include "base/platform_file.h"
7 #include "base/scoped_temp_dir.h" 7 #include "base/scoped_temp_dir.h"
8 #include "base/time.h" 8 #include "base/time.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 // Make sure the file was truncated. 242 // Make sure the file was truncated.
243 bytes_read = ReadFully(file, 0, data_read, kTestDataSize); 243 bytes_read = ReadFully(file, 0, data_read, kTestDataSize);
244 EXPECT_EQ(file_size, bytes_read); 244 EXPECT_EQ(file_size, bytes_read);
245 for (int i = 0; i < file_size; i++) 245 for (int i = 0; i < file_size; i++)
246 EXPECT_EQ(data_to_write[i], data_read[i]); 246 EXPECT_EQ(data_to_write[i], data_read[i]);
247 247
248 // Close the file handle to allow the temp directory to be deleted. 248 // Close the file handle to allow the temp directory to be deleted.
249 base::ClosePlatformFile(file); 249 base::ClosePlatformFile(file);
250 } 250 }
251 251
252 #if defined(OS_MACOSX)
253 // Flakily fails: http://crbug.com/86494
254 #define MAYBE_TouchGetInfoPlatformFile \
255 FLAKY_TouchGetInfoPlatformFile
joth 2011/06/17 14:08:27 this will go on one line
Leandro Gracia Gil 2011/06/17 14:12:44 Done.
256 #endif
joth 2011/06/17 14:08:27 and a default else clause mapping MAYBE_TouchGetIn
Leandro Gracia Gil 2011/06/17 14:12:44 Done.
252 TEST(PlatformFile, TouchGetInfoPlatformFile) { 257 TEST(PlatformFile, TouchGetInfoPlatformFile) {
joth 2011/06/17 14:08:27 rename the test to MAYBE_TouchGetInfoPlatformFile
Leandro Gracia Gil 2011/06/17 14:12:44 Done.
253 ScopedTempDir temp_dir; 258 ScopedTempDir temp_dir;
254 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); 259 ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
255 base::PlatformFile file = base::CreatePlatformFile( 260 base::PlatformFile file = base::CreatePlatformFile(
256 temp_dir.path().AppendASCII("touch_get_info_file"), 261 temp_dir.path().AppendASCII("touch_get_info_file"),
257 base::PLATFORM_FILE_CREATE | 262 base::PLATFORM_FILE_CREATE |
258 base::PLATFORM_FILE_WRITE | 263 base::PLATFORM_FILE_WRITE |
259 base::PLATFORM_FILE_WRITE_ATTRIBUTES, 264 base::PLATFORM_FILE_WRITE_ATTRIBUTES,
260 NULL, NULL); 265 NULL, NULL);
261 EXPECT_NE(base::kInvalidPlatformFileValue, file); 266 EXPECT_NE(base::kInvalidPlatformFileValue, file);
262 267
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 EXPECT_EQ(info.last_modified.ToInternalValue(), 316 EXPECT_EQ(info.last_modified.ToInternalValue(),
312 new_last_modified.ToInternalValue()); 317 new_last_modified.ToInternalValue());
313 #endif 318 #endif
314 319
315 EXPECT_EQ(info.creation_time.ToInternalValue(), 320 EXPECT_EQ(info.creation_time.ToInternalValue(),
316 creation_time.ToInternalValue()); 321 creation_time.ToInternalValue());
317 322
318 // Close the file handle to allow the temp directory to be deleted. 323 // Close the file handle to allow the temp directory to be deleted.
319 base::ClosePlatformFile(file); 324 base::ClosePlatformFile(file);
320 } 325 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698