From c72438f09f7d76e26028feeefbb4b9305835ad68 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 25 Jan 2017 08:44:01 +0900 Subject: [PATCH] WebInspector has been split up --- lib/renderer/inspector.js | 3 ++- spec/api-browser-window-spec.js | 4 ++-- spec/fixtures/pages/webview-devtools.html | 4 ++-- spec/package.json | 6 ++++-- vendor/brightray | 2 +- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/renderer/inspector.js b/lib/renderer/inspector.js index 81642dd6cf09..21aabbd347fb 100644 --- a/lib/renderer/inspector.js +++ b/lib/renderer/inspector.js @@ -3,7 +3,8 @@ window.onload = function () { window.InspectorFrontendHost.showContextMenuAtPoint = createMenu // Use dialog API to override file chooser dialog. - window.WebInspector.createFileSelectorElement = createFileSelectorElement + // Note: It will be moved to UI after Chrome 57. + window.Bindings.createFileSelectorElement = createFileSelectorElement } window.confirm = function (message, title) { diff --git a/spec/api-browser-window-spec.js b/spec/api-browser-window-spec.js index 213d917ae936..81d512212c39 100644 --- a/spec/api-browser-window-spec.js +++ b/spec/api-browser-window-spec.js @@ -1689,8 +1689,8 @@ describe('BrowserWindow module', function () { } const showLastPanel = function () { - const lastPanelId = WebInspector.inspectorView._tabbedPane._tabs.peekLast().id - WebInspector.inspectorView.showPanel(lastPanelId) + const lastPanelId = UI.inspectorView._tabbedPane._tabs.peekLast().id + UI.inspectorView.showPanel(lastPanelId) } devToolsWebContents.executeJavaScript(`(${showLastPanel})()`, false, () => { showPanelTimeoutId = setTimeout(show, 100) diff --git a/spec/fixtures/pages/webview-devtools.html b/spec/fixtures/pages/webview-devtools.html index c16dbb2f8f14..8928c4ea7988 100644 --- a/spec/fixtures/pages/webview-devtools.html +++ b/spec/fixtures/pages/webview-devtools.html @@ -13,8 +13,8 @@ var showPanelIntevalId = setInterval(function () { if (webContents.devToolsWebContents) { webContents.devToolsWebContents.executeJavaScript('(' + (function () { - var lastPanelId = WebInspector.inspectorView._tabbedPane._tabs.peekLast().id - WebInspector.inspectorView.showPanel(lastPanelId) + var lastPanelId = UI.inspectorView._tabbedPane._tabs.peekLast().id + UI.inspectorView.showPanel(lastPanelId) }).toString() + ')()') } else { clearInterval(showPanelIntevalId) diff --git a/spec/package.json b/spec/package.json index d0829f5db394..46aa8404c679 100644 --- a/spec/package.json +++ b/spec/package.json @@ -28,8 +28,10 @@ "serviceworker": true }, "globals": [ - "WebView", - "WebInspector" + "Bindings", + "Components", + "UI", + "WebView" ] } } diff --git a/vendor/brightray b/vendor/brightray index 593011033fee..a400856b41aa 160000 --- a/vendor/brightray +++ b/vendor/brightray @@ -1 +1 @@ -Subproject commit 593011033feed39fa037fa147648cfe93a4759bf +Subproject commit a400856b41aa0485a4b43ba1714c84fef4bb06f8