test: re-enable tests that were disabled in chromium rolls (#43968)
* test: fix should support base url for data urls test Caused by5802682
* test: fixup extensions can cancel http requests * chore: document custom protocol handling on Windows change due to Non-Special Scheme URLs shipping5802682
This commit is contained in:
parent
b60013fcf1
commit
40cae71df8
3 changed files with 47 additions and 12 deletions
|
@ -14,6 +14,33 @@ This document uses the following convention to categorize breaking changes:
|
|||
|
||||
## Planned Breaking API Changes (33.0)
|
||||
|
||||
### Behavior Changed: custom protocol URL handling on Windows
|
||||
|
||||
Due to changes made in Chromium to support [Non-Special Scheme URLs](http://bit.ly/url-non-special), custom protocol URLs that use Windows file paths will no longer work correctly with the deprecated `protocol.registerFileProtocol` and the `baseURLForDataURL` property on `BrowserWindow.loadURL`, `WebContents.loadURL`, and `<webview>.loadURL`. `protocol.handle` will also not work with these types of URLs but this is not a change since it has always worked that way.
|
||||
|
||||
```js
|
||||
// No longer works
|
||||
protocol.registerFileProtocol('other', () => {
|
||||
callback({ filePath: '/path/to/my/file' })
|
||||
})
|
||||
|
||||
const mainWindow = new BrowserWindow()
|
||||
mainWindow.loadURL('data:text/html,<script src="loaded-from-dataurl.js"></script>', { baseURLForDataURL: 'other://C:\\myapp' })
|
||||
mainWindow.loadURL('other://C:\\myapp\\index.html')
|
||||
|
||||
// Replace with
|
||||
const path = require('node:path')
|
||||
const nodeUrl = require('node:url')
|
||||
protocol.handle(other, (req) => {
|
||||
const srcPath = 'C:\\myapp\\'
|
||||
const reqURL = new URL(req.url)
|
||||
return net.fetch(nodeUrl.pathToFileURL(path.join(srcPath, reqURL.pathname)).toString())
|
||||
})
|
||||
|
||||
mainWindow.loadURL('data:text/html,<script src="loaded-from-dataurl.js"></script>', { baseURLForDataURL: 'other://' })
|
||||
mainWindow.loadURL('other://index.html')
|
||||
```
|
||||
|
||||
### Behavior Changed: menu bar will be hidden during fullscreen on Windows
|
||||
|
||||
This brings the behavior to parity with Linux. Prior behavior: Menu bar is still visible during fullscreen on Windows. New behavior: Menu bar is hidden during fullscreen on Windows.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue