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

Unified Diff: Source/web/tests/CustomEventTest.cpp

Issue 209713003: Make DOMWrapperWorld::current() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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
« no previous file with comments | « Source/web/FrameLoaderClientImpl.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/CustomEventTest.cpp
diff --git a/Source/web/tests/CustomEventTest.cpp b/Source/web/tests/CustomEventTest.cpp
index a71ab41a542367526a00d28c414322e0cd40621b..51e21839d5dc03a7a8006d110b5df3d554c1ebbf 100644
--- a/Source/web/tests/CustomEventTest.cpp
+++ b/Source/web/tests/CustomEventTest.cpp
@@ -72,14 +72,14 @@ public:
EXPECT_EQ(jsEvent->ToObject()->Get(v8::String::NewFromUtf8(isolate, "detail")), v8::Boolean::New(isolate, true));
}
- static PassRefPtr<TestListener> create(v8::Isolate* isolate)
+ static PassRefPtr<TestListener> create(v8::Isolate* isolate, DOMWrapperWorld& world)
{
- return adoptRef(new TestListener(isolate));
+ return adoptRef(new TestListener(isolate, world));
}
private:
- TestListener(v8::Isolate* isolate)
- : V8AbstractEventListener(false, 0, isolate)
+ TestListener(v8::Isolate* isolate, DOMWrapperWorld& world)
+ : V8AbstractEventListener(false, world, isolate)
{
}
@@ -111,7 +111,8 @@ TEST(CustomEventTest, InitWithSerializedScriptValue)
v8::Isolate* isolate = toIsolate(frame->frame());
v8::HandleScope handleScope(isolate);
customEvent.initCustomEvent("blah", false, false, WebSerializedScriptValue::serialize(v8::Boolean::New(isolate, true)));
- RefPtr<EventListener> listener = TestListener::create(isolate);
+ RefPtr<DOMWrapperWorld> world = DOMWrapperWorld::create();
+ RefPtr<EventListener> listener = TestListener::create(isolate, *world);
frame->frame()->document()->addEventListener("blah", listener, false);
frame->frame()->document()->dispatchEvent(event);
« no previous file with comments | « Source/web/FrameLoaderClientImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698