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

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

Issue 944183002: HostTableEntry refactor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Jamie's feedback Created 5 years, 10 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 | « remoting/webapp/base/js/base.js ('k') | remoting/webapp/browser_test/update_pin_browser_test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/browser_test/browser_test.js
diff --git a/remoting/webapp/browser_test/browser_test.js b/remoting/webapp/browser_test/browser_test.js
index 88f9ee445615def71a2129d6535b266869ab5d95..7e1807da02c8a030344b6da09580a27483b6bc92 100644
--- a/remoting/webapp/browser_test/browser_test.js
+++ b/remoting/webapp/browser_test/browser_test.js
@@ -130,11 +130,14 @@ browserTest.pass = function() {
};
/**
- * @param {string} id
+ * @param {string} id The id or the selector of the element.
* @return {void}
*/
browserTest.clickOnControl = function(id) {
var element = document.getElementById(id);
+ if (!element) {
+ element = document.querySelector(id);
+ }
browserTest.expect(element, 'No such element: ' + id);
element.click();
};
@@ -193,7 +196,7 @@ browserTest.connectMe2Me = function() {
// The one second timeout is necessary because the click handler of
// 'this-host-connect' is registered asynchronously.
return base.Promise.sleep(1000).then(function() {
- browserTest.clickOnControl('this-host-connect');
+ browserTest.clickOnControl('local-host-connect-button');
}).then(function(){
return browserTest.onUIMode(AppMode.CLIENT_HOST_NEEDS_UPGRADE);
}).then(function() {
@@ -408,11 +411,11 @@ browserTest.ensureHostStartedWithPIN = function(pin) {
function(started){
if (!started) {
console.log('browserTest: Enabling remote connection.');
- browserTest.clickOnControl('start-daemon');
+ browserTest.clickOnControl('.start-daemon');
} else {
console.log('browserTest: Changing the PIN of the host to: ' +
pin + '.');
- browserTest.clickOnControl('change-daemon-pin');
+ browserTest.clickOnControl('.change-daemon-pin');
}
return browserTest.setupPIN(pin);
});
« no previous file with comments | « remoting/webapp/base/js/base.js ('k') | remoting/webapp/browser_test/update_pin_browser_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698