Esempio n. 1
0
void DumpRenderTree::didClearWindowObjectInWorld(WebCore::DOMWrapperWorld*, JSGlobalContextRef context, JSObjectRef windowObject)
{
    JSValueRef exception = 0;

    gTestRunner->makeWindowObject(context, windowObject, &exception);
    ASSERT(!exception);

    m_gcController->makeWindowObject(context, windowObject, &exception);
    ASSERT(!exception);

    m_accessibilityController->makeWindowObject(context, windowObject, &exception);
    ASSERT(!exception);

    JSStringRef eventSenderStr = JSStringCreateWithUTF8CString("eventSender");
    JSValueRef eventSender = makeEventSender(context);
    JSObjectSetProperty(context, windowObject, eventSenderStr, eventSender, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, 0);
    JSStringRelease(eventSenderStr);
    WebCoreTestSupport::injectInternalsObject(context);
}
Esempio n. 2
0
void
DumpRenderTreeWKC::notifyWindowObjectCleared(void* in_context, void* in_window_object)
{
    JSGlobalContextRef context = (JSGlobalContextRef)in_context;
    JSObjectRef window_object = (JSObjectRef)in_window_object;
    JSValueRef exception = 0;

    ASSERT(fController);

    fController->makeWindowObject(context, window_object, &exception);
    ASSERT(!exception);

    fGCController->makeWindowObject(context, window_object, &exception);
    ASSERT(!exception);

    fAXController->makeWindowObject(context, window_object, &exception);
    ASSERT(!exception);

    JSStringRef event_sender_str = JSStringCreateWithUTF8CString("eventSender");
    JSValueRef event_sender = makeEventSender(context);
    JSObjectSetProperty(context, window_object, event_sender_str, event_sender, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, 0);
    JSStringRelease(event_sender_str);
}