Backout bugs 586754, 574189, 584611 due to orange. a=backout

This commit is contained in:
Jonas Sicking 2010-08-20 11:08:43 -07:00
parent 0b25dbb018
commit cbc0676504
190 changed files with 257 additions and 772 deletions

View File

@ -40,7 +40,6 @@ DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = browser/components/places/tests
include $(DEPTH)/config/autoconf.mk

View File

@ -45,7 +45,7 @@ const Cu = Components.utils;
Cu.import("resource://gre/modules/Services.jsm");
// Import common head.
let (commonFile = do_get_file("../../../../../toolkit/components/places/tests/head_common.js", false)) {
let (commonFile = do_get_file("../../test_places/head_common.js", false)) {
let uri = Services.io.newFileURI(commonFile);
Services.scriptloader.loadSubScript(uri.spec, this);
}

View File

@ -38,7 +38,6 @@
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
relativesrcdir = chrome/test
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk

View File

@ -147,9 +147,9 @@ endif
ifdef ENABLE_TESTS
ifdef XPCSHELL_TESTS
#ifndef MODULE
#$(error Must define MODULE when defining XPCSHELL_TESTS.)
#endif
ifndef MODULE
$(error Must define MODULE when defining XPCSHELL_TESTS.)
endif
testxpcobjdir = $(DEPTH)/_tests/xpcshell
@ -162,7 +162,7 @@ TEST_INSTALLER = $(INSTALL)
endif
define _INSTALL_TESTS
$(TEST_INSTALLER) $(wildcard $(srcdir)/$(dir)/*) $(testxpcobjdir)/$(relativesrcdir)/$(dir)
$(TEST_INSTALLER) $(wildcard $(srcdir)/$(dir)/*) $(testxpcobjdir)/$(MODULE)/$(dir)
endef # do not remove the blank line!
@ -172,7 +172,7 @@ libs::
$(foreach dir,$(XPCSHELL_TESTS),$(_INSTALL_TESTS))
$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py \
$(testxpcobjdir)/all-test-dirs.list \
$(addprefix $(relativesrcdir)/,$(XPCSHELL_TESTS))
$(addprefix $(MODULE)/,$(XPCSHELL_TESTS))
testxpcsrcdir = $(topsrcdir)/testing/xpcshell
@ -185,7 +185,7 @@ xpcshell-tests:
--symbols-path=$(DIST)/crashreporter-symbols \
$(EXTRA_TEST_ARGS) \
$(DIST)/bin/xpcshell \
$(foreach dir,$(XPCSHELL_TESTS),$(testxpcobjdir)/$(relativesrcdir)/$(dir))
$(foreach dir,$(XPCSHELL_TESTS),$(testxpcobjdir)/$(MODULE)/$(dir))
# Execute a single test, specified in $(SOLO_FILE), but don't automatically
# start the test. Instead, present the xpcshell prompt so the user can
@ -199,7 +199,7 @@ check-interactive:
--profile-name=$(MOZ_APP_NAME) \
--interactive \
$(DIST)/bin/xpcshell \
$(foreach dir,$(XPCSHELL_TESTS),$(testxpcobjdir)/$(relativesrcdir)/$(dir))
$(foreach dir,$(XPCSHELL_TESTS),$(testxpcobjdir)/$(MODULE)/$(dir))
# Execute a single test, specified in $(SOLO_FILE)
check-one:
@ -212,7 +212,7 @@ check-one:
--verbose \
$(EXTRA_TEST_ARGS) \
$(DIST)/bin/xpcshell \
$(foreach dir,$(XPCSHELL_TESTS),$(testxpcobjdir)/$(relativesrcdir)/$(dir))
$(foreach dir,$(XPCSHELL_TESTS),$(testxpcobjdir)/$(MODULE)/$(dir))
endif # XPCSHELL_TESTS

View File

@ -14,8 +14,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=415498
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">
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=415498">Mozilla Bug 415498</a>
@ -25,11 +23,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=415498
<script class="testbody" type="application/javascript"><![CDATA[
/** Test for Bug 415498 **/
if (Cc === undefined) {
var Cc = Components.classes;
var Ci = Components.interfaces;
}
var Cr = Components.results;
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cr = Components.results;
SimpleTest.waitForExplicitFinish();
@ -76,8 +72,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=415498
}, false);
// 1) This document uses addEventListener to register a method throwing an exception
var chromeDir = getRootDirectory(window.location.href);
browser.loadURI(chromeDir + "bug415498-doc1.html");
browser.loadURI("chrome://mochikit/content/chrome/content/events/test/bug415498-doc1.html");
yield;
ok(verifyErrorReceived("NS_ERROR_DOM_HIERARCHY_REQUEST_ERR"),
@ -85,8 +80,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=415498
gMessages = [];
// 2) This document sets window.onload to register a method throwing an exception
var chromeDir = getRootDirectory(window.location.href);
browser.loadURI(chromeDir + "bug415498-doc2.html");
browser.loadURI("chrome://mochikit/content/chrome/content/events/test/bug415498-doc2.html");
yield;
ok(verifyErrorReceived("NS_ERROR_DOM_HIERARCHY_REQUEST_ERR"),

View File

@ -1,7 +1,7 @@
<html>
<head>
<title>Tests for the dragstart event</title>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>

View File

@ -1,11 +1,11 @@
<html>
<head>
<title>Tests for the draggable property on HTML elements</title>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
<script type="application/javascript"
src="/MochiKit/packed.js"></script>
src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript"
src="/tests/SimpleTest/SimpleTest.js"></script>
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<body>
<p id="display"></p>

View File

@ -1,7 +1,7 @@
<html>
<head>
<title>Tests for the dragstart event</title>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>

View File

@ -5,7 +5,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=417760
-->
<head>
<title>cannot focus() img with tabindex="-1"</title>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
<style type="text/css">
img {
border: 5px solid white;
@ -16,8 +16,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=417760
</style>
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript">
function checkFocus(aExpected, aTabIndex)

View File

@ -40,7 +40,6 @@ DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = content/test
include $(DEPTH)/config/autoconf.mk

View File

@ -49,7 +49,6 @@ DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = content/xtf/test
include $(DEPTH)/config/autoconf.mk

View File

@ -8,7 +8,7 @@
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body style="height: 100%" onload="setTimeout(onBodyLoad, 0);">
<iframe id="test" src="398289-resource.xul" width="100%" height="100%">
<iframe id="test" src="chrome://mochikit/content/chrome/content/xul/content/test/398289-resource.xul" width="100%" height="100%">
</iframe>
<script class="testbody" type="text/javascript">

View File

@ -435,37 +435,3 @@ function compareConsoleMessages()
is(messages[m].message, expectedConsoleMessages.shift(), "logged message " + (m + 1));
}
}
function copyToProfile(filename)
{
if (Cc === undefined) {
var Cc = Components.classes;
var Ci = Components.interfaces;
}
var loader = Cc["@mozilla.org/moz/jssubscript-loader;1"]
.getService(Ci.mozIJSSubScriptLoader);
loader.loadSubScript("chrome://mochikit/content/chrome-harness.js");
var file = Cc["@mozilla.org/file/directory_service;1"]
.getService(Ci.nsIProperties)
.get("ProfD", Ci.nsIFile);
file.append(filename);
var parentURI = getResolvedURI(getRootDirectory(window.location.href));
if (parentURI.JARFile) {
parentURI = extractJarToTmp(parentURI);
} else {
var fileHandler = Cc["@mozilla.org/network/protocol;1?name=file"].
getService(Ci.nsIFileProtocolHandler);
parentURI = fileHandler.getFileFromURLSpec(parentURI.spec);
}
parentURI = parentURI.QueryInterface(Ci.nsILocalFile);
parentURI.append(filename);
try {
var retVal = parentURI.copyToFollowingLinks(file.parent, filename);
} catch (ex) {
ok(false, "Cannot copy files to profile due to: " + ex);
}
}

View File

@ -35,7 +35,6 @@ Components.classes["@mozilla.org/consoleservice;1"]
.getService(Components.interfaces.nsIConsoleService)
.reset();
copyToProfile('animals.sqlite');
expectedConsoleMessages.push("Error parsing template: the given named parameter is unknown in the SQL query");
var changes = [];
@ -43,7 +42,7 @@ var changes = [];
</script>
<listbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root"
flex="1" datasources="profile:animals.sqlite" ref="." querytype="storage">
flex="1" datasources="animals.sqlite" ref="." querytype="storage">
<template>
<query>
SELECT * FROM animals WHERE species_id = ? ORDER BY name

View File

@ -35,8 +35,6 @@ Components.classes["@mozilla.org/consoleservice;1"]
.getService(Components.interfaces.nsIConsoleService)
.reset();
copyToProfile('animals.sqlite');
expectedConsoleMessages.push("Error parsing template: the type of a query parameter is wrong");
var changes = [];
@ -44,7 +42,7 @@ var changes = [];
</script>
<listbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root"
flex="1" datasources="profile:animals.sqlite" ref="." querytype="storage">
flex="1" datasources="animals.sqlite" ref="." querytype="storage">
<template>
<query>
SELECT * FROM animals WHERE species_id = ? ORDER BY name

View File

@ -35,8 +35,6 @@ Components.classes["@mozilla.org/consoleservice;1"]
.getService(Components.interfaces.nsIConsoleService)
.reset();
copyToProfile('animals.sqlite');
expectedConsoleMessages.push("Error parsing template: a query parameter cannot be bound to the SQL query");
var changes = [];
@ -44,7 +42,7 @@ var changes = [];
</script>
<listbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root"
flex="1" datasources="profile:animals.sqlite" ref="." querytype="storage">
flex="1" datasources="animals.sqlite" ref="." querytype="storage">
<template>
<query>
SELECT * FROM animals WHERE species_id = :spec ORDER BY name

View File

@ -34,8 +34,6 @@ Components.classes["@mozilla.org/consoleservice;1"]
.getService(Components.interfaces.nsIConsoleService)
.reset();
copyToProfile('animals.sqlite');
expectedConsoleMessages.push("Error parsing template: syntax error in the SQL query");
@ -45,7 +43,7 @@ var changes = [];
<listbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root"
flex="1" rows="8"
datasources="profile:animals.sqlite" ref="." querytype="storage">
datasources="animals.sqlite" ref="." querytype="storage">
<template>
<query>
SELECT * FROM animalssssssss WHERE species_id = 2 ORDER BY

View File

@ -22,7 +22,6 @@
<![CDATA[
SimpleTest.waitForExplicitFinish();
copyToProfile('animals.sqlite');
function test_storage_template()
{
@ -68,7 +67,7 @@ var changes = [];
</script>
<listbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root"
flex="1" datasources="profile:animals.sqlite" ref="." querytype="storage">
flex="1" datasources="animals.sqlite" ref="." querytype="storage">
<template>
<query>
SELECT * FROM animals WHERE species_id = :spec ORDER BY name

View File

@ -22,8 +22,6 @@
<![CDATA[
SimpleTest.waitForExplicitFinish();
copyToProfile('animals.sqlite');
var testid ="storage simple listbox";
var queryType = "storage";
var isTreeBuilder = false;
@ -43,7 +41,7 @@ var changes = [];
<listbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root"
flex="1" rows="8"
datasources="profile:animals.sqlite" ref="." querytype="storage">
datasources="animals.sqlite" ref="." querytype="storage">
<template>
<query>
SELECT * FROM animals WHERE species_id = 2 ORDER BY name

View File

@ -22,8 +22,6 @@
<![CDATA[
SimpleTest.waitForExplicitFinish();
copyToProfile('animals.sqlite');
var testid ="storage listbox with multiqueries";
var queryType = "storage";
var isTreeBuilder = false;
@ -50,7 +48,7 @@ var changes = [];
</script>
<listbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root"
flex="1" datasources="profile:animals.sqlite" ref="." querytype="storage">
flex="1" datasources="animals.sqlite" ref="." querytype="storage">
<template>
<queryset>
<query>SELECT * FROM animals WHERE species_id = 5 ORDER BY name</query>

View File

@ -20,8 +20,6 @@
<script>
<![CDATA[
copyToProfile('animals.sqlite');
SimpleTest.waitForExplicitFinish();
@ -81,7 +79,7 @@ var changes = [];
</script>
<listbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root1"
flex="1" datasources="profile:animals.sqlite" ref="." querytype="storage">
flex="1" datasources="animals.sqlite" ref="." querytype="storage">
<template>
<query>
SELECT * FROM animals WHERE species_id = ? ORDER BY name
@ -95,7 +93,7 @@ var changes = [];
<listbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root2"
flex="1" datasources="profile:animals.sqlite" ref="." querytype="storage">
flex="1" datasources="animals.sqlite" ref="." querytype="storage">
<template>
<query>
SELECT * FROM animals WHERE species_id = ? ORDER BY name
@ -109,7 +107,7 @@ var changes = [];
<listbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root3"
flex="1" datasources="profile:animals.sqlite" ref="." querytype="storage">
flex="1" datasources="animals.sqlite" ref="." querytype="storage">
<template>
<query>
SELECT * FROM animals WHERE species_id = :spec AND name like ? ORDER BY name
@ -123,7 +121,7 @@ var changes = [];
</listbox>
<listbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root4"
flex="1" datasources="profile:animals.sqlite" ref="." querytype="storage">
flex="1" datasources="animals.sqlite" ref="." querytype="storage">
<template>
<query>
SELECT * FROM animals WHERE species_id = ?3 AND name like ?1 ORDER BY name
@ -137,7 +135,7 @@ var changes = [];
</listbox>
<listbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root5"
flex="1" datasources="profile:animals.sqlite" ref="." querytype="storage">
flex="1" datasources="animals.sqlite" ref="." querytype="storage">
<template>
<query>
SELECT * FROM animals WHERE species_id = ?3 AND name like :pattern ORDER BY name
@ -151,7 +149,7 @@ var changes = [];
</listbox>
<listbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root6"
flex="1" datasources="profile:animals.sqlite" ref="." querytype="storage">
flex="1" datasources="animals.sqlite" ref="." querytype="storage">
<template>
<query>
SELECT * FROM animals WHERE species_id = ? ORDER BY name

View File

@ -20,9 +20,7 @@
<script>
<![CDATA[
SimpleTest.waitForExplicitFinish();
copyToProfile('animals.sqlite');
var testid ="storage listbox with rule";
var queryType = "storage";
@ -44,7 +42,7 @@ var changes = [];
<listbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root"
flex="1" rows="8"
datasources="profile:animals.sqlite" ref="." querytype="storage">
datasources="animals.sqlite" ref="." querytype="storage">
<template>
<query>
SELECT * FROM animals WHERE species_id = 5 ORDER BY name

View File

@ -20,7 +20,6 @@
<script>
<![CDATA[
copyToProfile('animals.sqlite');
SimpleTest.waitForExplicitFinish();
var testid ="storage simple";
@ -41,7 +40,7 @@ var changes = [];
</script>
<vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root"
datasources="profile:animals.sqlite" querytype="storage" ref=".">
datasources="animals.sqlite" querytype="storage" ref=".">
<template>
<query>SELECT * FROM animals WHERE species_id = 2 ORDER BY name</query>
<action>

View File

@ -22,8 +22,6 @@
<![CDATA[
SimpleTest.waitForExplicitFinish();
copyToProfile('animals.sqlite');
var testid ="storage sort integer asc";
var queryType = "storage";
var isTreeBuilder = false;
@ -59,7 +57,7 @@ var changes = [];
<column flex="1"/>
<column flex="3"/>
</columns>
<rows id="root" datasources="profile:animals.sqlite" querytype="storage" ref="."
<rows id="root" datasources="animals.sqlite" querytype="storage" ref="."
sort="?id" sortDirection="ascending">
<template>
<query>SELECT id, name FROM animals</query>

View File

@ -22,8 +22,6 @@
<![CDATA[
SimpleTest.waitForExplicitFinish();
copyToProfile('animals.sqlite');
var testid ="storage sort integer desc";
var queryType = "storage";
var isTreeBuilder = false;
@ -59,7 +57,7 @@ var changes = [];
<column flex="1"/>
<column flex="3"/>
</columns>
<rows id="root" datasources="profile:animals.sqlite" querytype="storage" ref="."
<rows id="root" datasources="animals.sqlite" querytype="storage" ref="."
sort="?id" sortDirection="descending">
<template>
<query>SELECT id, name FROM animals</query>

View File

@ -22,8 +22,6 @@
<![CDATA[
SimpleTest.waitForExplicitFinish();
copyToProfile('animals.sqlite');
var testid ="storage sort string asc";
var queryType = "storage";
var isTreeBuilder = false;
@ -59,7 +57,7 @@ var changes = [];
<column flex="1"/>
<column flex="3"/>
</columns>
<rows id="root" datasources="profile:animals.sqlite" querytype="storage" ref="."
<rows id="root" datasources="animals.sqlite" querytype="storage" ref="."
sort="?name" sortDirection="ascending">
<template>
<query>SELECT id, name FROM animals</query>

View File

@ -22,8 +22,6 @@
<![CDATA[
SimpleTest.waitForExplicitFinish();
copyToProfile('animals.sqlite');
var testid ="storage sort string desc";
var queryType = "storage";
var isTreeBuilder = false;
@ -59,7 +57,7 @@ var changes = [];
<column flex="1"/>
<column flex="3"/>
</columns>
<rows id="root" datasources="profile:animals.sqlite" querytype="storage" ref="."
<rows id="root" datasources="animals.sqlite" querytype="storage" ref="."
sort="?name" sortDirection="descending">
<template>
<query>SELECT id, name FROM animals</query>

View File

@ -22,8 +22,6 @@
<![CDATA[
SimpleTest.waitForExplicitFinish();
copyToProfile('animals.sqlite');
var testid ="storage tree";
var queryType = "storage";
var isTreeBuilder = true;
@ -95,7 +93,7 @@ var changes = [];
</script>
<tree xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root"
flex="1" datasources="profile:animals.sqlite" ref="*" querytype="storage" flags="dont-build-content">
flex="1" datasources="animals.sqlite" ref="*" querytype="storage" flags="dont-build-content">
<treecols>
<treecol id="species" primary="true" label="Species" flex="2"/>
<treecol id="name" label="Common name" flex="2"/>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" ?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="/tests/SimpleTest/test.css" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<tree flex="20" id="t" ref="urn:data:row" datasources="rdf:null" seltype="single">

View File

@ -1,6 +1,6 @@
<?xml version="1.0" ?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="/tests/SimpleTest/test.css" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

View File

@ -10,7 +10,7 @@
<script type="application/javascript"
src=
"docshell_helpers.js">
"chrome://mochikit/content/chrome/docshell/test/chrome/docshell_helpers.js">
</script>
<script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/WindowSnapshot.js"></script>

View File

@ -10,7 +10,7 @@
<script type="application/javascript"
src=
"docshell_helpers.js">
"chrome://mochikit/content/chrome/docshell/test/chrome/docshell_helpers.js">
</script>
<script type="application/javascript"><![CDATA[

View File

@ -10,7 +10,7 @@
<script type="application/javascript"
src=
"docshell_helpers.js">
"chrome://mochikit/content/chrome/docshell/test/chrome/docshell_helpers.js">
</script>
<script type="application/javascript"><![CDATA[

View File

@ -10,7 +10,7 @@
<script type="application/javascript"
src=
"docshell_helpers.js">
"chrome://mochikit/content/chrome/docshell/test/chrome/docshell_helpers.js">
</script>
<script type="application/javascript"><![CDATA[

View File

@ -9,7 +9,7 @@
title="bug 303267 test">
<script type="application/javascript"
src="docshell_helpers.js">
src="chrome://mochikit/content/chrome/docshell/test/chrome/docshell_helpers.js">
</script>
<script type="application/javascript"><![CDATA[

View File

@ -10,7 +10,7 @@
<script type="application/javascript"
src=
"docshell_helpers.js">
"chrome://mochikit/content/chrome/docshell/test/chrome/docshell_helpers.js">
</script>
<script type="application/javascript"><![CDATA[

View File

@ -10,7 +10,7 @@
<script type="application/javascript"
src=
"docshell_helpers.js">
"chrome://mochikit/content/chrome/docshell/test/chrome/docshell_helpers.js">
</script>
<script type="application/javascript"><![CDATA[

View File

@ -10,7 +10,7 @@
<script type="application/javascript"
src=
"docshell_helpers.js">
"chrome://mochikit/content/chrome/docshell/test/chrome/docshell_helpers.js">
</script>
<script type="application/javascript"><![CDATA[

View File

@ -9,7 +9,7 @@
title="bug {BUGNUMBER} test">
<script type="application/javascript"
src="docshell_helpers.js">
src="chrome://mochikit/content/chrome/docshell/test/chrome/docshell_helpers.js">
</script>
<script type="application/javascript"><![CDATA[

View File

@ -2,9 +2,9 @@
<html>
<head>
<title>Test bug 529119</title>
<script type="text/javascript" src="/MochiKit/packed.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
<script type="text/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
<script class="testbody" type="text/javascript">

View File

@ -2,9 +2,9 @@
<html>
<head>
<title>Test bug 529119</title>
<script type="text/javascript" src="/MochiKit/packed.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
<script type="text/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
<script class="testbody" type="text/javascript">

View File

@ -39,7 +39,6 @@ DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = dom/tests
include $(DEPTH)/config/autoconf.mk

View File

@ -4,13 +4,13 @@
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/javascript"
src="/MochiKit/packed.js"></script>
src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript"
src="/tests/SimpleTest/SimpleTest.js"></script>
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript"
src="/tests/SimpleTest/EventUtils.js"></script>
src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
<script type="application/javascript"
src="/tests/SimpleTest/WindowSnapshot.js"></script>
src="chrome://mochikit/content/tests/SimpleTest/WindowSnapshot.js"></script>
<html:style xmlns:html="http://www.w3.org/1999/xhtml" type="text/css">
* { outline: none; }

View File

@ -7,10 +7,13 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=postMessage
<title>postMessage chrome tests</title>
<script type="application/javascript" 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>
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body>
<!--
This test runs at the following URL:
chrome://mochikit/content/chrome/dom/tests/mochitest/whatwg/test_postMessage_chrome.html
-->
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=postMessage">Mozilla Bug 387706</a>
<p id="display"></p>
@ -67,10 +70,8 @@ function messageReceiver(evt)
function checkSelf(evt)
{
var prepath = getChromePrePath(window.location.href);
is(evt.isTrusted, true, "should have sent a trusted event");
is(evt.origin, prepath, "wrong origin for chrome: URL");
is(evt.origin, "chrome://mochikit", "wrong origin for chrome: URL");
is(evt.source, null, "chrome posters get a null source, for security");
window.frames.contentDomain.postMessage("post-to-content",

View File

@ -2,11 +2,11 @@
<head>
<title>Test for contenteditable focus</title>
<script type="text/javascript"
src="/MochiKit/packed.js"></script>
src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="text/javascript"
src="/tests/SimpleTest/SimpleTest.js"></script>
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css"
href="/tests/SimpleTest/test.css" />
href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body>
<div id="display">

View File

@ -2,13 +2,13 @@
<head>
<title>Test for text input event handling on contenteditable editor</title>
<script type="text/javascript"
src="/MochiKit/packed.js"></script>
src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="text/javascript"
src="/tests/SimpleTest/SimpleTest.js"></script>
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript"
src="/tests/SimpleTest/EventUtils.js"></script>
src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
<link rel="stylesheet" type="text/css"
href="/tests/SimpleTest/test.css" />
href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body>
<div id="display">

View File

@ -2,13 +2,13 @@
<head>
<title>Test for key event handler of HTML editor</title>
<script type="text/javascript"
src="/MochiKit/packed.js"></script>
src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="text/javascript"
src="/tests/SimpleTest/SimpleTest.js"></script>
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript"
src="/tests/SimpleTest/EventUtils.js"></script>
src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
<link rel="stylesheet" type="text/css"
href="/tests/SimpleTest/test.css" />
href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body>
<div id="display">

View File

@ -2,13 +2,13 @@
<head>
<title>Test for root element replacement</title>
<script type="text/javascript"
src="/MochiKit/packed.js"></script>
src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="text/javascript"
src="/tests/SimpleTest/SimpleTest.js"></script>
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript"
src="/tests/SimpleTest/EventUtils.js"></script>
src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
<link rel="stylesheet" type="text/css"
href="/tests/SimpleTest/test.css" />
href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body>
<p id="display">

View File

@ -2,11 +2,11 @@
<head>
<title>Test select all in HTML editor without body element</title>
<script type="text/javascript"
src="/MochiKit/packed.js"></script>
src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="text/javascript"
src="/tests/SimpleTest/SimpleTest.js"></script>
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css"
href="/tests/SimpleTest/test.css" />
href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body>
<p id="display">

View File

@ -2,13 +2,13 @@
<head>
<title>Test for key event handler of text editor</title>
<script type="text/javascript"
src="/MochiKit/packed.js"></script>
src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="text/javascript"
src="/tests/SimpleTest/SimpleTest.js"></script>
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript"
src="/tests/SimpleTest/EventUtils.js"></script>
src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
<link rel="stylesheet" type="text/css"
href="/tests/SimpleTest/test.css" />
href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body>
<div id="display">

View File

@ -40,7 +40,6 @@ DEPTH = ..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = embedding
include $(DEPTH)/config/autoconf.mk

View File

@ -39,7 +39,6 @@ DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = gfx/tests
include $(DEPTH)/config/autoconf.mk

View File

@ -39,7 +39,6 @@ DEPTH = ../../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = intl/locale/src/unix/tests
include $(DEPTH)/config/autoconf.mk

View File

@ -39,7 +39,6 @@ DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = intl/locale/tests
include $(DEPTH)/config/autoconf.mk

View File

@ -39,7 +39,6 @@ DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = intl/locale/tests_multilocale
include $(DEPTH)/config/autoconf.mk

View File

@ -39,7 +39,6 @@ DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = intl/strres/tests
include $(DEPTH)/config/autoconf.mk

View File

@ -39,7 +39,6 @@ DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = intl/uconv/tests
include $(DEPTH)/config/autoconf.mk

View File

@ -39,7 +39,6 @@ DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = intl/unicharutil/tests
include $(DEPTH)/config/autoconf.mk

View File

@ -38,7 +38,6 @@ DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = ipc/testshell
include $(DEPTH)/config/autoconf.mk

View File

@ -39,7 +39,6 @@ DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = js/jetpack/tests
include $(DEPTH)/config/autoconf.mk

View File

@ -147,9 +147,9 @@ endif
ifdef ENABLE_TESTS
ifdef XPCSHELL_TESTS
#ifndef MODULE
#$(error Must define MODULE when defining XPCSHELL_TESTS.)
#endif
ifndef MODULE
$(error Must define MODULE when defining XPCSHELL_TESTS.)
endif
testxpcobjdir = $(DEPTH)/_tests/xpcshell
@ -162,7 +162,7 @@ TEST_INSTALLER = $(INSTALL)
endif
define _INSTALL_TESTS
$(TEST_INSTALLER) $(wildcard $(srcdir)/$(dir)/*) $(testxpcobjdir)/$(relativesrcdir)/$(dir)
$(TEST_INSTALLER) $(wildcard $(srcdir)/$(dir)/*) $(testxpcobjdir)/$(MODULE)/$(dir)
endef # do not remove the blank line!
@ -172,7 +172,7 @@ libs::
$(foreach dir,$(XPCSHELL_TESTS),$(_INSTALL_TESTS))
$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py \
$(testxpcobjdir)/all-test-dirs.list \
$(addprefix $(relativesrcdir)/,$(XPCSHELL_TESTS))
$(addprefix $(MODULE)/,$(XPCSHELL_TESTS))
testxpcsrcdir = $(topsrcdir)/testing/xpcshell
@ -185,7 +185,7 @@ xpcshell-tests:
--symbols-path=$(DIST)/crashreporter-symbols \
$(EXTRA_TEST_ARGS) \
$(DIST)/bin/xpcshell \
$(foreach dir,$(XPCSHELL_TESTS),$(testxpcobjdir)/$(relativesrcdir)/$(dir))
$(foreach dir,$(XPCSHELL_TESTS),$(testxpcobjdir)/$(MODULE)/$(dir))
# Execute a single test, specified in $(SOLO_FILE), but don't automatically
# start the test. Instead, present the xpcshell prompt so the user can
@ -199,7 +199,7 @@ check-interactive:
--profile-name=$(MOZ_APP_NAME) \
--interactive \
$(DIST)/bin/xpcshell \
$(foreach dir,$(XPCSHELL_TESTS),$(testxpcobjdir)/$(relativesrcdir)/$(dir))
$(foreach dir,$(XPCSHELL_TESTS),$(testxpcobjdir)/$(MODULE)/$(dir))
# Execute a single test, specified in $(SOLO_FILE)
check-one:
@ -212,7 +212,7 @@ check-one:
--verbose \
$(EXTRA_TEST_ARGS) \
$(DIST)/bin/xpcshell \
$(foreach dir,$(XPCSHELL_TESTS),$(testxpcobjdir)/$(relativesrcdir)/$(dir))
$(foreach dir,$(XPCSHELL_TESTS),$(testxpcobjdir)/$(MODULE)/$(dir))
endif # XPCSHELL_TESTS

View File

@ -40,7 +40,6 @@ DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = js/src/xpconnect/tests
include $(DEPTH)/config/autoconf.mk

View File

@ -16,7 +16,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=503926
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=503926"
target="_blank">Mozilla Bug 503926</a>
<iframe id="ifr" type="content" onload="iframe_loaded()" src="bug503926.xul#iframe"/>
<iframe id="ifr" type="content" onload="iframe_loaded()"
src="chrome://mochikit/content/chrome/js/src/xpconnect/tests/chrome/bug503926.xul#iframe"/>
</body>
<!-- test code goes here -->
@ -32,7 +33,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=503926
try { gWindowUtils.dispatchDOMEventViaPresShell(obj, obj, false); } catch (e) {}
ok(passed, "trusted QIs should be called");
openDialog("bug503926.xul", "chromeDialog", "modal");
openDialog("chrome://mochikit/content/chrome/js/src/xpconnect/tests/chrome/bug503926.xul",
"chromeDialog", "modal");
SimpleTest.finish();
}

View File

@ -40,7 +40,6 @@ DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = modules/libjar/test
include $(DEPTH)/config/autoconf.mk

View File

@ -7,7 +7,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=386153
<title>Test for Bug 386153</title>
<script type="application/javascript" 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>
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
</head>
<body>
@ -26,17 +25,15 @@ const Ci = Components.interfaces;
// Opens a zip file from the test directory.
function openZip(path) {
var location = window.location.href;
location = getRootDirectory(location);
var jar = getJar(location);
if (jar != null) {
var resolved = extractJarToTmp(jar);
} else {
var resolvedURI = getResolvedURI(window.location.href);
var resolved = getChromeDir(resolvedURI);
}
resolved.append(path);
var ios = Cc["@mozilla.org/network/io-service;1"].
getService(Ci.nsIIOService);
var chromeURI = ios.newURI("chrome://mochikit/content/chrome/modules/libjar/test/chrome/" + path,
null, null);
var resolved = Cc["@mozilla.org/chrome/chrome-registry;1"].
getService(Ci.nsIChromeRegistry).
convertChromeURL(chromeURI).
QueryInterface(Ci.nsIFileURL).
file;
var zip = Cc["@mozilla.org/libjar/zip-reader;1"].
createInstance(Ci.nsIZipReader);

View File

@ -39,7 +39,6 @@ DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = modules/libjar/zipwriter/test
include $(DEPTH)/config/autoconf.mk

View File

@ -40,7 +40,6 @@ DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = modules/libpref/test
include $(DEPTH)/config/autoconf.mk

View File

@ -40,7 +40,6 @@ DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = modules/plugin/test
include $(DEPTH)/config/autoconf.mk

View File

@ -3,9 +3,9 @@
532208</title>
<script type="application/javascript"
src="/MochiKit/packed.js"></script>
src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript"
src="/tests/SimpleTest/SimpleTest.js"></script>
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<body onload="setTimeout(runTests, 2000)">
<embed id="plugin1" type="application/x-test" width="400"

View File

@ -1,8 +1,8 @@
<html>
<head>
<title>NPCocoaEventFocusChanged Tests</title>
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
</head>
<body onload="runTests()">

View File

@ -1,8 +1,8 @@
<html>
<head>
<title>NPCocoaEventWindowFocusChanged Tests</title>
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
</head>
<body onload="runTests()">

View File

@ -1,8 +1,8 @@
<html>
<head>
<title>NPAPI Cookie Tests</title>
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
</head>
<body onload="runTests()">

View File

@ -1,7 +1,7 @@
<head>
<title>Plugin crashing in nested loop</title>
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<body>
<iframe id="iframe1" src="crashing_subpage.html" width="600" height="600"></iframe>

View File

@ -1,7 +1,7 @@
<head>
<title>Plugin crashing</title>
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<body>
<iframe id="iframe1" src="crashing_subpage.html" width="600" height="600"></iframe>

View File

@ -1,7 +1,7 @@
<head>
<title>Plugin crashing</title>
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<body onload="mainLoaded()">
<iframe id="iframe1" src="about:blank" width="600" height="600"></iframe>

View File

@ -1,8 +1,8 @@
<html>
<head>
<title>NPAPI Cookie Tests</title>
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css"
href="/tests/SimpleTest/test.css" />

View File

@ -1,7 +1,7 @@
<head>
<title>Plugin hanging</title>
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<body>
<iframe id="iframe1" src="crashing_subpage.html" width="600" height="600"></iframe>

View File

@ -1,7 +1,8 @@
<head>
<title>Plugin instantiation</title>
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<body onload="mainLoaded()">
<iframe id="iframe1" src="about:blank" width="600" height="600"></iframe>

View File

@ -1,7 +1,7 @@
<head>
<title>NPNV*NPObject accessibility tests</title>
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<body onload="runTests()">
<embed id="plugin1" type="application/x-test" width="400" height="400"></embed>

View File

@ -1,7 +1,7 @@
<head>
<title>NPN_GetURL called from NPP_Destroy</title>
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css"
href="/tests/SimpleTest/test.css">

View File

@ -1,7 +1,7 @@
<head>
<title>NPNV*NPObject accessibility tests</title>
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<body onload="runTests()">
<embed id="plugin1" type="application/x-test" width="400" height="400"></embed>

View File

@ -1,7 +1,7 @@
<head>
<title>NPN_Get/PostURLNotify tests</title>
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<body onload="runTests()">
<embed id="plugin1" type="application/x-test" width="400" height="400"></embed>

View File

@ -40,7 +40,6 @@ DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = netwerk/cookie
include $(DEPTH)/config/autoconf.mk

View File

@ -40,7 +40,6 @@ DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = netwerk/test
include $(DEPTH)/config/autoconf.mk
@ -120,6 +119,6 @@ install:: $(_RES_FILES)
# One of the xpcshell unit tests needs this file, so make sure it winds
# up in the test directory.
libs::
$(NSINSTALL) -D $(DEPTH)/_tests/xpcshell/$(relativesrcdir)/unit/data
$(NSINSTALL) -D $(DEPTH)/_tests/xpcshell/$(MODULE)/unit/data
$(INSTALL) $(topsrcdir)/netwerk/dns/effective_tld_names.dat \
$(DEPTH)/_tests/xpcshell/$(relativesrcdir)/unit/
$(DEPTH)/_tests/xpcshell/$(MODULE)/unit/

View File

@ -42,7 +42,6 @@ DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = netwerk/test/httpserver
include $(DEPTH)/config/autoconf.mk

View File

@ -49,7 +49,6 @@ DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = parser/xml/test
include $(DEPTH)/config/autoconf.mk

View File

@ -39,7 +39,6 @@ DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = rdf/tests
MODULE = test_rdf

View File

@ -40,7 +40,6 @@ DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = security/manager/ssl/tests
MODULE = pipnss
DIRS = mochitest

View File

@ -1,9 +1,9 @@
<html>
<head>
<title>Test bug 483437 and bug 480509</title>
<script type="text/javascript" src="/MochiKit/packed.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
<script type="text/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body onload="onWindowLoad()">

View File

@ -1,9 +1,9 @@
<html>
<head>
<title>Test bug 483437 and bug 480509</title>
<script type="text/javascript" src="/MochiKit/packed.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
<script type="text/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body>

View File

@ -1,9 +1,9 @@
<html>
<head>
<title>Test bug 484111</title>
<script type="text/javascript" src="/MochiKit/packed.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
<script type="text/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body onload="onWindowLoad()">

View File

@ -41,7 +41,6 @@ DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = storage/test
include $(DEPTH)/config/autoconf.mk

View File

@ -74,7 +74,6 @@ _SERV_FILES = \
harness.xul \
browser-test-overlay.xul \
browser-test.js \
chrome-harness.js \
ipc-overlay.xul \
ipc.js \
browser-harness.xul \

View File

@ -45,7 +45,6 @@ function Tester(aTests, aDumper, aCallback) {
var simpleTestScope = {};
this._scriptLoader.loadSubScript("chrome://mochikit/content/MochiKit/packed.js", simpleTestScope);
this._scriptLoader.loadSubScript("chrome://mochikit/content/tests/SimpleTest/SimpleTest.js", simpleTestScope);
this._scriptLoader.loadSubScript("chrome://mochikit/content/chrome-harness.js", simpleTestScope);
this.SimpleTest = simpleTestScope.SimpleTest;
}
Tester.prototype = {

View File

@ -1,342 +0,0 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et: */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mochitest code.
*
* The Initial Developer of the Original Code is
* Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2010
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Joel Maher <joel.maher@gmail.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*
* getChromeURI converts a URL to a URI
*
* url: string of a URL (http://mochi.test/test.html)
* returns: a nsiURI object representing the given URL
*
*/
function getChromeURI(url) {
var ios = Components.classes["@mozilla.org/network/io-service;1"].
getService(Components.interfaces.nsIIOService);
return ios.newURI(url, null, null);
}
/*
* Convert a URL (string) into a nsIURI or NSIJARURI
* This is intended for URL's that are on a file system
* or in packaged up in an extension .jar file
*
* url: a string of a url on the local system(http://localhost/blah.html)
*/
function getResolvedURI(url) {
var chromeURI = getChromeURI(url);
var resolvedURI = Components.classes["@mozilla.org/chrome/chrome-registry;1"].
getService(Components.interfaces.nsIChromeRegistry).
convertChromeURL(chromeURI);
try {
resolvedURI = resolvedURI.QueryInterface(Components.interfaces.nsIJARURI);
} catch (ex) {} //not a jar file
return resolvedURI;
}
/**
* getChromeDir is intended to be called after getResolvedURI and convert
* the input URI into a nsILocalFile (actually the directory containing the
* file). This can be used for copying or referencing the file or extra files
* required by the test. Usually we need to load a secondary html file or library
* and this will give us file system access to that.
*
* resolvedURI: nsIURI (from getResolvedURI) that points to a file:/// url
*/
function getChromeDir(resolvedURI) {
var fileHandler = Components.classes["@mozilla.org/network/protocol;1?name=file"].
getService(Components.interfaces.nsIFileProtocolHandler);
var chromeDir = fileHandler.getFileFromURLSpec(resolvedURI.spec);
return chromeDir.parent.QueryInterface(Components.interfaces.nsILocalFile);
}
/*
* given a .jar file, we get all test files located inside the archive
*
* basePath: base URL to determine chrome location and search for tests
* testPath: passed in testPath value from command line such as: dom/tests/mochitest
* dir: the test dir to append to the baseURL after getting a directory interface
*
* As a note, this is hardcoded to the .jar structure we use for mochitest.
* Please don't assume this works for all jar files.
*/
function getMochitestJarListing(basePath, testPath, dir)
{
var zReader = Components.classes["@mozilla.org/libjar/zip-reader;1"].
createInstance(Components.interfaces.nsIZipReader);
var fileHandler = Components.classes["@mozilla.org/network/protocol;1?name=file"].
getService(Components.interfaces.nsIFileProtocolHandler);
var fileName = fileHandler.getFileFromURLSpec(getResolvedURI(basePath).JARFile.spec);
zReader.open(fileName);
//hardcoded 'content' as that is the root dir in the mochikit.jar file
var base = "content/" + dir + "/";
var singleTestPath;
if (testPath) {
var extraPath = testPath;
var pathToCheck = base + testPath;
if (zReader.hasEntry(pathToCheck)) {
var pathEntry = zReader.getEntry(pathToCheck);
if (pathEntry.isDirectory) {
base = pathToCheck;
} else {
singleTestPath = '/' + base + testPath;
var singleObject = {};
singleObject[singleTestPath] = true;
return [singleObject, singleTestPath];
}
}
else if (zReader.hasEntry(pathToCheck + "/")) {
base = pathToCheck + "/";
}
}
var [links, count] = zList(base, zReader, true);
return [links, null];
}
/*
* Replicate the server.js list() function with a .jar file
*
* base: string value of base directory we are testing
* zReader: handle to opened nsIZipReader object
* recurse: true|false if we do subdirs
*
* returns:
* [json object of {dir:{subdir:{file:true, file:true, ...}}}, count of tests]
*/
function zList(base, zReader, recurse) {
var dirs = zReader.findEntries(base + "*");
var links = {};
var count = 0;
var fileArray = [];
while(dirs.hasMore()) {
var entryName = dirs.getNext();
if (entryName.substr(-1) == '/' && entryName.split('/').length == (base.split('/').length + 1) ||
(entryName.substr(-1) != '/' && entryName.split('/').length == (base.split('/').length))) {
fileArray.push(entryName);
}
}
fileArray.sort();
count = fileArray.length;
for (var i=0; i < fileArray.length; i++) {
var myFile = fileArray[i];
if (myFile.substr(-1) === '/' && recurse) {
var childCount = 0;
[links[myFile], childCount] = zList(myFile, zReader, recurse);
count += childCount;
} else {
if (myFile.indexOf("SimpleTest") == -1) {
//we add the '/' so we don't try to run content/content/chrome
links['/' + myFile] = true;
}
}
}
return [links, count];
}
/**
* basePath: the URL base path to search from such as chrome://mochikit/content/a11y
* testPath: the optional testPath passed into the test such as dom/tests/mochitest
* dir: the test dir to append to the uri after getting a directory interface
* srvScope: loaded javascript to server.js so we have aComponents.classesess to the list() function
*
* return value:
* single test: [json object, path to test]
* list of tests: [json object, null] <- directory [heirarchy]
*/
function getFileListing(basePath, testPath, dir, srvScope)
{
var uri = getResolvedURI(basePath);
var chromeDir = getChromeDir(uri);
chromeDir.appendRelativePath(dir);
basePath += '/' + dir;
var ioSvc = Components.classes["@mozilla.org/network/io-service;1"].
getService(Components.interfaces.nsIIOService);
var testsDirURI = ioSvc.newFileURI(chromeDir);
var testsDir = ioSvc.newURI(testPath, null, testsDirURI)
.QueryInterface(Components.interfaces.nsIFileURL).file;
var singleTestPath;
if (testPath != undefined) {
var extraPath = testPath;
var fileNameRegexp = /(browser|test)_.+\.(xul|html|js)$/;
// Invalid testPath...
if (!testsDir.exists())
return [];
// If we were passed a speComponents.interfacesfic file, run only that test.
if (testsDir.isFile()) {
if (fileNameRegexp.test(testsDir.leafName))
var singlePath = basePath + '/' + testPath;
var links = {};
links[singlePath] = true;
return [links, singlePath];
// We were passed a file that's not a test...
return [];
}
// otherwise, we were passed a directory of tests
basePath += "/" + testPath;
}
var [links, count] = srvScope.list(basePath, testsDir, true);
return [links, null];
}
//used by tests to determine their directory based off window.location.path
function getRootDirectory(path, chromeURI) {
if (chromeURI === undefined)
{
chromeURI = getChromeURI(path);
}
var myURL = chromeURI.QueryInterface(Components.interfaces.nsIURL);
return chromeURI.prePath + myURL.directory;
}
//used by tests to determine their directory based off window.location.path
function getChromePrePath(path, chromeURI) {
if (chromeURI === undefined) {
chromeURI = getChromeURI(path);
}
return chromeURI.prePath;
}
/*
* Given a URI, return nsIJARURI or null
*/
function getJar(uri) {
var resolvedURI = getResolvedURI(uri);
var jar = null;
try {
if (resolvedURI.JARFile) {
jar = resolvedURI;
}
} catch (ex) {}
return jar;
}
/*
* input:
* jar: a nsIJARURI object with the jarfile and jarentry (path in jar file)
*
* output;
* all files and subdirectories inside jarentry will be extracted to TmpD/mochikit.tmp
* we will return the location of /TmpD/mochikit.tmp* so you can reference the files locally
*/
function extractJarToTmp(jar) {
var tmpdir = Components.classes["@mozilla.org/file/directory_service;1"]
.getService(Components.interfaces.nsIProperties)
.get("ProfD", Components.interfaces.nsILocalFile);
tmpdir.append("mochikit.tmp");
tmpdir.createUnique(Components.interfaces.nsIFile.DIRECTORY_TYPE, 0777);
var zReader = Components.classes["@mozilla.org/libjar/zip-reader;1"].
createInstance(Components.interfaces.nsIZipReader);
var fileHandler = Components.classes["@mozilla.org/network/protocol;1?name=file"].
getService(Components.interfaces.nsIFileProtocolHandler);
var fileName = fileHandler.getFileFromURLSpec(jar.JARFile.spec);
zReader.open(fileName);
//filepath represents the path in the jar file without the filename
var filepath = "";
var parts = jar.JAREntry.split('/');
for (var i =0; i < parts.length - 1; i++) {
if (parts[i] != '') {
filepath += parts[i] + '/';
}
}
/* Create dir structure first, no guarantee about ordering of directories and
* files returned from findEntries.
*/
var dirs = zReader.findEntries(filepath + '*/');
while (dirs.hasMore()) {
var targetDir = buildRelativePath(dirs.getNext(), tmpdir, filepath);
targetDir.create(Components.interfaces.nsIFile.DIRECTORY_TYPE, 0777);
}
//now do the files
var files = zReader.findEntries(filepath + "*");
while (files.hasMore()) {
var fname = files.getNext();
if (fname.substr(-1) != '/') {
var targetFile = buildRelativePath(fname, tmpdir, filepath);
zReader.extract(fname, targetFile);
}
}
return tmpdir;
}
/*
* Simple utility function to take the directory structure in jarentryname and
* translate that to a path of a nsILocalFile.
*/
function buildRelativePath(jarentryname, destdir, basepath)
{
var baseParts = basepath.split('/');
if (baseParts[baseParts.length-1] == '') {
baseParts.pop();
}
var parts = jarentryname.split('/');
var targetFile = Components.classes["@mozilla.org/file/local;1"]
.createInstance(Components.interfaces.nsILocalFile);
targetFile.initWithFile(destdir);
for (var i = baseParts.length; i < parts.length; i++) {
targetFile.append(parts[i]);
}
return targetFile;
}

View File

@ -458,12 +458,7 @@ function isTest(filename, pattern)
if (pattern)
return pattern.test(filename);
// File name is a URL style path to a test file, make sure that we check for
// tests that start with test_.
testPattern = /^test_/;
pathPieces = filename.split('/');
return testPattern.test(pathPieces[pathPieces.length - 1]) &&
return filename.indexOf("test_") > -1 &&
filename.indexOf(".js") == -1 &&
filename.indexOf(".css") == -1 &&
!/\^headers\^$/.test(filename);

View File

@ -65,8 +65,7 @@ check if nsIFile can be determined
/** Test for Bug 462172 synthesizeDragStart**/
var testFile = Components.classes["@mozilla.org/file/directory_service;1"].
getService(Components.interfaces.nsIProperties).
get("CurWorkD", Components.interfaces.nsIFile);
getService(Ci.nsIProperties).get("CurWorkD", Ci.nsIFile);
var regularDtForDrag1 = null;
function doOnDragStart(aEvent)

View File

@ -51,6 +51,8 @@ _tests\testing\mochitest\chrome\testing\mochitest\tests\SimpleTest\tests\test_sy
src="chrome://mochikit/content/MochiKit/packed.js"/>
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="chrome://mochikit/content/chrome/toolkit/mozapps/downloads/tests/chrome/utils.js"/>
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
<script type="application/javascript">

View File

@ -50,7 +50,6 @@ DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = testing/xpcshell/example
include $(DEPTH)/config/autoconf.mk

View File

@ -40,7 +40,6 @@ DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = toolkit/components/autocomplete/tests
include $(DEPTH)/config/autoconf.mk

Some files were not shown because too many files have changed in this diff Show More