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

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

Issue 2698133003: MD Settings: About: Show connectionTypes message (Closed)
Patch Set: Rebase 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..9e02715936e0af5b9c4f21a0df5e84d0d2a953f3 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: UpdateStatus.FAILED,
+ 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(
+ page.$.updateStatusMessage.innerHTML.includes('no internet'));
+ });
+
/**
* 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