Index: chrome/test/data/webui/settings/people_page_test.js |
diff --git a/chrome/test/data/webui/settings/people_page_test.js b/chrome/test/data/webui/settings/people_page_test.js |
index f00d12a50f9bd6e8b185cac04dbc476247ca0d92..5187d62fe10160cd66b5f69633b1da07f87333b1 100644 |
--- a/chrome/test/data/webui/settings/people_page_test.js |
+++ b/chrome/test/data/webui/settings/people_page_test.js |
@@ -164,12 +164,19 @@ cr.define('settings_people_page', function() { |
var disconnectConfirm = peoplePage.$.disconnectConfirm; |
assertTrue(!!disconnectConfirm); |
assertFalse(disconnectConfirm.hidden); |
+ |
+ // Wait for exit of dialog route. |
+ var dialogExitPromise = new Promise(function(resolve) { |
+ window.addEventListener('popstate', function callback() { |
michaelpg
2016/08/26 20:56:09
i don't think it actually makes a difference when
tommycli
2016/08/29 22:43:23
I discussed this with Dan. I think we want to be s
|
+ window.removeEventListener('popstate', callback); |
+ resolve(browserProxy.whenCalled('signOut')); |
michaelpg
2016/08/26 20:56:09
so you're resolving this promise with... a promise
tommycli
2016/08/26 20:57:51
Yes my theory was:
Wait for the popstate and also
michaelpg
2016/08/26 21:34:10
I don't think it works like that; passing a promis
tommycli
2016/08/29 22:43:23
Done.
michaelpg
2016/08/30 02:01:40
I lied! It does work like that! O_O
http://jsbin.
|
+ }); |
+ }); |
+ |
MockInteractions.tap(disconnectConfirm); |
- return browserProxy.whenCalled('signOut'); |
+ return dialogExitPromise; |
}).then(function(deleteProfile) { |
Dan Beam
2016/08/29 18:08:55
/**
* @param {string} eventName
* @param {!Event
tommycli
2016/08/29 18:13:36
Yes I think that would be excellent.
|
- Polymer.dom.flush(); |
- |
assertFalse(deleteProfile); |
michaelpg
2016/08/26 21:34:10
...but then how is this false? browserProxy.whenCa
tommycli
2016/08/29 22:43:23
deleteProfile is an argument of signout. It's only
michaelpg
2016/08/30 02:01:40
yeah, nevermind -- I didn't know that calling reso
|
cr.webUIListenerCallback('sync-status-changed', { |