mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
merge mozilla-inbound to mozilla-central a=merge
This commit is contained in:
commit
75cecd4a58
@ -4,16 +4,24 @@
|
||||
# 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/.
|
||||
|
||||
import sys, os, xpidl
|
||||
import sys
|
||||
import os
|
||||
|
||||
from mozbuild.makeutil import write_dep_makefile
|
||||
from mozbuild.util import FileAvoidWrite
|
||||
import buildconfig
|
||||
import mozpack.path as mozpath
|
||||
|
||||
# The xpidl parser is not incorporated in the in-tree virtualenv.
|
||||
xpidl_dir = mozpath.join(buildconfig.topsrcdir, 'xpcom', 'idl-parser',
|
||||
'xpidl')
|
||||
sys.path.append(xpidl_dir)
|
||||
import xpidl
|
||||
|
||||
# Instantiate the parser.
|
||||
p = xpidl.IDLParser()
|
||||
|
||||
def findIDL(includePath, interfaceFileName):
|
||||
for d in includePath:
|
||||
# Not os.path.join: we need a forward slash even on Windows because
|
||||
# this filename ends up in makedepend output.
|
||||
path = d + '/' + interfaceFileName
|
||||
path = mozpath.join(d, interfaceFileName)
|
||||
if os.path.exists(path):
|
||||
return path
|
||||
raise BaseException("No IDL file found for interface %s "
|
||||
@ -33,16 +41,13 @@ class Configuration:
|
||||
execfile(filename, config)
|
||||
self.simple_events = config.get('simple_events', [])
|
||||
|
||||
def readConfigFile(filename):
|
||||
return Configuration(filename)
|
||||
|
||||
def firstCap(str):
|
||||
return str[0].upper() + str[1:]
|
||||
|
||||
def writeAttributeParams(a):
|
||||
return ("%s a%s" % (a.realtype.nativeType('in'), firstCap(a.name)))
|
||||
|
||||
def print_header_file(fd, conf):
|
||||
def print_header_file(fd, conf, incdirs):
|
||||
idl_paths = set()
|
||||
|
||||
fd.write("/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */\n")
|
||||
@ -55,7 +60,7 @@ def print_header_file(fd, conf):
|
||||
for e in conf.simple_events:
|
||||
fd.write("#include \"nsIAccessible%s.h\"\n" % e)
|
||||
for e in conf.simple_events:
|
||||
idl, idl_path = loadEventIDL(p, options.incdirs, e)
|
||||
idl, idl_path = loadEventIDL(p, incdirs, e)
|
||||
idl_paths.add(idl_path)
|
||||
for iface in filter(lambda p: p.kind == "interface", idl.productions):
|
||||
classname = ("xpcAcc%s" % e)
|
||||
@ -103,7 +108,7 @@ def print_cpp(idl, fd, conf, eventname):
|
||||
if p.kind == 'interface':
|
||||
write_cpp(eventname, p, fd)
|
||||
|
||||
def print_cpp_file(fd, conf):
|
||||
def print_cpp_file(fd, conf, incdirs):
|
||||
idl_paths = set()
|
||||
fd.write("/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */\n\n")
|
||||
fd.write('#include "xpcAccEvents.h"\n')
|
||||
@ -115,7 +120,7 @@ def print_cpp_file(fd, conf):
|
||||
|
||||
types = []
|
||||
for e in conf.simple_events:
|
||||
idl, idl_path = loadEventIDL(p, options.incdirs, e)
|
||||
idl, idl_path = loadEventIDL(p, incdirs, e)
|
||||
idl_paths.add(idl_path)
|
||||
types.extend(interfaceAttributeTypes(idl))
|
||||
|
||||
@ -124,7 +129,7 @@ def print_cpp_file(fd, conf):
|
||||
|
||||
fd.write("\n")
|
||||
for e in conf.simple_events:
|
||||
idl, idl_path = loadEventIDL(p, options.incdirs, e)
|
||||
idl, idl_path = loadEventIDL(p, incdirs, e)
|
||||
idl_paths.add(idl_path)
|
||||
print_cpp(idl, fd, conf, e)
|
||||
|
||||
@ -204,35 +209,14 @@ def write_cpp(eventname, iface, fd):
|
||||
for a in attributes:
|
||||
writeAttributeGetter(fd, classname, a)
|
||||
|
||||
def gen_header_file(fd, conf_file):
|
||||
conf = Configuration(conf_file)
|
||||
inc_dir = mozpath.join(buildconfig.topobjdir, 'dist', 'idl')
|
||||
|
||||
def main():
|
||||
from argparse import ArgumentParser
|
||||
o = ArgumentParser()
|
||||
o.add_argument('-I', action='append', dest='incdirs', default=['.'],
|
||||
help="Directory to search for imported files")
|
||||
o.add_argument('config',
|
||||
help='Config file to load')
|
||||
o.add_argument('header_output', metavar='FILE',
|
||||
help="Quick stub header output file")
|
||||
o.add_argument('stub_output', metavar='FILE',
|
||||
help="C++ source output file")
|
||||
o.add_argument('makedepend_output', metavar='FILE',
|
||||
help="gnumake dependencies output file")
|
||||
global options
|
||||
options = o.parse_args()
|
||||
return print_header_file(fd, conf, [inc_dir])
|
||||
|
||||
# Instantiate the parser.
|
||||
global p
|
||||
p = xpidl.IDLParser()
|
||||
def gen_cpp_file(fd, conf_file):
|
||||
conf = Configuration(conf_file)
|
||||
inc_dir = mozpath.join(buildconfig.topobjdir, 'dist', 'idl')
|
||||
|
||||
conf = readConfigFile(options.config)
|
||||
|
||||
with FileAvoidWrite(options.header_output) as fh:
|
||||
idl_paths = print_header_file(fh, conf)
|
||||
with FileAvoidWrite(options.stub_output) as fh:
|
||||
idl_paths |= print_cpp_file(fh, conf)
|
||||
with FileAvoidWrite(options.makedepend_output) as fh:
|
||||
write_dep_makefile(fh, options.stub_output, idl_paths)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
return print_cpp_file(fd, conf, [inc_dir])
|
||||
|
@ -2,31 +2,9 @@
|
||||
# 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/.
|
||||
|
||||
EXTRA_MDDEPEND_FILES = xpcAccEvents.pp
|
||||
|
||||
# We'd like this to be defined in a future GENERATED_EXPORTS list.
|
||||
# Bug 1160185 has a few proposals for this.
|
||||
INSTALL_TARGETS += xpcaccevents
|
||||
xpcaccevents_FILES := xpcAccEvents.h
|
||||
xpcaccevents_DEST = $(DIST)/include
|
||||
xpcaccevents_TARGET := export
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
xpcAccEvents.cpp: $(srcdir)/AccEvents.conf \
|
||||
$(srcdir)/AccEventGen.py \
|
||||
$(LIBXUL_DIST)/sdk/bin/header.py \
|
||||
$(LIBXUL_DIST)/sdk/bin/xpidl.py
|
||||
$(PYTHON) $(topsrcdir)/config/pythonpath.py \
|
||||
-I$(LIBXUL_DIST)/sdk/bin \
|
||||
$(srcdir)/AccEventGen.py \
|
||||
-I $(DEPTH)/dist/idl \
|
||||
$(srcdir)/AccEvents.conf \
|
||||
xpcAccEvents.h \
|
||||
xpcAccEvents.cpp \
|
||||
$(MDDEPDIR)/xpcAccEvents.pp
|
||||
|
||||
xpcAccEvents.h: xpcAccEvents.cpp
|
||||
|
||||
GARBAGE += \
|
||||
xpcAccEvents.cpp \
|
||||
xpcAccEvents.h \
|
||||
$(null)
|
||||
|
@ -46,4 +46,17 @@ else:
|
||||
'/accessible/other',
|
||||
]
|
||||
|
||||
GENERATED_FILES += [
|
||||
'xpcAccEvents.cpp',
|
||||
'xpcAccEvents.h',
|
||||
]
|
||||
|
||||
xpc_acc_events_h = GENERATED_FILES['xpcAccEvents.h']
|
||||
xpc_acc_events_h.script = 'AccEventGen.py:gen_header_file'
|
||||
xpc_acc_events_h.inputs += ['AccEvents.conf']
|
||||
|
||||
xpc_acc_events_cpp = GENERATED_FILES['xpcAccEvents.cpp']
|
||||
xpc_acc_events_cpp.script = 'AccEventGen.py:gen_cpp_file'
|
||||
xpc_acc_events_cpp.inputs += ['AccEvents.conf']
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
@ -12,10 +12,6 @@ include $(topsrcdir)/config/rules.mk
|
||||
|
||||
APP_ICON = app
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
REDIT_PATH = $(LIBXUL_DIST)/bin
|
||||
endif
|
||||
|
||||
APP_BINARY = $(MOZ_APP_NAME)$(BIN_SUFFIX)
|
||||
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
@ -65,7 +61,7 @@ libs::
|
||||
# Copy the app icon for b2g-desktop
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
cp $(DIST)/branding/$(APP_ICON).ico $(DIST)/bin/chrome/icons/default/$(APP_ICON).ico
|
||||
$(REDIT_PATH)/redit$(HOST_BIN_SUFFIX) $(DIST)/bin/$(APP_BINARY) $(DIST)/branding/$(APP_ICON).ico
|
||||
$(DIST)/bin/redit$(HOST_BIN_SUFFIX) $(DIST)/bin/$(APP_BINARY) $(DIST)/branding/$(APP_ICON).ico
|
||||
cp $(DIST)/branding/$(APP_ICON).ico $(DIST)/bin/chrome/icons/default/default.ico
|
||||
else ifneq (gonk,$(MOZ_WIDGET_TOOLKIT))
|
||||
cp $(DIST)/branding/default.png $(DIST)/bin/chrome/icons/default/default.png
|
||||
|
@ -1344,15 +1344,12 @@ nsContextMenu.prototype = {
|
||||
// * this.principal - as the loadingPrincipal
|
||||
// for now lets use systemPrincipal to bypass mixedContentBlocker
|
||||
// checks after redirects, see bug: 1136055
|
||||
var ioService = Cc["@mozilla.org/network/io-service;1"].
|
||||
getService(Ci.nsIIOService);
|
||||
var principal = Services.scriptSecurityManager.getSystemPrincipal();
|
||||
var channel = ioService.newChannelFromURI2(makeURI(linkURL),
|
||||
null, // aLoadingNode
|
||||
principal, // aLoadingPrincipal
|
||||
null, // aTriggeringPrincipal
|
||||
Ci.nsILoadInfo.SEC_NORMAL,
|
||||
Ci.nsIContentPolicy.TYPE_OTHER);
|
||||
var channel = NetUtil.newChannel({
|
||||
uri: makeURI(linkURL),
|
||||
loadUsingSystemPrincipal: true,
|
||||
securityFlags: Ci.nsILoadInfo.SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL
|
||||
});
|
||||
|
||||
if (linkDownload)
|
||||
channel.contentDispositionFilename = linkDownload;
|
||||
if (channel instanceof Ci.nsIPrivateBrowsingChannel) {
|
||||
@ -1385,7 +1382,7 @@ nsContextMenu.prototype = {
|
||||
timer.TYPE_ONE_SHOT);
|
||||
|
||||
// kick off the channel with our proxy object as the listener
|
||||
channel.asyncOpen(new saveAsListener(), null);
|
||||
channel.asyncOpen2(new saveAsListener());
|
||||
},
|
||||
|
||||
// Save URL of clicked-on link.
|
||||
|
@ -11,27 +11,32 @@
|
||||
* failure. */
|
||||
const kWhitelist = [
|
||||
// CodeMirror is imported as-is, see bug 1004423.
|
||||
{sourceName: /codemirror\.css/i},
|
||||
{sourceName: /codemirror\.css$/i},
|
||||
// PDFjs is futureproofing its pseudoselectors, and those rules are dropped.
|
||||
{sourceName: /web\/viewer\.css/i,
|
||||
{sourceName: /web\/viewer\.css$/i,
|
||||
errorMessage: /Unknown pseudo-class.*(fullscreen|selection)/i},
|
||||
// Tracked in bug 1004428.
|
||||
{sourceName: /aboutaccounts\/(main|normalize)\.css/i},
|
||||
{sourceName: /aboutaccounts\/(main|normalize)\.css$/i},
|
||||
// TokBox SDK assets, see bug 1032469.
|
||||
{sourceName: /loop\/.*sdk-content\/.*\.css$/i},
|
||||
// Loop standalone client CSS uses placeholder cross browser pseudo-element
|
||||
{sourceName: /loop\/.*\.css/i,
|
||||
{sourceName: /loop\/.*\.css$/i,
|
||||
errorMessage: /Unknown pseudo-class.*placeholder/i},
|
||||
{sourceName: /loop\/.*shared\/css\/common.css/i,
|
||||
{sourceName: /loop\/.*shared\/css\/common.css$/i,
|
||||
errorMessage: /Unknown property 'user-select'/i},
|
||||
// Highlighter CSS uses chrome-only pseudo-class, see bug 985597.
|
||||
{sourceName: /highlighters\.css/i,
|
||||
// Highlighter CSS uses a UA-only pseudo-class, see bug 985597.
|
||||
{sourceName: /highlighters\.css$/i,
|
||||
errorMessage: /Unknown pseudo-class.*moz-native-anonymous/i},
|
||||
];
|
||||
|
||||
var moduleLocation = gTestPath.replace(/\/[^\/]*$/i, "/parsingTestHelpers.jsm");
|
||||
var {generateURIsFromDirTree} = Cu.import(moduleLocation, {});
|
||||
|
||||
// Add suffix to stylesheets' URI so that we always load them here and
|
||||
// have them parsed. Add a random number so that even if we run this
|
||||
// test multiple times, it would be unlikely to affect each other.
|
||||
const kPathSuffix = "?always-parse-css-" + Math.random();
|
||||
|
||||
/**
|
||||
* Check if an error should be ignored due to matching one of the whitelist
|
||||
* objects defined in kWhitelist
|
||||
@ -135,17 +140,19 @@ function convertToChromeUri(fileUri) {
|
||||
}
|
||||
}
|
||||
|
||||
function messageIsCSSError(msg, innerWindowID, outerWindowID) {
|
||||
function messageIsCSSError(msg) {
|
||||
// Only care about CSS errors generated by our iframe:
|
||||
if ((msg instanceof Ci.nsIScriptError) &&
|
||||
msg.category.includes("CSS") &&
|
||||
msg.innerWindowID === innerWindowID && msg.outerWindowID === outerWindowID) {
|
||||
msg.sourceName.endsWith(kPathSuffix)) {
|
||||
let sourceName = msg.sourceName.slice(0, -kPathSuffix.length);
|
||||
let msgInfo = { sourceName, errorMessage: msg.errorMessage };
|
||||
// Check if this error is whitelisted in kWhitelist
|
||||
if (!ignoredError(msg)) {
|
||||
ok(false, "Got error message for " + msg.sourceName + ": " + msg.errorMessage);
|
||||
if (!ignoredError(msgInfo)) {
|
||||
ok(false, `Got error message for ${sourceName}: ${msg.errorMessage}`);
|
||||
return true;
|
||||
}
|
||||
info("Ignored error for " + msg.sourceName + " because of filter.");
|
||||
info(`Ignored error for ${sourceName} because of filter.`);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -167,10 +174,6 @@ add_task(function checkAllTheCSS() {
|
||||
iframe.contentWindow.location = testFile;
|
||||
yield iframeLoaded;
|
||||
let doc = iframe.contentWindow.document;
|
||||
let windowUtils = iframe.contentWindow.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDOMWindowUtils);
|
||||
let innerWindowID = windowUtils.currentInnerWindowID;
|
||||
let outerWindowID = windowUtils.outerWindowID;
|
||||
|
||||
// Parse and remove all manifests from the list.
|
||||
// NOTE that this must be done before filtering out devtools paths
|
||||
@ -214,7 +217,7 @@ add_task(function checkAllTheCSS() {
|
||||
linkEl.addEventListener("error", onError);
|
||||
linkEl.setAttribute("type", "text/css");
|
||||
let chromeUri = convertToChromeUri(uri);
|
||||
linkEl.setAttribute("href", chromeUri.spec);
|
||||
linkEl.setAttribute("href", chromeUri.spec + kPathSuffix);
|
||||
allPromises.push(promiseForThisSpec.promise);
|
||||
doc.head.appendChild(linkEl);
|
||||
}
|
||||
@ -225,7 +228,7 @@ add_task(function checkAllTheCSS() {
|
||||
let messages = Services.console.getMessageArray();
|
||||
// Count errors (the test output will list actual issues for us, as well
|
||||
// as the ok(false) in messageIsCSSError.
|
||||
let errors = messages.filter(m => messageIsCSSError(m, innerWindowID, outerWindowID));
|
||||
let errors = messages.filter(messageIsCSSError);
|
||||
is(errors.length, 0, "All the styles (" + allPromises.length + ") loaded without errors.");
|
||||
|
||||
// Clean up to avoid leaks:
|
||||
|
@ -488,7 +488,7 @@
|
||||
|
||||
// Don't open the suggestions if the mouse was used to focus the
|
||||
// textbox, that will be taken care of in the click handler.
|
||||
if (Services.focus.getLastFocusMethod(window) == Services.focus.FLAG_BYMOUSE)
|
||||
if (Services.focus.getLastFocusMethod(window) & Services.focus.FLAG_BYMOUSE)
|
||||
return;
|
||||
|
||||
this.openSuggestionsPanel();
|
||||
|
@ -157,11 +157,11 @@ if test -n "$MOZ_NATIVE_NSPR" -o -n "$NSPR_CFLAGS" -o -n "$NSPR_LIBS"; then
|
||||
AC_MSG_ERROR([system NSPR does not support PR_UINT64 or including prtypes.h does not provide it]))
|
||||
CFLAGS=$_SAVE_CFLAGS
|
||||
elif test -z "$JS_POSIX_NSPR"; then
|
||||
NSPR_CFLAGS="-I${LIBXUL_DIST}/include/nspr"
|
||||
NSPR_CFLAGS="-I${DIST}/include/nspr"
|
||||
if test -n "$GNU_CC"; then
|
||||
NSPR_LIBS="-L${LIBXUL_DIST}/lib -lnspr${NSPR_VERSION} -lplc${NSPR_VERSION} -lplds${NSPR_VERSION}"
|
||||
NSPR_LIBS="-L${DIST}/lib -lnspr${NSPR_VERSION} -lplc${NSPR_VERSION} -lplds${NSPR_VERSION}"
|
||||
else
|
||||
NSPR_LIBS="${LIBXUL_DIST}/lib/nspr${NSPR_VERSION}.lib ${LIBXUL_DIST}/lib/plc${NSPR_VERSION}.lib ${LIBXUL_DIST}/lib/plds${NSPR_VERSION}.lib "
|
||||
NSPR_LIBS="${DIST}/lib/nspr${NSPR_VERSION}.lib ${DIST}/lib/plc${NSPR_VERSION}.lib ${DIST}/lib/plds${NSPR_VERSION}.lib "
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -13,7 +13,7 @@ _CERTS_SRC_DIR = $(ABSOLUTE_TOPSRCDIR)/build/pgo/certs
|
||||
|
||||
AUTOMATION_PPARGS = \
|
||||
-DBROWSER_PATH=$(browser_path) \
|
||||
-DXPC_BIN_PATH='"$(LIBXUL_DIST)/bin"' \
|
||||
-DXPC_BIN_PATH='"$(DIST)/bin"' \
|
||||
-DBIN_SUFFIX='"$(BIN_SUFFIX)"' \
|
||||
-DPROFILE_DIR='"$(_PROFILE_DIR)"' \
|
||||
-DCERTS_SRC_DIR='"$(_CERTS_SRC_DIR)"' \
|
||||
|
@ -85,9 +85,6 @@ endif
|
||||
|
||||
RM = rm -f
|
||||
|
||||
# LIBXUL_DIST is not defined under js/src, thus we make it mean DIST there.
|
||||
LIBXUL_DIST ?= $(DIST)
|
||||
|
||||
# FINAL_TARGET specifies the location into which we copy end-user-shipped
|
||||
# build products (typelibs, components, chrome). It may already be specified by
|
||||
# a moz.build file.
|
||||
@ -581,7 +578,7 @@ EN_US_OR_L10N_FILE = $(firstword \
|
||||
EN_US_OR_L10N_FILES = $(foreach f,$(1),$(call EN_US_OR_L10N_FILE,$(f)))
|
||||
|
||||
ifneq (WINNT,$(OS_ARCH))
|
||||
RUN_TEST_PROGRAM = $(LIBXUL_DIST)/bin/run-mozilla.sh
|
||||
RUN_TEST_PROGRAM = $(DIST)/bin/run-mozilla.sh
|
||||
endif # ! WINNT
|
||||
|
||||
#
|
||||
|
36
configure.in
36
configure.in
@ -135,6 +135,7 @@ EOF
|
||||
break
|
||||
fi
|
||||
MOZ_BUILD_ROOT=`pwd -W 2>/dev/null || pwd`
|
||||
DIST="$MOZ_BUILD_ROOT/dist"
|
||||
|
||||
MOZ_PYTHON
|
||||
|
||||
@ -972,7 +973,7 @@ TARGET_MD_ARCH=unix
|
||||
DIRENT_INO=d_ino
|
||||
MOZ_USER_DIR=".mozilla"
|
||||
|
||||
MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin -Wl,-rpath-link,$(prefix)/lib'
|
||||
MOZ_FIX_LINK_PATHS="-Wl,-rpath-link,${DIST}/bin -Wl,-rpath-link,${prefix}/lib"
|
||||
|
||||
MOZ_FS_LAYOUT=unix
|
||||
|
||||
@ -2035,7 +2036,7 @@ case "$target" in
|
||||
fi
|
||||
LDFLAGS=$_SAVE_LDFLAGS
|
||||
|
||||
MOZ_FIX_LINK_PATHS='-Wl,-executable_path,$(LIBXUL_DIST)/bin'
|
||||
MOZ_FIX_LINK_PATHS="-Wl,-executable_path,${DIST}/bin"
|
||||
;;
|
||||
|
||||
ia64*-hpux*)
|
||||
@ -2063,13 +2064,13 @@ ia64*-hpux*)
|
||||
DSO_LDOPTS='-b -Wl,+s'
|
||||
DSO_CFLAGS=""
|
||||
DSO_PIC_CFLAGS="+Z"
|
||||
MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -L$(LIBXUL_DIST)/bin -o $@'
|
||||
MKCSHLIB='$(LD) -b +s -L$(LIBXUL_DIST)/bin -o $@'
|
||||
MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -L$(DIST)/bin -o $@'
|
||||
MKCSHLIB='$(LD) -b +s -L$(DIST)/bin -o $@'
|
||||
CXXFLAGS="$CXXFLAGS -Wc,-ansi_for_scope,on"
|
||||
else
|
||||
DSO_LDOPTS='-b -E +s'
|
||||
MKSHLIB='$(LD) $(DSO_LDOPTS) -L$(LIBXUL_DIST)/bin -L$(LIBXUL_DIST)/lib -o $@'
|
||||
MKCSHLIB='$(LD) $(DSO_LDOPTS) -L$(LIBXUL_DIST)/bin -L$(LIBXUL_DIST)/lib -o $@'
|
||||
MKSHLIB='$(LD) $(DSO_LDOPTS) -L$(DIST)/bin -L$(DIST)/lib -o $@'
|
||||
MKCSHLIB='$(LD) $(DSO_LDOPTS) -L$(DIST)/bin -L$(DIST)/lib -o $@'
|
||||
fi
|
||||
MOZ_POST_PROGRAM_COMMAND='chatr +s enable'
|
||||
AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES)
|
||||
@ -2389,7 +2390,10 @@ ia64*-hpux*)
|
||||
else
|
||||
DLL_SUFFIX=".so.1.0"
|
||||
fi
|
||||
MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin -Wl,-rpath-link,$(prefix)/lib -Wl,-rpath-link,$(if $(X11BASE),$(X11BASE),/usr/X11R6)/lib'
|
||||
if test -z "$X11BASE"; then
|
||||
X11BASE=/usr/X11R6
|
||||
fi
|
||||
MOZ_FIX_LINK_PATHS="$MOZ_FIX_LINK_PATHS -Wl,-rpath-link,${X11BASE}/lib"
|
||||
DSO_CFLAGS=''
|
||||
DSO_PIC_CFLAGS='-fPIC'
|
||||
DSO_LDOPTS='-shared -fPIC'
|
||||
@ -3354,9 +3358,6 @@ MOZ_ARG_WITH_STRING(libxul-sdk,
|
||||
[ --with-libxul-sdk=PFX Use the libXUL SDK at <PFX>],
|
||||
AC_MSG_ERROR([--with-libxul-sdk is not supported anymore.]))
|
||||
|
||||
LIBXUL_DIST="$MOZ_BUILD_ROOT/dist"
|
||||
AC_SUBST(LIBXUL_DIST)
|
||||
|
||||
MOZ_CONFIG_NSPR()
|
||||
|
||||
dnl set GRE_MILESTONE
|
||||
@ -3449,18 +3450,7 @@ fi
|
||||
if test -n "$MOZ_NATIVE_NSS"; then
|
||||
NSS_LIBS="$NSS_LIBS -lcrmf"
|
||||
else
|
||||
NSS_CFLAGS='-I$(LIBXUL_DIST)/include/nss'
|
||||
|
||||
if test -z "$GNU_CC" -a "$OS_ARCH" = "WINNT"; then
|
||||
NSS_LIBS="\
|
||||
\$(LIBXUL_DIST)/lib/\$(LIB_PREFIX)crmf.\$(LIB_SUFFIX) \
|
||||
\$(LIBXUL_DIST)/lib/\$(LIB_PREFIX)smime$NSS_VERSION.\$(LIB_SUFFIX) \
|
||||
\$(LIBXUL_DIST)/lib/\$(LIB_PREFIX)ssl$NSS_VERSION.\$(LIB_SUFFIX) \
|
||||
\$(LIBXUL_DIST)/lib/\$(LIB_PREFIX)nss$NSS_VERSION.\$(LIB_SUFFIX) \
|
||||
\$(LIBXUL_DIST)/lib/\$(LIB_PREFIX)nssutil$NSS_VERSION.\$(LIB_SUFFIX)"
|
||||
else
|
||||
NSS_LIBS='-L$(LIBXUL_DIST)/lib'" -lcrmf -lsmime$NSS_VERSION -lssl$NSS_VERSION -lnss$NSS_VERSION -lnssutil$NSS_VERSION"
|
||||
fi
|
||||
NSS_CFLAGS="-I${DIST}/include/nss"
|
||||
fi
|
||||
|
||||
dnl ======================
|
||||
@ -8201,7 +8191,7 @@ fi
|
||||
AC_SUBST(HAVE_INTTYPES_H)
|
||||
|
||||
if test "$MOZ_TREE_CAIRO"; then
|
||||
MOZ_CAIRO_CFLAGS='-I$(LIBXUL_DIST)/include/cairo'
|
||||
MOZ_CAIRO_CFLAGS="-I${DIST}/include/cairo"
|
||||
AC_DEFINE(MOZ_TREE_CAIRO)
|
||||
|
||||
if test "$OS_ARCH" = "WINNT"; then
|
||||
|
@ -23,6 +23,8 @@ LOCAL_INCLUDES += [
|
||||
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
|
||||
LOCAL_INCLUDES += ['/uriloader/exthandler/mac']
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
if CONFIG['GNU_CXX']:
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "nsPrefetchService.h"
|
||||
#include "nsOfflineCacheUpdate.h"
|
||||
#include "nsLocalHandlerApp.h"
|
||||
#include "ContentHandlerService.h"
|
||||
#ifdef MOZ_ENABLE_DBUS
|
||||
#include "nsDBusHandlerApp.h"
|
||||
#endif
|
||||
@ -38,6 +39,8 @@
|
||||
// download history
|
||||
#include "nsDownloadHistory.h"
|
||||
|
||||
using mozilla::dom::ContentHandlerService;
|
||||
|
||||
static bool gInitialized = false;
|
||||
|
||||
// The one time initialization for this module
|
||||
@ -86,6 +89,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsDBusHandlerApp)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsExternalSharingAppService)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsExternalURLHandlerService)
|
||||
#endif
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(ContentHandlerService, Init)
|
||||
|
||||
// session history
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSHEntry)
|
||||
@ -119,6 +123,7 @@ NS_DEFINE_NAMED_CID(NS_SHTRANSACTION_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_SHISTORY_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_SHISTORY_INTERNAL_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_DOWNLOADHISTORY_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_CONTENTHANDLERSERVICE_CID);
|
||||
|
||||
const mozilla::Module::CIDEntry kDocShellCIDs[] = {
|
||||
{ &kNS_DOCSHELL_CID, false, nullptr, nsDocShellConstructor },
|
||||
@ -128,6 +133,8 @@ const mozilla::Module::CIDEntry kDocShellCIDs[] = {
|
||||
{ &kNS_URI_LOADER_CID, false, nullptr, nsURILoaderConstructor },
|
||||
{ &kNS_DOCUMENTLOADER_SERVICE_CID, false, nullptr, nsDocLoaderConstructor },
|
||||
{ &kNS_EXTERNALHELPERAPPSERVICE_CID, false, nullptr, nsOSHelperAppServiceConstructor },
|
||||
{ &kNS_CONTENTHANDLERSERVICE_CID, false, nullptr, ContentHandlerServiceConstructor,
|
||||
mozilla::Module::CONTENT_PROCESS_ONLY },
|
||||
{ &kNS_EXTERNALPROTOCOLHANDLER_CID, false, nullptr, nsExternalProtocolHandlerConstructor },
|
||||
{ &kNS_PREFETCHSERVICE_CID, false, nullptr, nsPrefetchServiceConstructor },
|
||||
{ &kNS_OFFLINECACHEUPDATESERVICE_CID, false, nullptr, nsOfflineCacheUpdateServiceConstructor },
|
||||
@ -179,6 +186,7 @@ const mozilla::Module::ContractIDEntry kDocShellContracts[] = {
|
||||
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "webrtc", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
|
||||
{ NS_URI_LOADER_CONTRACTID, &kNS_URI_LOADER_CID },
|
||||
{ NS_DOCUMENTLOADER_SERVICE_CONTRACTID, &kNS_DOCUMENTLOADER_SERVICE_CID },
|
||||
{ NS_HANDLERSERVICE_CONTRACTID, &kNS_CONTENTHANDLERSERVICE_CID, mozilla::Module::CONTENT_PROCESS_ONLY },
|
||||
{ NS_EXTERNALHELPERAPPSERVICE_CONTRACTID, &kNS_EXTERNALHELPERAPPSERVICE_CID },
|
||||
{ NS_EXTERNALPROTOCOLSERVICE_CONTRACTID, &kNS_EXTERNALHELPERAPPSERVICE_CID },
|
||||
{ NS_MIMESERVICE_CONTRACTID, &kNS_EXTERNALHELPERAPPSERVICE_CID },
|
||||
|
17
dom/audiochannel/crashtests/1223734.html
Normal file
17
dom/audiochannel/crashtests/1223734.html
Normal file
@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<script>
|
||||
|
||||
function boom() {
|
||||
var audio = document.createElement('audio');
|
||||
audio.loop = true;
|
||||
audio.play();
|
||||
document.implementation.createDocument("", "", null).adoptNode(audio);
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body onload="boom();"></body>
|
||||
</html>
|
1
dom/audiochannel/crashtests/crashtests.list
Normal file
1
dom/audiochannel/crashtests/crashtests.list
Normal file
@ -0,0 +1 @@
|
||||
load 1223734.html
|
@ -352,7 +352,9 @@ nsFocusManager::GetRedirectedFocus(nsIContent* aContent)
|
||||
InputContextAction::Cause
|
||||
nsFocusManager::GetFocusMoveActionCause(uint32_t aFlags)
|
||||
{
|
||||
if (aFlags & nsIFocusManager::FLAG_BYMOUSE) {
|
||||
if (aFlags & nsIFocusManager::FLAG_BYTOUCH) {
|
||||
return InputContextAction::CAUSE_TOUCH;
|
||||
} else if (aFlags & nsIFocusManager::FLAG_BYMOUSE) {
|
||||
return InputContextAction::CAUSE_MOUSE;
|
||||
} else if (aFlags & nsIFocusManager::FLAG_BYKEY) {
|
||||
return InputContextAction::CAUSE_KEY;
|
||||
|
@ -2982,10 +2982,15 @@ EventStateManager::PostHandleEvent(nsPresContext* aPresContext,
|
||||
if (newFocus && currFrame) {
|
||||
// use the mouse flag and the noscroll flag so that the content
|
||||
// doesn't unexpectedly scroll when clicking an element that is
|
||||
// only hald visible
|
||||
// only half visible
|
||||
uint32_t flags = nsIFocusManager::FLAG_BYMOUSE |
|
||||
nsIFocusManager::FLAG_NOSCROLL;
|
||||
// If this was a touch-generated event, pass that information:
|
||||
if (mouseEvent->inputSource == nsIDOMMouseEvent::MOZ_SOURCE_TOUCH) {
|
||||
flags |= nsIFocusManager::FLAG_BYTOUCH;
|
||||
}
|
||||
nsCOMPtr<nsIDOMElement> newFocusElement = do_QueryInterface(newFocus);
|
||||
fm->SetFocus(newFocusElement, nsIFocusManager::FLAG_BYMOUSE |
|
||||
nsIFocusManager::FLAG_NOSCROLL);
|
||||
fm->SetFocus(newFocusElement, flags);
|
||||
}
|
||||
else if (!suppressBlur) {
|
||||
// clear the focus within the frame and then set it as the
|
||||
|
@ -136,11 +136,6 @@ public:
|
||||
nsCOMPtr<nsILoadGroup> loadGroup = proxy->GetWorkerPrivate()->GetLoadGroup();
|
||||
MOZ_ASSERT(loadGroup);
|
||||
RefPtr<FetchDriver> fetch = new FetchDriver(mRequest, principal, loadGroup);
|
||||
nsIDocument* doc = proxy->GetWorkerPrivate()->GetDocument();
|
||||
if (doc) {
|
||||
fetch->SetDocument(doc);
|
||||
}
|
||||
|
||||
nsresult rv = fetch->Fetch(mResolver);
|
||||
// Right now we only support async fetch, which should never directly fail.
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
|
@ -241,10 +241,8 @@ FetchDriver::HttpFetch()
|
||||
MOZ_ASSERT(mLoadGroup);
|
||||
nsCOMPtr<nsIChannel> chan;
|
||||
|
||||
// For dedicated workers mDocument refers to the parent document of the
|
||||
// worker (why do we do that?). In that case we don't want to use the
|
||||
// document here since that is not the correct principal.
|
||||
if (mDocument && mDocument->NodePrincipal() == mPrincipal) {
|
||||
if (mDocument) {
|
||||
MOZ_ASSERT(mDocument->NodePrincipal() == mPrincipal);
|
||||
rv = NS_NewChannel(getter_AddRefs(chan),
|
||||
uri,
|
||||
mDocument,
|
||||
|
@ -317,9 +317,15 @@ HTMLButtonElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
|
||||
static_cast<EventStateManager*>(esm), this);
|
||||
}
|
||||
nsIFocusManager* fm = nsFocusManager::GetFocusManager();
|
||||
if (fm)
|
||||
fm->SetFocus(this, nsIFocusManager::FLAG_BYMOUSE |
|
||||
nsIFocusManager::FLAG_NOSCROLL);
|
||||
if (fm) {
|
||||
uint32_t flags = nsIFocusManager::FLAG_BYMOUSE |
|
||||
nsIFocusManager::FLAG_NOSCROLL;
|
||||
// If this was a touch-generated event, pass that information:
|
||||
if (mouseEvent->inputSource == nsIDOMMouseEvent::MOZ_SOURCE_TOUCH) {
|
||||
flags |= nsIFocusManager::FLAG_BYTOUCH;
|
||||
}
|
||||
fm->SetFocus(this, flags);
|
||||
}
|
||||
mouseEvent->mFlags.mMultipleActionsPrevented = true;
|
||||
} else if (mouseEvent->button == WidgetMouseEvent::eMiddleButton ||
|
||||
mouseEvent->button == WidgetMouseEvent::eRightButton) {
|
||||
|
@ -175,8 +175,10 @@ HTMLLabelElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
|
||||
// caused by the user pressing an accesskey.
|
||||
nsCOMPtr<nsIDOMElement> elem = do_QueryInterface(content);
|
||||
bool byMouse = (mouseEvent->inputSource != nsIDOMMouseEvent::MOZ_SOURCE_KEYBOARD);
|
||||
bool byTouch = (mouseEvent->inputSource == nsIDOMMouseEvent::MOZ_SOURCE_TOUCH);
|
||||
fm->SetFocus(elem, nsIFocusManager::FLAG_BYMOVEFOCUS |
|
||||
(byMouse ? nsIFocusManager::FLAG_BYMOUSE : 0));
|
||||
(byMouse ? nsIFocusManager::FLAG_BYMOUSE : 0) |
|
||||
(byTouch ? nsIFocusManager::FLAG_BYTOUCH : 0));
|
||||
}
|
||||
}
|
||||
// Dispatch a new click event to |content|
|
||||
|
@ -1,25 +0,0 @@
|
||||
// this automatically sets the test plugin to be enabled (not e.g. click-to-play)
|
||||
// and resets this afterwards
|
||||
|
||||
(function() {
|
||||
function getTestPlugin(aPluginName) {
|
||||
var ph = SpecialPowers.Cc["@mozilla.org/plugin/host;1"]
|
||||
.getService(SpecialPowers.Ci.nsIPluginHost);
|
||||
var tags = ph.getPluginTags();
|
||||
for (var tag of tags) {
|
||||
if (tag.name == aPluginName) {
|
||||
return tag;
|
||||
}
|
||||
}
|
||||
|
||||
ok(false, "Could not find plugin tag with plugin name '" + name + "'");
|
||||
return null;
|
||||
}
|
||||
|
||||
var plugin = getTestPlugin("Test Plug-in");
|
||||
var oldEnabledState = plugin.enabledState;
|
||||
plugin.enabledState = SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED;
|
||||
SimpleTest.registerCleanupFunction(function() {
|
||||
getTestPlugin("Test Plug-in").enabledState = oldEnabledState;
|
||||
});
|
||||
})();
|
@ -16,7 +16,10 @@ Test plugins with DOM full-screen API:
|
||||
<title>Test for Bug 545812</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="enableTestPlugin.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
<script type="application/javascript">
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
</script>
|
||||
<script type="application/javascript" src="file_fullscreen-utils.js"></script>
|
||||
<style>
|
||||
body:-moz-full-screen, div:-moz-full-screen {
|
||||
|
@ -42,14 +42,9 @@
|
||||
|
||||
// test loading with relative url - this should fail since we are
|
||||
// sandboxed and have a null principal
|
||||
try {
|
||||
var worker_js = new Worker('file_iframe_sandbox_worker.js');
|
||||
} catch (e) {
|
||||
ok(e.name === "SecurityError", "a worker in a sandboxed document should throw when loading from a relative URI");
|
||||
}
|
||||
|
||||
var worker_js = new Worker('file_iframe_sandbox_worker.js');
|
||||
worker_js.onerror = function(error) {
|
||||
ok(false, "a worker in a sandboxed document should not tell the load error via error event");
|
||||
ok(true, "a worker in a sandboxed document should tell the load error via error event");
|
||||
}
|
||||
|
||||
worker_js.addEventListener('message', function(event) {
|
||||
|
@ -36,7 +36,7 @@ support-files =
|
||||
bug499092.html
|
||||
bug499092.xml
|
||||
bug514856_iframe.html
|
||||
enableTestPlugin.js
|
||||
../../plugins/test/mochitest/plugin-utils.js
|
||||
test_non-ascii-cookie.html^headers^
|
||||
file_bug209275_1.html
|
||||
file_bug209275_2.html
|
||||
@ -482,7 +482,7 @@ skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #time out on b2g desktop spec
|
||||
[test_iframe_sandbox_navigation2.html]
|
||||
skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #time out on b2g desktop specific
|
||||
[test_iframe_sandbox_plugins.html]
|
||||
skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(plugins not supported) b2g-debug(plugins not supported) b2g-desktop(plugins not supported)
|
||||
skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' # b2g(plugins not supported) b2g-debug(plugins not supported) b2g-desktop(plugins not supported)
|
||||
[test_iframe_sandbox_popups.html]
|
||||
skip-if = buildapp == 'b2g' # b2g(multiple concurrent window.open()s fail on B2G) b2g-debug(multiple concurrent window.open()s fail on B2G) b2g-desktop(Bug 931116, b2g desktop specific, initial triage)
|
||||
[test_iframe_sandbox_popups_inheritance.html]
|
||||
@ -512,7 +512,7 @@ skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) # b2g-debug(Perma-
|
||||
[test_nested_invalid_fieldsets.html]
|
||||
[test_object_attributes_reflection.html]
|
||||
[test_object_plugin_nav.html]
|
||||
skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT # b2g(plugins not supported) b2g-debug(plugins not supported) b2g-desktop(plugins not supported)
|
||||
skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' # b2g(plugins not supported) b2g-debug(plugins not supported) b2g-desktop(plugins not supported)
|
||||
[test_ol_attributes_reflection.html]
|
||||
[test_option_defaultSelected.html]
|
||||
[test_option_selected_state.html]
|
||||
|
@ -8,7 +8,10 @@ Implement HTML5 sandbox attribute for IFRAMEs
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 341604 - plugins</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="enableTestPlugin.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
<script type="application/javascript">
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
</script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<script type="application/javascript">
|
||||
|
@ -8,7 +8,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=720130
|
||||
<title>Test for Bug 720130</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="application/javascript" src="enableTestPlugin.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
<script type="application/javascript">
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
</script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -195,6 +195,12 @@ interface nsIFocusManager : nsISupports
|
||||
*/
|
||||
const unsigned long FLAG_SHOWRING = 0x100000;
|
||||
|
||||
/**
|
||||
* Focus is changing due to a touch operation that generated a mouse event.
|
||||
* Normally used in conjunction with FLAG_BYMOUSE.
|
||||
*/
|
||||
const unsigned long FLAG_BYTOUCH = 0x200000;
|
||||
|
||||
// these constants are used with the aType argument to MoveFocus
|
||||
|
||||
/** move focus forward one element, used when pressing TAB */
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "CrashReporterChild.h"
|
||||
#include "GeckoProfiler.h"
|
||||
#include "TabChild.h"
|
||||
#include "HandlerServiceChild.h"
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/LookAndFeel.h"
|
||||
@ -1894,6 +1895,20 @@ ContentChild::DeallocPExternalHelperAppChild(PExternalHelperAppChild* aService)
|
||||
return true;
|
||||
}
|
||||
|
||||
PHandlerServiceChild*
|
||||
ContentChild::AllocPHandlerServiceChild()
|
||||
{
|
||||
HandlerServiceChild* actor = new HandlerServiceChild();
|
||||
actor->AddRef();
|
||||
return actor;
|
||||
}
|
||||
|
||||
bool ContentChild::DeallocPHandlerServiceChild(PHandlerServiceChild* aHandlerServiceChild)
|
||||
{
|
||||
static_cast<HandlerServiceChild*>(aHandlerServiceChild)->Release();
|
||||
return true;
|
||||
}
|
||||
|
||||
PCellBroadcastChild*
|
||||
ContentChild::AllocPCellBroadcastChild()
|
||||
{
|
||||
|
@ -273,6 +273,9 @@ public:
|
||||
PBrowserChild* aBrowser) override;
|
||||
virtual bool DeallocPExternalHelperAppChild(PExternalHelperAppChild *aService) override;
|
||||
|
||||
virtual PHandlerServiceChild* AllocPHandlerServiceChild() override;
|
||||
virtual bool DeallocPHandlerServiceChild(PHandlerServiceChild*) override;
|
||||
|
||||
virtual PCellBroadcastChild* AllocPCellBroadcastChild() override;
|
||||
PCellBroadcastChild* SendPCellBroadcastConstructor(PCellBroadcastChild* aActor);
|
||||
virtual bool DeallocPCellBroadcastChild(PCellBroadcastChild* aActor) override;
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include "BlobParent.h"
|
||||
#include "CrashReporterParent.h"
|
||||
#include "GMPServiceParent.h"
|
||||
#include "HandlerServiceParent.h"
|
||||
#include "IHistory.h"
|
||||
#include "imgIContainer.h"
|
||||
#include "mozIApplication.h"
|
||||
@ -3898,6 +3899,21 @@ ContentParent::DeallocPExternalHelperAppParent(PExternalHelperAppParent* aServic
|
||||
return true;
|
||||
}
|
||||
|
||||
PHandlerServiceParent*
|
||||
ContentParent::AllocPHandlerServiceParent()
|
||||
{
|
||||
HandlerServiceParent* actor = new HandlerServiceParent();
|
||||
actor->AddRef();
|
||||
return actor;
|
||||
}
|
||||
|
||||
bool
|
||||
ContentParent::DeallocPHandlerServiceParent(PHandlerServiceParent* aHandlerServiceParent)
|
||||
{
|
||||
static_cast<HandlerServiceParent*>(aHandlerServiceParent)->Release();
|
||||
return true;
|
||||
}
|
||||
|
||||
PCellBroadcastParent*
|
||||
ContentParent::AllocPCellBroadcastParent()
|
||||
{
|
||||
|
@ -703,6 +703,9 @@ private:
|
||||
PBrowserParent* aBrowser) override;
|
||||
virtual bool DeallocPExternalHelperAppParent(PExternalHelperAppParent* aService) override;
|
||||
|
||||
virtual PHandlerServiceParent* AllocPHandlerServiceParent() override;
|
||||
virtual bool DeallocPHandlerServiceParent(PHandlerServiceParent*) override;
|
||||
|
||||
virtual PCellBroadcastParent* AllocPCellBroadcastParent() override;
|
||||
virtual bool DeallocPCellBroadcastParent(PCellBroadcastParent*) override;
|
||||
virtual bool RecvPCellBroadcastConstructor(PCellBroadcastParent* aActor) override;
|
||||
|
@ -16,6 +16,7 @@ include protocol PCycleCollectWithLogs;
|
||||
include protocol PCrashReporter;
|
||||
include protocol PPSMContentDownloader;
|
||||
include protocol PExternalHelperApp;
|
||||
include protocol PHandlerService;
|
||||
include protocol PDeviceStorageRequest;
|
||||
include protocol PFileDescriptorSet;
|
||||
include protocol PFMRadio;
|
||||
@ -458,6 +459,7 @@ prio(normal upto urgent) sync protocol PContent
|
||||
manages PFileDescriptorSet;
|
||||
manages PFMRadio;
|
||||
manages PHal;
|
||||
manages PHandlerService;
|
||||
manages PHeapSnapshotTempFileHelper;
|
||||
manages PIcc;
|
||||
manages PMedia;
|
||||
@ -891,6 +893,8 @@ parent:
|
||||
OptionalURIParams aReferrer,
|
||||
nullable PBrowser aBrowser);
|
||||
|
||||
PHandlerService();
|
||||
|
||||
AddGeolocationListener(Principal principal, bool highAccuracy);
|
||||
RemoveGeolocationListener();
|
||||
SetGeolocationHigherAccuracy(bool enable);
|
||||
|
@ -24,6 +24,10 @@
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#include <assert.h>
|
||||
#ifdef HASH_NODE_ID_WITH_DEVICE_ID
|
||||
#include <mach/mach.h>
|
||||
#include <mach/mach_vm.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(HASH_NODE_ID_WITH_DEVICE_ID)
|
||||
@ -114,14 +118,42 @@ GetStackAfterCurrentFrame(uint8_t** aOutTop, uint8_t** aOutBottom)
|
||||
#endif
|
||||
|
||||
#if defined(XP_MACOSX) && defined(HASH_NODE_ID_WITH_DEVICE_ID)
|
||||
static mach_vm_address_t
|
||||
RegionContainingAddress(mach_vm_address_t aAddress)
|
||||
{
|
||||
mach_port_t task;
|
||||
kern_return_t kr = task_for_pid(mach_task_self(), getpid(), &task);
|
||||
if (kr != KERN_SUCCESS) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
mach_vm_address_t address = aAddress;
|
||||
mach_vm_size_t size;
|
||||
vm_region_basic_info_data_64_t info;
|
||||
mach_msg_type_number_t count = VM_REGION_BASIC_INFO_COUNT_64;
|
||||
mach_port_t object_name;
|
||||
kr = mach_vm_region(task, &address, &size, VM_REGION_BASIC_INFO_64,
|
||||
reinterpret_cast<vm_region_info_t>(&info), &count,
|
||||
&object_name);
|
||||
if (kr != KERN_SUCCESS || size == 0
|
||||
|| address > aAddress || address + size <= aAddress) {
|
||||
// mach_vm_region failed, or couldn't find region at given address.
|
||||
return 0;
|
||||
}
|
||||
|
||||
return address;
|
||||
}
|
||||
|
||||
MOZ_NEVER_INLINE
|
||||
static bool
|
||||
GetStackAfterCurrentFrame(uint8_t** aOutTop, uint8_t** aOutBottom)
|
||||
{
|
||||
// TODO
|
||||
*aOutTop = nullptr;
|
||||
*aOutBottom = nullptr;
|
||||
return true;
|
||||
mach_vm_address_t stackFrame =
|
||||
reinterpret_cast<mach_vm_address_t>(__builtin_frame_address(0));
|
||||
*aOutTop = reinterpret_cast<uint8_t*>(stackFrame);
|
||||
// Kernel code shows that stack is always a single region.
|
||||
*aOutBottom = reinterpret_cast<uint8_t*>(RegionContainingAddress(stackFrame));
|
||||
return *aOutBottom && (*aOutBottom < *aOutTop);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -3,7 +3,7 @@ skip-if = (buildapp == 'b2g' || buildapp == 'mulet')
|
||||
support-files =
|
||||
hang_test.js
|
||||
privatemode_perwindowpb.xul
|
||||
utils.js
|
||||
plugin-utils.js
|
||||
|
||||
[test_bug479979.xul]
|
||||
[test_bug751809.html]
|
||||
|
@ -20,7 +20,7 @@ support-files =
|
||||
plugin_window.html
|
||||
pluginstream.js
|
||||
post.sjs
|
||||
utils.js
|
||||
plugin-utils.js
|
||||
|
||||
[test_GCrace.html]
|
||||
[test_NPNVdocumentOrigin.html]
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
@ -1,6 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body style="background-color: #88AAFF;">
|
||||
<h1>This Page Has a Solid Plugin</h1>
|
||||
|
||||
<p><embed id="p" type="application/x-test" drawmode="solid" color="FFFF0000" width="200" height="200"></embed>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body style="background-color: #88AAFF;">
|
||||
<h1>This Page Has a Solid Plugin</h1>
|
||||
|
||||
<p><embed id="p" type="application/x-test" drawmode="solid" color="FFFF0000" width="200" height="200"></embed>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<head>
|
||||
<title>nsICrashService plugin crash</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
|
||||
<body>
|
||||
<script class="testbody" type="application/javascript">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<head>
|
||||
<title>nsICrashService plugin hang</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
|
||||
<body>
|
||||
<script class="testbody" type="application/javascript">
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<script type="text/javascript"
|
||||
src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
<script type="text/javascript" src="plugin-utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="/tests/SimpleTest/test.css" />
|
||||
<body onload="start()">
|
||||
|
@ -2,7 +2,7 @@
|
||||
<head>
|
||||
<title>Test NPNVdocumentOrigin</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
</head>
|
||||
<body onload="runTest()">
|
||||
<script class="testbody" type="application/javascript">
|
||||
|
@ -2,7 +2,7 @@
|
||||
<head>
|
||||
<title>Test NPPVpluginWantsAllNetworkStreams</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
</head>
|
||||
<body onload="runTests()">
|
||||
<script class="testbody" type="application/javascript">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<title>Bug 1092842</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
<script type="text/javascript" src="plugin-utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
|
||||
<body onload="startTest()">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<title>Bug 1165981 Test</title>
|
||||
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
<script type="text/javascript" src="plugin-utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<title>Test for Bug 406541</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
<script type="text/javascript" src="plugin-utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
|
@ -6,7 +6,7 @@
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
<body xmlns="http://www.w3.org/1999/xhtml" onload="runTests()">
|
||||
<script class="testbody" type="application/javascript">
|
||||
<![CDATA[
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<script type="application/javascript"
|
||||
src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
|
||||
<body onload="setTimeout(runTests, 2000)">
|
||||
|
||||
|
@ -7,7 +7,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=539565
|
||||
<title>Test #1 for Bug 539565</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script class="testbody" type="text/javascript">
|
||||
|
@ -7,7 +7,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=539565
|
||||
<title>Test #2 for Bug 539565</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script class="testbody" type="text/javascript">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<title>Test for Bug 738396</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
<script type="text/javascript" src="plugin-utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
|
@ -4,7 +4,7 @@
|
||||
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/paint_listener.js"></script>
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
<script type="application/javascript;version=1.7">
|
||||
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||
Services.prefs.setBoolPref("plugins.click_to_play", true);
|
||||
|
@ -7,7 +7,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=771202
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 771202</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -7,7 +7,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=777098
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 777098</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body onload="go();">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<title>Test for Bug 784131</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<title>Test for Bug 813906</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
<script type="text/javascript" src="plugin-utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<title>Test for Bug 852315</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
<script type="text/javascript" src="plugin-utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<title>Test for Bug 854082</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
<script type="text/javascript" src="plugin-utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<title>Test for Bug 863792</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<title>Test for Bug 967694</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<title>Test for Bug 985859</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
<script type="text/javascript" src="plugin-utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
|
@ -5,7 +5,7 @@
|
||||
<title>Test for Bug 986930</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script class="testbody" type="application/javascript">
|
||||
|
@ -10,7 +10,7 @@
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
|
||||
<script type="application/javascript"
|
||||
src="http://mochi.test:8888/chrome/dom/plugins/test/mochitest/hang_test.js" />
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
<script type="application/javascript">
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
</script>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<title>NPAPI ClearSiteData/GetSitesWithData Functionality</title>
|
||||
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/ChromeUtils.js"></script>
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="application/javascript">
|
||||
|
@ -2,7 +2,7 @@
|
||||
<head>
|
||||
<title>NPCocoaEventFocusChanged Tests</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
<head>
|
||||
<title>NPCocoaEventWindowFocusChanged Tests</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
<script type="application/javascript">
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
</script>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<head>
|
||||
<title>NPAPI Cookie Tests</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
</head>
|
||||
|
||||
<body onload="runTests()">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<title>Test copying text from browser to plugin</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
<script type="text/javascript" src="plugin-utils.js"></script>
|
||||
|
||||
<script class="testbody" type="text/javascript">
|
||||
function runTests() {
|
||||
|
@ -1,7 +1,7 @@
|
||||
<head>
|
||||
<title>Plugin crashing in nested loop</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
|
||||
<body>
|
||||
<script class="testbody" type="application/javascript">
|
||||
|
@ -6,7 +6,7 @@
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
<script type="application/javascript">
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
</script>
|
||||
|
@ -6,7 +6,7 @@
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
<script type="application/javascript">
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
</script>
|
||||
|
@ -8,7 +8,7 @@
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js" />
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
<script type="application/javascript">
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
</script>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<head>
|
||||
<title>Plugin crashing</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
|
||||
<body>
|
||||
<script class="testbody" type="application/javascript">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<head>
|
||||
<title>Plugin crashing</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
|
||||
<body onload="mainLoaded()">
|
||||
<iframe id="iframe1" src="about:blank" width="600" height="600"></iframe>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<title>NPObject [[DefaultValue]] implementation</title>
|
||||
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
<script type="text/javascript" src="plugin-utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
|
||||
|
@ -1,36 +1,36 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>NPAPI Cookie Tests</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
|
||||
<body onload="runTests()">
|
||||
<script class="testbody" type="application/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
|
||||
function runTests() {
|
||||
var pluginElement = document.getElementById("plugin1");
|
||||
var c = 0;
|
||||
var foundSetColor = false;
|
||||
for (var n in pluginElement) {
|
||||
++c;
|
||||
ok(n in pluginElement, "Enumerated property which doesn't exist?");
|
||||
if (n == 'setColor')
|
||||
foundSetColor = true;
|
||||
}
|
||||
ok(c > 0, "Should have enumerated some properties");
|
||||
ok(foundSetColor, "Should have enumerated .setColor");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
</script>
|
||||
|
||||
<p id="display"></p>
|
||||
|
||||
<embed id="plugin1" type="application/x-test" width="400" height="400"></embed>
|
||||
</body>
|
||||
</html>
|
||||
<html>
|
||||
<head>
|
||||
<title>NPAPI Cookie Tests</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
|
||||
<body onload="runTests()">
|
||||
<script class="testbody" type="application/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
|
||||
function runTests() {
|
||||
var pluginElement = document.getElementById("plugin1");
|
||||
var c = 0;
|
||||
var foundSetColor = false;
|
||||
for (var n in pluginElement) {
|
||||
++c;
|
||||
ok(n in pluginElement, "Enumerated property which doesn't exist?");
|
||||
if (n == 'setColor')
|
||||
foundSetColor = true;
|
||||
}
|
||||
ok(c > 0, "Should have enumerated some properties");
|
||||
ok(foundSetColor, "Should have enumerated .setColor");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
</script>
|
||||
|
||||
<p id="display"></p>
|
||||
|
||||
<embed id="plugin1" type="application/x-test" width="400" height="400"></embed>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<script type="text/javascript"
|
||||
src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="/tests/SimpleTest/test.css">
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<title>Test for Login Manager</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
<script type="text/javascript" src="plugin-utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -8,7 +8,7 @@
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js" />
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
<script type="application/javascript">
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
</script>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<head>
|
||||
<title>Plugin hanging</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
|
||||
<body>
|
||||
<script class="testbody" type="application/javascript">
|
||||
|
@ -9,7 +9,7 @@
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
|
||||
<script type="application/javascript"
|
||||
src="utils.js" />
|
||||
src="plugin-utils.js" />
|
||||
<script type="application/javascript"
|
||||
src="http://mochi.test:8888/chrome/dom/plugins/test/mochitest/hang_test.js" />
|
||||
<script type="application/javascript"
|
||||
|
@ -10,7 +10,7 @@
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
|
||||
<script type="application/javascript"
|
||||
src="http://mochi.test:8888/chrome/dom/plugins/test/mochitest/hang_test.js" />
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
<script type="application/javascript">
|
||||
getTestPlugin().enabledState = Ci.nsIPluginTag.STATE_ENABLED;
|
||||
</script>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<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="utils.js"></script>
|
||||
<script type="text/javascript" src="plugin-utils.js"></script>
|
||||
</head>
|
||||
<body onload="begin()">
|
||||
<script type="application/javascript;version=1.8">
|
||||
|
@ -4,7 +4,7 @@
|
||||
<title>Test removing an instance's DOM node</title>
|
||||
<script type="text/javascript" src="/MochiKit/packed.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
<script type="text/javascript" src="plugin-utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body onload="startTest()">
|
||||
|
@ -4,7 +4,7 @@
|
||||
<title>Test removing an instance's DOM node</title>
|
||||
<script type="text/javascript" src="/MochiKit/packed.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
<script type="text/javascript" src="plugin-utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body onload="startTest()">
|
||||
|
@ -4,7 +4,7 @@
|
||||
<title>Test removing an instance's DOM node</title>
|
||||
<script type="text/javascript" src="/MochiKit/packed.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
<script type="text/javascript" src="plugin-utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body onload="startTest()">
|
||||
|
@ -1,33 +1,33 @@
|
||||
<head>
|
||||
<title>Plugin instantiation</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
|
||||
<body onload="mainLoaded()">
|
||||
<iframe id="iframe1" src="about:blank" width="600" height="600"></iframe>
|
||||
|
||||
<script class="testbody" type="application/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
|
||||
var iframe = document.getElementById('iframe1');
|
||||
|
||||
function mainLoaded() {
|
||||
var p = iframe.contentDocument.createElement('embed');
|
||||
p.setAttribute('id', 'plugin1');
|
||||
p.setAttribute('type', 'application/x-test');
|
||||
p.setAttribute('width', '400');
|
||||
p.setAttribute('height', '400');
|
||||
p.setAttribute('drawmode', 'solid');
|
||||
p.setAttribute('color', 'FF00FFFF');
|
||||
iframe.contentDocument.body.appendChild(p);
|
||||
|
||||
// Plugin instantiation happens asynchronously
|
||||
SimpleTest.executeSoon(function() {
|
||||
SimpleTest.executeSoon(function() {
|
||||
ok(p.setColor !== undefined, "Dynamic plugin instantiation.");
|
||||
SimpleTest.finish();
|
||||
})
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<head>
|
||||
<title>Plugin instantiation</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
|
||||
<body onload="mainLoaded()">
|
||||
<iframe id="iframe1" src="about:blank" width="600" height="600"></iframe>
|
||||
|
||||
<script class="testbody" type="application/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
|
||||
var iframe = document.getElementById('iframe1');
|
||||
|
||||
function mainLoaded() {
|
||||
var p = iframe.contentDocument.createElement('embed');
|
||||
p.setAttribute('id', 'plugin1');
|
||||
p.setAttribute('type', 'application/x-test');
|
||||
p.setAttribute('width', '400');
|
||||
p.setAttribute('height', '400');
|
||||
p.setAttribute('drawmode', 'solid');
|
||||
p.setAttribute('color', 'FF00FFFF');
|
||||
iframe.contentDocument.body.appendChild(p);
|
||||
|
||||
// Plugin instantiation happens asynchronously
|
||||
SimpleTest.executeSoon(function() {
|
||||
SimpleTest.executeSoon(function() {
|
||||
ok(p.setColor !== undefined, "Dynamic plugin instantiation.");
|
||||
SimpleTest.finish();
|
||||
})
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<head>
|
||||
<title>Test mixed case mimetype for plugins</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
<script type="text/javascript" src="plugin-utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
<script>
|
||||
SimpleTest.expectAssertions(0, 1);
|
||||
|
@ -1,7 +1,7 @@
|
||||
<head>
|
||||
<title>NPNV*NPObject accessibility tests</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
|
||||
<body onload="runTests()">
|
||||
<script class="testbody" type="application/javascript">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<head>
|
||||
<title>NPN_GetURL called from NPP_Destroy</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="/tests/SimpleTest/test.css">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<title>NPN_AsyncCallback Tests</title>
|
||||
<script type="text/javascript"
|
||||
src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
<script type="text/javascript" src="plugin-utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<title>NPN_Timer Tests</title>
|
||||
<script type="text/javascript"
|
||||
src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
<script type="text/javascript" src="plugin-utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<head>
|
||||
<title>NPNV*NPObject accessibility tests</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
|
||||
<body onload="runTests()">
|
||||
<script class="testbody" type="application/javascript">
|
||||
|
@ -6,7 +6,7 @@
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
<script type="application/javascript">
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
</script>
|
||||
|
@ -1,32 +1,32 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test whether windowless plugins receive correct visible/invisible notifications.</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
</script>
|
||||
|
||||
<p id="display"></p>
|
||||
|
||||
<embed id="theplugin" type="application/x-test"></embed>
|
||||
|
||||
<script type="application/javascript">
|
||||
function MyFunc(arg) {
|
||||
is(arg, "hi", "Argument passed to constructor function");
|
||||
this.localProp = 'local';
|
||||
}
|
||||
MyFunc.prototype.protoProp = 't';
|
||||
|
||||
var theplugin = document.getElementById('theplugin');
|
||||
|
||||
ok(theplugin.constructObject(Array) instanceof Array, "Constructed Array");
|
||||
var o = theplugin.constructObject(MyFunc, "hi");
|
||||
ok(o instanceof MyFunc, "Constructed MyFunc");
|
||||
is(o.localProp, 'local', "this property correct");
|
||||
is(o.protoProp, 't', "prototype property correct");
|
||||
</script>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test whether windowless plugins receive correct visible/invisible notifications.</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="plugin-utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
</script>
|
||||
|
||||
<p id="display"></p>
|
||||
|
||||
<embed id="theplugin" type="application/x-test"></embed>
|
||||
|
||||
<script type="application/javascript">
|
||||
function MyFunc(arg) {
|
||||
is(arg, "hi", "Argument passed to constructor function");
|
||||
this.localProp = 'local';
|
||||
}
|
||||
MyFunc.prototype.protoProp = 't';
|
||||
|
||||
var theplugin = document.getElementById('theplugin');
|
||||
|
||||
ok(theplugin.constructObject(Array) instanceof Array, "Constructed Array");
|
||||
var o = theplugin.constructObject(MyFunc, "hi");
|
||||
ok(o instanceof MyFunc, "Constructed MyFunc");
|
||||
is(o.localProp, 'local', "this property correct");
|
||||
is(o.protoProp, 't', "prototype property correct");
|
||||
</script>
|
||||
|
@ -1,67 +1,67 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>NPN_Invoke Tests</title>
|
||||
<script type="text/javascript"
|
||||
src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
<p id="display"></p>
|
||||
|
||||
<script class="testbody" type="application/javascript">
|
||||
////
|
||||
// This test exercises NP identifiers by querying the reflector to make sure
|
||||
// that identifiers are translated to values correctly.
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
|
||||
var testsRun = 0;
|
||||
|
||||
function doTest() {
|
||||
SpecialPowers.gc();
|
||||
|
||||
var reflector = document.getElementById("subframe").contentDocument.getElementById("plugin1").getReflector();
|
||||
|
||||
var i, prop, randomnumber;
|
||||
|
||||
for (i = 0; i < 20; ++i) {
|
||||
randomnumber=Math.floor(Math.random()*1001);
|
||||
prop = "prop" + randomnumber;
|
||||
is(reflector[prop], prop, "Property " + prop);
|
||||
}
|
||||
|
||||
for (i = -10; i < 0; ++i) {
|
||||
is(reflector[i], String(i), "Property " + i);
|
||||
prop = "prop" + i;
|
||||
is(reflector[prop], prop, "Property " + prop);
|
||||
}
|
||||
|
||||
for (i = 0; i < 10; ++i) {
|
||||
is(reflector[i], i, "Property " + i);
|
||||
prop = "prop" + i;
|
||||
is(reflector[prop], prop, "Property " + prop);
|
||||
}
|
||||
|
||||
is(reflector.a, 'a', "Property .a");
|
||||
is(reflector['a'], 'a', "Property ['a']");
|
||||
reflector = null;
|
||||
|
||||
SpecialPowers.gc();
|
||||
|
||||
++testsRun;
|
||||
if (testsRun == 3) {
|
||||
SimpleTest.finish();
|
||||
}
|
||||
else {
|
||||
document.getElementById('subframe').contentWindow.location.reload(true);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<iframe id="subframe" src="npruntime_identifiers_subpage.html" onload="doTest()"></iframe>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<html>
|
||||
<head>
|
||||
<title>NPN_Invoke Tests</title>
|
||||
<script type="text/javascript"
|
||||
src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="plugin-utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
<p id="display"></p>
|
||||
|
||||
<script class="testbody" type="application/javascript">
|
||||
////
|
||||
// This test exercises NP identifiers by querying the reflector to make sure
|
||||
// that identifiers are translated to values correctly.
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
|
||||
var testsRun = 0;
|
||||
|
||||
function doTest() {
|
||||
SpecialPowers.gc();
|
||||
|
||||
var reflector = document.getElementById("subframe").contentDocument.getElementById("plugin1").getReflector();
|
||||
|
||||
var i, prop, randomnumber;
|
||||
|
||||
for (i = 0; i < 20; ++i) {
|
||||
randomnumber=Math.floor(Math.random()*1001);
|
||||
prop = "prop" + randomnumber;
|
||||
is(reflector[prop], prop, "Property " + prop);
|
||||
}
|
||||
|
||||
for (i = -10; i < 0; ++i) {
|
||||
is(reflector[i], String(i), "Property " + i);
|
||||
prop = "prop" + i;
|
||||
is(reflector[prop], prop, "Property " + prop);
|
||||
}
|
||||
|
||||
for (i = 0; i < 10; ++i) {
|
||||
is(reflector[i], i, "Property " + i);
|
||||
prop = "prop" + i;
|
||||
is(reflector[prop], prop, "Property " + prop);
|
||||
}
|
||||
|
||||
is(reflector.a, 'a', "Property .a");
|
||||
is(reflector['a'], 'a', "Property ['a']");
|
||||
reflector = null;
|
||||
|
||||
SpecialPowers.gc();
|
||||
|
||||
++testsRun;
|
||||
if (testsRun == 3) {
|
||||
SimpleTest.finish();
|
||||
}
|
||||
else {
|
||||
document.getElementById('subframe').contentWindow.location.reload(true);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<iframe id="subframe" src="npruntime_identifiers_subpage.html" onload="doTest()"></iframe>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user