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

Side by Side Diff: chrome/test/data/webui/md_downloads/layout_tests.js

Issue 2455393004: MD Downloads: reduce the size of the ellided, displayed download URL (Closed)
Patch Set: she's choppin, she's choppin, brocoooooooollliiiiiii Created 4 years, 1 month 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/md_downloads/vulcanized.html ('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 suite('layout tests', function() { 5 suite('layout tests', function() {
6 /** @type {!downloads.Manager} */ 6 /** @type {!downloads.Manager} */
7 var manager; 7 var manager;
8 8
9 setup(function() { 9 setup(function() {
10 PolymerTest.clearBody(); 10 PolymerTest.clearBody();
11 manager = document.createElement('downloads-manager'); 11 manager = document.createElement('downloads-manager');
12 document.body.appendChild(manager); 12 document.body.appendChild(manager);
13 assertEquals(manager, downloads.Manager.get()); 13 assertEquals(manager, downloads.Manager.get());
14 }); 14 });
15 15
16 test('long URLs ellide', function() { 16 test('long URLs ellide', function() {
17 downloads.Manager.insertItems(0, [{ 17 downloads.Manager.insertItems(0, [{
18 file_name: 'file name', 18 file_name: 'file name',
19 state: downloads.States.COMPLETE, 19 state: downloads.States.COMPLETE,
20 url: 'a'.repeat(1000), 20 url: 'a'.repeat(1000),
21 }]); 21 }]);
22 22
23 Polymer.dom.flush(); 23 Polymer.dom.flush();
24 24
25 var item = manager.$$('downloads-item'); 25 var item = manager.$$('downloads-item');
26 assertLT(item.$$('#url').offsetWidth, item.offsetWidth); 26 assertLT(item.$$('#url').offsetWidth, item.offsetWidth);
27 assertEquals(300, item.$$('#url').textContent.length);
27 }); 28 });
28 }); 29 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_downloads/vulcanized.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698