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

Side by Side Diff: content/browser/device_orientation/provider_unittest.cc

Issue 8633014: Mark DeviceOrientationProviderTest.ObserverNotRemoved flaky. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 <queue> 5 #include <queue>
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/synchronization/lock.h" 8 #include "base/synchronization/lock.h"
9 #include "base/task.h" 9 #include "base/task.h"
10 #include "content/browser/device_orientation/data_fetcher.h" 10 #include "content/browser/device_orientation/data_fetcher.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 checker_c->AddExpectation(kTestOrientations[1]); 241 checker_c->AddExpectation(kTestOrientations[1]);
242 checker_c->AddExpectation(kTestOrientations[2]); 242 checker_c->AddExpectation(kTestOrientations[2]);
243 orientation_factory->SetOrientation(kTestOrientations[2]); 243 orientation_factory->SetOrientation(kTestOrientations[2]);
244 provider_->AddObserver(checker_c.get()); 244 provider_->AddObserver(checker_c.get());
245 MessageLoop::current()->Run(); 245 MessageLoop::current()->Run();
246 246
247 provider_->RemoveObserver(checker_b.get()); 247 provider_->RemoveObserver(checker_b.get());
248 provider_->RemoveObserver(checker_c.get()); 248 provider_->RemoveObserver(checker_c.get());
249 } 249 }
250 250
251 TEST_F(DeviceOrientationProviderTest, ObserverNotRemoved) { 251 // Flaky. See crbug.com/104950.
252 TEST_F(DeviceOrientationProviderTest, FLAKY_ObserverNotRemoved) {
252 scoped_refptr<MockOrientationFactory> orientation_factory( 253 scoped_refptr<MockOrientationFactory> orientation_factory(
253 new MockOrientationFactory()); 254 new MockOrientationFactory());
254 Init(MockOrientationFactory::CreateDataFetcher); 255 Init(MockOrientationFactory::CreateDataFetcher);
255 const Orientation kTestOrientation(true, 1, true, 2, true, 3); 256 const Orientation kTestOrientation(true, 1, true, 2, true, 3);
256 const Orientation kTestOrientation2(true, 4, true, 5, true, 6); 257 const Orientation kTestOrientation2(true, 4, true, 5, true, 6);
257 258
258 scoped_ptr<UpdateChecker> checker(new UpdateChecker(&pending_expectations_)); 259 scoped_ptr<UpdateChecker> checker(new UpdateChecker(&pending_expectations_));
259 checker->AddExpectation(kTestOrientation); 260 checker->AddExpectation(kTestOrientation);
260 orientation_factory->SetOrientation(kTestOrientation); 261 orientation_factory->SetOrientation(kTestOrientation);
261 provider_->AddObserver(checker.get()); 262 provider_->AddObserver(checker.get());
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 checker_b->AddExpectation(third_orientation); 367 checker_b->AddExpectation(third_orientation);
367 MessageLoop::current()->Run(); 368 MessageLoop::current()->Run();
368 369
369 provider_->RemoveObserver(checker_a.get()); 370 provider_->RemoveObserver(checker_a.get());
370 provider_->RemoveObserver(checker_b.get()); 371 provider_->RemoveObserver(checker_b.get());
371 } 372 }
372 373
373 } // namespace 374 } // namespace
374 375
375 } // namespace device_orientation 376 } // namespace device_orientation
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