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

Unified Diff: remoting/webapp/crd/js/desktop_viewport.js

Issue 951773005: Enables bump scrolling browser test on the Chromoting Waterfall. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
Index: remoting/webapp/crd/js/desktop_viewport.js
diff --git a/remoting/webapp/crd/js/desktop_viewport.js b/remoting/webapp/crd/js/desktop_viewport.js
index 1c9082d16fddaf5e965a901af7be899b9e79bca1..02c9a5219e4bfbbe5aa9b64aff118b0af793954b 100644
--- a/remoting/webapp/crd/js/desktop_viewport.js
+++ b/remoting/webapp/crd/js/desktop_viewport.js
@@ -92,10 +92,17 @@ remoting.DesktopViewport.prototype.getResizeToClient = function() {
* @return {{top:number, left:number}} The top-left corner of the plugin.
*/
remoting.DesktopViewport.prototype.getPluginPositionForTesting = function() {
- var style = this.pluginContainer_.style;
+ /**
+ * @param {number|string} value
+ * @return {number}
+ */
+ function toFloat(value) {
+ var number = parseFloat(value);
+ return isNaN(number) ? 0 : number;
+ }
return {
- top: parseFloat(style.marginTop),
- left: parseFloat(style.marginLeft)
+ top: toFloat(this.pluginContainer_.style.marginTop),
+ left: toFloat(this.pluginContainer_.style.marginLeft)
};
};
« no previous file with comments | « remoting/webapp/browser_test/bump_scroll_browser_test.js ('k') | testing/chromoting/browser_test_commands_linux.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698