OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @fileoverview | 6 * @fileoverview |
7 * @suppress {checkTypes} | 7 * @suppress {checkTypes} |
8 * Browser test for the scenario below: | 8 * Browser test for the scenario below: |
9 * 1. Enter full-screen mode | 9 * 1. Enter full-screen mode |
10 * 2. Move the mouse to each edge; verify that the desktop bump-scrolls. | 10 * 2. Move the mouse to each edge; verify that the desktop bump-scrolls. |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 function() { | 44 function() { |
45 return this.pluginPosition_; | 45 return this.pluginPosition_; |
46 }; | 46 }; |
47 | 47 |
48 /** @return {base.EventSource} */ | 48 /** @return {base.EventSource} */ |
49 browserTest.FakeDesktopViewport.prototype.getBumpScrollerForTesting = | 49 browserTest.FakeDesktopViewport.prototype.getBumpScrollerForTesting = |
50 function() { | 50 function() { |
51 return this.bumpScroller_; | 51 return this.bumpScroller_; |
52 }; | 52 }; |
53 | 53 |
| 54 /** @suppress {reportUnknownTypes} */ |
54 browserTest.FakeDesktopViewport.prototype.raiseEvent = | 55 browserTest.FakeDesktopViewport.prototype.raiseEvent = |
55 function() { | 56 function() { |
56 return this.bumpScroller_.raiseEvent.apply(this.bumpScroller_, arguments); | 57 return this.bumpScroller_.raiseEvent.apply(this.bumpScroller_, arguments); |
57 }; | 58 }; |
58 | 59 |
59 /** @return {remoting.DesktopViewport} */ | 60 /** @return {remoting.DesktopViewport} */ |
60 function getViewportForTesting() { | 61 function getViewportForTesting() { |
61 var desktopApp = /** @type {remoting.DesktopRemoting} */ (remoting.app); | 62 var desktopApp = /** @type {remoting.DesktopRemoting} */ (remoting.app); |
62 var view = desktopApp.getConnectedViewForTesting(); | 63 var view = desktopApp.getConnectedViewForTesting(); |
63 if (view) { | 64 if (view) { |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 */ | 348 */ |
348 browserTest.Bump_Scroll.prototype.verifyNoScroll = | 349 browserTest.Bump_Scroll.prototype.verifyNoScroll = |
349 function(opt_desktopViewport) { | 350 function(opt_desktopViewport) { |
350 var desktopViewport = opt_desktopViewport || getViewportForTesting(); | 351 var desktopViewport = opt_desktopViewport || getViewportForTesting(); |
351 var bumpScroller = desktopViewport.getBumpScrollerForTesting(); | 352 var bumpScroller = desktopViewport.getBumpScrollerForTesting(); |
352 if (!bumpScroller) { | 353 if (!bumpScroller) { |
353 Promise.resolve(true); | 354 Promise.resolve(true); |
354 } | 355 } |
355 return this.verifyScroll(undefined, undefined, desktopViewport); | 356 return this.verifyScroll(undefined, undefined, desktopViewport); |
356 }; | 357 }; |
OLD | NEW |