Changeset 54772 in webkit


Ignore:
Timestamp:
Feb 15, 2010 2:56:15 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-02-15 Robert Hogan <robert@roberthogan.net>

Reviewed by Simon Hausmann.

[Qt] DRT: Support evaluateInWebInspector(), setTimelineProfilingEnabled().

Support LayoutTestController.evaluateInWebInspector(), setTimelineProfilingEnabled() in Qt DRT.

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

This allows the following tests to pass:

inspector/console-format-collections.html
inspector/styles-iframe.html
inspector/syntax-highlight-css.html
inspector/syntax-highlight-javascript.html
inspector/timeline-enum-stability.html
inspector/timeline-layout.html
inspector/timeline-mark-timeline.html
inspector/timeline-paint.html
inspector/timeline-parse-html.html
inspector/timeline-recalculate-styles.html
inspector/timeline-script-tag-1.html
inspector/timeline-script-tag-2.html
inspector/timeline-trivial.html
inspector/cookie-resource-match.html
inspector/elements-img-tooltip.html
inspector/elements-panel-selection-on-refresh.html
inspector/inspected-objects-not-overriden.html
inspector/timeline-event-dispatch.html
inspector/timeline-network-resource.html
inspector/elements-panel-rewrite-href.html
inspector/console-dir.html
inspector/console-dirxml.html
inspector/console-format.html
inspector/console-tests.html
inspector/elements-panel-structure.html
inspector/evaluate-in-frontend.html
inspector/console-clear.html

  • platform/qt/Skipped:

2010-02-15 Robert Hogan <robert@roberthogan.net>, Jocelyn Turcotte <jocelyn.turcotte@nokia.com>

Reviewed by Simon Hausmann.

[Qt] DRT: Support evaluateInWebInspector(), setTimelineProfilingEnabled().

Support LayoutTestController.evaluateInWebInspector(), setTimelineProfilingEnabled() in Qt DRT.

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

This allows the following tests to pass:

inspector/console-format-collections.html
inspector/styles-iframe.html
inspector/syntax-highlight-css.html
inspector/syntax-highlight-javascript.html
inspector/timeline-enum-stability.html
inspector/timeline-layout.html
inspector/timeline-mark-timeline.html
inspector/timeline-paint.html
inspector/timeline-parse-html.html
inspector/timeline-recalculate-styles.html
inspector/timeline-script-tag-1.html
inspector/timeline-script-tag-2.html
inspector/timeline-trivial.html
inspector/cookie-resource-match.html
inspector/elements-img-tooltip.html
inspector/elements-panel-selection-on-refresh.html
inspector/inspected-objects-not-overriden.html
inspector/timeline-event-dispatch.html
inspector/timeline-network-resource.html
inspector/elements-panel-rewrite-href.html
inspector/console-dir.html
inspector/console-dirxml.html
inspector/console-format.html
inspector/console-tests.html
inspector/elements-panel-structure.html
inspector/evaluate-in-frontend.html
inspector/console-clear.html

  • Api/qwebpage.cpp: (qt_drt_webinspector_executeScript): (qt_drt_webinspector_close): (qt_drt_webinspector_show): (qt_drt_setTimelineProfilingEnabled):
  • WebCoreSupport/InspectorClientQt.cpp: (InspectorClientQt::createPage)

2010-02-15 Robert Hogan <robert@roberthogan.net>

Reviewed by Simon Hausmann.

[Qt] DRT: Support evaluateInWebInspector(), setTimelineProfilingEnabled().

Support LayoutTestController.evaluateInWebInspector(), setTimelineProfilingEnabled() in Qt DRT.

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

This allows the following tests to pass:

