OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/message_loop.h" | 5 #include "base/message_loop.h" |
6 #include "chrome/common/extensions/extension.h" | 6 #include "chrome/common/extensions/extension.h" |
7 #include "chrome/common/extensions/features/feature.h" | 7 #include "chrome/common/extensions/features/feature.h" |
8 #include "chrome/renderer/extensions/chrome_v8_context.h" | 8 #include "chrome/renderer/extensions/chrome_v8_context.h" |
9 #include "chrome/renderer/extensions/chrome_v8_context_set.h" | 9 #include "chrome/renderer/extensions/chrome_v8_context_set.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 context_set.Remove(context); | 46 context_set.Remove(context); |
47 EXPECT_EQ(0, context_set.size()); | 47 EXPECT_EQ(0, context_set.size()); |
48 EXPECT_FALSE(context_set.GetByV8Context(context->v8_context())); | 48 EXPECT_FALSE(context_set.GetByV8Context(context->v8_context())); |
49 EXPECT_EQ(1u, set_copy.size()); | 49 EXPECT_EQ(1u, set_copy.size()); |
50 | 50 |
51 // After removal, the context should be marked for destruction. | 51 // After removal, the context should be marked for destruction. |
52 EXPECT_FALSE(context->web_frame()); | 52 EXPECT_FALSE(context->web_frame()); |
53 | 53 |
54 // Run loop to do the actual deletion. | 54 // Run loop to do the actual deletion. |
55 loop.RunAllPending(); | 55 loop.RunUntilIdle(); |
56 } | 56 } |
57 | 57 |
58 } // namespace extensions | 58 } // namespace extensions |
OLD | NEW |