From 1e48228088fa0656f643271b1e1372235955930a Mon Sep 17 00:00:00 2001 From: Nigel Babu Date: Fri, 22 Aug 2014 11:33:54 +0530 Subject: [PATCH] Backed out changeset 429de5ae1110 (bug 1052240) for b2g ics m7 bustage --- .../test/webgl-conformance/mochi-single.html | 68 +++++++++---------- 1 file changed, 32 insertions(+), 36 deletions(-) diff --git a/dom/canvas/test/webgl-conformance/mochi-single.html b/dom/canvas/test/webgl-conformance/mochi-single.html index 9b1b88352d07..125f549306e4 100644 --- a/dom/canvas/test/webgl-conformance/mochi-single.html +++ b/dom/canvas/test/webgl-conformance/mochi-single.html @@ -22,49 +22,16 @@ WebGL Conformance Test Suite Single Test Wrapper var IFRAME_BODY_MARGIN = 8; var IFRAME_SIZE_UPDATE_INTERVAL = 100; // ms +//////////////////////////////////////// + var statusElem = document.getElementById('status'); var pathElem = document.getElementById('path'); var resultsElem = document.getElementById('results'); var frameElem = document.getElementById('test-frame'); -//////////////////////////////////////////////////////////////////////// -// Forward SimpleTest functions and replace if missing. - -if (!window.ok) { - window.ok = parent.ok; -} -if (!window.todo) { - window.todo = parent.todo; -} -if (!window.SimpleTest) { - window.SimpleTest = parent.SimpleTest; -} - -if (!window.ok) { - window.ok = function(status, message) { - console.log('ok(' + status + ', "' + message + '")'); - } -} -if (!window.todo) { - window.todo = function(status, message) { - console.log('todo(' + status + ', "' + message + '")'); - } -} -if (!window.SimpleTest) { - window.SimpleTest = { - waitForExplicitFinish: function(){}, - finish: function(){}, - }; -} - -//////////////////////////////////////////////////////////////////////// -// Test running and harness. - -var gTestPath = null; function RunTest(testPath) { pathElem.innerHTML = testPath; - gTestPath = testPath; // Auto-update to grow the size of the doc. function UpdateFrameSize() { @@ -111,6 +78,8 @@ window.webglTestHarness = { }, }; +var gTestPath = null; + function OnTestComplete() { statusElem.innerHTML = 'Complete'; @@ -119,7 +88,34 @@ function OnTestComplete() { SimpleTest.finish(); } -//////////////////////////////////////////////////////////////////////// +if (!window.ok) { + window.ok = parent.ok; +} +if (!window.todo) { + window.todo = parent.todo; +} +if (!window.SimpleTest) { + window.SimpleTest = parent.SimpleTest; +} + +if (!window.ok) { + window.ok = function(status, message) { + console.log('ok(' + status + ', "' + message + '")'); + } +} +if (!window.todo) { + window.todo = function(status, message) { + console.log('todo(' + status + ', "' + message + '")'); + } +} +if (!window.SimpleTest) { + window.SimpleTest = { + waitForExplicitFinish: function(){}, + finish: function(){}, + }; +} + +//////////////////////////////////////// // Begin execution SimpleTest.waitForExplicitFinish();