Changeset 163173 in webkit


Ignore:
Timestamp:
Jan 31, 2014 9:26:46 AM (10 years ago)
Author:
andersca@apple.com
Message:

REGRESSION: WebKit2.PageLoadBasic API test is failing
https://bugs.webkit.org/show_bug.cgi?id=127892

Reviewed by Dan Bernstein.

Source/WebKit2:

On Mountain Lion, URLs returned by -[NSBundle URLForResource:withExtension:subdirectory] include
localhost as the hostname, but WebCore::URL normalizes those URLs and removes the host name.

Because of this, URLs created by WKURLCreateWithCFURL won't be equal to urls passed through
the WebCore::URL constructor. Change WKURLIsEqual to compare the normalized URLs.

  • Shared/API/c/WKURL.cpp:

(WKURLIsEqual):

  • Shared/APIURL.h:

(API::URL::equals):
(API::URL::url):

Tools:

Re-enable test.

  • TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r163172 r163173  
     12014-01-31  Anders Carlsson  <andersca@apple.com>
     2
     3        REGRESSION: WebKit2.PageLoadBasic API test is failing
     4        https://bugs.webkit.org/show_bug.cgi?id=127892
     5
     6        Reviewed by Dan Bernstein.
     7
     8        On Mountain Lion, URLs returned by -[NSBundle URLForResource:withExtension:subdirectory] include
     9        localhost as the hostname, but WebCore::URL normalizes those URLs and removes the host name.
     10       
     11        Because of this, URLs created by WKURLCreateWithCFURL won't be equal to urls passed through
     12        the WebCore::URL constructor. Change WKURLIsEqual to compare the normalized URLs.
     13
     14        * Shared/API/c/WKURL.cpp:
     15        (WKURLIsEqual):
     16        * Shared/APIURL.h:
     17        (API::URL::equals):
     18        (API::URL::url):
     19
    1202014-01-31  Brady Eidson  <beidson@apple.com>
    221
  • trunk/Source/WebKit2/Shared/API/c/WKURL.cpp

    r160969 r163173  
    5353bool WKURLIsEqual(WKURLRef a, WKURLRef b)
    5454{
    55     return toImpl(a)->string() == toImpl(b)->string();
     55    return API::URL::equals(*toImpl(a), *toImpl(b));
    5656}
    5757
  • trunk/Source/WebKit2/Shared/APIURL.h

    r160969 r163173  
    5959    const WTF::String& string() const { return m_string; }
    6060
     61    static bool equals(const URL& a, const URL& b)
     62    {
     63        return a.url() == b.url();
     64    }
     65
    6166    WTF::String host() const
    6267    {
     
    110115    }
    111116
     117    const WebCore::URL& url() const
     118    {
     119        parseURLIfNecessary();
     120        return *m_parsedURL;
     121    }
     122
    112123    void parseURLIfNecessary() const
    113124    {
  • trunk/Tools/ChangeLog

    r163167 r163173  
     12014-01-31  Anders Carlsson  <andersca@apple.com>
     2
     3        REGRESSION: WebKit2.PageLoadBasic API test is failing
     4        https://bugs.webkit.org/show_bug.cgi?id=127892
     5
     6        Reviewed by Dan Bernstein.
     7
     8        Re-enable test.
     9
     10        * TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp:
     11
    1122014-01-31  Csaba Osztrogonác  <ossy@webkit.org>
    213
  • trunk/Tools/TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp

    r163100 r163173  
    110110
    111111// FIXME: http://webkit.org/b/127934 REGRESSION (r163037): WebKit2.PageLoadBasic API test failing on Mountain Lion
    112 #if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1080
    113 TEST(WebKit2, DISABLED_PageLoadBasic)
    114 #else
    115112TEST(WebKit2, PageLoadBasic)
    116 #endif
    117113{
    118114    State state;
Note: See TracChangeset for help on using the changeset viewer.