def test_enable_do_not_track_via_settings_app(self): """Enable do not track via the Settings app""" settings = Settings(self.marionette) settings.launch() do_not_track_settings = settings.open_do_not_track_settings() # turn to "disallow tracking" do_not_track_settings.tap_disallow_tracking() Wait(self.marionette).until(lambda m: self.data_layer.get_int_pref( 'privacy.donottrackheader.value') == 1) Wait(self.marionette).until(lambda m: self.data_layer.get_bool_pref( 'privacy.donottrackheader.enabled')) self.apps.switch_to_displayed_app() # turn to "allow tracking" do_not_track_settings.tap_allow_tracking() Wait(self.marionette).until(lambda m: self.data_layer.get_int_pref( 'privacy.donottrackheader.value') == 0) self.assertEqual( self.data_layer.get_bool_pref('privacy.donottrackheader.enabled'), True) self.apps.switch_to_displayed_app() # turn back to "no pref" do_not_track_settings.tap_do_not_have_pref_on_tracking() Wait(self.marionette).until(lambda m: self.data_layer.get_int_pref( 'privacy.donottrackheader.value') == -1) Wait( self.marionette).until(lambda m: not self.data_layer.get_bool_pref( 'privacy.donottrackheader.enabled'))
def test_enable_do_not_track_via_settings_app(self): """Enable do not track via the Settings app""" settings = Settings(self.marionette) settings.launch() do_not_track_settings = settings.open_do_not_track_settings() # turn to "disallow tracking" do_not_track_settings.tap_disallow_tracking() # should be enabled self.assertEqual(self.data_layer.get_setting('privacy.donottrackheader.enabled'), True) # should be 1 self.assertEqual(self.data_layer.get_setting('privacy.donottrackheader.value'), '1') # turn to "allow tracking" do_not_track_settings.tap_allow_tracking() # should be enabled self.assertEqual(self.data_layer.get_setting('privacy.donottrackheader.enabled'), True) # should be 0 self.assertEqual(self.data_layer.get_setting('privacy.donottrackheader.value'), '0') # turn back to "no pref" do_not_track_settings.tap_do_not_have_pref_on_tracking() # should be disabled self.assertEqual(self.data_layer.get_setting('privacy.donottrackheader.enabled'), False) # should be back to "no pref" self.assertEqual(self.data_layer.get_setting('privacy.donottrackheader.value'), '-1')
def test_enable_do_not_track_via_settings_app(self): """Enable do not track via the Settings app""" settings = Settings(self.marionette) settings.launch() do_not_track_settings = settings.open_do_not_track_settings() # turned off by default self.wait_for_condition( lambda m: not do_not_track_settings.is_do_not_track_enabled) # turn on do_not_track_settings.enable_do_not_track() # should be on self.assertTrue( self.data_layer.get_setting('privacy.donottrackheader.enabled'), 'Do Not Track was not enabled via Settings app') # turn back off do_not_track_settings.disable_do_not_track() # should be off self.assertFalse( self.data_layer.get_setting('privacy.donottrackheader.enabled'), 'Do Not Track was not disabled via Settings app')
def test_enable_do_not_track_via_settings_app(self): """Enable do not track via the Settings app""" settings = Settings(self.marionette) settings.launch() do_not_track_settings = settings.open_do_not_track_settings() # turned off by default self.wait_for_condition( lambda m: not do_not_track_settings.is_do_not_track_enabled ) # turn on do_not_track_settings.enable_do_not_track() # should be on self.assertTrue(self.data_layer.get_setting('privacy.donottrackheader.enabled'), 'Do Not Track was not enabled via Settings app') # turn back off do_not_track_settings.disable_do_not_track() # should be off self.assertFalse(self.data_layer.get_setting('privacy.donottrackheader.enabled'), 'Do Not Track was not disabled via Settings app')
def test_enable_do_not_track_via_settings_app(self): """Enable do not track via the Settings app""" settings = Settings(self.marionette) settings.launch() do_not_track_settings = settings.open_do_not_track_settings() do_not_track_settings.tap_tracking(True) self.assertEqual(self.data_layer.get_bool_pref('privacy.donottrackheader.enabled'), True) # Return to Settings app after checking pref self.apps.switch_to_displayed_app() do_not_track_settings.tap_tracking(False) self.assertEqual(self.data_layer.get_bool_pref('privacy.donottrackheader.enabled'), False)
def test_enable_do_not_track_via_settings_app(self): """Enable do not track via the Settings app""" settings = Settings(self.marionette) settings.launch() do_not_track_settings = settings.open_do_not_track_settings() # turn to "disallow tracking" do_not_track_settings.tap_disallow_tracking() # should be 1 self.assertEqual( self.data_layer.get_int_pref('privacy.donottrackheader.value'), 1) # should be enabled self.assertEqual( self.data_layer.get_bool_pref('privacy.donottrackheader.enabled'), True) # Return to Settings app after checking pref self.apps.switch_to_displayed_app() # turn to "allow tracking" do_not_track_settings.tap_allow_tracking() # should be 0 self.assertEqual( self.data_layer.get_int_pref('privacy.donottrackheader.value'), 0) # should be enabled self.assertEqual( self.data_layer.get_bool_pref('privacy.donottrackheader.enabled'), True) # Return to Settings app after checking pref self.apps.switch_to_displayed_app() # turn back to "no pref" do_not_track_settings.tap_do_not_have_pref_on_tracking() # should be back to "no pref" self.assertEqual( self.data_layer.get_int_pref('privacy.donottrackheader.value'), -1) # should be disabled self.assertEqual( self.data_layer.get_bool_pref('privacy.donottrackheader.enabled'), False)
def test_enable_do_not_track_via_settings_app(self): """Enable do not track via the Settings app""" settings = Settings(self.marionette) settings.launch() do_not_track_settings = settings.open_do_not_track_settings() # turn on do_not_track_settings.tap_allow_tracking() # should be on self.assertEqual(self.data_layer.get_setting('privacy.donottrackheader.value'), '1') # turn back off do_not_track_settings.tap_do_not_track() # should be off self.assertEqual(self.data_layer.get_setting('privacy.donottrackheader.value'), '-1')
def test_enable_do_not_track_via_settings_app(self): """Enable do not track via the Settings app""" settings = Settings(self.marionette) settings.launch() do_not_track_settings = settings.open_do_not_track_settings() # turn on do_not_track_settings.tap_allow_tracking() # should be on self.assertEqual( self.data_layer.get_setting('privacy.donottrackheader.value'), '1') # turn back off do_not_track_settings.tap_do_not_track() # should be off self.assertEqual( self.data_layer.get_setting('privacy.donottrackheader.value'), '-1')
def test_enable_do_not_track_via_settings_app(self): """Enable do not track via the Settings app""" settings = Settings(self.marionette) settings.launch() do_not_track_settings = settings.open_do_not_track_settings() # turn to "disallow tracking" do_not_track_settings.tap_disallow_tracking() # should be enabled self.assertEqual( self.data_layer.get_setting('privacy.donottrackheader.enabled'), True) # should be 1 self.assertEqual( self.data_layer.get_setting('privacy.donottrackheader.value'), '1') # turn to "allow tracking" do_not_track_settings.tap_allow_tracking() # should be enabled self.assertEqual( self.data_layer.get_setting('privacy.donottrackheader.enabled'), True) # should be 0 self.assertEqual( self.data_layer.get_setting('privacy.donottrackheader.value'), '0') # turn back to "no pref" do_not_track_settings.tap_do_not_have_pref_on_tracking() # should be disabled self.assertEqual( self.data_layer.get_setting('privacy.donottrackheader.enabled'), False) # should be back to "no pref" self.assertEqual( self.data_layer.get_setting('privacy.donottrackheader.value'), '-1')
def test_enable_do_not_track_via_settings_app(self): """Enable do not track via the Settings app""" settings = Settings(self.marionette) settings.launch() do_not_track_settings = settings.open_do_not_track_settings() # turn to "disallow tracking" do_not_track_settings.tap_disallow_tracking() Wait(self.marionette).until(lambda m: self.data_layer.get_int_pref('privacy.donottrackheader.value') == 1) Wait(self.marionette).until(lambda m: self.data_layer.get_bool_pref('privacy.donottrackheader.enabled')) self.apps.switch_to_displayed_app() # turn to "allow tracking" do_not_track_settings.tap_allow_tracking() Wait(self.marionette).until(lambda m: self.data_layer.get_int_pref('privacy.donottrackheader.value') == 0) self.assertEqual(self.data_layer.get_bool_pref('privacy.donottrackheader.enabled'), True) self.apps.switch_to_displayed_app() # turn back to "no pref" do_not_track_settings.tap_do_not_have_pref_on_tracking() Wait(self.marionette).until(lambda m: self.data_layer.get_int_pref('privacy.donottrackheader.value') == -1) Wait(self.marionette).until(lambda m: not self.data_layer.get_bool_pref('privacy.donottrackheader.enabled'))
def test_enable_do_not_track_via_settings_app(self): """Enable do not track via the Settings app""" settings = Settings(self.marionette) settings.launch() do_not_track_settings = settings.open_do_not_track_settings() # turn to "disallow tracking" do_not_track_settings.tap_disallow_tracking() # should be 1 self.assertEqual(self.data_layer.get_int_pref('privacy.donottrackheader.value'), 1) # should be enabled self.assertEqual(self.data_layer.get_bool_pref('privacy.donottrackheader.enabled'), True) # Return to Settings app after checking pref self.apps.switch_to_displayed_app() # turn to "allow tracking" do_not_track_settings.tap_allow_tracking() # should be 0 self.assertEqual(self.data_layer.get_int_pref('privacy.donottrackheader.value'), 0) # should be enabled self.assertEqual(self.data_layer.get_bool_pref('privacy.donottrackheader.enabled'), True) # Return to Settings app after checking pref self.apps.switch_to_displayed_app() # turn back to "no pref" do_not_track_settings.tap_do_not_have_pref_on_tracking() # should be back to "no pref" self.assertEqual(self.data_layer.get_int_pref('privacy.donottrackheader.value'), -1) # should be disabled self.assertEqual(self.data_layer.get_bool_pref('privacy.donottrackheader.enabled'), False)