Confirmed users
656
edits
m (→Related Bugs) |
|||
| Line 64: | Line 64: | ||
// Create our first action which will open Google | // Create our first action which will open Google | ||
performAction('open_google', function() { | pep.performAction('open_google', function() { | ||
controller.open('http://google.com'); | controller.open('http://google.com'); | ||
controller.waitForPageLoad(); | controller.waitForPageLoad(); | ||
| Line 74: | Line 74: | ||
// Create our second action which will perform a search in the google searchbox | // Create our second action which will perform a search in the google searchbox | ||
performAction('search_google', function() { | pep.performAction('search_google', function() { | ||
textbox.sendKeys('foobar'); | textbox.sendKeys('foobar'); | ||
button.click(); | button.click(); | ||
| Line 86: | Line 86: | ||
// getWindow is a convenience function exposed to tests | // getWindow is a convenience function exposed to tests | ||
// It uses nsIWindowMediator to get the current window | // It uses nsIWindowMediator to get the current window | ||
let window = getWindow(); | let window = pep.getWindow(); | ||
let width = window.outerWidth; | let width = window.outerWidth; | ||
let height = window.outerHeight; | let height = window.outerHeight; | ||
performAction('resize_by', function() { | pep.performAction('resize_by', function() { | ||
window.resizeBy(100, 100); | window.resizeBy(100, 100); | ||
}); | }); | ||
performAction('resize_to', function() { | pep.performAction('resize_to', function() { | ||
window.resizeTo(800, 600); | window.resizeTo(800, 600); | ||
}); | }); | ||