@@ -18,12 +18,8 @@ def add_prefs():
18
18
FIRST_SEARCH = "cheetah"
19
19
FIRST_RESULT = "https://www.google.com/search?client=firefox-b-1-d&q=cheetah"
20
20
SECOND_SEARCH = "lion"
21
- SECOND_RESULT = "https://www.google.com/search?client=firefox-b-1-d&q=lion"
22
- SEARCH_BAR_PREF = "browser.search.widget.inNavBar"
23
21
24
22
25
- # NOTE: Need to fix, failing in 130+ Firefox due to legacy search bar being deprecated
26
- @pytest .mark .unstable
27
23
def test_search_term_persists (driver : Firefox ):
28
24
"""
29
25
C2153943 - Persist search term basic functionality
@@ -33,35 +29,13 @@ def test_search_term_persists(driver: Firefox):
33
29
nav = Navigation (driver ).open ()
34
30
tab = TabBar (driver )
35
31
36
- def toggle_legacy_search_bar ():
37
- # This test requires that the old search bar is added while retaining search results.
38
- # First, open a new tab and switch to it
39
- tab .new_tab_by_button ()
40
- window_handles = driver .window_handles
41
- driver .switch_to .window (window_handles [- 1 ])
42
- # Then, toggle the old search bar via about:config
43
- ac = AboutConfig (driver )
44
- ac .toggle_true_false_config (SEARCH_BAR_PREF )
45
- # Finally, close the about:config tab and switch context back to the original tab
46
- nav .set_chrome_context ()
47
- x_icon = tab .get_element ("tab-x-icon" , multiple = True )
48
- x_icon [1 ].click ()
49
- driver .switch_to .window (window_handles [0 ])
50
32
51
33
# Perform a search using the URL bar.
52
34
nav .search (FIRST_SEARCH )
53
35
tab .expect_title_contains ("Google Search" )
54
36
address_bar_text = nav .get_awesome_bar_text ()
55
37
assert FIRST_SEARCH == address_bar_text
56
38
57
- # Add the search bar to toolbar
58
- toggle_legacy_search_bar ()
59
-
60
- # Search term should be replaced with full url
61
- address_bar_text = nav .get_awesome_bar_text ()
62
- assert FIRST_RESULT == address_bar_text
63
- nav .clear_awesome_bar ()
64
-
65
39
# Perform a new awesome bar search, full url should be present
66
40
# First, navigate away from Google
67
41
nav .set_content_context ()
@@ -70,13 +44,4 @@ def toggle_legacy_search_bar():
70
44
nav .search (SECOND_SEARCH )
71
45
tab .expect_title_contains ("Google Search" )
72
46
address_bar_text = nav .get_awesome_bar_text ()
73
- assert SECOND_RESULT == address_bar_text
74
-
75
- # Disable the old search bar
76
- toggle_legacy_search_bar ()
77
-
78
- # Again, perform a search using the URL bar.
79
- nav .search (FIRST_SEARCH )
80
- tab .expect_title_contains ("Google Search" )
81
- address_bar_text = nav .get_awesome_bar_text ()
82
- assert FIRST_SEARCH == address_bar_text
47
+ assert SECOND_SEARCH == address_bar_text
0 commit comments