Closed
Bug 951997
Opened 11 years ago
Closed 11 years ago
Create content sandbox permission prompt test
Categories
(Core :: Permission Manager, defect)
Tracking
()
RESOLVED
FIXED
mozilla29
People
(Reporter: ayang, Assigned: ayang)
References
Details
Attachments
(1 file, 3 obsolete files)
7.41 KB,
patch
|
ayang
:
review+
|
Details | Diff | Splinter Review |
Create test for sandbox permission prompt test [1], including geolocation, audio-capture, and desktop-notification. That's for bug 935291.
[1] https://wiki.mozilla.org/Apps/Security#Sandboxed_Permissions
Assignee | ||
Comment 1•11 years ago
|
||
Assignee | ||
Comment 2•11 years ago
|
||
It'd be better to move this test to b2g/components/test.
Assignee | ||
Comment 3•11 years ago
|
||
Attachment #8349888 -
Attachment is obsolete: true
Assignee | ||
Updated•11 years ago
|
Attachment #8349958 -
Flags: review?(jsmith)
Assignee | ||
Updated•11 years ago
|
Attachment #8349958 -
Attachment is patch: true
Comment 4•11 years ago
|
||
Comment on attachment 8349958 [details] [diff] [review]
sanbox_permission_test
Let me redirect this to baku, as he's done reviews on permission-based tests before.
Attachment #8349958 -
Flags: review?(jsmith) → review?(amarchesini)
Comment 5•11 years ago
|
||
Comment on attachment 8349958 [details] [diff] [review]
sanbox_permission_test
Review of attachment 8349958 [details] [diff] [review]:
-----------------------------------------------------------------
looks good.
::: b2g/components/test/mochitest/permission_handler_chrome.js
@@ +16,5 @@
> +
> +let browser = Services.wm.getMostRecentWindow("navigator:browser");
> +
> +if (!browser) {
> + debug("no browser");
return;
@@ +43,5 @@
> +
> +function checkPromptEvent(prompt_evt) {
> + let detail = prompt_evt.detail;
> +
> + if (detail.permission) {
you can remove this if.
::: b2g/components/test/mochitest/test_sandbox_permission.html
@@ +1,4 @@
> +<!DOCTYPE HTML>
> +<html>
> +<!--
> +https://bugzilla.mozilla.org/show_bug.cgi?id=
id?
@@ +10,5 @@
> + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
> + <script type="application/javascript" src="head.js"></script>
> +</head>
> +<body>
> +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=">Permission prompt web content test</a>
id.. ?
@@ +15,5 @@
> +<script type="application/javascript">
> +
> +"use strict";
> +
> +function debug(str) {
you don't use this. remove it.
Attachment #8349958 -
Flags: review?(amarchesini) → review+
Assignee | ||
Comment 6•11 years ago
|
||
I add a mochitest under b2g/components but testing/mochites/b2g.json doesn't include b2g folder.
Is it ok to include this folder?
Attachment #8350571 -
Flags: review?(Ms2ger)
Comment 7•11 years ago
|
||
Comment on attachment 8350571 [details] [diff] [review]
sanbox_permission_test
Adding jgriffin to the review list for reviewing a new addition to run tests list in b2g.json.
Note - you should kick off a try run to validate that these tests are okay to turn on.
Attachment #8350571 -
Flags: review?(jgriffin)
Comment 8•11 years ago
|
||
Comment on attachment 8350571 [details] [diff] [review]
sanbox_permission_test
Review of attachment 8350571 [details] [diff] [review]:
-----------------------------------------------------------------
r+ just for the b2g*.json changes; I don't have any particular knowledge about what these tests are doing.
Like Jason said, please do a try run (-b do -p linux32_gecko,linux64_gecko,emulator -u mochitests -t none) before landing.
Attachment #8350571 -
Flags: review?(jgriffin) → review+
Assignee | ||
Comment 9•11 years ago
|
||
(In reply to Jonathan Griffin (:jgriffin) from comment #8)
> Comment on attachment 8350571 [details] [diff] [review]
> sanbox_permission_test
>
> Review of attachment 8350571 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> r+ just for the b2g*.json changes; I don't have any particular knowledge
> about what these tests are doing.
>
> Like Jason said, please do a try run (-b do -p
> linux32_gecko,linux64_gecko,emulator -u mochitests -t none) before landing.
I had a try today and got following error.
18:51:58 INFO - 2 INFO TEST-START | /tests/b2g/components/test/mochitest/test_sandbox_permission.html
18:52:00 INFO - System JS : ERROR chrome://specialpowers/content/SpecialPowersObserverAPI.js:298 - ReferenceError: Cc is not defined
It looks like SpecialPowers.loadChromeScript doesn't work on b2g-desktop [1]. Is it supposed to be it or a bug?
[1] https://tbpl.mozilla.org/?tree=Try&rev=d9224934c017
Assignee | ||
Updated•11 years ago
|
Attachment #8350571 -
Flags: review?(Ms2ger)
Assignee | ||
Comment 10•11 years ago
|
||
That should be B2G-desktop dones't support OOP. I'll disable this test on B2G-desktop.
Assignee | ||
Comment 11•11 years ago
|
||
Check-in patch for this testcase, carry r+ from above comments.
https://tbpl.mozilla.org/?tree=Try&rev=41d2112f2651
Attachment #8351288 -
Flags: review+
Assignee | ||
Comment 12•11 years ago
|
||
Hi Sheriff, please check-in patch check_in_sandbox_permission_test, thanks.
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Updated•11 years ago
|
Attachment #8349958 -
Attachment is obsolete: true
Updated•11 years ago
|
Attachment #8350571 -
Attachment is obsolete: true
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → ayang
Comment 13•11 years ago
|
||
Flags: in-testsuite+
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
You need to log in
before you can comment on or make changes to this bug.
Description
•