Skip to content

Commit

Permalink
KristianRosenvold: Fixed transient instabilities in firefox driver
Browse files Browse the repository at this point in the history
The crooked timer strikes back

r16079
  • Loading branch information
krosenvold committed Mar 1, 2012
1 parent 47258f1 commit 39aa37c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
14 changes: 13 additions & 1 deletion java/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
v2.20.0 (In progress)
v2.21.0 (In Progress)
=======

WebDriver:
* Significant stability improvements in firefoxdriver.

Grid:
* Content length issue solved
* Improvements in thread dumps in both hub and node,
possible to corrolate the two.


v2.20.0
=======

WebDriver:
Expand Down
4 changes: 2 additions & 2 deletions javascript/firefox-driver/js/modals.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ goog.require('fxdriver.utils');


fxdriver.modals.isModalPresent = function(callback, timeout) {
var timer = new fxdriver.Timer();
timer.runWhenTrue(
fxdriver.modals.timer = new fxdriver.Timer();
fxdriver.modals.timer.runWhenTrue(
function() {
var modal = fxdriver.modals.find_();
return modal && modal.document;
Expand Down
4 changes: 2 additions & 2 deletions javascript/firefox-driver/js/nsCommandProcessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ DelayedCommand.prototype.executeInternal_ = function() {
this.driver_.response_ = this.response_;

var response = this.response_;
var timer = new fxdriver.Timer();
DelayedCommand.prototype.executeInternal_.nstimer = new fxdriver.Timer();
var startTime = new Date().getTime();
var endTime = startTime + this.response_.session.getImplicitWait();
var name = this.command_.name;
Expand All @@ -301,7 +301,7 @@ DelayedCommand.prototype.executeInternal_ = function() {
func();
} catch (e) {
if (new Date().getTime() < endTime) {
timer.setTimeout(toExecute, 100);
DelayedCommand.prototype.executeInternal_.nstimer.setTimeout(toExecute, 100);
} else {
if (!e.isWebDriverError) {
fxdriver.Logger.dumpn(
Expand Down

0 comments on commit 39aa37c

Please sign in to comment.