Skip to content

Commit

Permalink
Fix a test broken by closure update in
Browse files Browse the repository at this point in the history
f91121d

This test was trivially passing before because errors were
always being caught. The closure update included changes to
the testing framework that detected these types of bugs
and reported them as failures.

I'm not sure what the test was actually trying to exercise,
so I've changed it to what I *think* it was going for.
  • Loading branch information
jleyba committed Feb 29, 2016
1 parent adee046 commit a68b9aa
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions javascript/webdriver/test/atoms/inject/execute_script_test.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,9 @@
assertEquals("there", getValue(webdriver.atoms.inject.executeScript(func, [], win)));
}

function testExecuteScriptWithUnexistingWindow() {
function testExecuteScriptWithNullWindow() {
var func = function () {return document.getElementById('bou').value;};
var win = getValue(webdriver.atoms.inject.frame.findFrameByIdOrName("bou"));
try {
webdriver.atoms.inject.executeScript(func, [], win);
fail();
} catch (e) {
// expected
}
assertEquals("here", getValue(webdriver.atoms.inject.executeScript(func, [], null)));
}

function testExecuteScriptWithoutWindow() {
Expand Down

0 comments on commit a68b9aa

Please sign in to comment.