Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/resources/ServiceWorkersView.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/resources/ServiceWorkersView.js b/third_party/WebKit/Source/devtools/front_end/resources/ServiceWorkersView.js |
| index 2ff609166864e2376b0603330d04ff64edf17406..99e1efa8885d8ab4778f22eb48111d05f7c6e25e 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/resources/ServiceWorkersView.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/resources/ServiceWorkersView.js |
| @@ -37,9 +37,12 @@ WebInspector.ServiceWorkersView.prototype = { |
| this._toolbar.appendToolbarItem(WebInspector.NetworkConditionsSelector.createOfflineToolbarCheckbox()); |
| var forceUpdate = new WebInspector.ToolbarCheckbox(WebInspector.UIString("Update on reload"), WebInspector.UIString("Force update Service Worker on page reload"), this._manager.forceUpdateOnReloadSetting()); |
| this._toolbar.appendToolbarItem(forceUpdate); |
| - var fallbackToNetwork = new WebInspector.ToolbarCheckbox(WebInspector.UIString("Bypass for network"), WebInspector.UIString("Bypass Service Worker and load resources from the network"), target.networkManager.bypassServiceWorkerSetting()); |
| - this._toolbar.appendToolbarItem(fallbackToNetwork); |
| - this._toolbar.appendSpacer(); |
| + var networkManager = this.target && WebInspector.NetworkManager.fromTarget(this.target); |
|
dgozman
2016/06/29 18:37:57
this._target, not this.target
Do we have tests for
eostroukhov-old
2016/06/29 22:54:20
Looks like no tests detect missing toolbar button.
|
| + if (networkManager) { |
| + var fallbackToNetwork = new WebInspector.ToolbarCheckbox(WebInspector.UIString("Bypass for network"), WebInspector.UIString("Bypass Service Worker and load resources from the network"), networkManager.bypassServiceWorkerSetting()); |
| + this._toolbar.appendToolbarItem(fallbackToNetwork); |
| + this._toolbar.appendSpacer(); |
| + } |
| this._showAllCheckbox = new WebInspector.ToolbarCheckbox(WebInspector.UIString("Show all"), WebInspector.UIString("Show all Service Workers regardless of the origin")); |
| this._showAllCheckbox.inputElement.addEventListener("change", this._updateSectionVisibility.bind(this), false); |
| this._toolbar.appendToolbarItem(this._showAllCheckbox); |