diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /testing/web-platform/tests/old-tests/webdriver/windows | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'testing/web-platform/tests/old-tests/webdriver/windows')
8 files changed, 99 insertions, 0 deletions
diff --git a/testing/web-platform/tests/old-tests/webdriver/windows/__init__.py b/testing/web-platform/tests/old-tests/webdriver/windows/__init__.py new file mode 100644 index 000000000..0c8107beb --- /dev/null +++ b/testing/web-platform/tests/old-tests/webdriver/windows/__init__.py @@ -0,0 +1 @@ +__author__ = 'b-redeg' diff --git a/testing/web-platform/tests/old-tests/webdriver/windows/res/win1.html b/testing/web-platform/tests/old-tests/webdriver/windows/res/win1.html new file mode 100644 index 000000000..b8bf7e80b --- /dev/null +++ b/testing/web-platform/tests/old-tests/webdriver/windows/res/win1.html @@ -0,0 +1,5 @@ +<!DOCTYPE html> +<meta charset="utf-8" /> +<title>window one</title> + +<div onclick="window.open('win2.html')">win2</div>
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/webdriver/windows/res/win2.html b/testing/web-platform/tests/old-tests/webdriver/windows/res/win2.html new file mode 100644 index 000000000..81a068fa8 --- /dev/null +++ b/testing/web-platform/tests/old-tests/webdriver/windows/res/win2.html @@ -0,0 +1,5 @@ +<!DOCTYPE html> +<meta charset="utf-8" /> +<title>window two</title> + +<img src="//web-platform.test:8000/images/blue.png"> </a>
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/webdriver/windows/res/win3.html b/testing/web-platform/tests/old-tests/webdriver/windows/res/win3.html new file mode 100644 index 000000000..d3ee6944b --- /dev/null +++ b/testing/web-platform/tests/old-tests/webdriver/windows/res/win3.html @@ -0,0 +1,5 @@ +<!DOCTYPE html> +<meta charset="utf-8" /> +<title>window three</title> + +<img src="//web-platform.test:8000/images/blue.png"> </a>
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/webdriver/windows/res/win4.html b/testing/web-platform/tests/old-tests/webdriver/windows/res/win4.html new file mode 100644 index 000000000..ef35f7617 --- /dev/null +++ b/testing/web-platform/tests/old-tests/webdriver/windows/res/win4.html @@ -0,0 +1,5 @@ +<!DOCTYPE html> +<meta charset="utf-8" /> +<title>window four</title> + +<img src="//web-platform.test:8000/images/blue.png"> </a>
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/webdriver/windows/res/win5.html b/testing/web-platform/tests/old-tests/webdriver/windows/res/win5.html new file mode 100644 index 000000000..673d2a19a --- /dev/null +++ b/testing/web-platform/tests/old-tests/webdriver/windows/res/win5.html @@ -0,0 +1,5 @@ +<!DOCTYPE html> +<meta charset="utf-8" /> +<title>window five</title> + +<img src="//web-platform.test:8000/images/blue.png"> </a>
\ No newline at end of file diff --git a/testing/web-platform/tests/old-tests/webdriver/windows/tabbing.py b/testing/web-platform/tests/old-tests/webdriver/windows/tabbing.py new file mode 100644 index 000000000..a6b5f99bf --- /dev/null +++ b/testing/web-platform/tests/old-tests/webdriver/windows/tabbing.py @@ -0,0 +1,30 @@ +# -*- mode: python; fill-column: 100; comment-column: 100; -*- + +import os +import sys +import unittest +import time + +sys.path.insert(1, os.path.abspath(os.path.join(__file__, "../.."))) +import base_test +from selenium.common import exceptions +from selenium.webdriver.common.keys import Keys +from selenium.webdriver.common.action_chains import ActionChains + + +class tabbingTest(base_test.WebDriverBaseTest): + def test_open_close_tab(self): + self.driver.get(self.webserver.where_is("windows/res/win1.html")) + self.driver.find_element_by_tag_name("div").click() + h = self.driver.window_handles + self.assertEquals(2, len(h)) + self.driver.switch_to.window(h[1]) + try: + self.driver.switch_to.window("does not exist") + self.fail("NoSuchWindowException expected") + except exceptions.NoSuchWindowException: + pass + self.driver.close() + +if __name__ == "__main__": + unittest.main() diff --git a/testing/web-platform/tests/old-tests/webdriver/windows/window_manipulation.py b/testing/web-platform/tests/old-tests/webdriver/windows/window_manipulation.py new file mode 100644 index 000000000..027716727 --- /dev/null +++ b/testing/web-platform/tests/old-tests/webdriver/windows/window_manipulation.py @@ -0,0 +1,43 @@ +# -*- mode: python; fill-column: 100; comment-column: 100; -*- + +import os +import sys +import unittest + +sys.path.insert(1, os.path.abspath(os.path.join(__file__, "../.."))) +import base_test +from selenium.common import exceptions + + +class WindowingTest(base_test.WebDriverBaseTest): + def test_maximize(self): + #self.driver.get(self.webserver.where_is("windows/res/win1.html")) + self.driver.maximize_window() + + def test_window_size_manipulation(self): + #self.driver.get(self.webserver.where_is("windows/res/win1.html")) + self.driver.set_window_size(400, 400) + window_size = self.driver.get_window_size() + self.assertTrue("width" in window_size) + self.assertTrue("height" in window_size) + self.assertEquals({"width": 400, "height":400}, window_size) + + """ + todo: make that work + see: https://w3c.github.io/webdriver/webdriver-spec.html#setwindowsize + result = self.driver.set_window_size(100, 100) + self.assertTrue("status" in result) + self.assertEquals(result["status"], 500) + """ + + def test_window_position_manipulation(self): + #self.driver.get(self.webserver.where_is("windows/res/win1.html")) + self.driver.set_window_position(400, 400) + window_position = self.driver.get_window_position() + self.assertTrue("x" in window_position) + self.assertTrue("y" in window_position) + self.assertEquals({"x": 400, "y": 400}, window_position) + + +if __name__ == "__main__": + unittest.main() |