Commit cc4f6eab authored by Wez's avatar Wez Committed by Commit Bot

Fix HashSetTest.HashSetRefPtr test not to be flaky.

The test assumes specific values of DummyRefCounted::ref_invokes_count_
without re-setting it to zero at the start of the test.

TBR: haraken
Change-Id: I265fad41cbfa5b8692a7f620d4fa253736d32c74
Reviewed-on: https://chromium-review.googlesource.com/1188701Reviewed-by: default avatarWez <wez@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#586151}
parent a4ba7295
...@@ -197,6 +197,8 @@ TEST(HashSetTest, HashSetOwnPtr) { ...@@ -197,6 +197,8 @@ TEST(HashSetTest, HashSetOwnPtr) {
TEST(HashSetTest, HashSetRefPtr) { TEST(HashSetTest, HashSetRefPtr) {
bool is_deleted = false; bool is_deleted = false;
DummyRefCounted::ref_invokes_count_ = 0;
scoped_refptr<DummyRefCounted> ptr = scoped_refptr<DummyRefCounted> ptr =
base::AdoptRef(new DummyRefCounted(is_deleted)); base::AdoptRef(new DummyRefCounted(is_deleted));
EXPECT_EQ(0, DummyRefCounted::ref_invokes_count_); EXPECT_EQ(0, DummyRefCounted::ref_invokes_count_);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment