Skip to content

Commit

Permalink
fix: chrome://process-internals failing to load (#41476)
Browse files Browse the repository at this point in the history
fix: chrome://process-internals failing to load
  • Loading branch information
codebytere committed Mar 7, 2024
1 parent 62331f5 commit f826506
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions electron_paks.gni
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ template("electron_extra_paks") {
"//content:content_resources",
"//content/browser/resources/gpu:resources",
"//content/browser/resources/media:resources",
"//content/browser/resources/process:resources",
"//content/browser/tracing:resources",
"//content/browser/webrtc/resources",
"//electron:resources",
Expand All @@ -96,6 +97,7 @@ template("electron_extra_paks") {
# New paks should be added here by default.
sources += [
"$root_gen_dir/content/browser/devtools/devtools_resources.pak",
"$root_gen_dir/content/process_resources.pak",
"$root_gen_dir/ui/resources/webui_resources.pak",
]
deps += [ "//content/browser/devtools:devtools_resources" ]
Expand Down
6 changes: 4 additions & 2 deletions spec/chromium-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2113,16 +2113,18 @@ describe('chromium features', () => {
'chrome://gpu',
'chrome://media-internals',
'chrome://tracing',
'chrome://webrtc-internals'
'chrome://webrtc-internals',
'chrome://process-internals'
];

for (const url of urls) {
describe(url, () => {
it('loads the page successfully', async () => {
const w = new BrowserWindow({ show: false });
await w.loadURL(url);
const host = url.substring('chrome://'.length);
const pageExists = await w.webContents.executeJavaScript(
"window.hasOwnProperty('chrome') && window.chrome.hasOwnProperty('send')"
`window.hasOwnProperty('chrome') && window.location.host === '${host}'`
);
expect(pageExists).to.be.true();
});
Expand Down

0 comments on commit f826506

Please sign in to comment.