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

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

Issue 8682001: Disable DeviceOrientationproviderTest.ObserverNotRemoved on Linux (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 // Flaky. See crbug.com/104950. 251 #if defined(OS_LINUX)
252 // Flakily DCHECKs on Linux. See crbug.com/104950.
253 #define MAYBE_ObserverNotRemoved DISABLED_ObserverNotRemoved
254 #else
255 #define MAYBE_ObserverNotRemoved ObserverNotRemoved
256 #endif
252 TEST_F(DeviceOrientationProviderTest, FLAKY_ObserverNotRemoved) { 257 TEST_F(DeviceOrientationProviderTest, FLAKY_ObserverNotRemoved) {
yosin_UTC9 2011/11/23 07:21:17 s/FLAKY_/MAYBE_/
253 scoped_refptr<MockOrientationFactory> orientation_factory( 258 scoped_refptr<MockOrientationFactory> orientation_factory(
254 new MockOrientationFactory()); 259 new MockOrientationFactory());
255 Init(MockOrientationFactory::CreateDataFetcher); 260 Init(MockOrientationFactory::CreateDataFetcher);
256 const Orientation kTestOrientation(true, 1, true, 2, true, 3); 261 const Orientation kTestOrientation(true, 1, true, 2, true, 3);
257 const Orientation kTestOrientation2(true, 4, true, 5, true, 6); 262 const Orientation kTestOrientation2(true, 4, true, 5, true, 6);
258 263
259 scoped_ptr<UpdateChecker> checker(new UpdateChecker(&pending_expectations_)); 264 scoped_ptr<UpdateChecker> checker(new UpdateChecker(&pending_expectations_));
260 checker->AddExpectation(kTestOrientation); 265 checker->AddExpectation(kTestOrientation);
261 orientation_factory->SetOrientation(kTestOrientation); 266 orientation_factory->SetOrientation(kTestOrientation);
262 provider_->AddObserver(checker.get()); 267 provider_->AddObserver(checker.get());
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 checker_b->AddExpectation(third_orientation); 372 checker_b->AddExpectation(third_orientation);
368 MessageLoop::current()->Run(); 373 MessageLoop::current()->Run();
369 374
370 provider_->RemoveObserver(checker_a.get()); 375 provider_->RemoveObserver(checker_a.get());
371 provider_->RemoveObserver(checker_b.get()); 376 provider_->RemoveObserver(checker_b.get());
372 } 377 }
373 378
374 } // namespace 379 } // namespace
375 380
376 } // namespace device_orientation 381 } // 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