Bug 1392368 - Add missing browsing context test. r?automatedtester
This covers step 1 of the Set Window Rect algorithm.
MozReview-Commit-ID: 5DqDEiiMwXt
--- a/testing/web-platform/tests/webdriver/tests/set_window_rect.py
+++ b/testing/web-platform/tests/webdriver/tests/set_window_rect.py
@@ -10,16 +10,28 @@ alert_doc = inline("<script>window.alert
def set_window_rect(session, rect):
return session.transport.send("POST", "session/%s/window/rect" % session.session_id, rect)
# 10.7.2 Set Window Rect
+def test_current_top_level_browsing_context_no_longer_open(session, create_window):
+ """
+ 1. If the current top-level browsing context is no longer open,
+ return error with error code no such window.
+ """
+
+ session.window_handle = create_window()
+ session.close()
+ response = set_window_rect(session, {})
+ assert_error(response, "no such window")
+
+
def test_handle_prompt_dismiss():
"""TODO"""
def test_handle_prompt_accept(new_session):
"""
2. Handle any user prompts and return its value if it is an error.