Bug 601245 Stop packaging test files which are in tests.jar r=ctalbert a=test-only

This commit is contained in:
Joel Maher 2010-12-09 14:47:21 -08:00
Родитель 3c75d4e7d2
Коммит 0cdbc319b0
14 изменённых файлов: 64 добавлений и 51 удалений

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

@ -8,10 +8,8 @@
onload="setTimeout(nextTest,0);"
title="bug 293235 test">
<script type="application/javascript"
src=
"docshell_helpers.js">
</script>
<script type="application/javascript" src= "chrome://mochikit/content/chrome-harness.js" />
<script type="application/javascript" src="docshell_helpers.js" />
<script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/WindowSnapshot.js"></script>
<script type="application/javascript"><![CDATA[
@ -112,7 +110,6 @@
},
};
os.addObserver(visitObserver, "uri-visit-saved", false);
// Load the page that the link on the previous page points to.
doPageNavigation({
uri: getHttpUrl("bug293235_p2.html"),

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

@ -8,11 +8,8 @@
onload="setTimeout(nextTest,0);"
title="bug 294258 test">
<script type="application/javascript"
src=
"docshell_helpers.js">
</script>
<script type="application/javascript" src= "chrome://mochikit/content/chrome-harness.js" />
<script type="application/javascript" src="docshell_helpers.js" />
<script type="application/javascript"><![CDATA[
// Define the generator-iterator for the tests.

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

@ -8,11 +8,8 @@
onload="setTimeout(nextTest,0);"
title="bug 298622 test">
<script type="application/javascript"
src=
"docshell_helpers.js">
</script>
<script type="application/javascript" src= "chrome://mochikit/content/chrome-harness.js" />
<script type="application/javascript" src= "docshell_helpers.js" />
<script type="application/javascript"><![CDATA[
// Global variable that holds a reference to the find bar.
var gFindBar;

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

@ -8,11 +8,8 @@
onload="setTimeout(nextTest,0);"
title="bug 301397 test">
<script type="application/javascript"
src=
"docshell_helpers.js">
</script>
<script type="application/javascript" src= "chrome://mochikit/content/chrome-harness.js" />
<script type="application/javascript" src="docshell_helpers.js" />
<script type="application/javascript"><![CDATA[
// Define the generator-iterator for the tests.

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

@ -8,10 +8,8 @@
onload="setTimeout(nextTest,0);"
title="bug 303267 test">
<script type="application/javascript"
src="docshell_helpers.js">
</script>
<script type="application/javascript" src= "chrome://mochikit/content/chrome-harness.js" />
<script type="application/javascript" src="docshell_helpers.js" />
<script type="application/javascript"><![CDATA[
// Define the generator-iterator for the tests.

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

@ -8,11 +8,8 @@
onload="setTimeout(nextTest,0);"
title="bug 321671 test">
<script type="application/javascript"
src=
"docshell_helpers.js">
</script>
<script type="application/javascript" src= "chrome://mochikit/content/chrome-harness.js" />
<script type="application/javascript" src="docshell_helpers.js" />
<script type="application/javascript"><![CDATA[
// Define the generator-iterator for the tests.

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

@ -8,11 +8,8 @@
onload="setTimeout(nextTest,0);"
title="bug 360511 test">
<script type="application/javascript"
src=
"docshell_helpers.js">
</script>
<script type="application/javascript" src= "chrome://mochikit/content/chrome-harness.js" />
<script type="application/javascript" src="docshell_helpers.js" />
<script type="application/javascript"><![CDATA[
// Define the generator-iterator for the tests.

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

@ -8,11 +8,8 @@
onload="setTimeout(nextTest,0);"
title="bug 396649 test">
<script type="application/javascript"
src=
"docshell_helpers.js">
</script>
<script type="application/javascript" src= "chrome://mochikit/content/chrome-harness.js" />
<script type="application/javascript" src="docshell_helpers.js" />
<script type="application/javascript"><![CDATA[
// Define the generator-iterator for the tests.

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

@ -8,9 +8,8 @@
onload="nextTestAsync();"
title="bug 582176 test">
<script type="application/javascript"
src="docshell_helpers.js">
</script>
<script type="application/javascript" src= "chrome://mochikit/content/chrome-harness.js" />
<script type="application/javascript" src="docshell_helpers.js" />
<script type="application/javascript"><![CDATA[
// Define the generator-iterator for the tests.

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

@ -26,6 +26,8 @@ var gNavType = NAV_NONE; // defines the most recent navigation type
var gOrigMaxTotalViewers = // original value of max_total_viewers,
undefined; // to be restored at end of test
var gExtractedPath = null; //used to cache file path for extracting files from a .jar file
/**
* The doPageNavigation() function performs page navigations asynchronously,
* listens for specified events, and compares actual events with a list of
@ -406,12 +408,36 @@ function enableBFCache(enable) {
}
}
/*
* get http root for local tests. Use a single extractJarToTmp instead of
* extracting for each test.
* Returns a file://path if we have a .jar file
*/
function getHttpRoot() {
var location = window.location.href;
location = getRootDirectory(location);
var jar = getJar(location);
if (jar != null) {
if (gExtractedPath == null) {
var resolved = extractJarToTmp(jar);
gExtractedPath = resolved.path;
}
} else {
return null;
}
return "file://" + gExtractedPath + '/';
}
/**
* Returns the full HTTP url for a file in the mochitest docshell test
* directory.
*/
function getHttpUrl(filename) {
return "http://mochi.test:8888/chrome/docshell/test/chrome/" + filename;
var root = getHttpRoot();
if (root == null) {
root = "http://mochi.test:8888/chrome/docshell/test/chrome/";
}
return root + filename;
}
/**

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

@ -10,6 +10,8 @@
src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript"
src="chrome://mochikit/content/chrome-harness.js"></script>
<script type="application/javascript">
var SimpleTest = window.opener.wrappedJSObject.SimpleTest;
@ -23,8 +25,11 @@ document.addEventListener("DOMWindowCreated", function(e) {
window.close();
};
}, false);
var root = getRootDirectory(window.location.href);
var el = document.createElement("iframe");
el.setAttribute('type', 'content');
el.setAttribute('src', root + 'DOMWindowCreated_content.html');
document.documentElement.appendChild(el);
</script>
<iframe type="content" src="http://mochi.test:8888/chrome/dom/tests/mochitest/chrome/DOMWindowCreated_content.html"/>
</window>

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

@ -10,6 +10,8 @@
src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript"
src="chrome://mochikit/content/chrome-harness.js"></script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display">
@ -22,7 +24,8 @@
<script>
SimpleTest.waitForExplicitFinish();
window.open("DOMWindowCreated_chrome.xul", "_blank", "chrome,width=600,height=550");
var root = getRootDirectory(window.location.href);
window.open(root + "DOMWindowCreated_chrome.xul", "_blank", "chrome,width=600,height=550");
</script>
</window>

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

@ -7,6 +7,8 @@
src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript"
src="chrome://mochikit/content/chrome-harness.js"></script>
<!-- test results are displayed in the html:body -->
<body xmlns="http://www.w3.org/1999/xhtml">
@ -18,7 +20,8 @@
SimpleTest.waitForExplicitFinish();
// Run the test in a separate window so that the test runs as a chrome
// window
window.open("chrome_content_integration_window.xul", "chrome_content_integration",
var root = getRootDirectory(window.location.href);
window.open(root + "chrome_content_integration_window.xul", "chrome_content_integration",
"chrome,width=200,height=300");
]]>
</script>

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

@ -53,7 +53,7 @@ var observer =
setTimeout(runTest, 1000);
bmsvc.removeObserver(this);
},
onItemAdded: function(){}.
onItemAdded: function(){},
onBeforeItemRemoved: function(){},
onItemRemoved: function(){},
onItemChanged: function(){},