1
# -*- coding: utf-8 -*-
3
# Copyright 2013 Canonical
5
# This program is free software: you can redistribute it and/or modify it
6
# under the terms of the GNU General Public License version 3, as published
7
# by the Free Software Foundation.
9
from __future__ import absolute_import
11
from testtools.matchers import Equals
12
from autopilot.matchers import Eventually
14
from ubuntu_ui_extras.browser.tests import StartOpenRemotePageTestCaseBase
17
class TestWindowTitle(StartOpenRemotePageTestCaseBase):
19
"""Tests that the window’s title reflects the page title."""
21
def test_window_title(self):
22
title = "Alice in Wonderland"
23
body = "<p>Lorem ipsum dolor sit amet.</p>"
24
url = self.make_html_page(title, body)
26
window = self.main_window.get_qml_view()
27
title = "Alice in Wonderland"
28
self.assertThat(window.title, Eventually(Equals(title)))