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

Side by Side Diff: extensions/renderer/script_context_set_unittest.cc

Issue 2090063002: Remove calls to deprecated MessageLoop methods in extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months 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 | « extensions/renderer/gc_callback_unittest.cc ('k') | 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 <vector> 5 #include <vector>
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/run_loop.h"
8 #include "extensions/common/extension.h" 9 #include "extensions/common/extension.h"
9 #include "extensions/common/extension_set.h" 10 #include "extensions/common/extension_set.h"
10 #include "extensions/common/features/feature.h" 11 #include "extensions/common/features/feature.h"
11 #include "extensions/renderer/scoped_web_frame.h" 12 #include "extensions/renderer/scoped_web_frame.h"
12 #include "extensions/renderer/script_context.h" 13 #include "extensions/renderer/script_context.h"
13 #include "extensions/renderer/script_context_set.h" 14 #include "extensions/renderer/script_context_set.h"
14 #include "gin/public/context_holder.h" 15 #include "gin/public/context_holder.h"
15 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
16 #include "third_party/WebKit/public/web/WebFrame.h" 17 #include "third_party/WebKit/public/web/WebFrame.h"
17 #include "v8/include/v8.h" 18 #include "v8/include/v8.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 50
50 // Test context is correctly removed. 51 // Test context is correctly removed.
51 context_set.Remove(context); 52 context_set.Remove(context);
52 EXPECT_EQ(0u, context_set.size()); 53 EXPECT_EQ(0u, context_set.size());
53 EXPECT_EQ(nullptr, context_set.GetByV8Context(v8_context)); 54 EXPECT_EQ(nullptr, context_set.GetByV8Context(v8_context));
54 55
55 // After removal, the context should be marked for destruction. 56 // After removal, the context should be marked for destruction.
56 EXPECT_FALSE(context->is_valid()); 57 EXPECT_FALSE(context->is_valid());
57 58
58 // Run loop to do the actual deletion. 59 // Run loop to do the actual deletion.
59 loop.RunUntilIdle(); 60 base::RunLoop().RunUntilIdle();
60 } 61 }
61 62
62 } // namespace extensions 63 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/renderer/gc_callback_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698