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

Unified Diff: remoting/webapp/browser_test/bump_scroll_browser_test.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
« no previous file with comments | « no previous file | remoting/webapp/crd/js/desktop_viewport.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/browser_test/bump_scroll_browser_test.js
diff --git a/remoting/webapp/browser_test/bump_scroll_browser_test.js b/remoting/webapp/browser_test/bump_scroll_browser_test.js
index 76b5211b77beede8dd779210a802d7944a89213e..f8dc7ccaa351cfd439284108ae0489e427323e9c 100644
--- a/remoting/webapp/browser_test/bump_scroll_browser_test.js
+++ b/remoting/webapp/browser_test/bump_scroll_browser_test.js
@@ -119,7 +119,7 @@ browserTest.Bump_Scroll.prototype.noScrollWindowed = function() {
window.innerWidth + this.kHostDesktopSizeDelta,
window.innerHeight + this.kHostDesktopSizeDelta);
this.moveMouseTo(0, 0);
- return this.verifyScroll(undefined, undefined);
+ return this.verifyNoScroll();
};
/**
@@ -131,7 +131,7 @@ browserTest.Bump_Scroll.prototype.noScrollSmaller = function() {
window.innerWidth - this.kHostDesktopSizeDelta,
window.innerHeight - this.kHostDesktopSizeDelta);
this.moveMouseTo(0, 0);
- return this.verifyScroll(undefined, undefined);
+ return this.verifyNoScroll();
};
/**
@@ -217,13 +217,13 @@ browserTest.Bump_Scroll.prototype.testVerifyScroll = function() {
var that = this;
// No events raised (e.g. windowed mode).
- var result = this.verifyScroll(undefined, undefined, fakeViewport)
+ var result = this.verifyNoScroll(fakeViewport)
.then(function() {
// Start and end events raised, but no scrolling (e.g. full-screen mode
// with host desktop <= window size).
fakeViewport = new browserTest.FakeDesktopViewport;
- var result = that.verifyScroll(undefined, undefined, fakeViewport);
+ var result = that.verifyNoScroll(fakeViewport);
fakeViewport.raiseEvent(STARTED, {});
fakeViewport.raiseEvent(STOPPED, {});
return result;
@@ -320,3 +320,21 @@ browserTest.Bump_Scroll.prototype.verifyScroll =
return verifyPluginPosition();
});
};
+
+/**
+ * @param {browserTest.FakeDesktopViewport=} opt_desktopViewport
+ * DesktopViewport fake, for testing.
+ *
+ * @return {Promise<boolean>} A promise that resolves to true if no scrolling
+ * occurs within a timeout.
+ */
+browserTest.Bump_Scroll.prototype.verifyNoScroll =
+ function(opt_desktopViewport) {
+ var desktopViewport = opt_desktopViewport ||
+ remoting.desktopConnectedView.getViewportForTesting();
+ var bumpScroller = desktopViewport.getBumpScrollerForTesting();
+ if (!bumpScroller) {
+ Promise.resolve(true);
+ }
+ return this.verifyScroll(undefined, undefined, desktopViewport);
+};
« no previous file with comments | « no previous file | remoting/webapp/crd/js/desktop_viewport.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698