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

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

Issue 2555373003: MD Settings: Deactivate the Camera when leaving the Change Picture page. (Closed)
Patch Set: fix closure compile Created 4 years 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
« no previous file with comments | « chrome/browser/resources/settings/people_page/compiled_resources2.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/settings/people_page_change_picture_test.js
diff --git a/chrome/test/data/webui/settings/people_page_change_picture_test.js b/chrome/test/data/webui/settings/people_page_change_picture_test.js
index 1f9dc4b5cc4516db2bc1d6f76afbbf054c43af0b..4d51677affa697402b28d892c685dc2dee970489 100644
--- a/chrome/test/data/webui/settings/people_page_change_picture_test.js
+++ b/chrome/test/data/webui/settings/people_page_change_picture_test.js
@@ -107,6 +107,8 @@ cr.define('settings_people_page_change_picture', function() {
discardControlBar = changePicture.$.discardControlBar;
assertTrue(!!discardControlBar);
+ changePicture.currentRouteChanged(settings.Route.CHANGE_PICTURE);
+
return browserProxy.whenCalled('initialize').then(function() {
Polymer.dom.flush();
});
@@ -139,6 +141,10 @@ cr.define('settings_people_page_change_picture', function() {
expectEquals(ChangePictureSelectionTypes.CAMERA,
getSelectedItem().dataset.type);
expectTrue(discardControlBar.hidden);
+
+ // Ensure that the camera is deactivated if user navigates away.
+ changePicture.currentRouteChanged(settings.Route.BASIC);
+ expectFalse(settingsCamera.cameraActive);
});
test('ChangePictureProfileImage', function() {
« no previous file with comments | « chrome/browser/resources/settings/people_page/compiled_resources2.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698