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

Side by Side Diff: mojo/edk/system/shared_buffer_dispatcher_unittest.cc

Issue 2524883003: ABANDONED CL: Disable flaky SharedBufferDispatcherTest.CreateAndMapBuffer on Android. (Closed)
Patch Set: Created 4 years 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
« 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "mojo/edk/system/shared_buffer_dispatcher.h" 5 #include "mojo/edk/system/shared_buffer_dispatcher.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <limits> 10 #include <limits>
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 kSizeOfCreateOptions, // |struct_size|. 103 kSizeOfCreateOptions, // |struct_size|.
104 ~0u // |flags|. 104 ~0u // |flags|.
105 }; 105 };
106 MojoCreateSharedBufferOptions unused; 106 MojoCreateSharedBufferOptions unused;
107 EXPECT_EQ(MOJO_RESULT_UNIMPLEMENTED, 107 EXPECT_EQ(MOJO_RESULT_UNIMPLEMENTED,
108 SharedBufferDispatcher::ValidateCreateOptions( 108 SharedBufferDispatcher::ValidateCreateOptions(
109 &options, &unused)); 109 &options, &unused));
110 } 110 }
111 } 111 }
112 112
113 TEST_F(SharedBufferDispatcherTest, CreateAndMapBuffer) { 113 // https://crbug.com/667848: The test below is flaky on some Android bots.
114 #if defined(OS_ANDROID)
115 #define MAYBE_CreateAndMapBuffer DISABLED_CreateAndMapBuffer
116 #else
117 #define MAYBE_CreateAndMapBuffer CreateAndMapBuffer
118 #endif
119 TEST_F(SharedBufferDispatcherTest, MAYBE_CreateAndMapBuffer) {
114 scoped_refptr<SharedBufferDispatcher> dispatcher; 120 scoped_refptr<SharedBufferDispatcher> dispatcher;
115 EXPECT_EQ(MOJO_RESULT_OK, SharedBufferDispatcher::Create( 121 EXPECT_EQ(MOJO_RESULT_OK, SharedBufferDispatcher::Create(
116 SharedBufferDispatcher::kDefaultCreateOptions, 122 SharedBufferDispatcher::kDefaultCreateOptions,
117 nullptr, 100, &dispatcher)); 123 nullptr, 100, &dispatcher));
118 ASSERT_TRUE(dispatcher); 124 ASSERT_TRUE(dispatcher);
119 EXPECT_EQ(Dispatcher::Type::SHARED_BUFFER, dispatcher->GetType()); 125 EXPECT_EQ(Dispatcher::Type::SHARED_BUFFER, dispatcher->GetType());
120 126
121 // Make a couple of mappings. 127 // Make a couple of mappings.
122 std::unique_ptr<PlatformSharedBufferMapping> mapping1; 128 std::unique_ptr<PlatformSharedBufferMapping> mapping1;
123 EXPECT_EQ(MOJO_RESULT_OK, dispatcher->MapBuffer( 129 EXPECT_EQ(MOJO_RESULT_OK, dispatcher->MapBuffer(
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 EXPECT_EQ(MOJO_RESULT_INVALID_ARGUMENT, 309 EXPECT_EQ(MOJO_RESULT_INVALID_ARGUMENT,
304 dispatcher->MapBuffer(0, 0, MOJO_MAP_BUFFER_FLAG_NONE, &mapping)); 310 dispatcher->MapBuffer(0, 0, MOJO_MAP_BUFFER_FLAG_NONE, &mapping));
305 EXPECT_FALSE(mapping); 311 EXPECT_FALSE(mapping);
306 312
307 EXPECT_EQ(MOJO_RESULT_OK, dispatcher->Close()); 313 EXPECT_EQ(MOJO_RESULT_OK, dispatcher->Close());
308 } 314 }
309 315
310 } // namespace 316 } // namespace
311 } // namespace edk 317 } // namespace edk
312 } // namespace mojo 318 } // namespace mojo
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