inspector/console-format-collections.html
inspector/styles-iframe.html
inspector/syntax-highlight-css.html
inspector/syntax-highlight-javascript.html
inspector/timeline-enum-stability.html
inspector/timeline-layout.html
inspector/timeline-mark-timeline.html
inspector/timeline-paint.html
inspector/timeline-parse-html.html
inspector/timeline-recalculate-styles.html
inspector/timeline-script-tag-1.html
inspector/timeline-script-tag-2.html
inspector/timeline-trivial.html
inspector/cookie-resource-match.html
inspector/elements-img-tooltip.html
inspector/elements-panel-selection-on-refresh.html
inspector/inspected-objects-not-overriden.html
inspector/timeline-event-dispatch.html
inspector/timeline-network-resource.html
inspector/elements-panel-rewrite-href.html
inspector/console-dir.html
inspector/console-dirxml.html
inspector/console-format.html
inspector/console-tests.html
inspector/elements-panel-structure.html
inspector/evaluate-in-frontend.html
inspector/console-clear.html

  • DumpRenderTree/qt/DumpRenderTreeQt.cpp: (WebCore::DumpRenderTree::resetToConsistentStateBeforeTesting): (WebCore::isWebInspectorTest): (WebCore::DumpRenderTree::open):
  • DumpRenderTree/qt/DumpRenderTreeQt.h: (WebCore::DumpRenderTree::display):
  • DumpRenderTree/qt/LayoutTestControllerQt.cpp: (LayoutTestController::closeWebInspector): (LayoutTestController::showWebInspector): (LayoutTestController::evaluateInWebInspector): (LayoutTestController::setTimelineProfilingEnabled): (LayoutTestController::display):
  • DumpRenderTree/qt/LayoutTestControllerQt.h:
Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r54769 r54772  
     12010-02-15  Robert Hogan  <robert@roberthogan.net>
     2
     3        Reviewed by Simon Hausmann.
     4
     5        [Qt] DRT: Support evaluateInWebInspector(), setTimelineProfilingEnabled().
     6
     7        Support LayoutTestController.evaluateInWebInspector(), setTimelineProfilingEnabled() in Qt DRT.
     8
     9        https://bugs.webkit.org/show_bug.cgi?id=33096
     10
     11        This allows the following tests to pass:
     12
     13        inspector/console-format-collections.html
     14        inspector/styles-iframe.html
     15        inspector/syntax-highlight-css.html
     16        inspector/syntax-highlight-javascript.html
     17        inspector/timeline-enum-stability.html
     18        inspector/timeline-layout.html
     19        inspector/timeline-mark-timeline.html
     20        inspector/timeline-paint.html
     21        inspector/timeline-parse-html.html
     22        inspector/timeline-recalculate-styles.html
     23        inspector/timeline-script-tag-1.html
     24        inspector/timeline-script-tag-2.html
     25        inspector/timeline-trivial.html
     26        inspector/cookie-resource-match.html
     27        inspector/elements-img-tooltip.html
     28        inspector/elements-panel-selection-on-refresh.html
     29        inspector/inspected-objects-not-overriden.html
     30        inspector/timeline-event-dispatch.html
     31        inspector/timeline-network-resource.html
     32        inspector/elements-panel-rewrite-href.html
     33        inspector/console-dir.html
     34        inspector/console-dirxml.html
     35        inspector/console-format.html
     36        inspector/console-tests.html
     37        inspector/elements-panel-structure.html
     38        inspector/evaluate-in-frontend.html
     39        inspector/console-clear.html
     40
     41        * platform/qt/Skipped:
     42
    1432010-02-14  Pavel Feldman  <pfeldman@chromium.org>
    244
  • trunk/LayoutTests/platform/qt/Skipped

    r54761 r54772  
    159159# ============================================================================= #
    160160
    161 # Missing layoutTestController.showWebInspector()
    162 inspector/console-format-collections.html
    163 inspector/styles-iframe.html
    164 inspector/syntax-highlight-css.html
    165 inspector/syntax-highlight-javascript.html
    166 inspector/timeline-enum-stability.html
    167 inspector/timeline-layout.html
    168 inspector/timeline-mark-timeline.html
    169 inspector/timeline-paint.html
    170 inspector/timeline-parse-html.html
    171 inspector/timeline-recalculate-styles.html
    172 inspector/timeline-script-tag-1.html
    173 inspector/timeline-script-tag-2.html
    174 inspector/timeline-trivial.html
    175 
    176161# Missing textInputController.selectedRange()
    177162editing/selection/5825350-1.html
     
    230215
    231216http/tests/cache/subresource-failover-to-network.html
    232 
    233 # Missing layoutTestController.evaluateInWebInspector()
    234 # https://bugs.webkit.org/show_bug.cgi?id=33096
    235 http/tests/inspector/inspect-iframe-from-different-domain.html
    236 inspector/cookie-resource-match.html
    237 inspector/elements-img-tooltip.html
    238 inspector/elements-panel-selection-on-refresh.html
    239 inspector/inspected-objects-not-overriden.html
    240 inspector/timeline-event-dispatch.html
    241 inspector/timeline-network-resource.html
    242 inspector/elements-panel-rewrite-href.html
    243217
    244218# Missing layoutTestController.setSmartInsertDeleteEnabled()
     
    48654839http/tests/globalhistory
    48664840
    4867 # Skip inspector tests
    4868 inspector/console-dir.html
    4869 inspector/console-dirxml.html
    4870 inspector/console-format.html
    4871 inspector/console-log-before-inspector-open.html
    4872 inspector/console-tests.html
    4873 inspector/elements-panel-structure.html
    4874 inspector/evaluate-in-frontend.html
    4875 
    48764841# Skip xmlhttprequest tests - NETWORK_ERR: XMLHttpRequest Exception 101: A network error occured in synchronous requests.
    48774842http/tests/xmlhttprequest/access-control-basic-allow-preflight-cache.html
     
    50034968fast/dom/javascript-url-crash-function.html
    50044969fast/dom/location-new-window-no-crash.html
    5005 inspector/console-clear.html
    50064970http/tests/security/javascriptURL/xss-ALLOWED-from-javascript-url-window-open.html
    50074971
  • trunk/WebKit/qt/Api/qwebpage.cpp

    r54550 r54772  
    160160{
    161161    return page->handle()->page->groupName();
     162}
     163
     164void QWEBKIT_EXPORT qt_drt_webinspector_executeScript(QWebPage* page, long callId, const QString& script)
     165{
     166    if (!page->handle()->page->inspectorController())
     167        return;
     168    page->handle()->page->inspectorController()->evaluateForTestInFrontend(callId, script);
     169}
     170
     171void QWEBKIT_EXPORT qt_drt_webinspector_close(QWebPage* page)
     172{
     173    if (!page->handle()->page->inspectorController())
     174        return;
     175    page->handle()->page->inspectorController()->close();
     176}
     177
     178void QWEBKIT_EXPORT qt_drt_webinspector_show(QWebPage* page)
     179{
     180    if (!page->handle()->page->inspectorController())
     181        return;
     182    page->handle()->page->inspectorController()->show();
     183}
     184
     185void QWEBKIT_EXPORT qt_drt_setTimelineProfilingEnabled(QWebPage* page, bool enabled)
     186{
     187    InspectorController* controller = page->handle()->page->inspectorController();
     188    if (!controller)
     189        return;
     190    if (enabled)
     191        controller->startTimelineProfiler();
     192    else
     193        controller->stopTimelineProfiler();
    162194}
    163195
  • trunk/WebKit/qt/ChangeLog

    r54767 r54772  
     12010-02-15  Robert Hogan  <robert@roberthogan.net>, Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     2
     3        Reviewed by Simon Hausmann.
     4
     5        [Qt] DRT: Support evaluateInWebInspector(), setTimelineProfilingEnabled().
     6
     7        Support LayoutTestController.evaluateInWebInspector(), setTimelineProfilingEnabled() in Qt DRT.
     8
     9        https://bugs.webkit.org/show_bug.cgi?id=33096
     10
     11        This allows the following tests to pass:
     12
     13        inspector/console-format-collections.html
     14        inspector/styles-iframe.html
     15        inspector/syntax-highlight-css.html
     16        inspector/syntax-highlight-javascript.html
     17        inspector/timeline-enum-stability.html
     18        inspector/timeline-layout.html
     19        inspector/timeline-mark-timeline.html
     20        inspector/timeline-paint.html
     21        inspector/timeline-parse-html.html
     22        inspector/timeline-recalculate-styles.html
     23        inspector/timeline-script-tag-1.html
     24        inspector/timeline-script-tag-2.html
     25        inspector/timeline-trivial.html
     26        inspector/cookie-resource-match.html
     27        inspector/elements-img-tooltip.html
     28        inspector/elements-panel-selection-on-refresh.html
     29        inspector/inspected-objects-not-overriden.html
     30        inspector/timeline-event-dispatch.html
     31        inspector/timeline-network-resource.html
     32        inspector/elements-panel-rewrite-href.html
     33        inspector/console-dir.html
     34        inspector/console-dirxml.html
     35        inspector/console-format.html
     36        inspector/console-tests.html
     37        inspector/elements-panel-structure.html
     38        inspector/evaluate-in-frontend.html
     39        inspector/console-clear.html
     40
     41        * Api/qwebpage.cpp:
     42        (qt_drt_webinspector_executeScript):
     43        (qt_drt_webinspector_close):
     44        (qt_drt_webinspector_show):
     45        (qt_drt_setTimelineProfilingEnabled):
     46
     47        * WebCoreSupport/InspectorClientQt.cpp:
     48        (InspectorClientQt::createPage)
     49
    1502010-02-12  Antti Koivisto  <koivisto@iki.fi>
    251
  • trunk/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp

    r54236 r54772  
    8484Page* InspectorClientQt::createPage()
    8585{
    86     QWebView* inspectorView = new QWebView;
    87     InspectorClientWebPage* inspectorPage = new InspectorClientWebPage(inspectorView);
    88     inspectorView->setPage(inspectorPage);
    89     m_inspectorView.set(inspectorView);
    90 
    91     inspectorPage->mainFrame()->load(QString::fromLatin1("qrc:/webkit/inspector/inspector.html"));
     86    QWebView* inspectorView = m_inspectorView.get();
     87    if (!inspectorView) {
     88        inspectorView = new QWebView;
     89        InspectorClientWebPage* inspectorPage = new InspectorClientWebPage(inspectorView);
     90        inspectorView->setPage(inspectorPage);
     91        m_inspectorView.set(inspectorView);
     92    }
     93
     94    inspectorView->page()->mainFrame()->load(QString::fromLatin1("qrc:/webkit/inspector/inspector.html"));
    9295    m_inspectedWebPage->d->inspectorFrontend = inspectorView;
    9396    m_inspectedWebPage->d->getOrCreateInspector()->d->setFrontend(inspectorView);
    9497
    95     return m_inspectorView->page()->d->page;
     98    return inspectorView->page()->d->page;
    9699}
    97100
  • trunk/WebKitTools/ChangeLog

    r54760 r54772  
     12010-02-15  Robert Hogan  <robert@roberthogan.net>
     2
     3        Reviewed by Simon Hausmann.
     4
     5        [Qt] DRT: Support evaluateInWebInspector(), setTimelineProfilingEnabled().
     6
     7        Support LayoutTestController.evaluateInWebInspector(), setTimelineProfilingEnabled() in Qt DRT.
     8
     9        https://bugs.webkit.org/show_bug.cgi?id=33096
     10
     11        This allows the following tests to pass:
     12
     13        inspector/console-format-collections.html
     14        inspector/styles-iframe.html
     15        inspector/syntax-highlight-css.html
     16        inspector/syntax-highlight-javascript.html
     17        inspector/timeline-enum-stability.html
     18        inspector/timeline-layout.html
     19        inspector/timeline-mark-timeline.html
     20        inspector/timeline-paint.html
     21        inspector/timeline-parse-html.html
     22        inspector/timeline-recalculate-styles.html
     23        inspector/timeline-script-tag-1.html
     24        inspector/timeline-script-tag-2.html
     25        inspector/timeline-trivial.html
     26        inspector/cookie-resource-match.html
     27        inspector/elements-img-tooltip.html
     28        inspector/elements-panel-selection-on-refresh.html
     29        inspector/inspected-objects-not-overriden.html
     30        inspector/timeline-event-dispatch.html
     31        inspector/timeline-network-resource.html
     32        inspector/elements-panel-rewrite-href.html
     33        inspector/console-dir.html
     34        inspector/console-dirxml.html
     35        inspector/console-format.html
     36        inspector/console-tests.html
     37        inspector/elements-panel-structure.html
     38        inspector/evaluate-in-frontend.html
     39        inspector/console-clear.html
     40
     41        * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
     42        (WebCore::DumpRenderTree::resetToConsistentStateBeforeTesting):
     43        (WebCore::isWebInspectorTest):
     44        (WebCore::DumpRenderTree::open):
     45        * DumpRenderTree/qt/DumpRenderTreeQt.h:
     46        (WebCore::DumpRenderTree::display):
     47        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
     48        (LayoutTestController::closeWebInspector):
     49        (LayoutTestController::showWebInspector):
     50        (LayoutTestController::evaluateInWebInspector):
     51        (LayoutTestController::setTimelineProfilingEnabled):
     52        (LayoutTestController::display):
     53        * DumpRenderTree/qt/LayoutTestControllerQt.h:
     54
    1552010-02-14  Dirk Pranke  <dpranke@chromium.org>
    256
  • trunk/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp

    r54757 r54772  
    413413}
    414414
     415static bool isWebInspectorTest(const QUrl& url)
     416{
     417    if (url.path().contains("inspector/"))
     418        return true;
     419    return false;
     420}
     421
    415422void DumpRenderTree::open(const QUrl& url)
    416423{
    417424    resetToConsistentStateBeforeTesting();
     425
     426    if (isWebInspectorTest(m_page->mainFrame()->url()))
     427        layoutTestController()->closeWebInspector();
     428
     429    if (isWebInspectorTest(url))
     430        layoutTestController()->showWebInspector();
    418431
    419432    // W3C SVG tests expect to be 480x360
  • trunk/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.h

    r54054 r54772  
    159159    virtual ~WebPage();
    160160    QWebInspector* webInspector();
     161    void closeWebInspector();
    161162
    162163    QWebPage *createWindow(QWebPage::WebWindowType);
  • trunk/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp

    r54723 r54772  
    4242extern void qt_drt_setFrameSetFlatteningEnabled(QWebPage*, bool);
    4343extern void qt_drt_setJavaScriptProfilingEnabled(QWebFrame*, bool enabled);
     44extern void qt_drt_setTimelineProfilingEnabled(QWebPage*, bool enabled);
    4445extern bool qt_drt_pauseAnimation(QWebFrame*, const QString& name, double time, const QString& elementId);
    4546extern bool qt_drt_pauseTransitionOfProperty(QWebFrame*, const QString& name, double time, const QString& elementId);
     
    5253extern int qt_drt_workerThreadCount();
    5354extern int qt_drt_pageNumberForElementById(QWebFrame* qFrame, const QString& id, float width, float height);
     55extern void qt_drt_webinspector_executeScript(QWebPage* page, long callId, const QString& script);
     56extern void qt_drt_webinspector_show(QWebPage *page);
     57extern void qt_drt_webinspector_close(QWebPage *page);
    5458
    5559LayoutTestController::LayoutTestController(WebCore::DumpRenderTree* drt)
     
    286290}
    287291
     292
     293void LayoutTestController::closeWebInspector()
     294{
     295    qt_drt_webinspector_close(m_drt->webPage());
     296    m_drt->webPage()->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, false);
     297}
     298
    288299void LayoutTestController::showWebInspector()
    289300{
    290301    m_drt->webPage()->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
    291     m_drt->webPage()->webInspector()->show();
    292 }
    293 
    294 void LayoutTestController::hideWebInspector()
    295 {
    296     m_drt->webPage()->webInspector()->hide();
     302    qt_drt_webinspector_show(m_drt->webPage());
     303}
     304
     305void LayoutTestController::evaluateInWebInspector(long callId, const QString& script)
     306{
     307    qt_drt_webinspector_executeScript(m_drt->webPage(), callId, script);
    297308}
    298309
     
    311322    m_topLoadingFrame->page()->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
    312323    qt_drt_setJavaScriptProfilingEnabled(m_topLoadingFrame, enable);
     324}
     325
     326void LayoutTestController::setTimelineProfilingEnabled(bool enable)
     327{
     328    qt_drt_setTimelineProfilingEnabled(m_drt->webPage(), enable);
    313329}
    314330
  • trunk/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h

    r54723 r54772  
    116116    void dumpSelectionRect() const {}
    117117    void showWebInspector();
    118     void hideWebInspector();
     118    void closeWebInspector();
     119    void evaluateInWebInspector(long callId, const QString& script);
    119120
    120121    void setFrameSetFlatteningEnabled(bool enable);
    121122    void setAllowUniversalAccessFromFileURLs(bool enable);
    122123    void setJavaScriptProfilingEnabled(bool enable);
     124    void setTimelineProfilingEnabled(bool enable);
    123125    void setFixedContentsSize(int width, int height);
    124126    void setPrivateBrowsingEnabled(bool enable);
Note: See TracChangeset for help on using the changeset viewer.