Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(705)

Unified Diff: third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeToolbar.js

Issue 2446113004: DevTools: add tests for device mode's responsive mode (Closed)
Patch Set: ac Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/device-mode/device-mode-responsive-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeToolbar.js
diff --git a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeToolbar.js b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeToolbar.js
index 1011869d43cfadd91cb1bb3dcb82be56943f25cf..86e901bf1f5b1e35b63d435f050fae0026320fa3 100644
--- a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeToolbar.js
+++ b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeToolbar.js
@@ -83,7 +83,7 @@ WebInspector.DeviceModeToolbar.prototype = {
widthInput.maxLength = 4;
widthInput.type = "text";
widthInput.title = WebInspector.UIString("Width");
- this._updateWidthInput = WebInspector.bindInput(widthInput, applyWidth.bind(this), WebInspector.DeviceModeModel.deviceSizeValidator, true);
+ this._updateWidthInput = WebInspector.bindInput(widthInput, this._applyWidth.bind(this), WebInspector.DeviceModeModel.deviceSizeValidator, true);
this._widthInput = widthInput;
this._widthItem = this._wrapToolbarItem(widthInput);
toolbar.appendToolbarItem(this._widthItem);
@@ -97,7 +97,7 @@ WebInspector.DeviceModeToolbar.prototype = {
heightInput.maxLength = 4;
heightInput.type = "text";
heightInput.title = WebInspector.UIString("Height (leave empty for full)");
- this._updateHeightInput = WebInspector.bindInput(heightInput, applyHeight.bind(this), validateHeight, true);
+ this._updateHeightInput = WebInspector.bindInput(heightInput, this._applyHeight.bind(this), validateHeight, true);
this._heightInput = heightInput;
this._heightItem = this._wrapToolbarItem(heightInput);
toolbar.appendToolbarItem(this._heightItem);
@@ -110,26 +110,24 @@ WebInspector.DeviceModeToolbar.prototype = {
{
return !value || WebInspector.DeviceModeModel.deviceSizeValidator(value);
}
+ },
- /**
- * @param {string} value
- * @this {WebInspector.DeviceModeToolbar}
- */
- function applyWidth(value)
- {
- var width = value ? Number(value) : 0;
- this._model.setWidthAndScaleToFit(width);
- }
+ /**
+ * @param {string} value
+ */
+ _applyWidth: function(value)
+ {
+ var width = value ? Number(value) : 0;
+ this._model.setWidthAndScaleToFit(width);
+ },
- /**
- * @param {string} value
- * @this {WebInspector.DeviceModeToolbar}
- */
- function applyHeight(value)
- {
- var height = value ? Number(value) : 0;
- this._model.setHeightAndScaleToFit(height);
- }
+ /**
+ * @param {string} value
+ */
+ _applyHeight: function(value)
+ {
+ var height = value ? Number(value) : 0;
+ this._model.setHeightAndScaleToFit(height);
},
/**
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/device-mode/device-mode-responsive-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698