content/media/test/test_texttrackcue_chrome.html

Fri, 16 Jan 2015 04:50:19 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 04:50:19 +0100
branch
TOR_BUG_9701
changeset 13
44a2da4a2ab2
permissions
-rw-r--r--

Replace accessor implementation with direct member state manipulation, by
request https://trac.torproject.org/projects/tor/ticket/9701#comment:32

     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