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

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

Issue 1981033003: MD Settings: About page, implement help and feedback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweak strings to match the mocks." Created 4 years, 7 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 b18298c57fe53212a7a7d892f147f4d2e3d0ddde..f70c60c538724e3141dc76cf5ff7be94ad445a20 100644
--- a/chrome/test/data/webui/settings/about_page_tests.js
+++ b/chrome/test/data/webui/settings/about_page_tests.js
@@ -11,6 +11,8 @@ cr.define('settings_about_page', function() {
var TestAboutPageBrowserProxy = function() {
settings.TestBrowserProxy.call(this, [
'refreshUpdateStatus',
+ 'openHelpPage',
+ 'openFeedbackDialog',
'getCurrentChannel',
'getVersionInfo',
]);
@@ -47,17 +49,58 @@ cr.define('settings_about_page', function() {
this.methodCalled('getVersionInfo');
return Promise.resolve(this.versionInfo_);
},
+
+ /** @override */
+ openFeedbackDialog: function() {
+ this.methodCalled('openFeedbackDialog');
+ },
+
+ /** @override */
+ openHelpPage: function() {
+ this.methodCalled('openHelpPage');
+ },
};
function registerAboutPageTests() {
- suite('AboutPageTest', function() {
- test('Initialization', function() {
- // TODO(dpapad): Implement this test once <settings-about-page> is
- // ready. Currently this is needed to avoid failing with
- // "Failure: Mocha ran, but no mocha tests were run!" on non-ChromeOS
- // test bots.
- });
+ suite('AboutPageTest', function() {
+ var page = null;
+ var browserProxy = null;
+
+ setup(function() {
+ browserProxy = new TestAboutPageBrowserProxy();
+ settings.AboutPageBrowserProxyImpl.instance_ = browserProxy;
+ PolymerTest.clearBody();
+ page = document.createElement('settings-about-page');
+ document.body.appendChild(page);
+ });
+
+ test('GetHelp', function() {
+ assertTrue(!!page.$.help);
+ MockInteractions.tap(page.$.help);
+ return browserProxy.whenCalled('openHelpPage');
+ });
+ });
+ }
+
+ function registerOfficialBuildTests() {
+ suite('AboutPageTest_OfficialBuild', function() {
+ var page = null;
+ var browserProxy = null;
+
+ setup(function() {
+ browserProxy = new TestAboutPageBrowserProxy();
+ settings.AboutPageBrowserProxyImpl.instance_ = browserProxy;
+ PolymerTest.clearBody();
+ page = document.createElement('settings-about-page');
+ document.body.appendChild(page);
+ });
+
+ test('ReportAnIssue', function() {
+ assertTrue(!!page.$.reportIssue);
+ MockInteractions.tap(page.$.reportIssue);
+ return browserProxy.whenCalled('openFeedbackDialog');
});
+ });
}
if (cr.isChromeOS) {
@@ -106,5 +149,6 @@ cr.define('settings_about_page', function() {
}
registerAboutPageTests();
},
+ registerOfficialBuildTests: registerOfficialBuildTests,
};
});

Powered by Google App Engine
This is Rietveld 408576698