-
Notifications
You must be signed in to change notification settings - Fork 5.3k
chore: screencast/tracing/video size conflicts #39512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c5b4744
4ce6dc0
8ce33fb
c00f6db
780552c
e861197
d648efe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "browser": { | ||
| "browserName": "chromium", | ||
| "launchOptions": { | ||
| "channel": "chromium" | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| git bisect start | ||
| # status: waiting for both good and bad commits | ||
| # bad: [e4498b29eababe5ab0345f7dd8ea0bf62932841e] chore: freeze webkit version on macos 14 (#38996) | ||
| git bisect bad e4498b29eababe5ab0345f7dd8ea0bf62932841e | ||
| # status: waiting for good commit(s), bad commit known | ||
| # bad: [e4498b29eababe5ab0345f7dd8ea0bf62932841e] chore: freeze webkit version on macos 14 (#38996) | ||
| git bisect bad e4498b29eababe5ab0345f7dd8ea0bf62932841e | ||
| # status: waiting for good commit(s), bad commit known | ||
| # good: [e4498b29eababe5ab0345f7dd8ea0bf62932841e] chore: freeze webkit version on macos 14 (#38996) | ||
| git bisect good e4498b29eababe5ab0345f7dd8ea0bf62932841e | ||
| # bad: [0c45dfc773fef0aa9e13016052bc4f3cd86ba288] fix(windows): hide console window when spawning browser processes (#38776) | ||
| git bisect bad 0c45dfc773fef0aa9e13016052bc4f3cd86ba288 | ||
| # good: [7b3b57ab4cf11065477fabb169f8f5d403ef2729] chore: follow up to args parsing (#39178) | ||
| git bisect good 7b3b57ab4cf11065477fabb169f8f5d403ef2729 | ||
| # bad: [65576628e6440c4fe05c88dda4a396ce4576baaa] feat(chromium): roll to r1212 (#39240) | ||
| git bisect bad 65576628e6440c4fe05c88dda4a396ce4576baaa | ||
| # bad: [19b4dcd33d4a5b64c942c535d840ac491a88f63a] chore(cli): tray icon (#39218) | ||
| git bisect bad 19b4dcd33d4a5b64c942c535d840ac491a88f63a | ||
| # bad: [0be34e5b32e4da50427f26262e8caa22de0bb2d6] test: make trace-viewer tests e2e (#39174) | ||
| git bisect bad 0be34e5b32e4da50427f26262e8caa22de0bb2d6 | ||
| # good: [bfd1ec67a923589fd3b6ff30a6bcceba87ceaf96] Update params.md: fix "it's" typos (#39180) | ||
| git bisect good bfd1ec67a923589fd3b6ff30a6bcceba87ceaf96 | ||
| # good: [8f729bab319adb56d23c224f9aa52b8bbb815734] chore(deps): bump jsonwebtoken from 9.0.2 to 9.0.3 (#39149) | ||
| git bisect good 8f729bab319adb56d23c224f9aa52b8bbb815734 | ||
| # good: [3d806ab4f1f71249217dfe804c96a9543173481a] chore(aria): replace UUID with regex (#39191) | ||
| git bisect good 3d806ab4f1f71249217dfe804c96a9543173481a | ||
| # first bad commit: [0be34e5b32e4da50427f26262e8caa22de0bb2d6] test: make trace-viewer tests e2e (#39174) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| git bisect start | ||
| # status: waiting for both good and bad commits | ||
| # bad: [0c45dfc773fef0aa9e13016052bc4f3cd86ba288] fix(windows): hide console window when spawning browser processes (#38776) | ||
| git bisect bad 0c45dfc773fef0aa9e13016052bc4f3cd86ba288 | ||
| # status: waiting for good commit(s), bad commit known | ||
| # good: [e4498b29eababe5ab0345f7dd8ea0bf62932841e] chore: freeze webkit version on macos 14 (#38996) | ||
| git bisect good e4498b29eababe5ab0345f7dd8ea0bf62932841e | ||
| # good: [7b3b57ab4cf11065477fabb169f8f5d403ef2729] chore: follow up to args parsing (#39178) | ||
| git bisect good 7b3b57ab4cf11065477fabb169f8f5d403ef2729 | ||
| # bad: [65576628e6440c4fe05c88dda4a396ce4576baaa] feat(chromium): roll to r1212 (#39240) | ||
| git bisect bad 65576628e6440c4fe05c88dda4a396ce4576baaa | ||
| # good: [19b4dcd33d4a5b64c942c535d840ac491a88f63a] chore(cli): tray icon (#39218) | ||
| git bisect good 19b4dcd33d4a5b64c942c535d840ac491a88f63a | ||
| # good: [529f767c666b092e70525b9bcdc30c0e8335457b] fix(chromium): use actual device scale factor for css-scale screenshots (#39233) | ||
| git bisect good 529f767c666b092e70525b9bcdc30c0e8335457b | ||
| # bad: [951911cefedb1dd5a2a15f854a51bd7c34504a5f] chore: split daemon and client folders (#39245) | ||
| git bisect bad 951911cefedb1dd5a2a15f854a51bd7c34504a5f | ||
| # bad: [63f13454dedaa8f12a487df62cf42d9d89192b5b] chore: roll driver/Dockerfile to recent Node.js LTS version (#39238) | ||
| git bisect bad 63f13454dedaa8f12a487df62cf42d9d89192b5b | ||
| # bad: [8946b03f6f7c53e4bca0e9a2f1ab346133bdd25d] test(bidi): set channel option in showTraceViewer() fixture (#39222) | ||
| git bisect bad 8946b03f6f7c53e4bca0e9a2f1ab346133bdd25d | ||
| # bad: [6d35c8b168768a1f6dbc19eb414b2373bd6de8a9] chore: prep devtools app (#39231) | ||
| git bisect bad 6d35c8b168768a1f6dbc19eb414b2373bd6de8a9 | ||
| # first bad commit: [6d35c8b168768a1f6dbc19eb414b2373bd6de8a9] chore: prep devtools app (#39231) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,7 +17,6 @@ | |
| import { Page, Worker } from '../page'; | ||
| import { Dispatcher } from './dispatcher'; | ||
| import { parseError, serializeError } from '../errors'; | ||
| import { validateVideoSize } from '../browserContext'; | ||
| import { ArtifactDispatcher } from './artifactDispatcher'; | ||
| import { ElementHandleDispatcher } from './elementHandlerDispatcher'; | ||
| import { FrameDispatcher } from './frameDispatcher'; | ||
|
|
@@ -31,6 +30,7 @@ import { SdkObject } from '../instrumentation'; | |
| import { deserializeURLMatch, urlMatches } from '../../utils/isomorphic/urlMatch'; | ||
| import { PageAgentDispatcher } from './pageAgentDispatcher'; | ||
| import { Recorder } from '../recorder'; | ||
| import { eventsHelper } from '../utils/eventsHelper'; | ||
| import { disposeAll } from '../disposable'; | ||
|
|
||
| import type { Artifact } from '../artifact'; | ||
|
|
@@ -48,6 +48,7 @@ import type * as channels from '@protocol/channels'; | |
| import type { Progress } from '@protocol/progress'; | ||
| import type { URLMatch } from '../../utils/isomorphic/urlMatch'; | ||
| import type { ScreencastFrame } from '../types'; | ||
| import type { RegisteredListener } from '../utils/eventsHelper'; | ||
|
|
||
| export class PageDispatcher extends Dispatcher<Page, channels.PageChannel, BrowserContextDispatcher> implements channels.PageChannel { | ||
| _type_EventTarget = true; | ||
|
|
@@ -62,6 +63,7 @@ export class PageDispatcher extends Dispatcher<Page, channels.PageChannel, Brows | |
| private _locatorHandlers = new Set<number>(); | ||
| private _jsCoverageActive = false; | ||
| private _cssCoverageActive = false; | ||
| private _screencastFrameListener: RegisteredListener | null = null; | ||
|
|
||
| static from(parentScope: BrowserContextDispatcher, page: Page): PageDispatcher { | ||
| return PageDispatcher.fromNullable(parentScope, page)!; | ||
|
|
@@ -110,7 +112,6 @@ export class PageDispatcher extends Dispatcher<Page, channels.PageChannel, Brows | |
| // Artifact can outlive the page, so bind to the context scope. | ||
| this._dispatchEvent('download', { url: download.url, suggestedFilename: download.suggestedFilename(), artifact: ArtifactDispatcher.from(parentScope, download.artifact) }); | ||
| }); | ||
| this.addObjectListener(Page.Events.ScreencastFrame, (frame: ScreencastFrame) => this._dispatchEvent('screencastFrame', { data: frame.buffer, width: frame.width, height: frame.height })); | ||
| this.addObjectListener(Page.Events.EmulatedSizeChanged, () => this._dispatchEvent('viewportSizeChanged', { viewportSize: page.emulatedSize()?.viewport })); | ||
| this.addObjectListener(Page.Events.FileChooser, (fileChooser: FileChooser) => this._dispatchEvent('fileChooser', { | ||
| element: ElementHandleDispatcher.from(mainFrame, fileChooser.element()), | ||
|
|
@@ -365,11 +366,20 @@ export class PageDispatcher extends Dispatcher<Page, channels.PageChannel, Brows | |
| } | ||
|
|
||
| async startScreencast(params: channels.PageStartScreencastParams, progress?: Progress): Promise<channels.PageStartScreencastResult> { | ||
| const size = validateVideoSize(params.size, this._page.emulatedSize()?.viewport); | ||
| if (this._screencastFrameListener) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why this change? I don't quite understand.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't want to send screencastframe events if screencast is disabled, there is new test that checks that. Previously if video started we'd start dispatching screencastframe events.
yury-s marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| throw new Error('Screencast is already running'); | ||
| const size = params.maxSize || { width: 800, height: 800 }; | ||
| // TODO: move to screencast and make startScrencast accept a listener. | ||
| this._screencastFrameListener = eventsHelper.addEventListener(this._page, Page.Events.ScreencastFrame, (frame: ScreencastFrame) => { | ||
| this._dispatchEvent('screencastFrame', { data: frame.buffer }); | ||
| }); | ||
| await this._page.screencast.startScreencast(this, { quality: 90, width: size.width, height: size.height }); | ||
| } | ||
|
|
||
| async stopScreencast(params: channels.PageStopScreencastParams, progress?: Progress): Promise<channels.PageStopScreencastResult> { | ||
| if (this._screencastFrameListener) | ||
| eventsHelper.removeEventListeners([this._screencastFrameListener]); | ||
| this._screencastFrameListener = null; | ||
| return this._page.screencast.stopScreencast(this); | ||
| } | ||
|
|
||
|
|
@@ -440,6 +450,9 @@ export class PageDispatcher extends Dispatcher<Page, channels.PageChannel, Brows | |
| if (this._cssCoverageActive) | ||
| (this._page.coverage as CRCoverage).stopCSSCoverage().catch(() => {}); | ||
| this._cssCoverageActive = false; | ||
| if (this._screencastFrameListener) | ||
| eventsHelper.removeEventListeners([this._screencastFrameListener]); | ||
| this._screencastFrameListener = null; | ||
| } | ||
|
|
||
| async setDockTile(params: channels.PageSetDockTileParams): Promise<void> { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.