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

Unified Diff: remoting/webapp/browser_test/update_pin_browser_test.js

Issue 398823005: Automate host start up in browser test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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
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() {
« remoting/webapp/browser_test/browser_test.js ('K') | « remoting/webapp/browser_test/browser_test.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698