refactor: implement <webview> methods via dedicated IPCs without the remote module (#14377)

This commit is contained in:
Milan Burda 2018-10-01 03:07:50 +02:00 committed by Cheng Zhao
parent ce38be74df
commit d48f9bcf7f
4 changed files with 73 additions and 48 deletions

View file

@ -890,7 +890,6 @@ describe('<webview> tag', function () {
it('throws a custom error when an API method is called before the event is emitted', () => {
const expectedErrorMessage =
'Cannot call stop because the webContents is unavailable. ' +
'The WebView must be attached to the DOM ' +
'and the dom-ready event emitted before this method can be called.'
expect(() => { webview.stop() }).to.throw(expectedErrorMessage)
@ -1179,7 +1178,6 @@ describe('<webview> tag', function () {
loadWebView(webview)
setTimeout(() => {
const expectedErrorMessage =
'Cannot call stop because the webContents is unavailable. ' +
'The WebView must be attached to the DOM ' +
'and the dom-ready event emitted before this method can be called.'
expect(() => { webview.stop() }).to.throw(expectedErrorMessage)