diff options
| author | Jez Ng | 2012-01-10 01:22:41 +0800 | 
|---|---|---|
| committer | Jez Ng | 2012-01-12 02:12:24 +0800 | 
| commit | f9badc3e33045f478e9433916f0f608f85a4036e (patch) | |
| tree | f84ae6ed04403ec5f1a246bc5b4e99a4af55abb9 /test_harnesses/automated.html | |
| parent | 03728546c28664deaf89b9d2dc8fe5fb630bcd9a (diff) | |
| download | vimium-f9badc3e33045f478e9433916f0f608f85a4036e.tar.bz2 | |
Add password boxes to list of input focus-able elements.
Add test for this element and for skipping over hidden elements (commit
e2f3b54).
Diffstat (limited to 'test_harnesses/automated.html')
| -rw-r--r-- | test_harnesses/automated.html | 24 | 
1 files changed, 24 insertions, 0 deletions
| diff --git a/test_harnesses/automated.html b/test_harnesses/automated.html index e7d84413..5e3ae93c 100644 --- a/test_harnesses/automated.html +++ b/test_harnesses/automated.html @@ -224,6 +224,30 @@            })          ) + +      ); + +      context("Input focus", + +        setup(function() { +          var testContent = +            "<input type='text' id='first'/>" + +            "<input style='display:none;' id='second'/>" + +            "<input type='password' id='third' value='some value'/>"; +          document.getElementById("test-div").innerHTML = testContent; +        }), + +        tearDown(function() { +          document.getElementById("test-div").innerHTML = ""; +        }), + +        should("focus the right element", function() { +          focusInput(1); +          assert.equal('first', document.activeElement.id); +          focusInput(100); +          assert.equal('third', document.activeElement.id); +        }) +        );        Tests.outputMethod = function(output) { | 
