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

Unified Diff: chrome/test/data/webui/settings/about_page_tests.js

Issue 2698133003: MD Settings: About: Show connectionTypes message (Closed)
Patch Set: Build HTML in the JS instead of using multiple vars Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/webui/settings/about_page_tests.js
diff --git a/chrome/test/data/webui/settings/about_page_tests.js b/chrome/test/data/webui/settings/about_page_tests.js
index 701bcfcb4be9d325bb82c4bef6eb84d3dc056d24..5b3f24b17eecc5967c99468e088b0d51b8ce56b2 100644
--- a/chrome/test/data/webui/settings/about_page_tests.js
+++ b/chrome/test/data/webui/settings/about_page_tests.js
@@ -60,12 +60,19 @@ cr.define('settings_about_page', function() {
this.updateStatus_ = updateStatus;
},
- /** @override */
- pageReady: function() {
- this.methodCalled('pageReady');
+ sendStatusNoInternet: function() {
+ cr.webUIListenerCallback('update-status-changed', {
+ progress: 0,
+ status: 'failed',
dpapad 2017/02/17 02:44:28 UpdateStatus.FAILED
stevenjb 2017/02/17 20:02:41 Done.
+ message: 'offline',
+ connectionTypes: 'no internet',
+ });
},
/** @override */
+ pageReady: function() { this.methodCalled('pageReady'); },
+
+ /** @override */
refreshUpdateStatus: function() {
cr.webUIListenerCallback('update-status-changed', {
progress: 1,
@@ -75,14 +82,10 @@ cr.define('settings_about_page', function() {
},
/** @override */
- openFeedbackDialog: function() {
- this.methodCalled('openFeedbackDialog');
- },
+ openFeedbackDialog: function() { this.methodCalled('openFeedbackDialog'); },
/** @override */
- openHelpPage: function() {
- this.methodCalled('openHelpPage');
- },
+ openHelpPage: function() { this.methodCalled('openHelpPage'); },
};
if (cr.isMac) {
@@ -350,6 +353,15 @@ cr.define('settings_about_page', function() {
});
if (cr.isChromeOS) {
+ test('NoInternet', function() {
+ assertTrue(page.$.updateStatusMessage.hidden);
+ aboutBrowserProxy.sendStatusNoInternet();
+ Polymer.dom.flush();
+ assertFalse(page.$.updateStatusMessage.hidden);
+ assertNotEquals(
+ -1, page.$.updateStatusMessage.innerHTML.indexOf('no internet'));
dpapad 2017/02/17 02:44:28 Nit (optional): You can use String#includes instea
stevenjb 2017/02/17 20:02:41 Huh. Good old JS, why have one method when you can
+ });
+
/**
* Test that all buttons update according to incoming
* 'update-status-changed' events for the case where target and current

Powered by Google App Engine
This is Rietveld 408576698