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

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

Issue 1312373002: Material PDF: Style audit and cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests for page selector Created 5 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 chrome.test.succeed(); 43 chrome.test.succeed();
44 }, 44 },
45 45
46 /** 46 /**
47 * Test that viewer-page-selector changes in response to setting docLength. 47 * Test that viewer-page-selector changes in response to setting docLength.
48 */ 48 */
49 function testPageSelectorDocLength() { 49 function testPageSelectorDocLength() {
50 var selector = 50 var selector =
51 Polymer.Base.create('viewer-page-selector', {docLength: 1234}); 51 Polymer.Base.create('viewer-page-selector', {docLength: 1234});
52 chrome.test.assertEq('/ 1234', selector.$.pagelength.textContent); 52 chrome.test.assertEq('1234', selector.$.pagelength.textContent);
53 chrome.test.assertEq('2.4em', selector.$.pageselector.style.width); 53 chrome.test.assertEq('4ch', selector.$.pageselector.style.width);
54 chrome.test.succeed(); 54 chrome.test.succeed();
55 }, 55 },
56 56
57 /** 57 /**
58 * Test that clicking the dropdown icon opens/closes the dropdown. 58 * Test that clicking the dropdown icon opens/closes the dropdown.
59 */ 59 */
60 function testToolbarDropdownShowHide() { 60 function testToolbarDropdownShowHide() {
61 var dropdown = Polymer.Base.create('viewer-toolbar-dropdown', { 61 var dropdown = Polymer.Base.create('viewer-toolbar-dropdown', {
62 header: 'Test Menu', 62 header: 'Test Menu',
63 closedIcon: 'closedIcon', 63 closedIcon: 'closedIcon',
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 MockInteractions.tap(fab); 178 MockInteractions.tap(fab);
179 assertEvent('fit-to-page'); 179 assertEvent('fit-to-page');
180 180
181 chrome.test.succeed(); 181 chrome.test.succeed();
182 } 182 }
183 ]; 183 ];
184 184
185 importTestHelpers().then(function() { 185 importTestHelpers().then(function() {
186 chrome.test.runTests(tests); 186 chrome.test.runTests(tests);
187 }); 187 });
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