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

Side by Side Diff: chrome/test/data/pdf/material_elements_test.js

Issue 2283803003: PDF: Add shortcut to toggle fit-to-{page,width}. (Closed)
Patch Set: Extend testZoomToolbarToggle Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/resources/pdf/pdf.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 * Standalone unit tests of the PDF Polymer elements. 6 * Standalone unit tests of the PDF Polymer elements.
7 */ 7 */
8 var tests = [ 8 var tests = [
9 /** 9 /**
10 * Test that viewer-page-selector reacts correctly to text entry. The page 10 * Test that viewer-page-selector reacts correctly to text entry. The page
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 // Tap 2: Fire fit-to-width, show fit-to-page. 173 // Tap 2: Fire fit-to-width, show fit-to-page.
174 MockInteractions.tap(fab); 174 MockInteractions.tap(fab);
175 assertEvent('fit-to-width'); 175 assertEvent('fit-to-width');
176 chrome.test.assertTrue(fab.icon.endsWith(fitPageIcon)); 176 chrome.test.assertTrue(fab.icon.endsWith(fitPageIcon));
177 177
178 // Tap 3: Fire fit-to-page again. 178 // Tap 3: Fire fit-to-page again.
179 MockInteractions.tap(fab); 179 MockInteractions.tap(fab);
180 assertEvent('fit-to-page'); 180 assertEvent('fit-to-page');
181 181
182 // Do the same as above, but with fitToggleFromHotKey().
183 zoomToolbar.fitToggleFromHotKey();
184 assertEvent('fit-to-width');
185 zoomToolbar.fitToggleFromHotKey();
186 assertEvent('fit-to-page');
187 zoomToolbar.fitToggleFromHotKey();
188 assertEvent('fit-to-width');
189
190 // Tap 4: Fire fit-to-page again.
191 MockInteractions.tap(fab);
192 assertEvent('fit-to-page');
193
182 chrome.test.succeed(); 194 chrome.test.succeed();
183 } 195 }
184 ]; 196 ];
185 197
186 importTestHelpers().then(function() { 198 importTestHelpers().then(function() {
187 chrome.test.runTests(tests); 199 chrome.test.runTests(tests);
188 }); 200 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/pdf/pdf.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698