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

Unified Diff: extensions/renderer/script_context_set_unittest.cc

Issue 240603003: Remove ChromeV8Extension & most of ChromeV8Context (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: extensions/renderer/script_context_set_unittest.cc
diff --git a/chrome/renderer/extensions/chrome_v8_context_set_unittest.cc b/extensions/renderer/script_context_set_unittest.cc
similarity index 80%
rename from chrome/renderer/extensions/chrome_v8_context_set_unittest.cc
rename to extensions/renderer/script_context_set_unittest.cc
index 002b12920abd4cbd82851ecafbf8a2f64c58b45d..14184b52961800c505c5553eebb352e29f7421af 100644
--- a/chrome/renderer/extensions/chrome_v8_context_set_unittest.cc
+++ b/extensions/renderer/script_context_set_unittest.cc
@@ -3,20 +3,20 @@
// found in the LICENSE file.
#include "base/message_loop/message_loop.h"
-#include "chrome/renderer/extensions/chrome_v8_context.h"
-#include "chrome/renderer/extensions/chrome_v8_context_set.h"
#include "extensions/common/extension.h"
#include "extensions/common/features/feature.h"
+#include "extensions/renderer/script_context.h"
+#include "extensions/renderer/script_context_set.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/public/web/WebFrame.h"
#include "v8/include/v8.h"
namespace extensions {
-TEST(ChromeV8ContextSet, Lifecycle) {
+TEST(ScriptContextSet, Lifecycle) {
base::MessageLoop loop;
- ChromeV8ContextSet context_set;
+ ScriptContextSet context_set;
v8::Isolate* isolate = v8::Isolate::GetCurrent();
v8::HandleScope handle_scope(isolate);
@@ -26,11 +26,8 @@ TEST(ChromeV8ContextSet, Lifecycle) {
// creating a whole webview.
blink::WebFrame* frame = reinterpret_cast<blink::WebFrame*>(1);
const Extension* extension = NULL;
- ChromeV8Context* context = new ChromeV8Context(
- v8_context,
- frame,
- extension,
- Feature::BLESSED_EXTENSION_CONTEXT);
+ ScriptContext* context = new ScriptContext(
+ v8_context, frame, extension, Feature::BLESSED_EXTENSION_CONTEXT);
context_set.Add(context);
EXPECT_EQ(1u, context_set.GetAll().count(context));
@@ -41,7 +38,7 @@ TEST(ChromeV8ContextSet, Lifecycle) {
EXPECT_EQ(1u, context_set.GetAll().count(context));
// GetAll() returns a copy so removing from one should not remove from others.
- ChromeV8ContextSet::ContextSet set_copy = context_set.GetAll();
+ ScriptContextSet::ContextSet set_copy = context_set.GetAll();
EXPECT_EQ(1u, set_copy.count(context));
context_set.Remove(context);

Powered by Google App Engine
This is Rietveld 408576698