Closed Bug 1057273 Opened 10 years ago Closed 10 years ago

[Flame][v2.1] Cannot set app permission when executing test_everythingme_search.py

Categories

(Firefox OS Graveyard :: Gaia::UI Tests, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: whsu, Unassigned)

References

Details

Attachments

(1 file)

(deleted), text/x-github-pull-request
RobertC
: review+
Details
When Gaia UI Test executing test_everythingme_search.py, it cannot set app permission and cause failure.

@ Build Information:
 - Gaia      c8e93dadeaec6a2617b4db8b7d65ba14aa8db378
 - Gecko     https://hg.mozilla.org/mozilla-central/rev/c14e5feadc61
 - BuildID   20140821160203
 - Version   34.0a1

@ ERROR MESSAGE:
starting httpd
running webserver on http://10.247.27.5:57091/
SUITE-START | Running 1 tests
TEST-START | test_everythingme_search.py TestEverythingMeSearch.test_launch_everything_me_search
TEST-UNEXPECTED-ERROR | test_everythingme_search.py TestEverythingMeSearch.test_launch_everything_me_search | JavascriptException: JavascriptException: NS_ERROR_UNEXPECTED: 
stacktrace:
	execute_async_script @gaia_test.py, line 50
	inline javascript, line 80
	src: "      mozPerms.set("
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/marionette_client-0.8.2-py2.7.egg/marionette/marionette_test.py", line 153, in run
    self.setUp()
  File "/home/william/Workspace_B2G/Gaia_Repo/Gaia_Master/tests/python/gaia-ui-tests/gaiatest/tests/functional/everythingme/test_everythingme_search.py", line 14, in setUp
    self.apps.set_permission('Search', 'geolocation', 'deny')
  File "/home/william/Workspace_B2G/Gaia_Repo/Gaia_Master/tests/python/gaia-ui-tests/gaiatest/gaia_test.py", line 50, in set_permission
    (app_name, permission_name, value))
  File "/usr/local/lib/python2.7/dist-packages/marionette_client-0.8.2-py2.7.egg/marionette/marionette.py", line 1247, in execute_async_script
    filename=os.path.basename(frame[0]))
  File "/usr/local/lib/python2.7/dist-packages/marionette_client-0.8.2-py2.7.egg/marionette/decorators.py", line 35, in _
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/marionette_client-0.8.2-py2.7.egg/marionette/marionette.py", line 634, in _send_message
    self._handle_error(response)
  File "/usr/local/lib/python2.7/dist-packages/marionette_client-0.8.2-py2.7.egg/marionette/marionette.py", line 682, in _handle_error
    raise errors.JavascriptException(message=message, status=status, stacktrace=stacktrace)
TEST-INFO expected PASS | took 35885ms

SUMMARY
-------
passed: 0
failed: 1
todo: 0

FAILED TESTS
-------
According to b2g-i builds this bug started with:
https://tbpl.mozilla.org/?tree=B2g-Inbound&showall=1&rev=45771209ca06

but it doesn't look suspicious.

Let's run it locally with and without that commit.
I'm getting this in my logcat:

08-22 02:31:23.799 E/GeckoConsole( 1499): [JavaScript Error: "NS_ERROR_MALFORMED_URI: Component returned failure code: 0x804b000a (NS_ERROR_MALFORMED_URI) [nsIIOService2.newURI]" {file: "jar:file:///system/b2g/omni.ja!/components/PermissionSettings.js" line: 39}]
The app name has been changed and this is whty we see this fail.

The new app name is:  "Browser2"

https://github.com/mozilla-b2g/gaia/commit/3cae1cc87e8de8adabe006ff115b9e32006d1818#diff-d592df8babed869ec056e5b240f57e8aR13



Should we update the test?
Kevin - Do you know if the app name change above was expected? Just want to double check if we need to update the tests here.
Flags: needinfo?(kgrandon)
I'm a bit confused. Right now we have a "Browser" and a "Browser2" app. Can you describe what the test is doing? Since the Browser2 app is so new, I don't think we should have any python tests for it yet.

In the next few weeks we will be replacing the Browser app with the Browser2 app, and re-naming it.
Flags: needinfo?(kgrandon)
Oh, I understand now... Hmm is there no way to do this based on manifest URL and not test name? We are going to be updating the test in the next week or so, but go ahead and update the expected app name for now and we should be good.
Attached file Github pull request (deleted) —
Added a patch we can land here if it helps.
Attachment #8477455 - Flags: review?(whsu)
Thanks Kevin!
I will try this patch to see if it works a expected.
ETA: 8/25 (UTC+8)
Attachment #8477455 - Flags: review+
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Thanks Kevin and Robert! :)
The patch works as expected on my local branch.

---------------------------- LOG ----------------------------
starting httpd
running webserver on http://10.247.27.5:44436/
SUITE-START | Running 1 tests
TEST-START | test_everythingme_launch_link.py TestEverythingMeLaunchLink.test_launch_everything_me_link
TEST-PASS | test_everythingme_launch_link.py TestEverythingMeLaunchLink.test_launch_everything_me_link | took 55149ms

SUMMARY
-------
passed: 1
failed: 0
todo: 0
SUITE-END | took 55s
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: