| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 this.scrollDirection.bind(this, 1.0, 0.5) // Right edge | 112 this.scrollDirection.bind(this, 1.0, 0.5) // Right edge |
| 113 ).then( | 113 ).then( |
| 114 this.scrollDirection.bind(this, 0.5, 1.0) // Bottom edge | 114 this.scrollDirection.bind(this, 0.5, 1.0) // Bottom edge |
| 115 ).then( | 115 ).then( |
| 116 this.scrollDirection.bind(this, 0.0, 0.5) // Left edge | 116 this.scrollDirection.bind(this, 0.0, 0.5) // Left edge |
| 117 ).then( | 117 ).then( |
| 118 this.scrollDirection.bind(this, 0.5, 0.0) // Top edge | 118 this.scrollDirection.bind(this, 0.5, 0.0) // Top edge |
| 119 ).then( | 119 ).then( |
| 120 function(value) { | 120 function(value) { |
| 121 cleanup(); | 121 cleanup(); |
| 122 return browserTest.pass(value); | 122 return browserTest.pass(); |
| 123 }, | 123 }, |
| 124 function(error) { | 124 function(error) { |
| 125 cleanup(); | 125 cleanup(); |
| 126 return browserTest.fail(error); | 126 return browserTest.fail(error); |
| 127 } | 127 } |
| 128 ); | 128 ); |
| 129 }; | 129 }; |
| 130 | 130 |
| 131 /** | 131 /** |
| 132 * @return {Promise} | 132 * @return {Promise} |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 */ | 347 */ |
| 348 browserTest.Bump_Scroll.prototype.verifyNoScroll = | 348 browserTest.Bump_Scroll.prototype.verifyNoScroll = |
| 349 function(opt_desktopViewport) { | 349 function(opt_desktopViewport) { |
| 350 var desktopViewport = opt_desktopViewport || getViewportForTesting(); | 350 var desktopViewport = opt_desktopViewport || getViewportForTesting(); |
| 351 var bumpScroller = desktopViewport.getBumpScrollerForTesting(); | 351 var bumpScroller = desktopViewport.getBumpScrollerForTesting(); |
| 352 if (!bumpScroller) { | 352 if (!bumpScroller) { |
| 353 Promise.resolve(true); | 353 Promise.resolve(true); |
| 354 } | 354 } |
| 355 return this.verifyScroll(undefined, undefined, desktopViewport); | 355 return this.verifyScroll(undefined, undefined, desktopViewport); |
| 356 }; | 356 }; |
| OLD | NEW |