Skip to content

Commit

Permalink
[js] Stop patching in modules that have been converted from closure t…
Browse files Browse the repository at this point in the history
…o node

as it complicates instanceof checks in the remaining closure-based modules.
  • Loading branch information
jleyba committed Jan 25, 2016
1 parent e4e7c53 commit 7a02585
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions javascript/node/selenium-webdriver/lib/_base.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,7 @@ function Context(opt_configureForTesting) {
},
CLOSURE_NO_DEPS: !isDevMode(),
CLOSURE_UNCOMPILED_DEFINES: {'goog.json.USE_NATIVE_JSON': true},
goog: {},
webdriver: {
get Command() { return require('./command').Command; },
get CommandName() { return require('./command').Name; },
get CommandExecutor() { return require('./command').Executor; },
get logging() { return require('./logging'); }
}
goog: {}
});
closure.window = closure.top = closure;

Expand All @@ -131,15 +125,6 @@ function Context(opt_configureForTesting) {
loadScript(CLOSURE_BASE_FILE_PATH);
loadScript(DEPS_FILE_PATH);

let provide = closure.goog.provide;
closure.goog.provide = function(symbol) {
if (symbol.startsWith('webdriver.Command')
|| symbol.startsWith('webdriver.logging')) {
return;
}
provide(symbol);
};

// Redefine retrieveAndExecModule_ to load modules. Closure's version
// assumes XMLHttpRequest is defined (and by extension that scripts
// are being loaded from a server).
Expand Down

0 comments on commit 7a02585

Please sign in to comment.