   should "returns no results when there's more than one query term, because clearly it's not a domain", ->
     assert.arrayEqual [], filterCompleter(@completer, ["his", "tory"])
 
+  should "remove 1 matching domain entry", ->
+    # Force installation of `@onVisitRemovedListener`
+    @history2.lastVisitTime = hours(3) and filterCompleter(@completer, ["story"])
+    @onVisitRemovedListener { allHistory: false, urls: [ @history2.url ] }
+    assert.equal "history1.com", filterCompleter(@completer, ["story"])[0].url
+
+  should "remove 2 (both) matching domain entries", ->
+    # Force installation of `@onVisitRemovedListener`
+    @history2.lastVisitTime = hours(3) and filterCompleter(@completer, ["story"])
+    @onVisitRemovedListener { allHistory: false, urls: [ @history2.url ] }
+    @onVisitRemovedListener { allHistory: false, urls: [ @history1.url ] }
+    assert.isTrue filterCompleter(@completer, ["story"]).length == 0
+
+  should "remove *all* domain entries", ->
+    # Force installation of `@onVisitRemovedListener`
+    @history2.lastVisitTime = hours(3) and filterCompleter(@completer, ["story"])
+    @onVisitRemovedListener { allHistory: true }
+    assert.isTrue filterCompleter(@completer, ["story"]).length == 0
+
 context "tab completer",
   setup ->
     @tabs = [

      HistoryCache.use (@results) =>
      assert.arrayEqual [@history2, @history1], @results
      toRemove = { allHistory: true }
      @onVisitRemovedListerner(toRemove)
      HistoryCache.use (@results) =>
      assert.arrayEqual [], @results


      HistoryCache.use (@results) =>
      assert.arrayEqual [@history2, @history1], @results
      toRemove = { urls: [ "a.com" ], allHistory: false }
      @onVisitRemovedListener(toRemove)
      HistoryCache.use (@results) =>
      assert.arrayEqual [@history1], @results

