Revision 33fe5bd3476e442addc39da425366b212b1f1899 authored by B2G Bumper Bot on 14 May 2014, 08:45:50 UTC, committed by B2G Bumper Bot on 14 May 2014, 08:45:50 UTC
========

https://hg.mozilla.org/integration/gaia-1_3/rev/8fe90508435f
Author: Fernando Rodríguez Sela <frsela@tid.es>
Desc: Merge pull request #19188 from frsela/STK/Bug1007608_v1.3

Bug 1007608 - [sora][PTCRB][STK]Case 27.22.4.9.4/1 failed in TS 51.010-4

========

https://hg.mozilla.org/integration/gaia-1_3/rev/be91a760c51e
Author: Fernando Rodriguez Sela <frsela@tid.es>
Desc: Bug 1007608 - [sora][PTCRB][STK]Case 27.22.4.9.4/1 failed in TS 51.010-4
1 parent 8b95a34
Raw File
test_bug733553.html
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=733553
-->
<head>
  <title>Test for Bug 733553</title>
  <script type="application/javascript" src="/MochiKit/MochiKit.js"></script>
  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body onload="initializeOnload()">
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=733553">Mozilla Bug 733553</a>
<p id="display"></p>
<pre id="test">
<script type="application/javascript">

SimpleTest.waitForExplicitFinish();

var testIndex = -1;
var testParts = [
  [1, "red.png"],
  [40, "animated-gif2.gif"],
  [1, "red.png"],
  [100, "lime100x100.svg"],
  [100, "lime100x100.svg"],
  [40, "animated-gif2.gif"],
  [1, "red.png"],
  // Note a failure of the next 'red.png' may indicate failure of resniffing on
  // this part ('shaver.png'); see bug 907575.
  [177, "shaver.png"],
  [1, "red.png"],
  [80, "damon.jpg"],
  [80, "damon.jpg"],
  [80, "damon.jpg"],
  // An invalid image (from bug 787899) that is further delivered with a
  // "special" bad MIME type that indicates that the necko
  // multipart/x-mixed-replace parser wasn't able to parse it.
  [0, "rillybad.jpg"],
  [80, "damon.jpg"],
  [0, "bad.jpg"],
  [1, "red.png"],
  [0, "invalid.jpg"],
  [40, "animated-gif2.gif"]
];

// We'll append the part number to this, and tell the informant
const BASE_URL = "bug733553-informant.sjs?";

function initializeOnload() {
  var firstimg = document.createElement('img');
  firstimg.addEventListener("load", imageLoad, false);
  firstimg.addEventListener("error", imageLoad, false);
  firstimg.alt = "";
  firstimg.src = "bug733553.sjs";
  document.getElementById('content').appendChild(firstimg);

  // Really ready for first, but who's counting
  readyForNext();
}

function readyForNext() {
  var loader = document.getElementById("loader");
  loader.src = BASE_URL + ++testIndex;
}

function imageLoad(aEvent) {
  var [width, fileName] = testParts[testIndex];
  is(aEvent.target.width, width,
     "Test " + testIndex + " " + fileName + " width correct");

  // Always call readyForNext here, as it's the closest we have to a cleanup
  readyForNext();
  if (testParts.length == testIndex) {
    var firstimg = document.getElementsByTagName('img')[0];
    firstimg.removeEventListener("load", imageLoad, false);
    firstimg.removeEventListener("error", imageLoad, false);
    SimpleTest.finish();
  }
}

</script>
</pre>
<div id="content"> <!-- style="display: none" -->
<iframe id="loader"></iframe>
</div>
</body>
</html>
back to top