diff options
| author | jez | 2011-01-03 13:01:25 +0800 |
|---|---|---|
| committer | jez | 2011-01-03 13:01:25 +0800 |
| commit | 9d586d267b68b65e58c8f79ef23c4ecc25016984 (patch) | |
| tree | cf41f1b2965942252a1d8d5f42e09853f9695866 /test_harnesses | |
| parent | 58e12bf4cf690d4977ecdaf3542b7fb6d1f6345d (diff) | |
| download | vimium-9d586d267b68b65e58c8f79ef23c4ecc25016984.tar.bz2 | |
We don't need to stub variables that are in function scope...
Diffstat (limited to 'test_harnesses')
| -rw-r--r-- | test_harnesses/automated.html | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/test_harnesses/automated.html b/test_harnesses/automated.html index 03c6d673..c858d92b 100644 --- a/test_harnesses/automated.html +++ b/test_harnesses/automated.html @@ -24,8 +24,6 @@ return event; } - var testVariables = {}; - /* * Generate tests that are common to both default and filtered * link hinting modes. @@ -54,13 +52,13 @@ assert.equal(17, linkHints.hintMarkers[0].getClientRects()[0].top); }), should("position item 2", function() { - stub(testVariables, "originalLeft", linkHints.hintMarkers[1].getClientRects()[0].left); - stub(testVariables, "originalTop", linkHints.hintMarkers[1].getClientRects()[0].left); + var originalLeft = linkHints.hintMarkers[1].getClientRects()[0].left; + var originalTop = linkHints.hintMarkers[1].getClientRects()[0].left; linkHints.deactivateMode(); document.body.style.position = "relative"; linkHints.activateMode(); - assert.equal(testVariables.originalLeft, linkHints.hintMarkers[1].getClientRects()[0].left); - assert.equal(testVariables.originalTop, linkHints.hintMarkers[1].getClientRects()[0].top); + assert.equal(originalLeft, linkHints.hintMarkers[1].getClientRects()[0].left); + assert.equal(originalTop, linkHints.hintMarkers[1].getClientRects()[0].top); document.body.style.position = "static"; }) ) @@ -80,7 +78,6 @@ }), should("label the hints correctly", function() { var hintStrings = ["ss", "sa", "sd"]; - stub(testVariables, "hintStrings", "sad"); for (var i = 0; i < 3; i++) assert.equal(hintStrings[i], linkHints.hintMarkers[i].getAttribute("hintString")); |
