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

Unified Diff: content/browser/gamepad/gamepad_provider_unittest.cc

Issue 8678038: increase read contention count value on gamepad provider unittest (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: add crbug and FLAKY_ 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gamepad/gamepad_provider_unittest.cc
diff --git a/content/browser/gamepad/gamepad_provider_unittest.cc b/content/browser/gamepad/gamepad_provider_unittest.cc
index e11099806d6c63709bccc76a8fd421f2ba19a309..00d48c6ad802123fcdea8d41acc5d977bfc11863 100644
--- a/content/browser/gamepad/gamepad_provider_unittest.cc
+++ b/content/browser/gamepad/gamepad_provider_unittest.cc
@@ -63,7 +63,8 @@ TEST_F(GamepadProviderTest, BasicStartStop) {
// Just ensure that there's no asserts on startup, shutdown, or destroy.
}
-TEST_F(GamepadProviderTest, PollingAccess) {
+// http://crbug.com/105348
+TEST_F(GamepadProviderTest, FLAKY_PollingAccess) {
using namespace gamepad;
Provider* provider = CreateProvider();
@@ -101,7 +102,7 @@ TEST_F(GamepadProviderTest, PollingAccess) {
// Here we're attempting to test the read discipline during contention. If
// we fail to read this many times, then the read thread is starving, and we
// should fail the test.
- for (contention_count = 0; contention_count < 10; ++contention_count) {
+ for (contention_count = 0; contention_count < 1000; ++contention_count) {
end = base::subtle::Acquire_Load(&hwbuf->end_marker);
memcpy(&output, &hwbuf->buffer, sizeof(output));
start = base::subtle::Acquire_Load(&hwbuf->start_marker);
@@ -109,7 +110,7 @@ TEST_F(GamepadProviderTest, PollingAccess) {
break;
base::PlatformThread::YieldCurrentThread();
}
- EXPECT_GT(10, contention_count);
+ EXPECT_GT(1000, contention_count);
EXPECT_EQ(1u, output.length);
EXPECT_EQ(1u, output.items[0].buttonsLength);
EXPECT_EQ(1.f, output.items[0].buttons[0]);
« 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