Bug 1451503 Move most reftest resources from chrome: to resource: r=kmag

Differential Revision: https://phabricator.services.mozilla.com/D5232

--HG--
extra : rebase_source : 00223dacf6cfdfc4bb8505405844f66c7134e2c0
extra : histedit_source : 2d1f6e353e394520038c05b07bcd08ce06908cf2
This commit is contained in:
Andrew Swan 2018-09-06 16:01:39 -07:00
Родитель f9b40a12b2
Коммит 62bcb25a7c
37 изменённых файлов: 60 добавлений и 55 удалений

Просмотреть файл

@ -7,8 +7,7 @@ function load()
let textarea = document.getElementById("editor");
textarea.focus();
SpecialPowers.Cu.import(
"chrome://reftest/content/AsyncSpellCheckTestHelper.jsm")
SpecialPowers.Cu.import("resource://reftest/AsyncSpellCheckTestHelper.jsm")
.onSpellCheck(textarea, () => {
let isc = SpecialPowers.wrap(textarea).editor.getInlineSpellChecker(false);
let sc = isc.spellChecker;

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://reftest/content/input.css" type="text/css"?>
<?xml-stylesheet href="resource://reftest/input.css" type="text/css"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://reftest/content/input.css" type="text/css"?>
<?xml-stylesheet href="resource://reftest/input.css" type="text/css"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://reftest/content/input.css" type="text/css"?>
<?xml-stylesheet href="resource://reftest/input.css" type="text/css"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://reftest/content/input.css" type="text/css"?>
<?xml-stylesheet href="resource://reftest/input.css" type="text/css"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://reftest/content/input.css" type="text/css"?>
<?xml-stylesheet href="resource://reftest/input.css" type="text/css"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://reftest/content/input.css" type="text/css"?>
<?xml-stylesheet href="resource://reftest/input.css" type="text/css"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://reftest/content/input.css" type="text/css"?>
<?xml-stylesheet href="resource://reftest/input.css" type="text/css"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://reftest/content/input.css" type="text/css"?>
<?xml-stylesheet href="resource://reftest/input.css" type="text/css"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://reftest/content/input.css" type="text/css"?>
<?xml-stylesheet href="resource://reftest/input.css" type="text/css"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://reftest/content/input.css" type="text/css"?>
<?xml-stylesheet href="resource://reftest/input.css" type="text/css"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://reftest/content/input.css" type="text/css"?>
<?xml-stylesheet href="resource://reftest/input.css" type="text/css"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://reftest/content/input.css" type="text/css"?>
<?xml-stylesheet href="resource://reftest/input.css" type="text/css"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"

Просмотреть файл

@ -1,6 +1,6 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' href='chrome://reftest/content/progress.css'>
<link rel='stylesheet' href='resource://reftest/progress.css'>
<style>
body > div:nth-child(1) > .progress-bar { margin: 10px; padding: 0px; }
body > div:nth-child(2) > .progress-bar { margin: 0px; padding: 10px; }

Просмотреть файл

@ -1,6 +1,6 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' href='chrome://reftest/content/progress.css'>
<link rel='stylesheet' href='resource://reftest/progress.css'>
<style>
body > div:nth-child(1) > .progress-bar { margin: 0px 10px 0px 0px; padding: 0px; }
body > div:nth-child(2) > .progress-bar { margin: 0px 0px 0px 10px; padding: 0px; }

Просмотреть файл

@ -1,6 +1,6 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' href='chrome://reftest/content/progress.css'>
<link rel='stylesheet' href='resource://reftest/progress.css'>
<style>
.progress-element { margin: 10px; }
body > div:nth-child(1) > .progress-bar { position: relative; top: 4px; left: 4px;

Просмотреть файл

@ -1,6 +1,6 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' href='chrome://reftest/content/progress.css'>
<link rel='stylesheet' href='resource://reftest/progress.css'>
<style>
.progress-element { margin: 10px; }
body > div:nth-child(1) > .progress-bar { position: relative; top: 4px; left: 4px;

Просмотреть файл

@ -1,6 +1,6 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' href='chrome://reftest/content/progress.css'>
<link rel='stylesheet' href='resource://reftest/progress.css'>
<style>
progress { display: block; }
</style>

Просмотреть файл

@ -1,6 +1,6 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' href='chrome://reftest/content/progress.css'>
<link rel='stylesheet' href='resource://reftest/progress.css'>
<style>
progress { width: 10em; height: 1em; }
progress.vertical { -moz-orient: vertical; width: 1em; height: 10em; }

Просмотреть файл

@ -1,6 +1,6 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' href='chrome://reftest/content/progress.css'>
<link rel='stylesheet' href='resource://reftest/progress.css'>
<style>
div.progress-element {
height: 12em;

Просмотреть файл

@ -1,6 +1,6 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' href='chrome://reftest/content/progress.css'>
<link rel='stylesheet' href='resource://reftest/progress.css'>
<style>
div.progress-bar {
width:100%;

Просмотреть файл

@ -1,6 +1,6 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' href='chrome://reftest/content/progress.css'>
<link rel='stylesheet' href='resource://reftest/progress.css'>
<style>
body > div:nth-child(1) { margin: 10px; padding: 0px; }
body > div:nth-child(2) { margin: 0px; padding: 10px; }

Просмотреть файл

@ -1,6 +1,6 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' href='chrome://reftest/content/progress.css'>
<link rel='stylesheet' href='resource://reftest/progress.css'>
<style>
body > div:nth-child(1) { margin: 10px; padding: 0px; }
body > div:nth-child(2) { margin: 0px; padding: 10px; }

Просмотреть файл

@ -1,6 +1,6 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' href='chrome://reftest/content/progress.css'>
<link rel='stylesheet' href='resource://reftest/progress.css'>
<style>
body > div:nth-child(1) { margin: 10px; padding: 0px; }
body > div:nth-child(2) { margin: 0px; padding: 10px; }

Просмотреть файл

@ -1,6 +1,6 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' href='chrome://reftest/content/progress.css'>
<link rel='stylesheet' href='resource://reftest/progress.css'>
<style>
body > div:nth-child(1) { margin: 10px; padding: 0px; }
body > div:nth-child(2) { margin: 0px; padding: 10px; }

Просмотреть файл

@ -1,6 +1,6 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' href='chrome://reftest/content/progress.css'>
<link rel='stylesheet' href='resource://reftest/progress.css'>
<style>
body > div:nth-child(1) { -moz-transform: matrix(1, -0.2, 0, 1, 0, 0); }
body > div:nth-child(2) { -moz-transform: translateX(15em) matrix(1, 0, 0.6, 1, 0, 0); }

Просмотреть файл

@ -1,6 +1,6 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' href='chrome://reftest/content/progress.css'>
<link rel='stylesheet' href='resource://reftest/progress.css'>
<style>
div:nth-child(1) > .progress-bar { width: 100%; }
div:nth-child(2) > .progress-bar { width: 0%; }

Просмотреть файл

@ -1,6 +1,6 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' href='chrome://reftest/content/progress.css'>
<link rel='stylesheet' href='resource://reftest/progress.css'>
<style>
div:nth-child(1) > .progress-bar { width: 100%; }
div:nth-child(2) > .progress-bar { width: 0%; }

Просмотреть файл

@ -1,6 +1,6 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' href='chrome://reftest/content/progress.css'>
<link rel='stylesheet' href='resource://reftest/progress.css'>
<style>
div:nth-child(1) > .progress-bar { position: relative; top: 0%; height: 100%; }
div:nth-child(2) > .progress-bar { position: relative; top: 100%; height: 0%; }

Просмотреть файл

@ -1,6 +1,6 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' href='chrome://reftest/content/progress.css'>
<link rel='stylesheet' href='resource://reftest/progress.css'>
<style>
div:nth-child(1) > .progress-bar { position: relative; top: 0%; height: 100%; }
div:nth-child(2) > .progress-bar { position: relative; top: 100%; height: 0%; }

11
layout/tools/reftest/bootstrap.js поставляемый
Просмотреть файл

@ -28,7 +28,7 @@ var WindowListener = {
break;
}
ChromeUtils.import("chrome://reftest/content/reftest.jsm");
ChromeUtils.import("resource://reftest/reftest.jsm");
win.addEventListener("pageshow", function() {
// Add setTimeout here because windows.innerWidth/Height are not set yet.
win.setTimeout(function() {OnRefTestLoad(win);}, 0);
@ -44,6 +44,11 @@ function startup(data, reason) {
return;
}
let resProto = Cc["@mozilla.org/network/protocol;1?name=resource"]
.getService(Ci.nsISubstitutingProtocolHandler);
let uri = Services.io.newURI("chrome/reftest/res/", null, data.resourceURI);
resProto.setSubstitutionWithFlags("reftest", uri, resProto.ALLOW_CONTENT_ACCESS);
let orig = Services.wm.getMostRecentWindow("navigator:browser");
let ios = Cc["@mozilla.org/network/io-service;1"]
@ -59,7 +64,7 @@ function startup(data, reason) {
// Close pre-existing window
orig.close();
ChromeUtils.import("chrome://reftest/content/PerTestCoverageUtils.jsm");
ChromeUtils.import("resource://reftest/PerTestCoverageUtils.jsm");
if (PerTestCoverageUtils.enabled) {
// In PerTestCoverage mode, wait for the process belonging to the window we just closed
// to be terminated, to avoid its shutdown interfering when we reset the counters.
@ -77,7 +82,7 @@ function shutdown(data, reason) {
Services.wm.removeListener(WindowListener);
Cm.removedBootstrappedManifestLocation(data.installPath);
OnRefTestUnload();
Cu.unload("chrome://reftest/content/reftest.jsm");
Cu.unload("resource://reftest/reftest.jsm");
}
}

Просмотреть файл

@ -1,14 +1,15 @@
reftest.jar:
% content reftest %content/ contentaccessible=yes
content/globals.jsm (globals.jsm)
content/reftest-content.js (reftest-content.js)
content/AsyncSpellCheckTestHelper.jsm (../../../editor/AsyncSpellCheckTestHelper.jsm)
content/httpd.jsm (../../../netwerk/test/httpserver/httpd.js)
content/StructuredLog.jsm (../../../testing/modules/StructuredLog.jsm)
content/PerTestCoverageUtils.jsm (../../../tools/code-coverage/PerTestCoverageUtils.jsm)
content/input.css (../../../editor/reftests/xul/input.css)
content/moz-bool-pref.css (../../../layout/reftests/css-parsing/moz-bool-pref.css)
content/progress.css (../../../layout/reftests/forms/progress/style.css)
* content/manifest.jsm (manifest.jsm)
* content/reftest.jsm (reftest.jsm)
content/reftest.xul (reftest.xul)
res/globals.jsm (globals.jsm)
res/reftest-content.js (reftest-content.js)
res/AsyncSpellCheckTestHelper.jsm (../../../editor/AsyncSpellCheckTestHelper.jsm)
res/httpd.jsm (../../../netwerk/test/httpserver/httpd.js)
res/StructuredLog.jsm (../../../testing/modules/StructuredLog.jsm)
res/PerTestCoverageUtils.jsm (../../../tools/code-coverage/PerTestCoverageUtils.jsm)
res/input.css (../../../editor/reftests/xul/input.css)
res/progress.css (../../../layout/reftests/forms/progress/style.css)
* res/manifest.jsm (manifest.jsm)
* res/reftest.jsm (reftest.jsm)

Просмотреть файл

@ -7,8 +7,8 @@
var EXPORTED_SYMBOLS = ["ReadTopManifest", "CreateUrls"];
Cu.import("chrome://reftest/content/globals.jsm", this);
Cu.import("chrome://reftest/content/reftest.jsm", this);
Cu.import("resource://reftest/globals.jsm", this);
Cu.import("resource://reftest/reftest.jsm", this);
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/NetUtil.jsm");

Просмотреть файл

@ -17,7 +17,7 @@ const IO_SERVICE_CONTRACTID = "@mozilla.org/network/io-service;1"
const BLANK_URL_FOR_CLEARING = "data:text/html;charset=UTF-8,%3C%21%2D%2DCLEAR%2D%2D%3E";
Cu.import("resource://gre/modules/Timer.jsm");
Cu.import("chrome://reftest/content/AsyncSpellCheckTestHelper.jsm");
Cu.import("resource://reftest/AsyncSpellCheckTestHelper.jsm");
Cu.import("resource://gre/modules/Services.jsm");
var gBrowserIsRemote;

Просмотреть файл

@ -12,11 +12,11 @@ var EXPORTED_SYMBOLS = [
];
Cu.import("resource://gre/modules/FileUtils.jsm");
Cu.import("chrome://reftest/content/globals.jsm", this);
Cu.import("chrome://reftest/content/httpd.jsm", this);
Cu.import("chrome://reftest/content/manifest.jsm", this);
Cu.import("chrome://reftest/content/StructuredLog.jsm", this);
Cu.import("chrome://reftest/content/PerTestCoverageUtils.jsm", this);
Cu.import("resource://reftest/globals.jsm", this);
Cu.import("resource://reftest/httpd.jsm", this);
Cu.import("resource://reftest/manifest.jsm", this);
Cu.import("resource://reftest/StructuredLog.jsm", this);
Cu.import("resource://reftest/PerTestCoverageUtils.jsm", this);
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/NetUtil.jsm");
Cu.import('resource://gre/modules/XPCOMUtils.jsm');
@ -1455,7 +1455,7 @@ function RegisterMessageListenersAndLoadContentScript()
function (m) { RecvExpectProcessCrash(); }
);
g.browserMessageManager.loadFrameScript("chrome://reftest/content/reftest-content.js", true, true);
g.browserMessageManager.loadFrameScript("resource://reftest/reftest-content.js", true, true);
}
function RecvAssertionCount(count)

Просмотреть файл

@ -9,6 +9,6 @@
onunload="OnRefTestUnload();"
style="background:white; overflow:hidden"
>
<script type="application/ecmascript" src="reftest.jsm" />
<script type="application/ecmascript" src="resource://reftest/reftest.jsm" />
<!-- The reftest browser element is dynamically created, here -->
</window>

Просмотреть файл

@ -1,6 +1,6 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' href='chrome://reftest/content/progress.css'>
<link rel='stylesheet' href='resource://reftest/progress.css'>
<style>
div.progress-element { padding: 5px; }
body > div:nth-child(1) { -moz-appearance: none; }