Index: remoting/webapp/browser_test/update_pin_browser_test.js |
diff --git a/remoting/webapp/browser_test/update_pin_browser_test.js b/remoting/webapp/browser_test/update_pin_browser_test.js |
index 7eed5aa14d3a612884fb79f1e265af2cfee6655b..72cc8bfd87e2efb7f5a6276bf64cb4487cb80069 100644 |
--- a/remoting/webapp/browser_test/update_pin_browser_test.js |
+++ b/remoting/webapp/browser_test/update_pin_browser_test.js |
@@ -53,23 +53,8 @@ browserTest.Update_PIN.prototype.run = function(data) { |
}; |
browserTest.Update_PIN.prototype.changePIN_ = function(newPin) { |
- var AppMode = remoting.AppMode; |
- var HOST_RESTART_WAIT = 10000; |
- |
browserTest.clickOnControl('change-daemon-pin'); |
- |
- return browserTest.onUIMode(AppMode.HOST_SETUP_ASK_PIN).then(function() { |
- var onSetupDone = browserTest.onUIMode(AppMode.HOST_SETUP_DONE); |
- document.getElementById('daemon-pin-entry').value = newPin; |
- document.getElementById('daemon-pin-confirm').value = newPin; |
- browserTest.clickOnControl('daemon-pin-ok'); |
- return onSetupDone; |
- }).then(function() { |
- browserTest.clickOnControl('host-config-done-dismiss'); |
- // On Linux, we restart the host after changing the PIN, need to sleep |
- // for ten seconds before the host is ready for connection. |
- return base.Promise.sleep(HOST_RESTART_WAIT); |
- }); |
+ return browserTest.setupPIN(newPin); |
}; |
browserTest.Update_PIN.prototype.disconnect_ = function() { |