Monday, December 26, 2011

0.4 release

First is I change the createDefaultContain to access by closure, but i'm not sure does this achieve what cadecairos wants -- https://webmademovies.lighthouseapp.com/projects/63272/tickets/873-stop-subtitle-from-polluting-popcorn-instances

and I remove timeline.css as cadecairos said
https://webmademovies.lighthouseapp.com/projects/63272/tickets/879-remove-popcorntimelinecss

here is the commit url
https://github.com/keyanr/popcorn-js/commit/1eed62d0b2a80a568cf4f7ba2ccd35ede34dd8d8
Just ignore some crap testing code....:)

Wednesday, December 7, 2011

Late 0.3 Release

I add a popup feature for popcorn in my 0.3
This popup allow user to watch the video in a new popup window, and the original window's player will be paused and hiden while the popup window is existing.
If the user close the popup window, he/she can restore the original one by click the restore button. (In my origin plan, This should be done automatically, but the onunload method cannot be called correctly)
For now, this feature cannot store user's watching time point, so user has to start from begining, I'm looking for a way to achive that.

https://github.com/keyanr/popcorn-js/commit/2b7379d08212ab4ef134ad7946fb55d6832a6c5e

Sunday, December 4, 2011

Saturday, December 3, 2011

There are some problem in git push

When I try to push my test, this error message always appears.
So I will post my test here first.


<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=633602
-->
<head>
    <title>Test for Bug 633602</title>
    <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
    <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
    <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=633602">Mozilla Bug 633602</a>
<div id="content">
</div>
    <pre id="test">
        <script type="application/javascript">

            /** Test for Bug 633602 **/
            SimpleTest.waitForExplicitFinish()

            SimpleTest.waitForFocus(function () {

                SpecialPowers.setBoolPref("full-screen-api.allow-trusted-requests-only", false);
                var pointer = navigator.pointer;
                var ePrevious = document.createEvent("MouseEvent");
                var eNow = document.createEvent("MouseEvent");
                var ep = document.createEvent("MouseEvent");
                var i = false;
                var t = 0;

                ePrevious.initMouseEvent("mousemove", true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
                eNow.initMouseEvent("mousemove", true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
                document.body.addEventListener("mousemove", function (e) {

                if (t <= 3) {
                    //check if mouseEvent contains movementX/Y
                ok(e.movementX != null, "MouseEvent must contain movementX.");
                ok(e.movementY != null, "MouseEvent must contain movementY.");


                eNow = e;
                ePrevious = ep;
                ep = e;

                if (i) {    //the validation won't start at the first time

                //check if movementX/Y = eNow.screenX/Y - ePrevious.screenX/Y
                if (pointer.islocked() == true || pointer.islocked() == false) {  //movementX/Y must be valid regardless of mouse lock state
                  is(e.movementX, eNow.screenX - ePrevious.screenX, "movementX shoulde equal eNow.screenX - ePrevious.screenX");
                  is(e.movementY, eNow.screenY - ePrevious.screenY, "movementY shoulde equal eNow.screenY - ePrevious.screenY");
                  }


                 }
                i = true;
                SimpleTest.finish();
                t++;
                    }
                }, false);
                document.body.addEventListener("mouseout", function (e) {
               i = false;   //if the pointer goes out from the browser, reset
                }, false);
            }, false);
        </script>
    </pre>

    <input type ="text" name ="txt" id="txt" />
</body>
</html>

The test is done

3 tests for movementX/Y are done (test #24,25,26)
I tried to retrieve the ePrevious's value directly, it costs me so long time and I'm still in confuse. So I use another way, create a variable to store the object and then compare with eNow.
Because movement is a dynamic implement, so the test won't take place as soon as others. User need to move the pointer in order to active the test.
For avoid thousands test result crush the browser, I limited the test in 4 times.

Friday, December 2, 2011

Mochitest need more time

I don't know why, there is a problem when I re-build the firefox that says permission deny, but will work after one or two more tries. Anyway, this costs me much more time to finish the test.

Monday, November 21, 2011

Finally done for Firefox build

After so many errors and OS/software conflicts. I finally got the build..(reinstall OS and all implements)
It seems I'm big fall behind than others, so I have to work more hard to catch up