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

Side by Side Diff: chrome/installer/util/move_tree_work_item_unittest.cc

Issue 11189036: Marked flaky test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 <windows.h> 5 #include <windows.h>
6 6
7 #include <fstream> 7 #include <fstream>
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 work_item->Rollback(); 379 work_item->Rollback();
380 380
381 EXPECT_TRUE(file_util::PathExists(from_dir)); 381 EXPECT_TRUE(file_util::PathExists(from_dir));
382 EXPECT_TRUE(file_util::ContentsEqual(exe_full_path, from_file)); 382 EXPECT_TRUE(file_util::ContentsEqual(exe_full_path, from_file));
383 EXPECT_TRUE(file_util::PathExists(to_dir)); 383 EXPECT_TRUE(file_util::PathExists(to_dir));
384 EXPECT_EQ(0, ReadTextFile(to_file).compare(kTextContent1)); 384 EXPECT_EQ(0, ReadTextFile(to_file).compare(kTextContent1));
385 } 385 }
386 386
387 // Move one directory from source to destination when destination already 387 // Move one directory from source to destination when destination already
388 // exists. 388 // exists.
389 TEST_F(MoveTreeWorkItemTest, MoveDirectoryDestExistsCheckForDuplicatesFull) { 389 TEST_F(MoveTreeWorkItemTest,
390 FLAKY_MoveDirectoryDestExistsCheckForDuplicatesFull) {
390 // Create two level deep source dir 391 // Create two level deep source dir
391 FilePath from_dir1(temp_from_dir_.path()); 392 FilePath from_dir1(temp_from_dir_.path());
392 from_dir1 = from_dir1.AppendASCII("From_Dir1"); 393 from_dir1 = from_dir1.AppendASCII("From_Dir1");
393 file_util::CreateDirectory(from_dir1); 394 file_util::CreateDirectory(from_dir1);
394 ASSERT_TRUE(file_util::PathExists(from_dir1)); 395 ASSERT_TRUE(file_util::PathExists(from_dir1));
395 396
396 FilePath from_dir2(from_dir1); 397 FilePath from_dir2(from_dir1);
397 from_dir2 = from_dir2.AppendASCII("From_Dir2"); 398 from_dir2 = from_dir2.AppendASCII("From_Dir2");
398 file_util::CreateDirectory(from_dir2); 399 file_util::CreateDirectory(from_dir2);
399 ASSERT_TRUE(file_util::PathExists(from_dir2)); 400 ASSERT_TRUE(file_util::PathExists(from_dir2));
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 // the source files. 544 // the source files.
544 EXPECT_TRUE(file_util::PathExists(from_dir1)); 545 EXPECT_TRUE(file_util::PathExists(from_dir1));
545 EXPECT_TRUE(file_util::PathExists(to_dir)); 546 EXPECT_TRUE(file_util::PathExists(to_dir));
546 EXPECT_TRUE(file_util::PathExists(orig_to_file)); 547 EXPECT_TRUE(file_util::PathExists(orig_to_file));
547 EXPECT_EQ(0, ReadTextFile(orig_to_file).compare(kTextContent1)); 548 EXPECT_EQ(0, ReadTextFile(orig_to_file).compare(kTextContent1));
548 EXPECT_EQ(0, ReadTextFile(from_file).compare(kTextContent1)); 549 EXPECT_EQ(0, ReadTextFile(from_file).compare(kTextContent1));
549 550
550 // Also, after rollback the new "to" file should be gone. 551 // Also, after rollback the new "to" file should be gone.
551 EXPECT_FALSE(file_util::PathExists(new_to_file2)); 552 EXPECT_FALSE(file_util::PathExists(new_to_file2));
552 } 553 }
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