Loading testing/base-browser/manifest.toml 0 → 100644 +4 −0 Original line number Diff line number Diff line [DEFAULT] tags = "base-browser" ["test_new_window.py"] testing/base-browser/test_new_window.py 0 → 100644 +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.", ) Loading
testing/base-browser/manifest.toml 0 → 100644 +4 −0 Original line number Diff line number Diff line [DEFAULT] tags = "base-browser" ["test_new_window.py"]
testing/base-browser/test_new_window.py 0 → 100644 +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.", )