예제 #1
0
String ParsedURL::segment(const URLComponent& component) const
{
    ASSERT(isValid());

    if (!component.isValid())
        return String();

    String segment = m_spec.string().substring(component.begin(), component.length());
    ASSERT_WITH_MESSAGE(!segment.isEmpty(), "A valid URL component should not be empty.");
    return segment;
}
예제 #2
0
String ParsedURL::segment(const URLComponent& component) const
{
    ASSERT(isValid());

    if (!component.isValid())
        return String();

    String segment = m_spec.string().substring(component.begin(), component.length());

    // FIXME: GoogleURL create empty segments. This happen for the fragment for the test fast/url/segments.html
    // ASSERT_WITH_MESSAGE(!segment.isEmpty(), "A valid URL component should not be empty.");
    return segment;
}
예제 #3
0
String ParsedURL::segment(const URLComponent& component) const
{
    if (!component.isValid())
        return String();
    return m_spec.string().substring(component.begin(), component.length());
}