Chromium Code Reviews| 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..fdd68249f593b260201d118b8960520d8476cfd9 100644 |
| --- a/chrome/test/data/webui/settings/about_page_tests.js |
| +++ b/chrome/test/data/webui/settings/about_page_tests.js |
| @@ -10,9 +10,11 @@ cr.define('settings_about_page', function() { |
| */ |
| var TestAboutPageBrowserProxy = function() { |
| settings.TestBrowserProxy.call(this, [ |
| - 'refreshUpdateStatus', |
| 'getCurrentChannel', |
| 'getVersionInfo', |
| + 'openFeedbackDialog', |
|
tommycli
2016/05/17 00:36:48
nit: Can we make this match the interface order?
dpapad
2016/05/17 00:45:13
Done.
|
| + 'openHelpPage', |
| + 'refreshUpdateStatus', |
| ]); |
| /** @type {!VersionInfo} */ |
| @@ -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, |
| }; |
| }); |