aboutsummaryrefslogtreecommitdiffstats
path: root/tests/dom_tests
AgeCommit message (Collapse)Author
2015-06-25Merge branch 'store-all-settings' into hud-iframe-input-with-store-all-settingsStephen Blott
2015-06-10Guard against chrome being undefined in the HUD iframemrmr1993
2015-06-10Fix bug relating to duplicate hint strings.Stephen Blott
(Not sure when this crept in.) We need to ensure that we always generate the same hint strings for the same filter state. Here, we do this by always using the same mechanism (@filterLinkHints) to set the hint strings.
2015-06-09Make LinkHints a class (LinkHintsMode).Stephen Blott
Functionality wise, this is a no-op. However, since we now create a new LinkHintsMode object on every "f", we don't need to be so careful about resetting the state on exit.
2015-06-01Remove LinkHints.init()...Stephen Blott
LinkHints.init() isn't doing anything.
2015-06-01Re-work unified settings.Stephen Blott
This is a minor re-working of #1705 from @mrmr1993. The main changes are: - Simplify initialisation logic. - Always initialise Settings immediately and automatically (ie. don't initialise Settings separately and manually in the background, content scripts, options and tests). - Get rid of addEventListener (it's only being used for on "load"). - Add Settings.use() in its place.
2015-05-31Rewrite settings as a tight wrapper around Settings, tweaks for testsmrmr1993
2015-05-29Verify keyword for custom search-engine activation.Stephen Blott
For ... map s Vomnibar.activate keyword=g ... we verify that "g" is indeed a custom search-engine keyword before setting it. If it is not, we output a console.log message and launch a vanilla vomnibar. (An alternative would be to bail.)
2015-05-27Merge pull request #1616 from mrmr1993/detect-inline-inline-fontSize-elementsStephen Blott
Fix for #1554.
2015-05-26Refactor to avoid potential race condition.Stephen Blott
I haven't seen this happen, but... It could be possible for the iframe's contents to load before this callback is called (on nextTick), in which case the "load" callback wouldn't be called. So we delay setting the iframe's source until nextTick has elapsed.
2015-05-13Search completion; rework handling when no selection.Stephen Blott
This makes the behaviour consistent between custom and non-custom searches when there is no selection in the vomnibar (omni-mode only). Approach: - When there is no selection in the vomnibar, we *always* send the query to to background completer (that is, both for default searches and for custom searches) and ask the completer to provide only the primary suggestion. The primary suggestion is just what you get if you append the query terms to the search URL (default or custom). We then immediately open the first response. The round trip for default searches isn't strictly necessary. However, this uniform approach disentangles some nasty logic in the vomnibar when we're trying to handle several cases (default or custom search, with or without prompted text, with or without any suggestions at all). The extra round trip simplifies the logic to such a great extend that it's worth it.
2015-05-11Move the HUD to its own filemrmr1993
2015-05-09Search completion; complete commmon search term.Stephen Blott
2015-04-29Fix text matching/exclusion; repair tests (again).Stephen Blott
We should also take a look at these tests and the assumptions they're making. They're difficult to follow as is.
2015-04-29Fix text matching/exclusion; repair tests.Stephen Blott
2015-04-28Add a test to confirm that issue #1554 is fixedmrmr1993
2015-04-28Revert "Do not grab back focus if Vimium is disabled."Stephen Blott
This reverts commit cfb137d515e6f214322538fdd9a8e236445b63b0. Conflicts: content_scripts/vimium_frontend.coffee There are HUD initialization issues with this.
2015-04-28Temporary fix for tests.Stephen Blott
The tests are passing, but they are triggering an exception in the initialization of the HUD. It's proving difficult to get the initialization in the right order for both the tests and live. This is a temporary fix...
2015-04-28Make DomUtils.getVisibleClientRects default to expected behaviourmrmr1993
This requires passing of an extra truthy argument in order to access the (generally) unexpected behaviour of sometimes returning the rects of child elements. All locations in the code that *actually* wanted this behaviour have been updated to continue using it. Also add a comment about the unexpected behaviour in the function description.
2015-04-25Merge branch 'exclusion-rules-pushState-and-hash' of ↵Stephen Blott
https://github.com/mrmr1993/vimium into mrmr1993-exclusion-rules-pushState-and-hash Conflicts: content_scripts/vimium_frontend.coffee
2015-04-24Always initialise event listeners earlymrmr1993
The event listeners were registered late, potentially allowing the page to get priority over us for key events, etc., when: * the original URL was disabled by an exclusion rule * the URL was changed - without a page load (by history.pushState or modifying location.hash), and - the new URL isn't (completely) disabled by any exclusion rules. This forces the event listeners to be registered even when the current URL is disabled, to avoid this problem.
2015-04-24Add chrome.webNavigation stubs to fix testsmrmr1993
2015-04-18Mode indicator: strip all references to badges.Stephen Blott
2015-03-08Reload content scripts: document why changes are needed in tests.Stephen Blott
2015-03-07Reload content scripts after install/update.Stephen Blott
This is @mrmr1993's work from #1041. Reload content scripts when vimium is installed or updates. (@mrmr1993: The automatic merge was really messy (or, at least, I couldn't figure out what was going on). Since the bulk of #1041 was actually quite compact, I took the liberty of just copying it in. Hope you don't mind.)
2015-03-06Merge branch 'fix-focus-html5-inputs'Stephen Blott
2015-02-23Ensure inconito mode flag and find-mode-history are initialised.Stephen Blott
See #1495.
2015-02-18Add a test for link hints on HTML5 input typesmrmr1993
2015-02-12Grab back focus...Stephen Blott
- add new option "GrabBackFocus" - use chrome.storage.sync.get() to get option value - avoid race conditions on load - fix tests
2015-02-11Fix error on yank/scroll.Stephen Blott
When we exit visual mode with "y"... "y" is a command for visual mode. Currently it clears the selection. Because it's executed as a command, scrollIntoView is called after running the command. Because the selection is cleared, scrollIntoView found nothing to scroll, and was creating an error. So we need to check whether there's anything to scroll into view, before trying to scroll it. Also fix mis-named file in the tests.
2015-01-20Rework focus input so it can be better included in tests.Stephen Blott
focusInput was getting its focus events from the handler stack. When the handler stack was reset during tests, we lost focusInput's handler. So we couldn't test the feature whereby focusInput has a memory (#1438). Instead, here focusInput adds its listener directly to the window, and we add the approriate test.
2015-01-20Rebase.Stephen Blott
2015-01-20Rework DOM tests (clean up).Stephen Blott
2015-01-20Rework DOM tests (integrate keyboard-event handling).Stephen Blott
This uses phantomjs to generate keyboard events. So the events are propagated through the regular event listeners. So we're testing the full keyboard-event flow.
2015-01-20Rework DOM tests.Stephen Blott
- Set up modes such that they can be re-initialised. - Move initialisation of BadgeMode to general initialisation function. - Add reset() method for handlerStack. - Consistently use initializeModeState() in all tests' setup(). - Refactor focusInput tests. - Add some more tests. - Simplify some other tests. Note: Clean-up of the inputFocus overlay now happens when the exit() method is called in Mode.reset(). This eliminates most needs to artificially bubble a keyboard event to clear the overlay.
2015-01-18Give focusInput a memory (fix typo).Stephen Blott
2015-01-18Merge branch 'master' into focus-input-with-memoryStephen Blott
2015-01-18Minor clean-up of the tests.Stephen Blott
Nicer syntax. And we don't need those braces.
2015-01-18Give focusInput a memory; add tests.Stephen Blott
2015-01-17Modes; yet more tweaks...Stephen Blott
- Mainly comments. - Rename chooseBadge to updateBadge (for consistency). - No badge for passkeys; also fix tests.
2015-01-16Modes; tweaks.Stephen Blott
2015-01-15Modes; match test to reality.Stephen Blott
2015-01-15Modes; yet more teaks and fiddles.Stephen Blott
2015-01-14Modes; fix tests.Stephen Blott
2015-01-11Modes; yet more tweaks, yet more tests.Stephen Blott
2015-01-11Modes; tweaks, including more tests.Stephen Blott
2015-01-11Modes; tweek tests.Stephen Blott
2015-01-11Modes; add DOM tests.Stephen Blott
2015-01-11Modes; add DOM tests.Stephen Blott
2015-01-06Modes; fix testsStephen Blott