Closed
Bug 1495364
Opened 7 years ago
Closed 7 years ago
FeaturePolicy: geolocation
Categories
(Core :: DOM: Core & HTML, enhancement, P2)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla64
| Tracking | Status | |
|---|---|---|
| firefox64 | --- | fixed |
People
(Reporter: baku, Assigned: baku)
References
Details
(Keywords: dev-doc-complete, Whiteboard: [domsecurity-backlog1] [domsecurity-active])
Attachments
(1 file, 1 obsolete file)
|
8.86 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
Supporting for 'geolocation' feature policy.
| Assignee | ||
Comment 1•7 years ago
|
||
Attachment #9013219 -
Flags: review?(bugs)
Comment 2•7 years ago
|
||
Comment on attachment 9013219 [details] [diff] [review]
A_feature_geolocation.patch
https://bugzilla.mozilla.org/show_bug.cgi?id=1495362#c3 applies here too.
Attachment #9013219 -
Flags: review?(bugs)
Updated•7 years ago
|
Priority: -- → P2
| Assignee | ||
Updated•7 years ago
|
Attachment #9013219 -
Flags: review?(bugs)
Comment 3•7 years ago
|
||
Comment on attachment 9013219 [details] [diff] [review]
A_feature_geolocation.patch
https://bugzilla.mozilla.org/show_bug.cgi?id=1495362#c6 applies here too.
nsCOMPtr<nsIDocument> doc = win->GetDoc();
should use GetExtantDoc()
Attachment #9013219 -
Flags: review?(bugs) → review-
| Assignee | ||
Comment 4•7 years ago
|
||
Attachment #9013219 -
Attachment is obsolete: true
Attachment #9014731 -
Flags: review?(bugs)
Comment 5•7 years ago
|
||
Comment on attachment 9014731 [details] [diff] [review]
A_feature_geolocation.patch
>+function test_currentPosition() {
>+ navigator.geolocation.getCurrentPosition(() => {
>+ tests.push(1);
>+ test_watchPosition();
>+ }, () => {
>+ tests.push(0);
>+ test_watchPosition();
>+ })
>+}
>+
>+function test_watchPosition() {
>+ navigator.geolocation.watchPosition(() => {
>+ tests.push(1);
>+ send_results();
>+ }, () => {
>+ tests.push(0);
>+ send_results();
>+ });
>+}
What are these magical 0 and 1 values in the tests array? Couldn't you just push "denied" or "allowed"
>+
>+var tests = [
>+ [ "geolocation 'none'", "denied"],
>+ [ "geolocation", "allowed"],
>+ [ "geolocation 'src'", "allowed"],
>+ [ "geolocation 'self'", "allowed"],
>+ [ "geolocation *", "allowed"],
>+ [ "geolocation http://random.net", "denied"],
>+];
Please add a test without any featurepolicy (in which case allow attribute isn't set) and ensure its behavior doesn't change with or without the patch.
>+
>+function nextTest() {
>+ if (tests.length == 0) {
>+ SimpleTest.finish();
>+ return;
>+ }
>+
>+ let test = tests.shift();
>+
>+ var iframe = document.createElement("iframe");
>+ iframe.setAttribute("allow", test[0]);
>+
>+ window.continueTest = event => {
>+ delete window.continueTest;
event isn't an event, just a message. So, don't call the argument event. Perhaps msg
Attachment #9014731 -
Flags: review?(bugs) → review+
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/fd12d054f76c
FeaturePolicy: geolocation, r=smaug
Comment 7•7 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox64:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Updated•7 years ago
|
Keywords: dev-doc-needed
Comment 8•7 years ago
|
||
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Feature-Policy
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Feature-Policy/geolocation
Keywords: dev-doc-needed → dev-doc-complete
Updated•7 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•