From 5f8de423f190bbb79a62f804151bc24824fa32d8 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 2 Feb 2018 04:16:08 -0500 Subject: Add m-esr52 at 52.6.0 --- dom/xslt/tests/XSLTMark/XSLTMark-static.js | 49 ++++ dom/xslt/tests/XSLTMark/XSLTMark-test.js | 46 ++++ dom/xslt/tests/XSLTMark/XSLTMark-view.js | 175 ++++++++++++ dom/xslt/tests/XSLTMark/XSLTMark.css | 8 + dom/xslt/tests/XSLTMark/XSLTMark.xul | 52 ++++ dom/xslt/tests/buster/DiffDOM.js | 103 +++++++ dom/xslt/tests/buster/DumpDOM.js | 85 ++++++ dom/xslt/tests/buster/ReadMe | 22 ++ dom/xslt/tests/buster/buster-files.js | 81 ++++++ dom/xslt/tests/buster/buster-handlers.js | 37 +++ dom/xslt/tests/buster/buster-statics.js | 87 ++++++ dom/xslt/tests/buster/buster-test.js | 356 +++++++++++++++++++++++++ dom/xslt/tests/buster/buster-view.js | 193 ++++++++++++++ dom/xslt/tests/buster/buster.css | 20 ++ dom/xslt/tests/buster/buster.xul | 196 ++++++++++++++ dom/xslt/tests/buster/helper/generate-rdf.pl | 95 +++++++ dom/xslt/tests/buster/install.js | 17 ++ dom/xslt/tests/buster/jar.mn | 18 ++ dom/xslt/tests/buster/result-inspector.xul | 37 +++ dom/xslt/tests/buster/result-view.css | 16 ++ dom/xslt/tests/buster/result-view.js | 105 ++++++++ dom/xslt/tests/buster/result-view.xul | 46 ++++ dom/xslt/tests/buster/xslt-qa-overlay.js | 10 + dom/xslt/tests/buster/xslt-qa-overlay.xul | 12 + dom/xslt/tests/mochitest/file_bug1135764.xml | 3 + dom/xslt/tests/mochitest/file_bug1135764.xsl | 19 ++ dom/xslt/tests/mochitest/mochitest.ini | 20 ++ dom/xslt/tests/mochitest/test_bug1072116.html | 37 +++ dom/xslt/tests/mochitest/test_bug1135764.html | 53 ++++ dom/xslt/tests/mochitest/test_bug319374.xhtml | 109 ++++++++ dom/xslt/tests/mochitest/test_bug427060.html | 49 ++++ dom/xslt/tests/mochitest/test_bug440974.html | 46 ++++ dom/xslt/tests/mochitest/test_bug453441.html | 57 ++++ dom/xslt/tests/mochitest/test_bug468208.html | 35 +++ dom/xslt/tests/mochitest/test_bug511487.html | 59 ++++ dom/xslt/tests/mochitest/test_bug551412.html | 48 ++++ dom/xslt/tests/mochitest/test_bug551654.html | 49 ++++ dom/xslt/tests/mochitest/test_bug566629.html | 70 +++++ dom/xslt/tests/mochitest/test_bug566629.xhtml | 73 +++++ dom/xslt/tests/mochitest/test_bug603159.html | 54 ++++ dom/xslt/tests/mochitest/test_bug616774.html | 28 ++ dom/xslt/tests/mochitest/test_bug667315.html | 46 ++++ dom/xslt/tests/mochitest/test_exslt_regex.html | 60 +++++ dom/xslt/tests/mochitest/test_parameter.html | 31 +++ 44 files changed, 2812 insertions(+) create mode 100644 dom/xslt/tests/XSLTMark/XSLTMark-static.js create mode 100644 dom/xslt/tests/XSLTMark/XSLTMark-test.js create mode 100644 dom/xslt/tests/XSLTMark/XSLTMark-view.js create mode 100644 dom/xslt/tests/XSLTMark/XSLTMark.css create mode 100644 dom/xslt/tests/XSLTMark/XSLTMark.xul create mode 100644 dom/xslt/tests/buster/DiffDOM.js create mode 100644 dom/xslt/tests/buster/DumpDOM.js create mode 100644 dom/xslt/tests/buster/ReadMe create mode 100644 dom/xslt/tests/buster/buster-files.js create mode 100644 dom/xslt/tests/buster/buster-handlers.js create mode 100644 dom/xslt/tests/buster/buster-statics.js create mode 100644 dom/xslt/tests/buster/buster-test.js create mode 100644 dom/xslt/tests/buster/buster-view.js create mode 100644 dom/xslt/tests/buster/buster.css create mode 100644 dom/xslt/tests/buster/buster.xul create mode 100644 dom/xslt/tests/buster/helper/generate-rdf.pl create mode 100644 dom/xslt/tests/buster/install.js create mode 100644 dom/xslt/tests/buster/jar.mn create mode 100644 dom/xslt/tests/buster/result-inspector.xul create mode 100644 dom/xslt/tests/buster/result-view.css create mode 100644 dom/xslt/tests/buster/result-view.js create mode 100644 dom/xslt/tests/buster/result-view.xul create mode 100644 dom/xslt/tests/buster/xslt-qa-overlay.js create mode 100644 dom/xslt/tests/buster/xslt-qa-overlay.xul create mode 100644 dom/xslt/tests/mochitest/file_bug1135764.xml create mode 100644 dom/xslt/tests/mochitest/file_bug1135764.xsl create mode 100644 dom/xslt/tests/mochitest/mochitest.ini create mode 100644 dom/xslt/tests/mochitest/test_bug1072116.html create mode 100644 dom/xslt/tests/mochitest/test_bug1135764.html create mode 100644 dom/xslt/tests/mochitest/test_bug319374.xhtml create mode 100644 dom/xslt/tests/mochitest/test_bug427060.html create mode 100644 dom/xslt/tests/mochitest/test_bug440974.html create mode 100644 dom/xslt/tests/mochitest/test_bug453441.html create mode 100644 dom/xslt/tests/mochitest/test_bug468208.html create mode 100644 dom/xslt/tests/mochitest/test_bug511487.html create mode 100644 dom/xslt/tests/mochitest/test_bug551412.html create mode 100644 dom/xslt/tests/mochitest/test_bug551654.html create mode 100644 dom/xslt/tests/mochitest/test_bug566629.html create mode 100644 dom/xslt/tests/mochitest/test_bug566629.xhtml create mode 100644 dom/xslt/tests/mochitest/test_bug603159.html create mode 100644 dom/xslt/tests/mochitest/test_bug616774.html create mode 100644 dom/xslt/tests/mochitest/test_bug667315.html create mode 100644 dom/xslt/tests/mochitest/test_exslt_regex.html create mode 100644 dom/xslt/tests/mochitest/test_parameter.html (limited to 'dom/xslt/tests') diff --git a/dom/xslt/tests/XSLTMark/XSLTMark-static.js b/dom/xslt/tests/XSLTMark/XSLTMark-static.js new file mode 100644 index 000000000..d3284aac8 --- /dev/null +++ b/dom/xslt/tests/XSLTMark/XSLTMark-static.js @@ -0,0 +1,49 @@ +/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +const enablePrivilege = netscape.security.PrivilegeManager.enablePrivilege; +const IOSERVICE_CTRID = "@mozilla.org/network/io-service;1"; +const nsIIOService = Components.interfaces.nsIIOService; +const SIS_CTRID = "@mozilla.org/scriptableinputstream;1"; +const nsISIS = Components.interfaces.nsIScriptableInputStream; +const nsIFilePicker = Components.interfaces.nsIFilePicker; +const STDURL_CTRID = "@mozilla.org/network/standard-url;1"; +const nsIURI = Components.interfaces.nsIURI; + +Components.utils.import("resource://gre/modules/NetUtil.jsm"); + +var gStop = false; + +function loadFile(aUriSpec) +{ + enablePrivilege('UniversalXPConnect'); + var serv = Components.classes[IOSERVICE_CTRID]. + getService(nsIIOService); + if (!serv) { + throw Components.results.ERR_FAILURE; + } + var chan = NetUtil.newChannel({ + uri: aUriSpec, + loadUsingSystemPrincipal: true + }); + var instream = + Components.classes[SIS_CTRID].createInstance(nsISIS); + instream.init(chan.open2()); + + return instream.read(instream.available()); +} + +function dump20(aVal) +{ + const pads = ' '; + if (typeof(aVal)=='string') + out = aVal; + else if (typeof(aVal)=='number') + out = Number(aVal).toFixed(2); + else + out = new String(aVal); + dump(pads.substring(0, 20 - out.length)); + dump(out); +} diff --git a/dom/xslt/tests/XSLTMark/XSLTMark-test.js b/dom/xslt/tests/XSLTMark/XSLTMark-test.js new file mode 100644 index 000000000..4037c75e4 --- /dev/null +++ b/dom/xslt/tests/XSLTMark/XSLTMark-test.js @@ -0,0 +1,46 @@ +/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +var gParser = new DOMParser; +var gTimeout; + +function Test(aTitle, aSourceURL, aStyleURL, aNumber, aObserver) +{ + this.mTitle = aTitle; + this.mObserver = aObserver; + this.mTotal = aNumber; + this.mDone = 0; + var xmlcontent = loadFile(aSourceURL); + var xslcontent = loadFile(aStyleURL); + this.mSource = gParser.parseFromString(xmlcontent, 'application/xml'); + this.mStyle = gParser.parseFromString(xslcontent, 'application/xml'); +} + +function runTest(aTitle, aSourceURL, aStyleURL, aNumber, aObserver) +{ + test = new Test(aTitle, aSourceURL, aStyleURL, aNumber, + aObserver); + gTimeout = setTimeout(onNextTransform, 100, test, 0); +} + +function onNextTransform(aTest, aNumber) +{ + var proc = new XSLTProcessor; + var startTime = Date.now(); + proc.importStylesheet(aTest.mStyle); + var res = proc.transformToDocument(aTest.mSource); + var endTime = Date.now(); + aNumber++; + var progress = aNumber / aTest.mTotal * 100; + if (aTest.mObserver) { + aTest.mObserver.progress(aTest.mTitle, endTime - startTime, + progress); + } + if (aNumber < aTest.mTotal) { + gTimeout = setTimeout(onNextTransform, 100, aTest, aNumber); + } else if (aTest.mObserver) { + aTest.mObserver.done(aTest.mTitle); + } +} diff --git a/dom/xslt/tests/XSLTMark/XSLTMark-view.js b/dom/xslt/tests/XSLTMark/XSLTMark-view.js new file mode 100644 index 000000000..7342d0d9a --- /dev/null +++ b/dom/xslt/tests/XSLTMark/XSLTMark-view.js @@ -0,0 +1,175 @@ +/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +var view = +{ + configUrl: null, + testArray: null, + mCurrent: null, + + browseForConfig: function() + { + enablePrivilege('UniversalXPConnect'); + var fp = Components.classes["@mozilla.org/filepicker;1"]. + createInstance(nsIFilePicker); + fp.init(window,'XSLTMark Description File',nsIFilePicker.modeOpen); + fp.appendFilter('*.conf', '*.conf'); + fp.appendFilters(nsIFilePicker.filterAll); + var res = fp.show(); + + if (res == nsIFilePicker.returnOK) { + this.configUrl = Components.classes[STDURL_CTRID].createInstance(nsIURI); + this.configUrl.spec = fp.fileURL.spec; + document.getElementById('config').setAttribute('value', this.configUrl.spec); + } + this.parseConfig(); + return true; + }, + + parseConfig: function() + { + this.testArray = new Array(); + var test; + if (!this.configUrl) { + return; + } + + var content = loadFile(this.configUrl.spec); + + var lines = content.split("\n"); + var line, res; + var head = /^\[(.+)\]$/; + var instruct = /^(.+)=(.+)$/; + while (lines.length) { + line = lines.shift(); + if (head.test(line)) { + test = new Object; + res = head.exec(line); + test['title'] = res[1]; + this.testArray.push(test); + } + else if (line == '') { + test = undefined; + } + else { + res = instruct.exec(line); + test[res[1]] = res[2]; + } + } + }, + + onLoad: function() + { + this.mCurrentStatus = document.getElementById('currentStatus'); + this.mCurrentProgress = document.getElementById('currentProgress'); + this.mTotalProgress = document.getElementById('totalProgress'); + this.mOutput = document.getElementById('transformOutput'); + this.mDetailOutput = + document.getElementById('transformDetailedOutput'); + this.mDetail = true; + }, + + progress: function(aTitle, aTime, aProgress) + { + // dump20(aTitle); + // dump20(aTime); + // dump20(aProgress); + this.mCurrentProgress.value = aProgress; + this.displayDetailTime(aTime); + this.mTimes.push(aTime); + // dump("\n"); + }, + + done: function(aTitle) + { + // dump(aTitle + " is finished.\n"); + this.mCurrent++; + this.mCurrentProgress.value = 0; + this.displayTotalTime(); + if (this.mCurrent >= this.testArray.length) { + this.mTotalProgress.value = 0; + this.mCurrentStatus.value = "done"; + return; + } + this.mTotalProgress.value = this.mCurrent*100/this.testArray.length; + var test = this.testArray[this.mCurrent]; + enablePrivilege('UniversalXPConnect'); + this.displayTest(test.title); + runTest(test.title, this.configUrl.resolve(test.input), + this.configUrl.resolve(test.stylesheet), + test.iterations, this); + }, + + onStop: function() + { + clearTimeout(gTimeout); + this.mCurrentProgress.value = 0; + this.mTotalProgress.value = 0; + this.mCurrentStatus.value = "stopped"; + }, + + displayTest: function(aTitle) + { + this.mTimes = new Array; + aTitle += "\t"; + this.mCurrentStatus.value = aTitle; + this.mOutput.value += aTitle; + if (this.mDetail) { + this.mDetailOutput.value += aTitle; + } + }, + + displayDetailTime: function(aTime) + { + if (this.mDetail) { + this.mDetailOutput.value += aTime + " ms\t"; + } + }, + + displayTotalTime: function() + { + var sum = 0; + for (k = 0; k < this.mTimes.length; k++) { + sum += this.mTimes[k]; + } + var mean = sum / this.mTimes.length; + this.mOutput.value += Number(mean).toFixed(2) + " ms\t" + sum + " ms\t"; + var variance = 0; + for (k = 0; k < this.mTimes.length; k++) { + var n = this.mTimes[k] - mean; + variance += n*n; + } + variance = Math.sqrt(variance/this.mTimes.length); + this.mOutput.value += Number(variance).toFixed(2)+"\n"; + if (this.mDetail) { + this.mDetailOutput.value += "\n"; + } + }, + + runBenchmark: function() + { + enablePrivilege('UniversalXPConnect'); + if (!this.testArray) { + if (!this.configUrl) { + this.configUrl = Components.classes[STDURL_CTRID].createInstance(nsIURI); + this.configUrl.spec = document.getElementById('config').value; + } + this.parseConfig(); + } + + this.mCurrent = 0; + var test = this.testArray[this.mCurrent]; + this.mOutput.value = ''; + if (this.mDetail) { + this.mDetailOutput.value = ''; + } + this.displayTest(test.title); + runTest(test.title, this.configUrl.resolve(test.input), + this.configUrl.resolve(test.stylesheet), + test.iterations, this); + return true; + } +} + diff --git a/dom/xslt/tests/XSLTMark/XSLTMark.css b/dom/xslt/tests/XSLTMark/XSLTMark.css new file mode 100644 index 000000000..80386ae2d --- /dev/null +++ b/dom/xslt/tests/XSLTMark/XSLTMark.css @@ -0,0 +1,8 @@ +/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +textbox.out { + white-space: pre; +} diff --git a/dom/xslt/tests/XSLTMark/XSLTMark.xul b/dom/xslt/tests/XSLTMark/XSLTMark.xul new file mode 100644 index 000000000..bc34a7a03 --- /dev/null +++ b/dom/xslt/tests/XSLTMark/XSLTMark.xul @@ -0,0 +1,52 @@ + + + + + + + + + + +Mozilla Bug 1072116 +

+ +
+
+
+ + diff --git a/dom/xslt/tests/mochitest/test_bug1135764.html b/dom/xslt/tests/mochitest/test_bug1135764.html new file mode 100644 index 000000000..5a7410e37 --- /dev/null +++ b/dom/xslt/tests/mochitest/test_bug1135764.html @@ -0,0 +1,53 @@ + + + + + + Test for Bug 1135764 + + + + + +Mozilla Bug 1135764 +

+ +

+ +
+
+ + diff --git a/dom/xslt/tests/mochitest/test_bug319374.xhtml b/dom/xslt/tests/mochitest/test_bug319374.xhtml new file mode 100644 index 000000000..2342b3447 --- /dev/null +++ b/dom/xslt/tests/mochitest/test_bug319374.xhtml @@ -0,0 +1,109 @@ + + + + + Test for Bug 319374 + + + + + + anon text
+
+
+
+ + +Mozilla Bug 319374 +

+
+
+
+
+ + + diff --git a/dom/xslt/tests/mochitest/test_bug427060.html b/dom/xslt/tests/mochitest/test_bug427060.html new file mode 100644 index 000000000..89bcb5255 --- /dev/null +++ b/dom/xslt/tests/mochitest/test_bug427060.html @@ -0,0 +1,49 @@ + + + + + Test for Bug 427060 + + + + +Mozilla Bug 427060 +

+ +
+
+
+ + diff --git a/dom/xslt/tests/mochitest/test_bug440974.html b/dom/xslt/tests/mochitest/test_bug440974.html new file mode 100644 index 000000000..33b73e6de --- /dev/null +++ b/dom/xslt/tests/mochitest/test_bug440974.html @@ -0,0 +1,46 @@ + + + + + Test for Bug 440974 + + + + +Mozilla Bug 440974 +

+ +
+
+
+ + diff --git a/dom/xslt/tests/mochitest/test_bug453441.html b/dom/xslt/tests/mochitest/test_bug453441.html new file mode 100644 index 000000000..4decae56c --- /dev/null +++ b/dom/xslt/tests/mochitest/test_bug453441.html @@ -0,0 +1,57 @@ + + + + + Test for Bug 453441 + + + + +Mozilla Bug 453441 +

+ +
+
+
+ + diff --git a/dom/xslt/tests/mochitest/test_bug468208.html b/dom/xslt/tests/mochitest/test_bug468208.html new file mode 100644 index 000000000..3da0349be --- /dev/null +++ b/dom/xslt/tests/mochitest/test_bug468208.html @@ -0,0 +1,35 @@ + + + + + Test for Bug 468208 + + + + + +Mozilla Bug 468208 +

+ +
+
+
+ + diff --git a/dom/xslt/tests/mochitest/test_bug511487.html b/dom/xslt/tests/mochitest/test_bug511487.html new file mode 100644 index 000000000..b5cd21cf6 --- /dev/null +++ b/dom/xslt/tests/mochitest/test_bug511487.html @@ -0,0 +1,59 @@ + + + + + Test for Bug 511487 + + + + +Mozilla Bug 511487 +

+ +
+
+
+ + diff --git a/dom/xslt/tests/mochitest/test_bug551412.html b/dom/xslt/tests/mochitest/test_bug551412.html new file mode 100644 index 000000000..c6f5e13e8 --- /dev/null +++ b/dom/xslt/tests/mochitest/test_bug551412.html @@ -0,0 +1,48 @@ + + + + + Test for Bug 551412 + + + + +Mozilla Bug 551412 +

+ +
+
+
+ + diff --git a/dom/xslt/tests/mochitest/test_bug551654.html b/dom/xslt/tests/mochitest/test_bug551654.html new file mode 100644 index 000000000..a72fa41fa --- /dev/null +++ b/dom/xslt/tests/mochitest/test_bug551654.html @@ -0,0 +1,49 @@ + + + + + Test for Bug 551654 + + + + +Mozilla Bug 551654 +

+ +
+
+
+ + diff --git a/dom/xslt/tests/mochitest/test_bug566629.html b/dom/xslt/tests/mochitest/test_bug566629.html new file mode 100644 index 000000000..7d66d212b --- /dev/null +++ b/dom/xslt/tests/mochitest/test_bug566629.html @@ -0,0 +1,70 @@ + + + + + Test for Bug 566629 + + + + +Mozilla Bug 566629 +

+ +
+
+
+ + diff --git a/dom/xslt/tests/mochitest/test_bug566629.xhtml b/dom/xslt/tests/mochitest/test_bug566629.xhtml new file mode 100644 index 000000000..e5fca2b58 --- /dev/null +++ b/dom/xslt/tests/mochitest/test_bug566629.xhtml @@ -0,0 +1,73 @@ + + + + Test for Bug 566629 + + + + +Mozilla Bug 566629 +

+ +
+
+
+ + diff --git a/dom/xslt/tests/mochitest/test_bug603159.html b/dom/xslt/tests/mochitest/test_bug603159.html new file mode 100644 index 000000000..ac0191bd3 --- /dev/null +++ b/dom/xslt/tests/mochitest/test_bug603159.html @@ -0,0 +1,54 @@ + + + + + Test for Bug 603159 + + + + +Mozilla Bug 603159 +

+ +
+
+
+ + diff --git a/dom/xslt/tests/mochitest/test_bug616774.html b/dom/xslt/tests/mochitest/test_bug616774.html new file mode 100644 index 000000000..3578d1704 --- /dev/null +++ b/dom/xslt/tests/mochitest/test_bug616774.html @@ -0,0 +1,28 @@ + + + + + Test for Bug 616774 + + + + + +Mozilla Bug 616774 +

+ +
+
+
+ + diff --git a/dom/xslt/tests/mochitest/test_bug667315.html b/dom/xslt/tests/mochitest/test_bug667315.html new file mode 100644 index 000000000..fc5baff77 --- /dev/null +++ b/dom/xslt/tests/mochitest/test_bug667315.html @@ -0,0 +1,46 @@ + + + + + Test for Bug 667315 + + + + +Mozilla Bug 667315 +

+ +
+
+
+ + diff --git a/dom/xslt/tests/mochitest/test_exslt_regex.html b/dom/xslt/tests/mochitest/test_exslt_regex.html new file mode 100644 index 000000000..f4e00f9d3 --- /dev/null +++ b/dom/xslt/tests/mochitest/test_exslt_regex.html @@ -0,0 +1,60 @@ + + + + + Test for EXSLT Regular Expression Extensions + + + + +

+ +
+
+
+ + diff --git a/dom/xslt/tests/mochitest/test_parameter.html b/dom/xslt/tests/mochitest/test_parameter.html new file mode 100644 index 000000000..2430f75ec --- /dev/null +++ b/dom/xslt/tests/mochitest/test_parameter.html @@ -0,0 +1,31 @@ + + + + Test for setParameter/getParameter + + + + +

+ +
+
+
+ + -- cgit v1.2.3