Closed Bug 1306505 Opened 8 years ago Closed 7 years ago

[webvr] Implement mochitest: VRDisplay.exitPresent must only be allowed by content that started VR Presentation

Categories

(Core :: WebVR, defect, P3)

x86_64
Windows
defect

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: kip, Assigned: cleu)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [gfx-noted][webvr])

Attachments

(1 file)

Content from separate iframes, separate tabs, or separate windows should not be able to exit a VR presentation with VRDisplay.exitPresent unless it was the content that started the presentation with VRDisplay.beginPresent.
OS: Unspecified → Windows
Priority: -- → P3
Hardware: Unspecified → x86_64
Whiteboard: [gfx-noted]
Whiteboard: [gfx-noted] → [gfx-noted][webr]
Whiteboard: [gfx-noted][webr] → [gfx-noted][webvr]
Component: Graphics → WebVR
Assignee: nobody → cleu
Comment on attachment 8850812 [details]
Bug 1306505 - Implement mochitest: VRDisplay.exitPresent must only be allowed by content that started VR Presentation;

https://reviewboard.mozilla.org/r/123330/#review125714

::: dom/vr/test/test_vrDisplay_exitPresent.html:21
(Diff revision 1)
> +            return content.vrDisplay.exitPresent();
> +        });
> +      }
> +      var initVRPresentation = function(content) {
> +            return content.navigator.getVRDisplays().then((displays) => {
> +            console.log("GetVRDisplay!!");

Please remove console.log

::: dom/vr/test/test_vrDisplay_exitPresent.html:33
(Diff revision 1)
> +      function startTest() {
> +        var ifr1 = document.getElementById("iframe1");
> +        var ifr2 = document.getElementById("iframe2");
> +        var frame1 = ifr1.contentWindow;
> +        var frame2 = ifr2.contentWindow;
> +        initVRPresentation(frame1).then(() => {

You should confirm the vrdisplay from iframe 1 is isPresenting and then start to check iframe 2 whether it is available to present.
Attachment #8850812 - Flags: review?(dmu)
Comment on attachment 8850812 [details]
Bug 1306505 - Implement mochitest: VRDisplay.exitPresent must only be allowed by content that started VR Presentation;

https://reviewboard.mozilla.org/r/123330/#review125786

LGTM. Please make sure getting the green lights from try before landing.
Attachment #8850812 - Flags: review?(dmu) → review+
Here is try result, anything other than green light seems to have nothing to do with it. 
https://treeherder.mozilla.org/#/jobs?repo=try&revision=d6e326c4b97a6d92ef216d3ecaf4d2e02423888a&selectedJob=86154057
Please don't forget to have a try on Android.
Keywords: checkin-needed
hg error in cmd: hg push -r tip ssh://hg.mozilla.org/integration/autoland: pushing to ssh://hg.mozilla.org/integration/autoland
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 2 changes to 2 files
remote: 
remote: 
remote: ************************** ERROR ****************************
remote: Rev 6faedea20076 needs "Bug N" or "No bug" in the commit message.
remote: Chih-Yi Leu <cleu@mozilla.com>
remote: Bug1306505 - Implement mochitest: VRDisplay.exitPresent must only be allowed by content that started VR Presentation; r=daoshengmu
remote: 
remote: MozReview-Commit-ID: 8iFE4vK4oiZ
remote: *************************************************************
remote: 
remote: 
remote: transaction abort!
remote: rollback completed
remote: pretxnchangegroup.c_commitmessage hook failed
abort: push failed on remote
Pushed by dmu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/16e182457e16
Implement mochitest: VRDisplay.exitPresent must only be allowed by content that started VR Presentation; r=daoshengmu
https://hg.mozilla.org/mozilla-central/rev/16e182457e16
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Depends on: 1358008
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: