Skip to content

[wdspec] bidi: print: add tests for content area with less than 1x1 point#40872

Merged
DanielRyanSmith merged 19 commits intomasterfrom
40870-print-margin-same-as-page-dimension
Sep 12, 2023
Merged

[wdspec] bidi: print: add tests for content area with less than 1x1 point#40872
DanielRyanSmith merged 19 commits intomasterfrom
40870-print-margin-same-as-page-dimension

Conversation

@thiagowfx
Copy link
Member

@thiagowfx thiagowfx commented Jul 4, 2023

Content area with less than 1x1 point should fail.

Spec: w3c/webdriver-bidi#522
Closes: #40870

@thiagowfx
Copy link
Member Author

Note: Do not submit, wait for review from at least Mozilla folks.

@thiagowfx thiagowfx changed the title [wdspec] bidi: print: fail gracefully for empty page dimensions (POC, do not submit) [wdspec] bidi: print: fail gracefully for empty page dimensions Jul 5, 2023
@thiagowfx thiagowfx marked this pull request as draft July 5, 2023 12:50
@thiagowfx
Copy link
Member Author

Updated test to reflect "unsupported operation", but we still need spec consensus.

@thiagowfx thiagowfx force-pushed the 40870-print-margin-same-as-page-dimension branch from 1228882 to ea9d1f6 Compare July 10, 2023 16:13
thiagowfx pushed a commit to GoogleChromeLabs/chromium-bidi that referenced this pull request Jul 10, 2023
thiagowfx pushed a commit to GoogleChromeLabs/chromium-bidi that referenced this pull request Jul 10, 2023
thiagowfx pushed a commit to GoogleChromeLabs/chromium-bidi that referenced this pull request Jul 10, 2023
@thiagowfx thiagowfx changed the title (POC, do not submit) [wdspec] bidi: print: fail gracefully for empty page dimensions [wdspec] bidi: print: fail gracefully for empty page dimensions Jul 10, 2023
@thiagowfx thiagowfx marked this pull request as ready for review July 10, 2023 18:12
@thiagowfx thiagowfx force-pushed the 40870-print-margin-same-as-page-dimension branch from 2d35276 to 28132a8 Compare September 11, 2023 18:34
@thiagowfx thiagowfx enabled auto-merge (squash) September 11, 2023 18:34
@thiagowfx
Copy link
Member Author

@whimboo PTAL

thiagowfx pushed a commit to GoogleChromeLabs/chromium-bidi that referenced this pull request Sep 12, 2023
#1280)

…ing an empty content area

Related, in sync with, and blocked on:
web-platform-tests/wpt#40872
Copy link
Contributor

@whimboo whimboo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the updates. Looks fine to me. Just two nits that would be good to see addressed before the merge.

@thiagowfx
Copy link
Member Author

Done.

@thiagowfx
Copy link
Member Author

@DanielRyanSmith could you admin merge this?

@DanielRyanSmith DanielRyanSmith merged commit e55288f into master Sep 12, 2023
@DanielRyanSmith DanielRyanSmith deleted the 40870-print-margin-same-as-page-dimension branch September 12, 2023 20:01
thiagowfx pushed a commit that referenced this pull request Sep 12, 2023
…operation for empty content areas

Follow-up-of: #40872
thiagowfx pushed a commit that referenced this pull request Sep 12, 2023
Lightning00Blade pushed a commit to Lightning00Blade/wpt that referenced this pull request Dec 11, 2023
…oint (web-platform-tests#40872)

* [wdspec] bidi: print: fail gracefully for empty page dimensions

Chromium cannot print pages with 0x0 content area.

Closes: web-platform-tests#40870

* check for UnsupportedOperationException

* Update webdriver/tests/bidi/browsing_context/print/margin.py

Co-authored-by: Julian Descottes <jdescottes@mozilla.com>

* update test to match spec update

Spec: w3c/webdriver-bidi#522

* add new tests for minimum page dimensions with margins

* add new tests for invalid small page dimensions

* add inch_in_point, replace inch_in_point and inch_in_cm usages

* fix typo: page -> margin

* add missing pytest fixture

* fix indentation error, round up fraction

* Update webdriver/tests/bidi/browsing_context/print/margin.py

Co-authored-by: Henrik Skupin <mail@hskupin.info>

* test: address some review comments

* test: address some more review comments

* test: add pt_to_cm, fix background test

* test: extend test_params_page_invalid_value

* make expected_width and expected_height more readable

* dimensions: 0.01 -> 0.03

* extract constants for default page width and height

* use constant in f-string as well

---------

Co-authored-by: Julian Descottes <jdescottes@mozilla.com>
Co-authored-by: Henrik Skupin <mail@hskupin.info>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

webdriver/tests/bidi/browsing_context/print /margin.py: test_margin_same_as_page_dimension implementation is problematic with Chromium

10 participants