Chromium Code Reviews| Index: blimp/client/core/contents/blimp_contents_manager_unittest.cc |
| diff --git a/blimp/client/core/contents/blimp_contents_manager_unittest.cc b/blimp/client/core/contents/blimp_contents_manager_unittest.cc |
| index 0a8f1f805f3c0cf10149b066d70bc96af583b290..f035b1a15d61dae551c590077eb01c8519ed3fa6 100644 |
| --- a/blimp/client/core/contents/blimp_contents_manager_unittest.cc |
| +++ b/blimp/client/core/contents/blimp_contents_manager_unittest.cc |
| @@ -82,6 +82,27 @@ TEST(BlimpContentsManagerUnittest, GetDestroyedBlimpContents) { |
| EXPECT_EQ(nullptr, blimp_contents_manager.GetBlimpContents(id)); |
| } |
| +TEST(BlimpContentsManagerUnittest, CreateTwoBlimpContentsDestroyAndCreate) { |
|
David Trainor- moved to gerrit
2016/08/30 23:31:12
Add a TODO and a bug to remove this test and the r
Menglin
2016/08/31 00:13:02
Done.
|
| + base::MessageLoop loop; |
| + MockTabControlFeature tab_control_feature; |
| + BlimpContentsManager blimp_contents_manager(nullptr, nullptr, |
| + &tab_control_feature); |
| + |
| + EXPECT_CALL(tab_control_feature, CreateTab(_)).Times(2); |
| + std::unique_ptr<BlimpContentsImpl> blimp_contents = |
| + blimp_contents_manager.CreateBlimpContents(); |
| + DCHECK(blimp_contents); |
|
David Trainor- moved to gerrit
2016/08/30 23:31:12
EXPECT_NE()? Same below.
Menglin
2016/08/31 00:13:02
Done.
|
| + |
| + std::unique_ptr<BlimpContentsImpl> second_blimp_contents = |
| + blimp_contents_manager.CreateBlimpContents(); |
| + EXPECT_EQ(second_blimp_contents, nullptr); |
| + |
| + blimp_contents.reset(); |
| + std::unique_ptr<BlimpContentsImpl> third_blimp_contents = |
| + blimp_contents_manager.CreateBlimpContents(); |
| + DCHECK(third_blimp_contents); |
| +} |
| + |
| } // namespace |
| } // namespace client |
| } // namespace blimp |