From a3a2f22402cb856e795bf05c525a561cebf84cd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20L=C3=A4nd?= Date: Mon, 12 Dec 2022 13:47:41 +0000 Subject: [PATCH] No bug: apply code formatting via Lando # ignore-this-changeset --- .../webdriver/bidi/modules/browsing_context.py | 2 +- .../browsing_context/capture_screenshot/__init__.py | 2 +- .../capture_screenshot/capture_screenshot.py | 1 - .../browsing_context/capture_screenshot/frame.py | 13 +++++++------ .../browsing_context/capture_screenshot/invalid.py | 1 - .../tests/webdriver/tests/support/asserts.py | 1 - .../tests/webdriver/tests/support/fixtures_bidi.py | 3 +-- .../tests/webdriver/tests/take_screenshot/iframe.py | 13 +++++++------ 8 files changed, 17 insertions(+), 19 deletions(-) diff --git a/testing/web-platform/tests/tools/webdriver/webdriver/bidi/modules/browsing_context.py b/testing/web-platform/tests/tools/webdriver/webdriver/bidi/modules/browsing_context.py index 033929d5ff5f0..70c834c3840c2 100644 --- a/testing/web-platform/tests/tools/webdriver/webdriver/bidi/modules/browsing_context.py +++ b/testing/web-platform/tests/tools/webdriver/webdriver/bidi/modules/browsing_context.py @@ -1,5 +1,5 @@ import base64 -from typing import Any, Optional, Mapping, MutableMapping +from typing import Any, Mapping, MutableMapping, Optional from ._module import BidiModule, command diff --git a/testing/web-platform/tests/webdriver/tests/bidi/browsing_context/capture_screenshot/__init__.py b/testing/web-platform/tests/webdriver/tests/bidi/browsing_context/capture_screenshot/__init__.py index cd0ad7a282630..c15b76baf4b1f 100644 --- a/testing/web-platform/tests/webdriver/tests/bidi/browsing_context/capture_screenshot/__init__.py +++ b/testing/web-platform/tests/webdriver/tests/bidi/browsing_context/capture_screenshot/__init__.py @@ -1,8 +1,8 @@ from base64 import encodebytes +from tests.support.image import png_dimensions from webdriver.bidi.modules.script import ContextTarget -from tests.support.image import png_dimensions async def viewport_dimensions(bidi_session, context): """Get the dimensions of the viewport containing context. diff --git a/testing/web-platform/tests/webdriver/tests/bidi/browsing_context/capture_screenshot/capture_screenshot.py b/testing/web-platform/tests/webdriver/tests/bidi/browsing_context/capture_screenshot/capture_screenshot.py index f406698096ad2..be853ddc4280c 100644 --- a/testing/web-platform/tests/webdriver/tests/bidi/browsing_context/capture_screenshot/capture_screenshot.py +++ b/testing/web-platform/tests/webdriver/tests/bidi/browsing_context/capture_screenshot/capture_screenshot.py @@ -1,5 +1,4 @@ import pytest - from tests.support.image import png_dimensions from . import compare_png_data, viewport_dimensions diff --git a/testing/web-platform/tests/webdriver/tests/bidi/browsing_context/capture_screenshot/frame.py b/testing/web-platform/tests/webdriver/tests/bidi/browsing_context/capture_screenshot/frame.py index 960998044cdbc..6fb9d49cf2e97 100644 --- a/testing/web-platform/tests/webdriver/tests/bidi/browsing_context/capture_screenshot/frame.py +++ b/testing/web-platform/tests/webdriver/tests/bidi/browsing_context/capture_screenshot/frame.py @@ -1,11 +1,12 @@ import pytest - from tests.support.image import png_dimensions -from tests.support.screenshot import (DEFAULT_CONTENT, - REFERENCE_CONTENT, - REFERENCE_STYLE, - OUTER_IFRAME_STYLE, - INNER_IFRAME_STYLE) +from tests.support.screenshot import ( + DEFAULT_CONTENT, + INNER_IFRAME_STYLE, + OUTER_IFRAME_STYLE, + REFERENCE_CONTENT, + REFERENCE_STYLE, +) from . import compare_png_data, viewport_dimensions diff --git a/testing/web-platform/tests/webdriver/tests/bidi/browsing_context/capture_screenshot/invalid.py b/testing/web-platform/tests/webdriver/tests/bidi/browsing_context/capture_screenshot/invalid.py index bb6d054b916df..e30a0d3c99714 100644 --- a/testing/web-platform/tests/webdriver/tests/bidi/browsing_context/capture_screenshot/invalid.py +++ b/testing/web-platform/tests/webdriver/tests/bidi/browsing_context/capture_screenshot/invalid.py @@ -1,5 +1,4 @@ import pytest - import webdriver.bidi.error as error diff --git a/testing/web-platform/tests/webdriver/tests/support/asserts.py b/testing/web-platform/tests/webdriver/tests/support/asserts.py index f5812bc893236..231d8ab1caabd 100644 --- a/testing/web-platform/tests/webdriver/tests/support/asserts.py +++ b/testing/web-platform/tests/webdriver/tests/support/asserts.py @@ -3,7 +3,6 @@ from webdriver import Element, NoSuchAlertException, WebDriverException - # WebDriver specification ID: dfn-error-response-data errors = { "detached shadow root": 404, diff --git a/testing/web-platform/tests/webdriver/tests/support/fixtures_bidi.py b/testing/web-platform/tests/webdriver/tests/support/fixtures_bidi.py index a5e494345be83..db0903017c9de 100644 --- a/testing/web-platform/tests/webdriver/tests/support/fixtures_bidi.py +++ b/testing/web-platform/tests/webdriver/tests/support/fixtures_bidi.py @@ -87,8 +87,7 @@ def add_and_remove_iframe(bidi_session, inline): async def closed_frame(context, url=inline("test-frame")): initial_contexts = await bidi_session.browsing_context.get_tree(root=context["context"]) resp = await bidi_session.script.call_function( - function_declaration= - """(url) => { + function_declaration="""(url) => { const iframe = document.createElement("iframe"); // Once we're confident implementations support returning the iframe, just // return that directly. For now generate a unique id to use as a handle. diff --git a/testing/web-platform/tests/webdriver/tests/take_screenshot/iframe.py b/testing/web-platform/tests/webdriver/tests/take_screenshot/iframe.py index 258e764407a7e..133692bc7e789 100644 --- a/testing/web-platform/tests/webdriver/tests/take_screenshot/iframe.py +++ b/testing/web-platform/tests/webdriver/tests/take_screenshot/iframe.py @@ -1,14 +1,15 @@ import pytest - from tests.support.asserts import assert_success from tests.support.image import png_dimensions +from tests.support.screenshot import ( + DEFAULT_CONTENT, + INNER_IFRAME_STYLE, + OUTER_IFRAME_STYLE, + REFERENCE_CONTENT, + REFERENCE_STYLE, +) from . import viewport_dimensions -from tests.support.screenshot import (DEFAULT_CONTENT, - REFERENCE_CONTENT, - REFERENCE_STYLE, - OUTER_IFRAME_STYLE, - INNER_IFRAME_STYLE) def take_screenshot(session):