Beispiel #1
0
    def test_urlparse(self):
        """Test urlparser for chrome and about URLs."""

        # about:*
        url = 'about:config'
        p = utils.urlparse(url)
        eq_(p.scheme, 'about')
        eq_(p.netloc, 'config')
        eq_(p.geturl(), url)

        # chrome
        url = 'chrome://somewhere/special'
        p = utils.urlparse(url)
        eq_(p.scheme, 'chrome')
        eq_(p.netloc, 'somewhere')
        eq_(p.path, 'special')
        eq_(p.geturl(), url)

        # HTTP (unchanged from Python)
        url = 'http://example.com/something'
        p = utils.urlparse(url)
        eq_(p, urlparse_.urlparse(url))
Beispiel #2
0
    def test_urlparse(self):
        """Test urlparser for chrome and about URLs."""

        # about:*
        url = 'about:config'
        p = utils.urlparse(url)
        eq_(p.scheme, 'about')
        eq_(p.netloc, 'config')
        eq_(p.geturl(), url)

        # chrome
        url = 'chrome://somewhere/special'
        p = utils.urlparse(url)
        eq_(p.scheme, 'chrome')
        eq_(p.netloc, 'somewhere')
        eq_(p.path, 'special')
        eq_(p.geturl(), url)

        # HTTP (unchanged from Python)
        url = 'http://example.com/something'
        p = utils.urlparse(url)
        eq_(p, urlparse_.urlparse(url))
Beispiel #3
0
 def parsed_url(self):
     return utils.urlparse(self.url)