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