dom/plugins/test/mochitest/test_twostreams.html

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 <html>
     2 <head>
     3   <title>Dual NPAPI NP_ASFILEONLY NPStream Test</title>
     4   <script type="text/javascript" 
     5           src="/tests/SimpleTest/SimpleTest.js"></script>
     6   <script type="text/javascript" src="utils.js"></script>
     7   <link rel="stylesheet" type="text/css" 
     8         href="/tests/SimpleTest/test.css" />
     9 </head>
    10 <body>
    11   <p id="display"></p>
    13   <script type="text/javascript">
    14   SimpleTest.expectAssertions(0, 2);
    16   SimpleTest.waitForExplicitFinish();
    17   setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
    19   var framesToLoad = 2;
    20   function frameLoaded(id) {
    21     var frame = document.getElementById('testframe' + id);
    22     if (!frame.contentDocument.body.innerHTML.length)
    23       return;
    25     --framesToLoad;
    26     if (0 == framesToLoad) {
    27       is(document.getElementById('testframe1').contentDocument.body.innerHTML,
    28          document.getElementById('testframe2').contentDocument.body.innerHTML,
    29          "Frame contents should match");
    30       SimpleTest.finish();
    31     }
    32   }
    33   </script>
    35   <iframe id="testframe1" name="testframe1" onload="frameLoaded(1)"></iframe>
    36   <iframe id="testframe2" name="testframe2" onload="frameLoaded(2)"></iframe>
    38   <embed src="loremipsum_nocache.txt" streammode="asfileonly"
    39          frame="testframe1"
    40          id="embedtest" style="width: 400px; height: 100px;"
    41          type="application/x-test"></embed>
    42   <embed src="loremipsum_nocache.txt" streammode="asfileonly"
    43 	 frame="testframe2"
    44 	 id="embedtest2" style="width: 400px; height: 100px;"
    45 	 type="application/x-test"></embed>

mercurial