Commit 47e5558b authored by brizental's avatar brizental Committed by Pier Angelo Vendrame
Browse files

BB 45120: Add tests for Base Browser

parent da7254bb
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
[DEFAULT]
tags = "base-browser"

["test_new_window.py"]
+25 −0
Original line number Diff line number Diff line
from marionette_harness import MarionetteTestCase, WindowManagerMixin


class TestNewWindow(WindowManagerMixin, MarionetteTestCase):
    def tearDown(self):
        self.close_all_windows()
        super().tearDown()

    def test_open_new_window(self):
        with self.marionette.using_context("chrome"):
            new_window = self.open_window()

        self.assertEqual(
            len(self.marionette.chrome_window_handles),
            len(self.start_windows) + 1,
            "A new browser window should have been opened.",
        )

        self.marionette.switch_to_window(new_window)
        self.marionette.navigate("about:blank")
        self.assertEqual(
            self.marionette.get_url(),
            "about:blank",
            "Should be able to navigate in the newly opened window.",
        )