@@ -26,7 +26,6 @@ import android.net.http.SslError
2626import android.os.Build
2727import android.print.PrintAttributes
2828import android.view.MenuItem
29- import android.view.MotionEvent
3029import android.view.View
3130import android.webkit.HttpAuthHandler
3231import android.webkit.PermissionRequest
@@ -5616,110 +5615,6 @@ class BrowserTabViewModelTest {
56165615 verify(mockPixel).fire(AppPixelName .TAB_MANAGER_CLICKED_DAILY , params, emptyMap(), Daily ())
56175616 }
56185617
5619- @Test
5620- fun whenOnUserTouchedOmnibarTextInputWithEmptyTextAndActionUpThenPixelFired () {
5621- testee.onUserTouchedOmnibarTextInput(MotionEvent .ACTION_UP )
5622-
5623- verify(mockPixel).fire(AppPixelName .ADDRESS_BAR_NEW_TAB_PAGE_CLICKED )
5624- }
5625-
5626- @Test
5627- fun whenOnUserTouchedOmnibarTextInputWithUrlAndActionUpThenPixelFired () {
5628- loadUrl(" https://example.com" )
5629- testee.onUserTouchedOmnibarTextInput(MotionEvent .ACTION_UP )
5630-
5631- verify(mockPixel).fire(AppPixelName .ADDRESS_BAR_WEBSITE_CLICKED )
5632- }
5633-
5634- @Test
5635- fun whenOnUserTouchedOmnibarTextInputWithQueryAndActionUpThenPixelFired () {
5636- loadUrl(" https://duckduckgo.com/?q=example" )
5637- testee.onUserTouchedOmnibarTextInput(MotionEvent .ACTION_UP )
5638-
5639- verify(mockPixel).fire(AppPixelName .ADDRESS_BAR_SERP_CLICKED )
5640- }
5641-
5642- @Test
5643- fun whenOnUserTouchedOmnibarTextInputWithAnyTextAndOtherActionThenPixelNotFired () {
5644- loadUrl(" https://duckduckgo.com/?q=example" )
5645- testee.onUserTouchedOmnibarTextInput(MotionEvent .ACTION_DOWN )
5646-
5647- verify(mockPixel, never()).fire(AppPixelName .ADDRESS_BAR_NEW_TAB_PAGE_CLICKED )
5648- verify(mockPixel, never()).fire(AppPixelName .ADDRESS_BAR_WEBSITE_CLICKED )
5649- verify(mockPixel, never()).fire(AppPixelName .ADDRESS_BAR_SERP_CLICKED )
5650- }
5651-
5652- @Test
5653- fun whenOnClearOmnibarTextInputWithEmptyTextThenPixelFired () {
5654- testee.onClearOmnibarTextInput()
5655-
5656- verify(mockPixel).fire(AppPixelName .ADDRESS_BAR_NEW_TAB_PAGE_ENTRY_CLEARED )
5657- }
5658-
5659- @Test
5660- fun whenOnClearOmnibarTextInputWithUrlThenPixelFired () {
5661- loadUrl(" https://example.com" )
5662- testee.onClearOmnibarTextInput()
5663-
5664- verify(mockPixel).fire(AppPixelName .ADDRESS_BAR_WEBSITE_ENTRY_CLEARED )
5665- }
5666-
5667- @Test
5668- fun whenOnClearOmnibarTextInputWithQueryUrlThenPixelFired () {
5669- loadUrl(" https://duckduckgo.com/?q=example" )
5670- testee.onClearOmnibarTextInput()
5671-
5672- verify(mockPixel).fire(AppPixelName .ADDRESS_BAR_SERP_ENTRY_CLEARED )
5673- }
5674-
5675- @Test
5676- fun whenSendPixelsOnBackKeyPressedWithEmptyTextThenPixelFired () {
5677- testee.sendPixelsOnBackKeyPressed()
5678-
5679- verify(mockPixel).fire(AppPixelName .ADDRESS_BAR_NEW_TAB_PAGE_CANCELLED )
5680- }
5681-
5682- @Test
5683- fun whenSendPixelsOnBackKeyPressedWithUrlThenPixelFired () {
5684- loadUrl(" https://example.com" )
5685- testee.sendPixelsOnBackKeyPressed()
5686-
5687- verify(mockPixel).fire(AppPixelName .ADDRESS_BAR_WEBSITE_CANCELLED )
5688- }
5689-
5690- @Test
5691- fun whenSendPixelsOnBackKeyPressedWithQueryUrlThenPixelFired () {
5692- loadUrl(" https://duckduckgo.com/?q=example" )
5693-
5694- testee.sendPixelsOnBackKeyPressed()
5695-
5696- verify(mockPixel).fire(AppPixelName .ADDRESS_BAR_SERP_CANCELLED )
5697- }
5698-
5699- @Test
5700- fun whenSendPixelsOnEnterKeyPressedWithEmptyTextThenPixelFired () {
5701- testee.sendPixelsOnEnterKeyPressed()
5702-
5703- verify(mockPixel).fire(AppPixelName .KEYBOARD_GO_NEW_TAB_CLICKED )
5704- }
5705-
5706- @Test
5707- fun whenSendPixelsOnEnterKeyPressedWithUrlThenPixelFired () {
5708- loadUrl(" https://example.com" )
5709- testee.sendPixelsOnEnterKeyPressed()
5710-
5711- verify(mockPixel).fire(AppPixelName .KEYBOARD_GO_WEBSITE_CLICKED )
5712- }
5713-
5714- @Test
5715- fun whenSendPixelsOnEnterKeyPressedWithQueryUrlThenPixelFired () {
5716- loadUrl(" https://duckduckgo.com/?q=example" )
5717-
5718- testee.sendPixelsOnEnterKeyPressed()
5719-
5720- verify(mockPixel).fire(AppPixelName .KEYBOARD_GO_SERP_CLICKED )
5721- }
5722-
57235618 @Test
57245619 fun whenNewTabShownThenPixelIsFired () {
57255620 testee.onNewTabShown()
0 commit comments