content/media/test/test_texttrackcue_chrome.html

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=967157
     5 -->
     6 <head>
     7   <meta charset='utf-8'>
     8   <title>Test for Bug 967157 - Setting TextTrackCue::DisplayState should set TextTrackCue::HasBeenReset to false</title>
     9   <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
    10   <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
    11 </head>
    12 <body>
    13 <p id="display"></p>
    14 <div id="content">
    15 </div>
    16 <pre id="test">
    17 <script class="testbody" type="text/javascript">
    18 SimpleTest.waitForExplicitFinish();
    19 SpecialPowers.pushPrefEnv({"set": [["media.webvtt.enabled", true]]},
    20   function() {
    21     var cue = new VTTCue(0, 1, "Some text.");
    22     is(cue.hasBeenReset, false, "Cue's hasBeenReset flag should be false.");
    23     is(cue.displayState, null, "Cue's displayState should be null.");
    25     cue.startTime = 0.5;
    26     is(cue.hasBeenReset, true, "Cue's hasBeenReset flag should now be true.");
    28     cue.displayState = document.createElement("div");
    29     is(cue.hasBeenReset, false, "Cue's hasBeenReset flag should now be false.");
    30     SimpleTest.finish();
    31   }
    32 );
    33 </script>

mercurial