Repository navigation
Conversation
On Linux, it is not possible to disable the window backgrounding logic in browser runs, so apply the same window cascading logic as was done on Firefox. https://issues.chromium.org/issues/590631905
Fixes ruff's unused-variable errors for right and bottom, which were meant as the screen bounds: wrap the cascade around them, like the Firefox window cascading does, so that the windows of many parallel workers stay on screen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…parallel browser test workers
…parallel browser test workers
| browser_args += f' {config.data_dir_flag}"{browser_data_dir}"' | ||
|
|
||
| # In parallel runs, spawn browsers in cascaded window order so each is visible. | ||
| if EMTEST_BROWSER_AUTO_CONFIG and parallel_harness and not EMTEST_HEADLESS and hasattr(config, 'window_rect_flags'): |
There was a problem hiding this comment.
In what situation is window_rect_flags not present?
There was a problem hiding this comment.
They are not present for the Safari and Firefox browser classes, just for Chrome. So this is an OOP-esque way to say "if CHROME:" (and if Firefox adds them in the future, https://bugzilla.mozilla.org/show_bug.cgi?id=2035615 )
|
Is there no a flag we can pass to instead just disable the "backgrounding logic" ? e.g. |
--headless will do that. Besides that, in headful runs, I'm not sure why one would want to do it, since it will result in failed tests? |
Sorry, my understanding of this change is that you are trying to force chrome to keep all the windows in foreground mode. You are doing this by moving the windows around hoping that chrome will not think any of them are in the background? Is that not right? |
|
Yes, that's right. (I'd refer to that as "cascading", you mentioned "backgrounding", which I understood to refer to the startup flags, which unfortunately aren't 100% bomb-proof like the Chrome bug ticket mentions) |
| config.configure(browser_data_dir) | ||
| browser_args += f' {config.data_dir_flag}"{browser_data_dir}"' | ||
|
|
||
| # In parallel runs, spawn browsers in cascaded window order so each is visible. |
There was a problem hiding this comment.
Can you add something like "Sadly, none of the exiting chrome flags for controlling xxx currently work, so this is a workaround for <bug_url>"
|
Oh! Sorry I didn't see that bug. I think this workaround seems fine, with an added comment about why we cannot use any of the command line flags. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On Linux, it is not possible to disable the window backgrounding logic in browser runs, so apply the same window cascading logic as was done on Firefox.
https://issues.chromium.org/issues/590631905