[Webkit-unassigned] [Bug 90675] Web Inspector: implement testing harness for pure protocol tests.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 18 23:34:18 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=90675





--- Comment #10 from Vivek Galatage <vivekgalatage at gmail.com>  2012-07-18 23:34:17 PST ---
(In reply to comment #9)
> Capturing the IRC discussion here:
> 
> So the (ideal) plan would be:
> 
> 1) Implement window.internals.openInspectorTestFrontend
> 
> This method will create a Page, install the InspectorFrontendClientLocal-based harness on it (a-la Qt or GTK port). This should require almost no code.
> 

Will this be a raw page from Page.h? If yes, then should we pass all the clients via PageClients as null(0) to this new page?

I have the following pseudo code in my mind about this:

Internals.cpp
=============
class InspectorFrontendClientDummy : public InspectorFrontendClientLocal
{
public:
    // Most of the methods go notImplemented() here
};

class InspectorFrontendChannelDummy : public InspectorFrontendChannel
{
public:
    virtual bool sendMessageToFrontend(const String& message) {
        // We can eval script here.
        // WebInspector.dispatchMessageFromBackend(message)
    }
};

boolean Internals::openDummyInspectorFrontend() {
    Page::PageClients pageClients;
    pageClients.chromeClient = 0;
    pageClients.contextMenuClient = 0;
    pageClients.editorClient = 0;
    pageClients.dragClient = 0;
    pageClients.inspectorClient = 0;
    m_page = new Page(pageClients); 

    m_frontendClient = new InspectorFrontendClientDummy(...); 

    m_page->inspectorController()->setInspectorFrontendClient(m_frontendClient);

    m_frontendChannel = new InspectorFrontendChannelDummy(...);

    m_page->inspectorController()->connectFrontend(m_frontendChannel);
}


Now my questions are:
1. Can the internals object hold these members: m_frontendClient, m_page, m_frontendChannel?
2. If yes, when should these be destroyed?(in Internals object desctrutor?)
3. Other possibility is we can make the m_frontendChannel member of InspectorFrontendClientDummy and destroy it as soon as closeWindow() is called.
4. How to handle the remote frontend? (or do we need to handle the remote case as I am not aware whether these tests can be run on remote devices?)

Please let me know your thoughts on the same. Thank you.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list