summaryrefslogtreecommitdiffstats
path: root/chrome/test/data/webui/settings/change_picture_browsertest_chromeos.js
diff options
context:
space:
mode:
authortommycli <tommycli@chromium.org>2016-03-09 11:37:48 -0800
committerCommit bot <commit-bot@chromium.org>2016-03-09 19:41:08 +0000
commitb2bf6ebb42d71afea2b6ef3834a40724fa2fb3f6 (patch)
tree6cb7eb25edf4fceb1aabc6b263961e7ff57f4df0 /chrome/test/data/webui/settings/change_picture_browsertest_chromeos.js
parentae35edbf864d215d1dc699225a1b0e0ece08b3be (diff)
downloadchromium_src-b2bf6ebb42d71afea2b6ef3834a40724fa2fb3f6.zip
chromium_src-b2bf6ebb42d71afea2b6ef3834a40724fa2fb3f6.tar.gz
chromium_src-b2bf6ebb42d71afea2b6ef3834a40724fa2fb3f6.tar.bz2
Settings People Revamp: Change Picture: Update to new C++ <-> JS method.
This uses the FooBrowserProxy pattern for JS -> C++ communication and the WebUIListener pattern for the C++ -> JS communication. BUG=563721 Review URL: https://codereview.chromium.org/1780573002 Cr-Commit-Position: refs/heads/master@{#380178}
Diffstat (limited to 'chrome/test/data/webui/settings/change_picture_browsertest_chromeos.js')
-rw-r--r--chrome/test/data/webui/settings/change_picture_browsertest_chromeos.js8
1 files changed, 4 insertions, 4 deletions
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 faa6a03..261f0cd 100644
--- a/chrome/test/data/webui/settings/change_picture_browsertest_chromeos.js
+++ b/chrome/test/data/webui/settings/change_picture_browsertest_chromeos.js
@@ -85,13 +85,13 @@ TEST_F('SettingsChangePictureBrowserTest', 'MAYBE_ChangePicture', function() {
assertTrue(!!cameraIcon);
// Force the camera to be absent, even if it's actually present.
- settings.ChangePicturePage.receiveCameraPresence(false);
+ cr.webUIListenerCallback('camera-presence-changed', false);
Polymer.dom.flush();
expectTrue(cameraIcon.hidden);
expectFalse(settingsCamera.cameraActive);
- settings.ChangePicturePage.receiveCameraPresence(true);
+ cr.webUIListenerCallback('camera-presence-changed', true);
Polymer.dom.flush();
expectFalse(cameraIcon.hidden);
@@ -127,7 +127,7 @@ TEST_F('SettingsChangePictureBrowserTest', 'MAYBE_ChangePicture', function() {
assertTrue(oldImage.hidden);
return runAndResolveWhenSelectedItemChanged(function() {
- settings.ChangePicturePage.receiveOldImage('fake-old-image.jpg');
+ cr.webUIListenerCallback('old-image-changed', 'fake-old-image.jpg');
}).then(function() {
Polymer.dom.flush();
@@ -172,7 +172,7 @@ TEST_F('SettingsChangePictureBrowserTest', 'MAYBE_ChangePicture', function() {
function injectAndVerifyOldImage() {
return runAndResolveWhenSelectedItemChanged(function() {
- settings.ChangePicturePage.receiveOldImage('fake-old-image.jpg');
+ cr.webUIListenerCallback('old-image-changed', 'fake-old-image.jpg');
}).then(function() {
Polymer.dom.flush();
expectEquals('old', changePicture.selectedItem_.dataset.type);