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

Side by Side Diff: chrome/test/data/webui/settings/downloads_page_test.js

Issue 2769593002: MD Settings/Downloads: show file chooser after CHANGE button ripple completes (Closed)
Patch Set: test fix Created 3 years, 9 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 * @constructor 6 * @constructor
7 * @implements {settings.DownloadsBrowserProxy} 7 * @implements {settings.DownloadsBrowserProxy}
8 * @extends {settings.TestBrowserProxy} 8 * @extends {settings.TestBrowserProxy}
9 */ 9 */
10 var TestDownloadsBrowserProxy = function() { 10 var TestDownloadsBrowserProxy = function() {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 }); 54 });
55 55
56 teardown(function() { 56 teardown(function() {
57 downloadsPage.remove(); 57 downloadsPage.remove();
58 }); 58 });
59 59
60 test('select downloads location', function() { 60 test('select downloads location', function() {
61 var button = downloadsPage.$$('#changeDownloadsPath'); 61 var button = downloadsPage.$$('#changeDownloadsPath');
62 assertTrue(!!button); 62 assertTrue(!!button);
63 MockInteractions.tap(button); 63 MockInteractions.tap(button);
64 button.fire('transitionend');
64 return DownloadsBrowserProxy.whenCalled('selectDownloadLocation'); 65 return DownloadsBrowserProxy.whenCalled('selectDownloadLocation');
65 }); 66 });
66 67
67 test('openAdvancedDownloadsettings', function() { 68 test('openAdvancedDownloadsettings', function() {
68 var button = downloadsPage.$$('#resetAutoOpenFileTypes'); 69 var button = downloadsPage.$$('#resetAutoOpenFileTypes');
69 assertTrue(!button); 70 assertTrue(!button);
70 71
71 cr.webUIListenerCallback('auto-open-downloads-changed', true); 72 cr.webUIListenerCallback('auto-open-downloads-changed', true);
72 Polymer.dom.flush(); 73 Polymer.dom.flush();
73 var button = downloadsPage.$$('#resetAutoOpenFileTypes'); 74 var button = downloadsPage.$$('#resetAutoOpenFileTypes');
74 assertTrue(!!button); 75 assertTrue(!!button);
75 76
76 MockInteractions.tap(button); 77 MockInteractions.tap(button);
77 return DownloadsBrowserProxy.whenCalled('resetAutoOpenFileTypes') 78 return DownloadsBrowserProxy.whenCalled('resetAutoOpenFileTypes')
78 .then(function() { 79 .then(function() {
79 cr.webUIListenerCallback('auto-open-downloads-changed', false); 80 cr.webUIListenerCallback('auto-open-downloads-changed', false);
80 Polymer.dom.flush(); 81 Polymer.dom.flush();
81 var button = downloadsPage.$$('#resetAutoOpenFileTypes'); 82 var button = downloadsPage.$$('#resetAutoOpenFileTypes');
82 assertTrue(!button); 83 assertTrue(!button);
83 }); 84 });
84 }); 85 });
85 }); 86 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698