-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding WebDriver version fingerprint to the Firefox log
- Loading branch information
Showing
1 changed file
with
7 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,19 +19,26 @@ | |
|
||
goog.require('WebDriverServer'); | ||
goog.require('WebElement'); | ||
goog.require('fxdriver.logging'); | ||
goog.require('goog.log'); | ||
|
||
// constants | ||
/** @const */ var nsISupports = Components.interfaces.nsISupports; | ||
/** @const */ var CLASS_ID = Components.ID("{1C0E8D86-B661-40d0-AE3D-CA012FADF170}"); | ||
/** @const */ var CLASS_NAME = "firefoxWebDriver"; | ||
/** @const */ var CONTRACT_ID = "@googlecode.com/webdriver/fxdriver;1"; | ||
/** @const */ var LOG_ = fxdriver.logging.getLogger('fxdriver.ServerFactory'); | ||
|
||
// This code has been derived from the example code at | ||
// http://developer-stage.mozilla.org/en/docs/How_to_Build_an_XPCOM_Component_in_Javascript | ||
// Its copyrights belong to the original author | ||
|
||
var ServerFactory = { | ||
createInstance: function (aOuter, aIID) { | ||
Components.utils.import("resource://gre/modules/AddonManager.jsm"); | ||
AddonManager.getAddonByID("[email protected]", function(addon) { | ||
goog.log.info(LOG_, "Driven by WebDriver version " + addon.version); | ||
}); | ||
if (aOuter != null) | ||
throw Components.results.NS_ERROR_NO_AGGREGATION; | ||
if (!this.server) | ||
|