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

Side by Side Diff: chrome/common/important_file_writer_unittest.cc

Issue 9406017: Flakiness cleanup: disable flaky tests under chrome/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/common/important_file_writer.h" 5 #include "chrome/common/important_file_writer.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 FROM_HERE, 97 FROM_HERE,
98 MessageLoop::QuitClosure(), 98 MessageLoop::QuitClosure(),
99 base::TimeDelta::FromMilliseconds(100)); 99 base::TimeDelta::FromMilliseconds(100));
100 MessageLoop::current()->Run(); 100 MessageLoop::current()->Run();
101 EXPECT_FALSE(writer.HasPendingWrite()); 101 EXPECT_FALSE(writer.HasPendingWrite());
102 ASSERT_TRUE(file_util::PathExists(writer.path())); 102 ASSERT_TRUE(file_util::PathExists(writer.path()));
103 EXPECT_EQ("foo", GetFileContent(writer.path())); 103 EXPECT_EQ("foo", GetFileContent(writer.path()));
104 } 104 }
105 105
106 // Flaky - http://crbug.com/109292 106 // Flaky - http://crbug.com/109292
107 TEST_F(ImportantFileWriterTest, FLAKY_BatchingWrites) { 107 TEST_F(ImportantFileWriterTest, DISABLED_BatchingWrites) {
108 ImportantFileWriter writer(file_, 108 ImportantFileWriter writer(file_,
109 base::MessageLoopProxy::current()); 109 base::MessageLoopProxy::current());
110 writer.set_commit_interval(base::TimeDelta::FromMilliseconds(25)); 110 writer.set_commit_interval(base::TimeDelta::FromMilliseconds(25));
111 DataSerializer foo("foo"), bar("bar"), baz("baz"); 111 DataSerializer foo("foo"), bar("bar"), baz("baz");
112 writer.ScheduleWrite(&foo); 112 writer.ScheduleWrite(&foo);
113 writer.ScheduleWrite(&bar); 113 writer.ScheduleWrite(&bar);
114 writer.ScheduleWrite(&baz); 114 writer.ScheduleWrite(&baz);
115 MessageLoop::current()->PostDelayedTask( 115 MessageLoop::current()->PostDelayedTask(
116 FROM_HERE, 116 FROM_HERE,
117 MessageLoop::QuitClosure(), 117 MessageLoop::QuitClosure(),
118 base::TimeDelta::FromMilliseconds(100)); 118 base::TimeDelta::FromMilliseconds(100));
119 MessageLoop::current()->Run(); 119 MessageLoop::current()->Run();
120 ASSERT_TRUE(file_util::PathExists(writer.path())); 120 ASSERT_TRUE(file_util::PathExists(writer.path()));
121 EXPECT_EQ("baz", GetFileContent(writer.path())); 121 EXPECT_EQ("baz", GetFileContent(writer.path()));
122 } 122 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698