tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_title.py (548B)


      1 # This Source Code Form is subject to the terms of the Mozilla Public
      2 # License, v. 2.0. If a copy of the MPL was not distributed with this
      3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
      4 
      5 from urllib.parse import quote
      6 
      7 from marionette_harness import MarionetteTestCase
      8 
      9 
     10 def inline(doc):
     11    return "data:text/html;charset=utf-8,{}".format(quote(doc))
     12 
     13 
     14 class TestTitle(MarionetteTestCase):
     15    def test_basic(self):
     16        self.marionette.navigate(inline("<title>foo</title>"))
     17        self.assertEqual(self.marionette.title, "foo")