Changeset 140100 in webkit


Ignore:
Timestamp:
Jan 17, 2013 8:41:36 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[BlackBerry] DRT - Accept http/file URL when running drt-launcher from command line
https://bugs.webkit.org/show_bug.cgi?id=107107
PR 282192

Patch by Xiaobo Wang <xbwang@torchmobile.com.cn> on 2013-01-17
Reviewed by Rob Buis.

The DRT application will convert relative/absolute file path to
file://<real-file-path> format, so we only check for http/file prefix.

  • DumpRenderTree/blackberry/DumpRenderTree.cpp:

(BlackBerry::WebKit::isFullUrl):
(WebKit):
(BlackBerry::WebKit::DumpRenderTree::runCurrentTest):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r140093 r140100  
     12013-01-17  Xiaobo Wang  <xbwang@torchmobile.com.cn>
     2
     3        [BlackBerry] DRT - Accept http/file URL when running drt-launcher from command line
     4        https://bugs.webkit.org/show_bug.cgi?id=107107
     5        PR 282192
     6
     7        Reviewed by Rob Buis.
     8
     9        The DRT application will convert relative/absolute file path to
     10        file://<real-file-path> format, so we only check for http/file prefix.
     11
     12        * DumpRenderTree/blackberry/DumpRenderTree.cpp:
     13        (BlackBerry::WebKit::isFullUrl):
     14        (WebKit):
     15        (BlackBerry::WebKit::DumpRenderTree::runCurrentTest):
     16
    1172013-01-17  Frank Farzan  <frankf@chromium.org>
    218
  • trunk/Tools/DumpRenderTree/blackberry/DumpRenderTree.cpp

    r137908 r140100  
    161161}
    162162
     163static bool isFullUrl(const String& url)
     164{
     165    static Vector<String> *prefixes = 0;
     166    if (!prefixes)  {
     167        prefixes = new Vector<String>();
     168        prefixes->append("http://");
     169        prefixes->append("file://");
     170    }
     171    for (unsigned i = 0; i < prefixes->size(); ++i) {
     172        if (url.startsWith(prefixes->at(i), false))
     173            return true;
     174    }
     175    return false;
     176}
     177
    163178DumpRenderTree::DumpRenderTree(BlackBerry::WebKit::WebPage* page)
    164179    : m_gcController(0)
     
    235250        m_currentHttpTest.remove(0, strlen(httpTestSyntax));
    236251        runTest(httpPrefixURL + m_currentHttpTest, imageHash);
    237     } else
     252    } else if (isFullUrl(*m_currentTest))
     253        runTest(*m_currentTest, imageHash);
     254    else
    238255        runTest(kSDCLayoutTestsURI + *m_currentTest, imageHash);
    239256}
Note: See TracChangeset for help on using the changeset viewer.