Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #21583 from mozilla-b2g/revert-21432-bug_924835
Browse files Browse the repository at this point in the history
Revert "Bug 924835 - Create a test for receiving a call with a locked sc...
  • Loading branch information
AndreiH committed Jul 10, 2014
2 parents 3f01ab5 + e0f538b commit 41ec15c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 90 deletions.
Expand Up @@ -2,8 +2,8 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

import time
from marionette.by import By
from marionette.marionette import Actions
from gaiatest.apps.phone.app import Phone


Expand All @@ -16,7 +16,6 @@ class CallScreen(Phone):
_incoming_call_locator = (By.CSS_SELECTOR, '.handled-call.incoming')
_hangup_bar_locator = (By.ID, 'callbar-hang-up')
_answer_bar_locator = (By.ID, 'callbar-answer')
_lockscreen_handle_locator = (By.ID, 'lockscreen-area-slide')

def __init__(self, marionette):
Phone.__init__(self, marionette)
Expand Down Expand Up @@ -50,10 +49,6 @@ def wait_for_incoming_call(self):
self.wait_for_condition(lambda m: incoming_call.location['y'] == 0)
self.wait_for_condition(lambda m: self.incoming_calling_contact != u'')

def wait_for_incoming_call_with_locked_screen(self):
self.wait_for_condition(lambda m: self.is_element_displayed(*self._incoming_call_locator))
self.wait_for_condition(lambda m: self.incoming_calling_contact != u'')

def answer_call(self):
self.marionette.find_element(*self._answer_bar_locator).tap()

Expand All @@ -69,23 +64,3 @@ def a11y_hang_up(self):
self.a11y_click_hang_up()
self.marionette.switch_to_frame()
self.wait_for_element_not_displayed(*self._call_screen_locator)

def _handle_incoming_call(self, destination):

lockscreen_handle = self.marionette.find_element(*self._lockscreen_handle_locator)
lockscreen_handle_x_centre = int(lockscreen_handle.size['width'] / 2)
lockscreen_handle_y_centre = int(lockscreen_handle.size['height'] / 2)

handle_destination = lockscreen_handle.size['width']
if destination == 'reject':
handle_destination *= -1

# Flick lockscreen handle to the destination
Actions(self.marionette).flick(
lockscreen_handle, lockscreen_handle_x_centre, lockscreen_handle_y_centre, handle_destination, 0
).perform()

def reject_call(self):
self.wait_for_element_displayed(*self._lockscreen_handle_locator)
self._handle_incoming_call('reject')
self.marionette.switch_to_frame()
Expand Up @@ -25,7 +25,3 @@ skip-if = device == "desktop"
[test_dialer_receive_call.py]
smoketest = true
skip-if = device == "desktop"

[test_receive_call_with_locked_screen.py]
smoketest = true
skip-if = device == "desktop"

This file was deleted.

0 comments on commit 41ec15c

Please sign in to comment.