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

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

Issue 2074483003: MD Downloads: hide ... (more options) menu on resize (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: michaelpg review Created 4 years, 6 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
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 cr.define('downloads.layout_tests', function() { 5 suite('layout tests', function() {
6 function registerTests() { 6 /** @type {!downloads.Manager} */
7 suite('LayoutTests', function() { 7 var manager;
8 /** @type {!downloads.Manager} */
9 var manager;
10 8
11 setup(function() { 9 setup(function() {
12 PolymerTest.clearBody(); 10 PolymerTest.clearBody();
13 manager = document.createElement('downloads-manager'); 11 manager = document.createElement('downloads-manager');
14 document.body.appendChild(manager); 12 document.body.appendChild(manager);
15 assertEquals(manager, downloads.Manager.get()); 13 assertEquals(manager, downloads.Manager.get());
16 }); 14 });
17 15
18 test('long URLs ellide', function() { 16 test('long URLs ellide', function() {
19 downloads.Manager.insertItems(0, [{ 17 downloads.Manager.insertItems(0, [{
20 file_name: 'file name', 18 file_name: 'file name',
21 state: downloads.States.COMPLETE, 19 state: downloads.States.COMPLETE,
22 url: 'a'.repeat(1000), 20 url: 'a'.repeat(1000),
23 }]); 21 }]);
24 22
25 Polymer.dom.flush(); 23 Polymer.dom.flush();
26 24
27 var item = manager.$$('downloads-item'); 25 var item = manager.$$('downloads-item');
28 assertLT(item.$$('#url').offsetWidth, item.offsetWidth); 26 assertLT(item.$$('#url').offsetWidth, item.offsetWidth);
29 }); 27 });
30 });
31 }
32
33 return {
34 registerTests: registerTests,
35 };
36 }); 28 });
OLDNEW
« no previous file with comments | « chrome/test/data/webui/md_downloads/downloads_browsertest.js ('k') | chrome/test/data/webui/md_downloads/toolbar_tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698