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

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

Issue 1610973002: Settings People Revamp: Implement Change People preview pane (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@0072-settings-add-tests-for-cros-choose-picture
Patch Set: Created 4 years, 11 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
« no previous file with comments | « chrome/browser/resources/settings/people_page/change_picture.js ('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/change_picture_browsertest_chromeos.js
diff --git a/chrome/test/data/webui/settings/change_picture_browsertest_chromeos.js b/chrome/test/data/webui/settings/change_picture_browsertest_chromeos.js
index 52a977f6bbe2dfd76f504684d1bcb93df81389f1..cd8f5a5bf2e9e45be33392471da86119a9d9c5dc 100644
--- a/chrome/test/data/webui/settings/change_picture_browsertest_chromeos.js
+++ b/chrome/test/data/webui/settings/change_picture_browsertest_chromeos.js
@@ -75,6 +75,21 @@ TEST_F('SettingsChangePictureBrowserTest', 'MAYBE_ChangePicture', function() {
changePicture.selectedImageUrl_ = '';
});
+ test('select camera image', function() {
+ var cameraImage = changePicture.$$('#camera-image');
+ assertTrue(!!cameraImage);
+
+ assertFalse(changePicture.cameraActive_);
+ expectFalse(changePicture.$.previewImage.hidden);
+
+ MockInteractions.tap(cameraImage);
+
+ Polymer.dom.flush();
+
+ expectTrue(changePicture.cameraActive_);
+ expectTrue(changePicture.$.previewImage.hidden);
+ });
+
test('select profile image', function() {
var profileImage = changePicture.$$('#profile-image');
assertTrue(!!profileImage);
@@ -87,6 +102,7 @@ TEST_F('SettingsChangePictureBrowserTest', 'MAYBE_ChangePicture', function() {
Polymer.dom.flush();
expectTrue(profileImage.active);
+ expectFalse(changePicture.$.previewImage.hidden);
});
});
@@ -111,12 +127,12 @@ TEST_F('SettingsChangePictureBrowserTest', 'MAYBE_ChangePicture', function() {
var oldImage = changePicture.$$('#old-image');
assertTrue(!!oldImage);
expectTrue(oldImage.active);
+ expectFalse(changePicture.$.previewImage.hidden);
});
});
test('select first default image', function() {
var firstDefaultImage = changePicture.$$('.default-image');
- console.log(firstDefaultImage);
assertTrue(!!firstDefaultImage);
MockInteractions.tap(firstDefaultImage);
@@ -128,6 +144,7 @@ TEST_F('SettingsChangePictureBrowserTest', 'MAYBE_ChangePicture', function() {
Polymer.dom.flush();
expectTrue(firstDefaultImage.active);
+ expectFalse(changePicture.$.previewImage.hidden);
});
});
});
« no previous file with comments | « chrome/browser/resources/settings/people_page/change_picture.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698