mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 13:34:03 +00:00
import changes from `dev' branch of rmottola/Arctic-Fox:
- Bug 1234012 - Do not try to copy files from the non-existing default profile. r=bsmedberg (d30314c902) - Bug 1192831 - Remove PlayPreview API. r=jet, r=peterv (bb33dc609d) - Bug 1098064 part B - remove nsIPluginHost.isPluginOOP, r=jimm (39643555da) - Bug 1239913 - Convert toolkit/ to use asyncOpen2 where loadingPrincipal is SystemPrincipal (r=sicking) (b7d663d0e6) - minor (ac122dbb68) - Bug 1216972 - OS.File AsyncShutdown for content processes. r=froydnj (53550f1050) - Bug 1204834 - OS.File.writeAtomic should have the path argument in its closure. r=yoric (8dcf508961) - Bug 1201904 - Add test for force windowless mode. r=aklotz (ae4e591342) - Bug 1131368 - test plugin.allowed_types pref; r=josh (6a61ae8592) - Bug 1129040 - Query the chrome process blocklist service prior to instantiating plugins in the content process. r=billm (398664884f) - Bug 1225293 - Add Microsoft Silverlight to Win64 Plugin Whitelist; r=bsmedberg (eeecf59efc) - Bug 1165981 - Mochitests and test plugin for Win64 plugin disabling; r=bsmedberg (82211ff568) - Bug 1213710 part 1 - Convert all html/xul files in dom/plugins/test/mochitest to unix format. r=bsmedberg (8f89d2ac1d) - Bug 1213710 part 2 - Rename dom/plugins/test/mochitest/utils.js to plugin-utils.js. r=bsmedberg (e74d035ffc) - Bug 1225293 - Mochitests for Win64 Silverlight Whitelisting; r=bsmedberg (079ed3a442) - minor bits left out (5fa7b83b68) - Bug 1214516 - Sync check PBackgroundChild existence to initiate indexed DB open/delete request right away if it exists. r=khuey (8a2c5c7f8f) - Bug 1200004 - Fix IDB permission handling around navigated windows. r=baku (cea1d31ed9) - Bug 1239751 - FieldInfoHash does not need a post barrier; r=jonco (70b443bc23) - Bug 891107 - Part 5: Show function name in this and callee type error messages in js-ctypes. r=jorendorff (4358085f8f) - Bug 891107 - Part 6: Show information about range and value in array index error messages in js-ctypes. r=jorendorff (dfa926dc95) - Bug 891107 - Part 7: Show information about value, type, function, and argument number in function related error messages in js-ctypes. r=jorendorff (4b71ee5304) - Bug 891107 - Part 8: Show information about field name and type in struct field related error messages in js-ctypes. r=jorendorff (3a128382a6) - Bug 891107 - Part 9: Report construction error as TypeError in js-ctypes. r=jorendorff (4199e59c7b) - Bug 891107 - Part 10: Show information about value in pointer related error messages in js-ctypes. r=jorendorff (ad7e5fe53d) - Bug 891107 - Part 11: Show information about type in cast error messages in js-ctypes. r=jorendorff (74fe412bb9) - Bug 1243918 - Don't clobber safeseh in msvcc.sh -clang-cl; r=glandium (f014a945c9) - default to -O3 again (0d9261962c) - Bug 1239369 - Restore oomTests's check that an exception is thrown on failure, except where it isn't r=terrence (9f00c22106) - Bug 1203595 - move tests into manual-tests. r=waldo (444b7c10aa) - Bug 1079844 - Rename the shell builtin 'neuter' function to 'detachArrayBuffer', consistent with the spec name for the operation. r=till (48cfe8ff3a) - Bug 1234428 - findPath wrap cross-compartment objects. r=jonco (2ca70c86b0) - minor (c32fe44e31) - Add a semicolon to avoid relying on ASI in one place in String.js. No bug, r=trivial (5f005bf2af) - minor (2604e4d608) - Bug 1132630 - Prefix bound function names. r=till (3b30a82402) - Bug 1246157 - avoid memory leak when bindings->init fails. r=jcoppeard (e1f4513225) - Bug 1241116: Fix a leak in js_StartPref; r=nbp (8d258dcb05) - Bug 1238679 - Mark the Bool32x4 functions as inlinable. r=bbouvier (f0ea70894e) - Bug 992472 - Remove self-hosting macros ARRAY_PUSH and ARRAY_SLICE. r=efaust (60ae1d29a9) - missing bit of 1040390 (dea7f70cf1) - Bug 1246136: Check for dead code in assertion in EmitIfElse; r=luke (03d6f690da) - Bug 1241233 - Odin: don't report symbolicLinks memory usage twice (r=bbouvier) (f2344bc392) - Bug 1241581 - Put back null filename checks (r=bbouvier) (3c54ac7cf9) - Bug 1249787 - BaldrMonkey: Fix wasm string hex escape parsing endianness. r=luke (bf3aeb7ddb) - Bug 1229855: Fix miscompilation of uint8_t enum class with gcc4.8.2; r=luke (a86039958b) - Bug 1241454: Fix enum class storage of ExprType; r=bustage (9ee3368aed) - Bug 1248502 - Remove obsolete variants and configure flags, r=terrence (5dbcd14884)
This commit is contained in:
@@ -25,7 +25,7 @@ class nsNPAPIPluginInstance;
|
||||
* interface to mirror this interface when changing it.
|
||||
*/
|
||||
|
||||
[scriptable, uuid(5efbd411-5bbe-4de1-9f3a-1c3459696eb2)]
|
||||
[scriptable, uuid(2eb3195e-3eea-4083-bb1d-d2d70fa35ccb)]
|
||||
interface nsIObjectLoadingContent : nsISupports
|
||||
{
|
||||
/**
|
||||
@@ -65,8 +65,6 @@ interface nsIObjectLoadingContent : nsISupports
|
||||
const unsigned long PLUGIN_VULNERABLE_UPDATABLE = 9;
|
||||
// The plugin is vulnerable (no update available)
|
||||
const unsigned long PLUGIN_VULNERABLE_NO_UPDATE = 10;
|
||||
// The plugin is in play preview mode
|
||||
const unsigned long PLUGIN_PLAY_PREVIEW = 11;
|
||||
|
||||
/**
|
||||
* The actual mime type (the one we got back from the network
|
||||
@@ -128,8 +126,7 @@ interface nsIObjectLoadingContent : nsISupports
|
||||
in boolean submittedCrashReport);
|
||||
|
||||
/**
|
||||
* This method will play a plugin that has been stopped by the
|
||||
* click-to-play plugins or play-preview features.
|
||||
* This method will play a plugin that has been stopped by click-to-play.
|
||||
*/
|
||||
void playPlugin();
|
||||
|
||||
@@ -144,7 +141,7 @@ interface nsIObjectLoadingContent : nsISupports
|
||||
/**
|
||||
* This attribute will return true if the current content type has been
|
||||
* activated, either explicitly or by passing checks that would have it be
|
||||
* click-to-play or play-preview.
|
||||
* click-to-play.
|
||||
*/
|
||||
readonly attribute boolean activated;
|
||||
|
||||
@@ -184,11 +181,6 @@ interface nsIObjectLoadingContent : nsISupports
|
||||
*/
|
||||
readonly attribute bool hasRunningPlugin;
|
||||
|
||||
/**
|
||||
* This method will disable the play-preview plugin state.
|
||||
*/
|
||||
void cancelPlayPreview();
|
||||
|
||||
/**
|
||||
* If this plugin runs out-of-process, it has a runID to differentiate
|
||||
* between different times the plugin process has been instantiated.
|
||||
|
||||
@@ -709,7 +709,6 @@ nsObjectLoadingContent::nsObjectLoadingContent()
|
||||
, mInstantiating(false)
|
||||
, mNetworkCreated(true)
|
||||
, mActivated(false)
|
||||
, mPlayPreviewCanceled(false)
|
||||
, mIsStopping(false)
|
||||
, mIsLoading(false)
|
||||
, mScriptRequested(false) {}
|
||||
@@ -1411,8 +1410,6 @@ nsObjectLoadingContent::ObjectState() const
|
||||
return NS_EVENT_STATE_USERDISABLED;
|
||||
case eFallbackClickToPlay:
|
||||
return NS_EVENT_STATE_TYPE_CLICK_TO_PLAY;
|
||||
case eFallbackPlayPreview:
|
||||
return NS_EVENT_STATE_TYPE_PLAY_PREVIEW;
|
||||
case eFallbackDisabled:
|
||||
return NS_EVENT_STATE_BROKEN | NS_EVENT_STATE_HANDLER_DISABLED;
|
||||
case eFallbackBlocklisted:
|
||||
@@ -3112,7 +3109,7 @@ nsObjectLoadingContent::PlayPlugin()
|
||||
LOG(("OBJLC [%p]: Activated by user", this));
|
||||
}
|
||||
|
||||
// If we're in a click-to-play or play preview state, we need to reload
|
||||
// If we're in a click-to-play state, reload.
|
||||
// Fallback types >= eFallbackClickToPlay are plugin-replacement types, see
|
||||
// header
|
||||
if (mType == eType_Null && mFallbackType >= eFallbackClickToPlay) {
|
||||
@@ -3127,7 +3124,6 @@ nsObjectLoadingContent::Reload(bool aClearActivation)
|
||||
{
|
||||
if (aClearActivation) {
|
||||
mActivated = false;
|
||||
mPlayPreviewCanceled = false;
|
||||
}
|
||||
|
||||
return LoadObject(true, true);
|
||||
@@ -3167,22 +3163,6 @@ nsObjectLoadingContent::GetHasRunningPlugin(bool *aHasPlugin)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsObjectLoadingContent::CancelPlayPreview()
|
||||
{
|
||||
if (!nsContentUtils::IsCallerChrome())
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
|
||||
mPlayPreviewCanceled = true;
|
||||
|
||||
// If we're in play preview state already, reload
|
||||
if (mType == eType_Null && mFallbackType == eFallbackPlayPreview) {
|
||||
return LoadObject(true, true);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsObjectLoadingContent::GetRunID(uint32_t* aRunID)
|
||||
{
|
||||
@@ -3233,31 +3213,6 @@ nsObjectLoadingContent::ShouldPlay(FallbackType &aReason, bool aIgnoreCurrentTyp
|
||||
|
||||
RefPtr<nsPluginHost> pluginHost = nsPluginHost::GetInst();
|
||||
|
||||
nsCOMPtr<nsIPluginPlayPreviewInfo> playPreviewInfo;
|
||||
bool isPlayPreviewSpecified = NS_SUCCEEDED(pluginHost->GetPlayPreviewInfo(
|
||||
mContentType, getter_AddRefs(playPreviewInfo)));
|
||||
if (isPlayPreviewSpecified) {
|
||||
// Checking PlayPreview whitelist as well.
|
||||
nsCString uriSpec, baseSpec;
|
||||
if (mURI) {
|
||||
mURI->GetSpec(uriSpec);
|
||||
}
|
||||
if (mBaseURI) {
|
||||
mBaseURI->GetSpec(baseSpec);
|
||||
}
|
||||
playPreviewInfo->CheckWhitelist(baseSpec, uriSpec, &isPlayPreviewSpecified);
|
||||
}
|
||||
bool ignoreCTP = false;
|
||||
if (isPlayPreviewSpecified) {
|
||||
playPreviewInfo->GetIgnoreCTP(&ignoreCTP);
|
||||
}
|
||||
if (isPlayPreviewSpecified && !mPlayPreviewCanceled &&
|
||||
ignoreCTP) {
|
||||
// play preview in ignoreCTP mode is shown even if the native plugin
|
||||
// is not present/installed
|
||||
aReason = eFallbackPlayPreview;
|
||||
return false;
|
||||
}
|
||||
// at this point if it's not a plugin, we let it play/fallback
|
||||
if (!aIgnoreCurrentType && mType != eType_Plugin) {
|
||||
return true;
|
||||
@@ -3267,8 +3222,6 @@ nsObjectLoadingContent::ShouldPlay(FallbackType &aReason, bool aIgnoreCurrentTyp
|
||||
// * Assume a default of click-to-play
|
||||
// * If globally disabled, per-site permissions cannot override.
|
||||
// * If blocklisted, override the reason with the blocklist reason
|
||||
// * If not blocklisted but playPreview, override the reason with the
|
||||
// playPreview reason.
|
||||
// * Check per-site permissions and follow those if specified.
|
||||
// * Honor per-plugin disabled permission
|
||||
// * Blocklisted plugins are forced to CtP
|
||||
@@ -3285,8 +3238,9 @@ nsObjectLoadingContent::ShouldPlay(FallbackType &aReason, bool aIgnoreCurrentTyp
|
||||
}
|
||||
|
||||
// Before we check permissions, get the blocklist state of this plugin to set
|
||||
// the fallback reason correctly.
|
||||
uint32_t blocklistState = nsIBlocklistService::STATE_NOT_BLOCKED;
|
||||
// the fallback reason correctly. In the content process this will involve
|
||||
// an ipc call to chrome.
|
||||
uint32_t blocklistState = nsIBlocklistService::STATE_BLOCKED;
|
||||
pluginHost->GetBlocklistStateForType(mContentType,
|
||||
nsPluginHost::eExcludeNone,
|
||||
&blocklistState);
|
||||
@@ -3303,12 +3257,6 @@ nsObjectLoadingContent::ShouldPlay(FallbackType &aReason, bool aIgnoreCurrentTyp
|
||||
aReason = eFallbackVulnerableNoUpdate;
|
||||
}
|
||||
|
||||
if (aReason == eFallbackClickToPlay && isPlayPreviewSpecified &&
|
||||
!mPlayPreviewCanceled && !ignoreCTP) {
|
||||
// play preview in click-to-play mode is shown instead of standard CTP UI
|
||||
aReason = eFallbackPlayPreview;
|
||||
}
|
||||
|
||||
// Check the permission manager for permission based on the principal of
|
||||
// the toplevel content.
|
||||
|
||||
|
||||
@@ -94,9 +94,6 @@ class nsObjectLoadingContent : public nsImageLoadingContent
|
||||
eFallbackVulnerableUpdatable = nsIObjectLoadingContent::PLUGIN_VULNERABLE_UPDATABLE,
|
||||
// The plugin is vulnerable (no update available)
|
||||
eFallbackVulnerableNoUpdate = nsIObjectLoadingContent::PLUGIN_VULNERABLE_NO_UPDATE,
|
||||
// The plugin is disabled and play preview content is displayed until
|
||||
// the extension code enables it by sending the MozPlayPlugin event
|
||||
eFallbackPlayPreview = nsIObjectLoadingContent::PLUGIN_PLAY_PREVIEW
|
||||
};
|
||||
|
||||
nsObjectLoadingContent();
|
||||
@@ -225,10 +222,6 @@ class nsObjectLoadingContent : public nsImageLoadingContent
|
||||
{
|
||||
return !!mInstanceOwner;
|
||||
}
|
||||
void CancelPlayPreview(mozilla::ErrorResult& aRv)
|
||||
{
|
||||
aRv = CancelPlayPreview();
|
||||
}
|
||||
void SwapFrameLoaders(nsXULElement& aOtherOwner, mozilla::ErrorResult& aRv)
|
||||
{
|
||||
aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
|
||||
@@ -622,16 +615,13 @@ class nsObjectLoadingContent : public nsImageLoadingContent
|
||||
// activated by PlayPlugin(). (see ShouldPlay())
|
||||
bool mActivated : 1;
|
||||
|
||||
// Used to keep track of whether or not a plugin is blocked by play-preview.
|
||||
bool mPlayPreviewCanceled : 1;
|
||||
|
||||
// Protects DoStopPlugin from reentry (bug 724781).
|
||||
bool mIsStopping : 1;
|
||||
|
||||
// Protects LoadObject from re-entry
|
||||
bool mIsLoading : 1;
|
||||
|
||||
// For plugin stand-in types (click-to-play, play preview, ...) tracks
|
||||
// For plugin stand-in types (click-to-play) tracks
|
||||
// whether content js has tried to access the plugin script object.
|
||||
bool mScriptRequested : 1;
|
||||
|
||||
|
||||
@@ -262,8 +262,6 @@ private:
|
||||
#define NS_EVENT_STATE_LTR NS_DEFINE_EVENT_STATE_MACRO(42)
|
||||
// Element is rtl (for :dir pseudo-class)
|
||||
#define NS_EVENT_STATE_RTL NS_DEFINE_EVENT_STATE_MACRO(43)
|
||||
// Handler for play preview plugin
|
||||
#define NS_EVENT_STATE_TYPE_PLAY_PREVIEW NS_DEFINE_EVENT_STATE_MACRO(44)
|
||||
// Element is highlighted (devtools inspector)
|
||||
#define NS_EVENT_STATE_DEVTOOLS_HIGHLIGHTED NS_DEFINE_EVENT_STATE_MACRO(45)
|
||||
// Element is an unresolved custom element candidate
|
||||
|
||||
@@ -830,14 +830,14 @@ class WorkerPermissionChallenge;
|
||||
|
||||
// This class calles WorkerPermissionChallenge::OperationCompleted() in the
|
||||
// worker thread.
|
||||
class WorkerPermissionOperationCompleted final : public WorkerRunnable
|
||||
class WorkerPermissionOperationCompleted final : public WorkerControlRunnable
|
||||
{
|
||||
RefPtr<WorkerPermissionChallenge> mChallenge;
|
||||
|
||||
public:
|
||||
WorkerPermissionOperationCompleted(WorkerPrivate* aWorkerPrivate,
|
||||
WorkerPermissionChallenge* aChallenge)
|
||||
: WorkerRunnable(aWorkerPrivate, WorkerThreadUnchangedBusyCount)
|
||||
: WorkerControlRunnable(aWorkerPrivate, WorkerThreadUnchangedBusyCount)
|
||||
, mChallenge(aChallenge)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
@@ -943,11 +943,7 @@ public:
|
||||
RefPtr<WorkerPermissionOperationCompleted> runnable =
|
||||
new WorkerPermissionOperationCompleted(mWorkerPrivate, this);
|
||||
|
||||
if (!runnable->Dispatch(nullptr)) {
|
||||
NS_WARNING("Failed to dispatch a runnable to the worker thread.");
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_ALWAYS_TRUE(runnable->Dispatch(nullptr));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1419,7 +1415,7 @@ BackgroundFactoryRequestChild::RecvPermissionChallenge(
|
||||
JSContext* cx = workerPrivate->GetJSContext();
|
||||
MOZ_ASSERT(cx);
|
||||
|
||||
if (!workerPrivate->AddFeature(cx, challenge)) {
|
||||
if (NS_WARN_IF(!workerPrivate->AddFeature(cx, challenge))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1441,7 +1437,9 @@ BackgroundFactoryRequestChild::RecvPermissionChallenge(
|
||||
nsCOMPtr<Element> ownerElement =
|
||||
do_QueryInterface(window->GetChromeEventHandler());
|
||||
if (NS_WARN_IF(!ownerElement)) {
|
||||
return false;
|
||||
// If this fails, the page was navigated. Fail the permission check by
|
||||
// forcing an immediate retry.
|
||||
return SendPermissionRetry();
|
||||
}
|
||||
|
||||
RefPtr<PermissionRequestMainProcessHelper> helper =
|
||||
|
||||
@@ -133,10 +133,8 @@ IDBFactory::CreateForWindow(nsPIDOMWindow* aWindow,
|
||||
|
||||
if (!(NS_SUCCEEDED(rv) && nsContentUtils::IsSystemPrincipal(principal)) &&
|
||||
NS_WARN_IF(!Preferences::GetBool(kPrefIndexedDBEnabled, false))) {
|
||||
// IndexedDB is disabled and the caller is content.
|
||||
NS_WARNING("An attempt to use IndexedDB was made, but it is not enabled.");
|
||||
*aFactory = nullptr;
|
||||
return NS_OK;
|
||||
return NS_ERROR_DOM_INDEXEDDB_NOT_ALLOWED_ERR;
|
||||
}
|
||||
|
||||
if (rv == NS_ERROR_DOM_NOT_SUPPORTED_ERR) {
|
||||
@@ -685,8 +683,6 @@ IDBFactory::OpenInternal(nsIPrincipal* aPrincipal,
|
||||
}
|
||||
|
||||
if (!mBackgroundActor && mPendingRequests.IsEmpty()) {
|
||||
// We need to start the sequence to create a background actor for this
|
||||
// thread.
|
||||
BackgroundChildImpl::ThreadLocal* threadLocal =
|
||||
BackgroundChildImpl::GetThreadLocalForCurrentThread();
|
||||
|
||||
@@ -706,12 +702,18 @@ IDBFactory::OpenInternal(nsIPrincipal* aPrincipal,
|
||||
newIDBThreadLocal = idbThreadLocal = new ThreadLocal(id);
|
||||
}
|
||||
|
||||
RefPtr<BackgroundCreateCallback> cb =
|
||||
new BackgroundCreateCallback(this, idbThreadLocal->GetLoggingInfo());
|
||||
if (NS_WARN_IF(!BackgroundChild::GetOrCreateForCurrentThread(cb))) {
|
||||
IDB_REPORT_INTERNAL_ERR();
|
||||
aRv.Throw(NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
|
||||
return nullptr;
|
||||
if (PBackgroundChild* actor = BackgroundChild::GetForCurrentThread()) {
|
||||
BackgroundActorCreated(actor, idbThreadLocal->GetLoggingInfo());
|
||||
} else {
|
||||
// We need to start the sequence to create a background actor for this
|
||||
// thread.
|
||||
RefPtr<BackgroundCreateCallback> cb =
|
||||
new BackgroundCreateCallback(this, idbThreadLocal->GetLoggingInfo());
|
||||
if (NS_WARN_IF(!BackgroundChild::GetOrCreateForCurrentThread(cb))) {
|
||||
IDB_REPORT_INTERNAL_ERR();
|
||||
aRv.Throw(NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
if (newIDBThreadLocal) {
|
||||
|
||||
@@ -30,7 +30,6 @@ EXPORTS += [
|
||||
'nsPluginLogging.h',
|
||||
'nsPluginNativeWindow.h',
|
||||
'nsPluginNativeWindowGtk.h',
|
||||
'nsPluginPlayPreviewInfo.h',
|
||||
'nsPluginsCID.h',
|
||||
'nsPluginsDir.h',
|
||||
'nsPluginTags.h',
|
||||
@@ -46,7 +45,6 @@ UNIFIED_SOURCES += [
|
||||
'nsNPAPIPluginStreamListener.cpp',
|
||||
'nsPluginInstanceOwner.cpp',
|
||||
'nsPluginModule.cpp',
|
||||
'nsPluginPlayPreviewInfo.cpp',
|
||||
'nsPluginStreamListenerPeer.cpp',
|
||||
'nsPluginTags.cpp',
|
||||
'PluginPRLibrary.cpp',
|
||||
|
||||
@@ -12,22 +12,7 @@
|
||||
"@mozilla.org/plugin/host;1"
|
||||
%}
|
||||
|
||||
[scriptable, uuid(57069ada-2845-46ef-b57f-233596d1c02c)]
|
||||
interface nsIPluginPlayPreviewInfo : nsISupports
|
||||
{
|
||||
readonly attribute AUTF8String mimeType;
|
||||
readonly attribute boolean ignoreCTP;
|
||||
readonly attribute AUTF8String redirectURL;
|
||||
readonly attribute AUTF8String whitelist;
|
||||
|
||||
/**
|
||||
* Checks if pageURI and objectURI matches once of the entries in
|
||||
* the whitelist. If whitelist is empty, returns true.
|
||||
*/
|
||||
boolean checkWhitelist(in AUTF8String pageURI, in AUTF8String objectURI);
|
||||
};
|
||||
|
||||
[scriptable, uuid(50677599-323f-4c7d-a450-307bdb7acbf0)]
|
||||
[scriptable, uuid(f938f5ba-7093-42cd-a559-af8039d99204)]
|
||||
interface nsIPluginHost : nsISupports
|
||||
{
|
||||
/**
|
||||
@@ -92,27 +77,6 @@ interface nsIPluginHost : nsISupports
|
||||
*/
|
||||
boolean siteHasData(in nsIPluginTag plugin, in AUTF8String domain);
|
||||
|
||||
/**
|
||||
* Registers the play preview plugin mode for specific mime type
|
||||
*
|
||||
* @param mimeType: specifies plugin mime type.
|
||||
* @param ignoreCTP: if true, the play preview ignores CTP rules, e.g.
|
||||
whitelisted websites, will not notify about plugin
|
||||
presence in the address bar.
|
||||
* @param redirectURL: specifies url for the overlay iframe
|
||||
* @param whitelist: specifies plugin whitelist in form of comma separated
|
||||
* "[@page_url object_url|@page_url|object_url]" entries,
|
||||
* e.g. @http://example.org/* http://example.org/t.swf
|
||||
*/
|
||||
void registerPlayPreviewMimeType(in AUTF8String mimeType,
|
||||
[optional] in boolean ignoreCTP,
|
||||
[optional] in AUTF8String redirectURL,
|
||||
[optional] in AUTF8String whitelist);
|
||||
|
||||
void unregisterPlayPreviewMimeType(in AUTF8String mimeType);
|
||||
|
||||
nsIPluginPlayPreviewInfo getPlayPreviewInfo(in AUTF8String mimeType);
|
||||
|
||||
/**
|
||||
* Get the "permission string" for the plugin. This is a string that can be
|
||||
* passed to the permission manager to see whether the plugin is allowed to
|
||||
@@ -183,10 +147,4 @@ interface nsIPluginHost : nsISupports
|
||||
* passed in the FakePluginTagInit when registering.
|
||||
*/
|
||||
void unregisterFakePlugin(in AUTF8String handlerURI);
|
||||
|
||||
/**
|
||||
* Returns true if plugins with the given mimetype will run out of process.
|
||||
*/
|
||||
boolean isPluginOOP(in AUTF8String aMimeType);
|
||||
};
|
||||
|
||||
|
||||
@@ -109,6 +109,10 @@
|
||||
#define LOG(args...) __android_log_print(ANDROID_LOG_INFO, "GeckoPlugins" , ## args)
|
||||
#endif
|
||||
|
||||
#if MOZ_CRASHREPORTER
|
||||
#include "nsExceptionHandler.h"
|
||||
#endif
|
||||
|
||||
#include "npapi.h"
|
||||
|
||||
using namespace mozilla;
|
||||
@@ -245,6 +249,11 @@ IsTypeInList(const nsCString& aMimeType, nsCString aTypeList)
|
||||
commaSeparated += aMimeType;
|
||||
commaSeparated.Append(',');
|
||||
|
||||
// Lower-case the search string and MIME type to properly handle a mixed-case
|
||||
// type, as MIME types are case insensitive.
|
||||
ToLowerCase(searchStr);
|
||||
ToLowerCase(commaSeparated);
|
||||
|
||||
return FindInReadable(commaSeparated, start, end);
|
||||
}
|
||||
|
||||
@@ -968,6 +977,12 @@ nsPluginHost::TrySetUpPluginInstance(const nsACString &aMimeType,
|
||||
|
||||
plugin->GetLibrary()->SetHasLocalInstance();
|
||||
|
||||
#if defined(MOZ_WIDGET_ANDROID) && defined(MOZ_CRASHREPORTER)
|
||||
if (pluginTag->mIsFlashPlugin) {
|
||||
CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("FlashVersion"), pluginTag->Version());
|
||||
}
|
||||
#endif
|
||||
|
||||
RefPtr<nsNPAPIPluginInstance> instance = new nsNPAPIPluginInstance();
|
||||
|
||||
// This will create the owning reference. The connection must be made between the
|
||||
@@ -1082,18 +1097,6 @@ nsPluginHost::GetBlocklistStateForType(const nsACString &aMimeType,
|
||||
return tag->GetBlocklistState(aState);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPluginHost::IsPluginOOP(const nsACString& aMimeType,
|
||||
bool* aResult)
|
||||
{
|
||||
nsPluginTag* tag = FindNativePluginForType(aMimeType, true);
|
||||
if (!tag) {
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
*aResult = nsNPAPIPlugin::RunPluginOOP(tag);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPluginHost::GetPermissionStringForType(const nsACString &aMimeType,
|
||||
uint32_t aExcludeFlags,
|
||||
@@ -1372,6 +1375,13 @@ nsPluginHost::GetPluginForContentProcess(uint32_t aPluginId, nsNPAPIPlugin** aPl
|
||||
|
||||
nsPluginTag* pluginTag = PluginWithId(aPluginId);
|
||||
if (pluginTag) {
|
||||
// When setting up a bridge, double check with chrome to see if this plugin
|
||||
// is blocked hard. Note this does not protect against vulnerable plugins
|
||||
// that the user has explicitly allowed. :(
|
||||
if (pluginTag->IsBlocklisted()) {
|
||||
return NS_ERROR_PLUGIN_BLOCKLISTED;
|
||||
}
|
||||
|
||||
nsresult rv = EnsurePluginLoaded(pluginTag);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
@@ -1610,58 +1620,6 @@ nsPluginHost::UnregisterFakePlugin(const nsACString& aHandlerURI)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPluginHost::RegisterPlayPreviewMimeType(const nsACString& mimeType,
|
||||
bool ignoreCTP,
|
||||
const nsACString& redirectURL,
|
||||
const nsACString& whitelist)
|
||||
{
|
||||
nsAutoCString mt(mimeType);
|
||||
nsAutoCString url(redirectURL);
|
||||
if (url.Length() == 0) {
|
||||
// using default play preview iframe URL, if redirectURL is not specified
|
||||
url.AssignLiteral("data:application/x-moz-playpreview;,");
|
||||
url.Append(mimeType);
|
||||
}
|
||||
nsAutoCString wl(whitelist);
|
||||
|
||||
RefPtr<nsPluginPlayPreviewInfo> playPreview =
|
||||
new nsPluginPlayPreviewInfo(mt.get(), ignoreCTP, url.get(), wl.get());
|
||||
mPlayPreviewMimeTypes.AppendElement(playPreview);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPluginHost::UnregisterPlayPreviewMimeType(const nsACString& mimeType)
|
||||
{
|
||||
nsAutoCString mimeTypeToRemove(mimeType);
|
||||
for (uint32_t i = mPlayPreviewMimeTypes.Length(); i > 0; i--) {
|
||||
RefPtr<nsPluginPlayPreviewInfo> pp = mPlayPreviewMimeTypes[i - 1];
|
||||
if (PL_strcasecmp(pp.get()->mMimeType.get(), mimeTypeToRemove.get()) == 0) {
|
||||
mPlayPreviewMimeTypes.RemoveElementAt(i - 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPluginHost::GetPlayPreviewInfo(const nsACString& mimeType,
|
||||
nsIPluginPlayPreviewInfo** aResult)
|
||||
{
|
||||
nsAutoCString mimeTypeToFind(mimeType);
|
||||
for (uint32_t i = 0; i < mPlayPreviewMimeTypes.Length(); i++) {
|
||||
RefPtr<nsPluginPlayPreviewInfo> pp = mPlayPreviewMimeTypes[i];
|
||||
if (PL_strcasecmp(pp.get()->mMimeType.get(), mimeTypeToFind.get()) == 0) {
|
||||
*aResult = new nsPluginPlayPreviewInfo(pp.get());
|
||||
NS_ADDREF(*aResult);
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
*aResult = nullptr;
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
// FIXME-jsplugins Is this method actually needed?
|
||||
NS_IMETHODIMP
|
||||
nsPluginHost::GetFakePlugin(const nsACString & aMimeType,
|
||||
@@ -1798,7 +1756,8 @@ nsPluginHost::GetSpecialType(const nsACString & aMIMEType)
|
||||
}
|
||||
|
||||
if (aMIMEType.LowerCaseEqualsASCII("application/x-shockwave-flash") ||
|
||||
aMIMEType.LowerCaseEqualsASCII("application/futuresplash")) {
|
||||
aMIMEType.LowerCaseEqualsASCII("application/futuresplash") ||
|
||||
aMIMEType.LowerCaseEqualsASCII("application/x-shockwave-flash-test")) {
|
||||
return eSpecialType_Flash;
|
||||
}
|
||||
|
||||
@@ -1984,13 +1943,19 @@ bool
|
||||
nsPluginHost::ShouldAddPlugin(nsPluginTag* aPluginTag)
|
||||
{
|
||||
#if 0 && defined(XP_WIN) && (defined(__x86_64__) || defined(_M_X64))
|
||||
// On 64-bit windows, the only plugin we should load is flash. Use library
|
||||
// filename and MIME type to check.
|
||||
// On 64-bit windows, the only plugins we should load are flash and
|
||||
// silverlight. Use library filename and MIME type to check.
|
||||
if (StringBeginsWith(aPluginTag->FileName(), NS_LITERAL_CSTRING("NPSWF"), nsCaseInsensitiveCStringComparator()) &&
|
||||
(aPluginTag->HasMimeType(NS_LITERAL_CSTRING("application/x-shockwave-flash")) ||
|
||||
aPluginTag->HasMimeType(NS_LITERAL_CSTRING("application/x-shockwave-flash-test")))) {
|
||||
return true;
|
||||
}
|
||||
if (StringBeginsWith(aPluginTag->FileName(), NS_LITERAL_CSTRING("npctrl"), nsCaseInsensitiveCStringComparator()) &&
|
||||
(aPluginTag->HasMimeType(NS_LITERAL_CSTRING("application/x-silverlight-test")) ||
|
||||
aPluginTag->HasMimeType(NS_LITERAL_CSTRING("application/x-silverlight-2")) ||
|
||||
aPluginTag->HasMimeType(NS_LITERAL_CSTRING("application/x-silverlight")))) {
|
||||
return true;
|
||||
}
|
||||
// Accept the test plugin MIME types, so mochitests still work.
|
||||
if (aPluginTag->HasMimeType(NS_LITERAL_CSTRING("application/x-test")) ||
|
||||
aPluginTag->HasMimeType(NS_LITERAL_CSTRING("application/x-Second-Test")) ||
|
||||
@@ -2631,12 +2596,6 @@ nsPluginHost::FindPluginsForContent(uint32_t aPluginEpoch,
|
||||
/// to be more sane and avoid this dance
|
||||
nsPluginTag *tag = static_cast<nsPluginTag *>(basetag.get());
|
||||
|
||||
if (!nsNPAPIPlugin::RunPluginOOP(tag)) {
|
||||
// Don't expose non-OOP plugins to content processes since we have no way
|
||||
// to bridge them over.
|
||||
continue;
|
||||
}
|
||||
|
||||
aPlugins->AppendElement(PluginTag(tag->mId,
|
||||
tag->Name(),
|
||||
tag->Description(),
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
#include "prlink.h"
|
||||
#include "prclist.h"
|
||||
#include "nsIPluginTag.h"
|
||||
#include "nsPluginPlayPreviewInfo.h"
|
||||
#include "nsPluginsDir.h"
|
||||
#include "nsPluginDirServiceProvider.h"
|
||||
#include "nsAutoPtr.h"
|
||||
@@ -373,7 +372,6 @@ private:
|
||||
RefPtr<nsPluginTag> mPlugins;
|
||||
RefPtr<nsPluginTag> mCachedPlugins;
|
||||
RefPtr<nsInvalidPluginTag> mInvalidPlugins;
|
||||
nsTArray< RefPtr<nsPluginPlayPreviewInfo> > mPlayPreviewMimeTypes;
|
||||
|
||||
nsTArray< RefPtr<nsFakePluginTag> > mFakePlugins;
|
||||
|
||||
|
||||
@@ -1,154 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsPluginPlayPreviewInfo.h"
|
||||
#include "nsWildCard.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
nsPluginPlayPreviewInfo::nsPluginPlayPreviewInfo(const char* aMimeType,
|
||||
bool aIgnoreCTP,
|
||||
const char* aRedirectURL,
|
||||
const char* aWhitelist)
|
||||
: mMimeType(aMimeType), mIgnoreCTP(aIgnoreCTP), mRedirectURL(aRedirectURL),
|
||||
mWhitelist(aWhitelist) {}
|
||||
|
||||
nsPluginPlayPreviewInfo::nsPluginPlayPreviewInfo(
|
||||
const nsPluginPlayPreviewInfo* aSource)
|
||||
{
|
||||
MOZ_ASSERT(aSource);
|
||||
|
||||
mMimeType = aSource->mMimeType;
|
||||
mIgnoreCTP = aSource->mIgnoreCTP;
|
||||
mRedirectURL = aSource->mRedirectURL;
|
||||
mWhitelist = aSource->mWhitelist;
|
||||
}
|
||||
|
||||
nsPluginPlayPreviewInfo::~nsPluginPlayPreviewInfo()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsPluginPlayPreviewInfo, nsIPluginPlayPreviewInfo)
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPluginPlayPreviewInfo::GetMimeType(nsACString& aMimeType)
|
||||
{
|
||||
aMimeType = mMimeType;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPluginPlayPreviewInfo::GetIgnoreCTP(bool* aIgnoreCTP)
|
||||
{
|
||||
*aIgnoreCTP = mIgnoreCTP;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPluginPlayPreviewInfo::GetRedirectURL(nsACString& aRedirectURL)
|
||||
{
|
||||
aRedirectURL = mRedirectURL;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPluginPlayPreviewInfo::GetWhitelist(nsACString& aWhitelist)
|
||||
{
|
||||
aWhitelist = mWhitelist;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* static */ nsresult
|
||||
nsPluginPlayPreviewInfo::CheckWhitelist(const nsACString& aPageURI,
|
||||
const nsACString& aObjectURI,
|
||||
const nsACString& aWhitelist,
|
||||
bool *_retval)
|
||||
{
|
||||
if (aWhitelist.Length() == 0) {
|
||||
// Considering empty whitelist as '*' entry.
|
||||
*_retval = true;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Parses whitelist as comma separated entries of
|
||||
// [@page_url object_url|@page_url|object_url]
|
||||
// where page_url and object_url pattern matches for aPageURI
|
||||
// and aObjectURI, and performs matching as the same time.
|
||||
nsACString::const_iterator start, end;
|
||||
aWhitelist.BeginReading(start);
|
||||
aWhitelist.EndReading(end);
|
||||
|
||||
nsAutoCString pageURI(aPageURI);
|
||||
nsAutoCString objectURI(aObjectURI);
|
||||
nsACString::const_iterator pos = start, entryStart, entryEnd;
|
||||
nsACString::const_iterator pagePatternStart, pagePatternEnd;
|
||||
nsACString::const_iterator objectPatternStart, objectPatternEnd;
|
||||
int matchResult;
|
||||
bool matched, didMatching;
|
||||
while (pos != end) {
|
||||
matched = true;
|
||||
didMatching = false;
|
||||
entryStart = pos;
|
||||
// Looking for end of the entry.
|
||||
while (pos != end && *pos != ',') {
|
||||
pos++;
|
||||
}
|
||||
entryEnd = pos;
|
||||
if (entryStart != entryEnd && *entryStart == '@') {
|
||||
// Pattern for aPageURL is found, finding a space or end of the entry.
|
||||
pagePatternStart = entryStart;
|
||||
pagePatternStart++;
|
||||
pagePatternEnd = pagePatternStart;
|
||||
while (pagePatternEnd != entryEnd && *pagePatternEnd != ' ') {
|
||||
pagePatternEnd++;
|
||||
}
|
||||
nsAutoCString pagePattern(Substring(pagePatternStart, pagePatternEnd));
|
||||
matchResult = NS_WildCardMatch(pageURI.get(), pagePattern.get(), true);
|
||||
matched &= matchResult == MATCH;
|
||||
didMatching = true;
|
||||
objectPatternStart = pagePatternEnd;
|
||||
} else {
|
||||
objectPatternStart = entryStart;
|
||||
}
|
||||
while (objectPatternStart != entryEnd && *objectPatternStart == ' ') {
|
||||
objectPatternStart++;
|
||||
}
|
||||
if (objectPatternStart != entryEnd) {
|
||||
// Pattern for aObjectURL is found, removing trailing spaces.
|
||||
objectPatternEnd = entryEnd;
|
||||
--objectPatternEnd;
|
||||
while (objectPatternStart != objectPatternEnd &&
|
||||
*objectPatternEnd == ' ') {
|
||||
objectPatternEnd--;
|
||||
};
|
||||
objectPatternEnd++;
|
||||
nsAutoCString objectPattern(Substring(objectPatternStart,
|
||||
objectPatternEnd));
|
||||
matchResult = NS_WildCardMatch(objectURI.get(), objectPattern.get(), true);
|
||||
matched &= matchResult == MATCH;
|
||||
didMatching = true;
|
||||
}
|
||||
// Ignoring match result for empty entries.
|
||||
if (didMatching && matched) {
|
||||
*_retval = true;
|
||||
return NS_OK;
|
||||
}
|
||||
if (pos == end) {
|
||||
break;
|
||||
}
|
||||
pos++;
|
||||
}
|
||||
|
||||
*_retval = false;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPluginPlayPreviewInfo::CheckWhitelist(const nsACString& aPageURI,
|
||||
const nsACString& aObjectURI,
|
||||
bool *_retval)
|
||||
{
|
||||
return CheckWhitelist(aPageURI, aObjectURI, mWhitelist, _retval);
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef nsPluginPlayPreviewInfo_h_
|
||||
#define nsPluginPlayPreviewInfo_h_
|
||||
|
||||
#include "nsString.h"
|
||||
#include "nsIPluginHost.h"
|
||||
|
||||
class nsPluginPlayPreviewInfo : public nsIPluginPlayPreviewInfo
|
||||
{
|
||||
virtual ~nsPluginPlayPreviewInfo();
|
||||
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIPLUGINPLAYPREVIEWINFO
|
||||
|
||||
nsPluginPlayPreviewInfo(const char* aMimeType,
|
||||
bool aIgnoreCTP,
|
||||
const char* aRedirectURL,
|
||||
const char* aWhitelist);
|
||||
explicit nsPluginPlayPreviewInfo(const nsPluginPlayPreviewInfo* aSource);
|
||||
|
||||
/** This function checks aPageURI and aObjectURI against the whitelist
|
||||
* specified in aWhitelist. This is public static function because this
|
||||
* whitelist checking code needs to be accessed without any instances of
|
||||
* nsIPluginPlayPreviewInfo. In particular, the Shumway whitelist is
|
||||
* obtained directly from prefs and compared using this code for telemetry
|
||||
* purposes.
|
||||
*/
|
||||
static nsresult CheckWhitelist(const nsACString& aPageURI,
|
||||
const nsACString& aObjectURI,
|
||||
const nsACString& aWhitelist,
|
||||
bool *_retval);
|
||||
|
||||
nsCString mMimeType;
|
||||
bool mIgnoreCTP;
|
||||
nsCString mRedirectURL;
|
||||
nsCString mWhitelist;
|
||||
};
|
||||
|
||||
|
||||
#endif // nsPluginPlayPreviewInfo_h_
|
||||
@@ -178,26 +178,7 @@ PluginInstanceParent::InitMetadata(const nsACString& aMimeType,
|
||||
return false;
|
||||
}
|
||||
nsCOMPtr<nsIURI> baseUri(owner->GetBaseURI());
|
||||
nsresult rv = NS_MakeAbsoluteURI(mSrcAttribute, aSrcAttribute, baseUri);
|
||||
if (NS_FAILED(rv)) {
|
||||
return false;
|
||||
}
|
||||
// Check the whitelist
|
||||
nsAutoCString baseUrlSpec;
|
||||
rv = baseUri->GetSpec(baseUrlSpec);
|
||||
if (NS_FAILED(rv)) {
|
||||
return false;
|
||||
}
|
||||
auto whitelist = Preferences::GetCString(kShumwayWhitelistPref);
|
||||
// Empty whitelist is interpreted by CheckWhitelist as "allow everything,"
|
||||
// which is not valid for our use case and should be treated as a failure.
|
||||
if (whitelist.IsEmpty()) {
|
||||
return false;
|
||||
}
|
||||
rv = nsPluginPlayPreviewInfo::CheckWhitelist(baseUrlSpec, mSrcAttribute,
|
||||
whitelist,
|
||||
&mIsWhitelistedForShumway);
|
||||
return NS_SUCCEEDED(rv);
|
||||
return NS_SUCCEEDED(NS_MakeAbsoluteURI(mSrcAttribute, aSrcAttribute, baseUri));
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -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]
|
||||
@@ -106,9 +106,13 @@ skip-if = e10s
|
||||
[test_twostreams.html]
|
||||
[test_windowed_invalidate.html]
|
||||
skip-if = os != "win"
|
||||
[test_windowless_flash.html]
|
||||
skip-if = !(os == "win" && processor == "x86_64")
|
||||
[test_windowless_ime.html]
|
||||
skip-if = os != "win"
|
||||
[test_visibility.html]
|
||||
skip-if = toolkit == "cocoa"
|
||||
[test_zero_opacity.html]
|
||||
skip-if = e10s
|
||||
[test_bug1165981.html]
|
||||
skip-if = !(os == "win" && processor == "x86_64")
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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()">
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Bug 1165981 Test</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 onload="run()">
|
||||
<script class="testbody" type="application/javascript">
|
||||
"use strict";
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
ok(SpecialPowers.setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED, "Flash Test Plug-in"), "Should find allowed test flash plugin");
|
||||
ok(SpecialPowers.setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED, "Silverlight Test Plug-in"), "Should find allowed test silverlight plugin");
|
||||
ok(!SpecialPowers.setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED, "Third Test Plug-in"), "Should not find disallowed plugin");
|
||||
|
||||
function findPlugin(pluginName) {
|
||||
for (var i = 0; i < navigator.plugins.length; i++) {
|
||||
var plugin = navigator.plugins[i];
|
||||
if (plugin.name === pluginName) {
|
||||
return plugin;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function findMimeType(mimeTypeType) {
|
||||
for (var i = 0; i < navigator.mimeTypes.length; i++) {
|
||||
var mimeType = navigator.mimeTypes[i];
|
||||
if (mimeType.type === mimeTypeType) {
|
||||
return mimeType;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function run() {
|
||||
var pluginElement = document.getElementById("plugin-flash");
|
||||
is(pluginElement.identifierToStringTest("foo"), "foo", "Should be able to call a function provided by the plugin");
|
||||
|
||||
pluginElement = document.getElementById("plugin-silverlight");
|
||||
is(pluginElement.identifierToStringTest("foo"), "foo", "Should be able to call a function provided by the plugin");
|
||||
|
||||
pluginElement = document.getElementById("disallowedPlugin");
|
||||
is(typeof pluginElement.identifierToStringTest, "undefined", "Should NOT be able to call a function on a disallowed plugin");
|
||||
|
||||
ok(navigator.plugins["Flash Test Plug-in"], "Should have queried a plugin named 'Flash Test Plug-in'");
|
||||
ok(navigator.plugins["Silverlight Test Plug-in"], "Should have queried a plugin named 'Silverlight Test Plug-in'");
|
||||
ok(!navigator.plugins["Third Test Plug-in"], "Should NOT have queried a disallowed plugin named 'Third Test Plug-in'");
|
||||
|
||||
ok(findPlugin("Flash Test Plug-in"), "Should have found a plugin named 'Flash Test Plug-in'");
|
||||
ok(findPlugin("Silverlight Test Plug-in"), "Should have found a plugin named 'Silverlight Test Plug-in'");
|
||||
ok(!findPlugin("Third Test Plug-in"), "Should NOT found a disallowed plugin named 'Third Test Plug-in'");
|
||||
|
||||
ok(navigator.mimeTypes["application/x-shockwave-flash-test"], "Should have queried a MIME type named 'application/x-shockwave-flash-test'");
|
||||
ok(navigator.mimeTypes["application/x-silverlight-test"], "Should have queried a MIME type named 'application/x-silverlight-test'");
|
||||
ok(!navigator.mimeTypes["application/x-third-test"], "Should NOT have queried a disallowed type named 'application/x-third-test'");
|
||||
|
||||
ok(findMimeType("application/x-shockwave-flash-test"), "Should have found a MIME type named 'application/x-shockwave-flash-test'");
|
||||
ok(findMimeType("application/x-silverlight-test"), "Should have found a MIME type named 'application/x-silverlight-test'");
|
||||
ok(!findMimeType("application/x-third-test"), "Should NOT have found a disallowed MIME type named 'application/x-third-test'");
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
</script>
|
||||
|
||||
<object id="plugin-flash" type="application/x-shockwave-flash-test" width=200 height=200></object>
|
||||
<object id="plugin-silverlight" type="application/x-silverlight-test" width=200 height=200></object>
|
||||
<object id="disallowedPlugin" type="application/x-third-test" width=200 height=200></object>
|
||||
</body>
|
||||
</html>
|
||||
@@ -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">
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<title>NPN_Evaluate 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_Invoke 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_Invoke_Default 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>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
</head>
|
||||
<body onload="initialize()">
|
||||
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
<script type="application/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SimpleTest.requestFlakyTimeout("untriaged");
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<title>Test that scrolling a windowless plugin doesn't force us to repaint it</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 type="text/javascript">
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
</script>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<title>Test Modifying Plugin click-to-play Flag</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 class="testbody" type="application/javascript">
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript"
|
||||
src="pluginstream.js"></script>
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
<script type="text/javascript" src="plugin-utils.js"></script>
|
||||
<script type="text/javascript">
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
</script>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript"
|
||||
src="pluginstream.js"></script>
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
<script type="text/javascript" src="plugin-utils.js"></script>
|
||||
<script type="text/javascript">
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
</script>
|
||||
|
||||
@@ -9,7 +9,7 @@ Tests for plugin stream error conditions.
|
||||
<title>NPAPI Stream Error 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>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript"
|
||||
src="pluginstream.js"></script>
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
<script type="text/javascript" src="plugin-utils.js"></script>
|
||||
<script type="text/javascript">
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
</script>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript"
|
||||
src="pluginstream.js"></script>
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
<script type="text/javascript" src="plugin-utils.js"></script>
|
||||
<script type="text/javascript">
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
</script>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript"
|
||||
src="pluginstream.js"></script>
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
<script type="text/javascript" src="plugin-utils.js"></script>
|
||||
<script type="text/javascript">
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
</script>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript"
|
||||
src="pluginstream.js"></script>
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
<script type="text/javascript" src="plugin-utils.js"></script>
|
||||
<script type="text/javascript">
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
</script>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript"
|
||||
src="pluginstream.js"></script>
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
<script type="text/javascript" src="plugin-utils.js"></script>
|
||||
<script type="text/javascript">
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
</script>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<title>Do plugin stream requests send the Referer header correctly?</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" />
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript"
|
||||
src="pluginstream.js"></script>
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
<script type="text/javascript" src="plugin-utils.js"></script>
|
||||
<script type="text/javascript">
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
</script>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<title>NPAPI Seekable NPStream 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" />
|
||||
<script>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript"
|
||||
src="pluginstream.js"></script>
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
<script type="text/javascript" src="plugin-utils.js"></script>
|
||||
<script type="text/javascript">
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
</script>
|
||||
|
||||
@@ -1,43 +1,43 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>NPAPI src="" NPStream Test</title>
|
||||
<script type="text/javascript"
|
||||
src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript"
|
||||
src="pluginstream.js"></script>
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
<script type="text/javascript">
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
</script>
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
<p id="display"></p>
|
||||
|
||||
<iframe id="testframe" name="testframe" onload="frameLoaded()"></iframe>
|
||||
|
||||
<!--
|
||||
- A stream is sent to the browser via NPP_NewStream, NP_NORMAL.
|
||||
- The plugin reports that data can only be sent to it in 100-byte
|
||||
- chunks. When NPP_DestroyStream is called, the plugin sends the stream
|
||||
- content back to the browser by passing it as a data: url to
|
||||
- NPN_GetURL, using a frame, so that the stream content should
|
||||
- be displayed in the frame in the browser.
|
||||
-
|
||||
- We create the object element dynamically, which in some cases has caused us to deliver the data=""
|
||||
- stream twice. This verifies that we only deliver the data="" stream once.
|
||||
-->
|
||||
|
||||
<script type="text/javascript">
|
||||
var e = document.createElement('object');
|
||||
e.setAttribute('data', 'loremipsum.xtest');
|
||||
e.setAttribute('type', 'application/x-test');
|
||||
e.setAttribute('streammode', 'normal');
|
||||
e.setAttribute('streamchunksize', '100');
|
||||
e.setAttribute('frame', 'testframe');
|
||||
e.setAttribute('style', 'width: 400px; height: 100px;');
|
||||
document.body.appendChild(e);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
<html>
|
||||
<head>
|
||||
<title>NPAPI src="" NPStream Test</title>
|
||||
<script type="text/javascript"
|
||||
src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript"
|
||||
src="pluginstream.js"></script>
|
||||
<script type="text/javascript" src="plugin-utils.js"></script>
|
||||
<script type="text/javascript">
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
</script>
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
<p id="display"></p>
|
||||
|
||||
<iframe id="testframe" name="testframe" onload="frameLoaded()"></iframe>
|
||||
|
||||
<!--
|
||||
- A stream is sent to the browser via NPP_NewStream, NP_NORMAL.
|
||||
- The plugin reports that data can only be sent to it in 100-byte
|
||||
- chunks. When NPP_DestroyStream is called, the plugin sends the stream
|
||||
- content back to the browser by passing it as a data: url to
|
||||
- NPN_GetURL, using a frame, so that the stream content should
|
||||
- be displayed in the frame in the browser.
|
||||
-
|
||||
- We create the object element dynamically, which in some cases has caused us to deliver the data=""
|
||||
- stream twice. This verifies that we only deliver the data="" stream once.
|
||||
-->
|
||||
|
||||
<script type="text/javascript">
|
||||
var e = document.createElement('object');
|
||||
e.setAttribute('data', 'loremipsum.xtest');
|
||||
e.setAttribute('type', 'application/x-test');
|
||||
e.setAttribute('streammode', 'normal');
|
||||
e.setAttribute('streamchunksize', '100');
|
||||
e.setAttribute('frame', 'testframe');
|
||||
e.setAttribute('style', 'width: 400px; height: 100px;');
|
||||
document.body.appendChild(e);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<title>Do plugin stream src requests send the Referer header correctly?</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" />
|
||||
|
||||
|
||||
@@ -1,56 +1,56 @@
|
||||
<!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" />
|
||||
|
||||
<style type="text/css">
|
||||
body {
|
||||
height: 10000px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<body onload="startTest()">
|
||||
<p id="display"></p>
|
||||
|
||||
<script type="application/javascript;version=1.8">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
|
||||
var p = null;
|
||||
|
||||
function startTest() {
|
||||
p = document.getElementById('theplugin');
|
||||
|
||||
// Wait for the plugin to have painted once
|
||||
var interval = setInterval(function() {
|
||||
if (!p.getPaintCount())
|
||||
return;
|
||||
|
||||
clearInterval(interval);
|
||||
doScroll();
|
||||
}, 100);
|
||||
}
|
||||
|
||||
const kScrollAmount = 1000;
|
||||
var startY;
|
||||
|
||||
function doScroll() {
|
||||
let [x, y, w, h] = p.getWindowPosition();
|
||||
startY = y;
|
||||
|
||||
scrollBy(0, kScrollAmount);
|
||||
setTimeout(checkScroll, 500);
|
||||
}
|
||||
|
||||
function checkScroll() {
|
||||
let [x, y, w, h] = p.getWindowPosition();
|
||||
|
||||
is(y, startY - kScrollAmount, "Window should be informed of its new position.");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
</script>
|
||||
|
||||
<embed id="theplugin" type="application/x-test" width="200" height="200"></embed>
|
||||
<!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" />
|
||||
|
||||
<style type="text/css">
|
||||
body {
|
||||
height: 10000px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<body onload="startTest()">
|
||||
<p id="display"></p>
|
||||
|
||||
<script type="application/javascript;version=1.8">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
|
||||
var p = null;
|
||||
|
||||
function startTest() {
|
||||
p = document.getElementById('theplugin');
|
||||
|
||||
// Wait for the plugin to have painted once
|
||||
var interval = setInterval(function() {
|
||||
if (!p.getPaintCount())
|
||||
return;
|
||||
|
||||
clearInterval(interval);
|
||||
doScroll();
|
||||
}, 100);
|
||||
}
|
||||
|
||||
const kScrollAmount = 1000;
|
||||
var startY;
|
||||
|
||||
function doScroll() {
|
||||
let [x, y, w, h] = p.getWindowPosition();
|
||||
startY = y;
|
||||
|
||||
scrollBy(0, kScrollAmount);
|
||||
setTimeout(checkScroll, 500);
|
||||
}
|
||||
|
||||
function checkScroll() {
|
||||
let [x, y, w, h] = p.getWindowPosition();
|
||||
|
||||
is(y, startY - kScrollAmount, "Window should be informed of its new position.");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
</script>
|
||||
|
||||
<embed id="theplugin" type="application/x-test" width="200" height="200"></embed>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/chrome-harness.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>NPObject with property and method with the same name</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>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<head>
|
||||
<title>NPAPI NPNVcontentsScaleFactor Test</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()">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<head>
|
||||
<title>Basic NPAPI Redirect Handling</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">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<title>Test Refreshing navigator.plugins (bug 820708)</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 class="testbody" type="application/javascript">
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<title>Second Test Plug-in 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>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<title>Test changing src attribute</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="runTests()">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<head>
|
||||
<title>NPN_Get/PostURLNotify 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">
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<title>Stream open at NPP_Destroy</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">
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<head>
|
||||
<title>NPAPI string test</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" />
|
||||
|
||||
@@ -1,46 +1,46 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Dual NPAPI NP_ASFILEONLY NPStream Test</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 type="text/javascript">
|
||||
SimpleTest.expectAssertions(0, 2);
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
|
||||
var framesToLoad = 2;
|
||||
function frameLoaded(id) {
|
||||
var frame = document.getElementById('testframe' + id);
|
||||
if (!frame.contentDocument.body.innerHTML.length)
|
||||
return;
|
||||
|
||||
--framesToLoad;
|
||||
if (0 == framesToLoad) {
|
||||
is(document.getElementById('testframe1').contentDocument.body.innerHTML,
|
||||
document.getElementById('testframe2').contentDocument.body.innerHTML,
|
||||
"Frame contents should match");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<iframe id="testframe1" name="testframe1" onload="frameLoaded(1)"></iframe>
|
||||
<iframe id="testframe2" name="testframe2" onload="frameLoaded(2)"></iframe>
|
||||
|
||||
<embed src="loremipsum_nocache.txt" streammode="asfileonly"
|
||||
frame="testframe1"
|
||||
id="embedtest" style="width: 400px; height: 100px;"
|
||||
type="application/x-test"></embed>
|
||||
<embed src="loremipsum_nocache.txt" streammode="asfileonly"
|
||||
frame="testframe2"
|
||||
id="embedtest2" style="width: 400px; height: 100px;"
|
||||
type="application/x-test"></embed>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Dual NPAPI NP_ASFILEONLY NPStream Test</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 type="text/javascript">
|
||||
SimpleTest.expectAssertions(0, 2);
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
|
||||
var framesToLoad = 2;
|
||||
function frameLoaded(id) {
|
||||
var frame = document.getElementById('testframe' + id);
|
||||
if (!frame.contentDocument.body.innerHTML.length)
|
||||
return;
|
||||
|
||||
--framesToLoad;
|
||||
if (0 == framesToLoad) {
|
||||
is(document.getElementById('testframe1').contentDocument.body.innerHTML,
|
||||
document.getElementById('testframe2').contentDocument.body.innerHTML,
|
||||
"Frame contents should match");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<iframe id="testframe1" name="testframe1" onload="frameLoaded(1)"></iframe>
|
||||
<iframe id="testframe2" name="testframe2" onload="frameLoaded(2)"></iframe>
|
||||
|
||||
<embed src="loremipsum_nocache.txt" streammode="asfileonly"
|
||||
frame="testframe1"
|
||||
id="embedtest" style="width: 400px; height: 100px;"
|
||||
type="application/x-test"></embed>
|
||||
<embed src="loremipsum_nocache.txt" streammode="asfileonly"
|
||||
frame="testframe2"
|
||||
id="embedtest2" style="width: 400px; height: 100px;"
|
||||
type="application/x-test"></embed>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<title>Test NPN_Invalidate working for a windowed 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>
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script type="text/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 type="application/javascript" src="plugin-utils.js"></script>
|
||||
<script type="text/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SpecialPowers.setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
|
||||
function runTests() {
|
||||
var p1 = document.getElementById('plugin1');
|
||||
var p2 = document.getElementById('plugin2');
|
||||
var p3 = document.getElementById('plugin3');
|
||||
is(p1.hasWidget(), false, "Flash is always windowless mode even if wmode=window");
|
||||
is(p2.hasWidget(), false, "Flash is always windowless mode even if wmode=anything");
|
||||
is(p3.hasWidget(), false, "Flash is always windowless mode even if no wmode");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
</script>
|
||||
<p id="display"></p>
|
||||
|
||||
<div id="div1">
|
||||
<embed id="plugin1" type="application/x-shockwave-flash-test" width="200" height="200" wmode="window"></embed>
|
||||
<embed id="plugin2" type="application/x-shockwave-flash-test" width="200" height="200" wmode="test"></embed>
|
||||
<embed id="plugin3" type="application/x-shockwave-flash-test" width="200" height="200"></embed>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -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,24 +1,24 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin/" 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">
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
|
||||
<script type="application/javascript" src="utils.js"></script>
|
||||
|
||||
<script>
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
|
||||
var w = window.open('xulbrowser_plugin_visibility.xul', '_blank', 'chrome,resizable=yes,width=400,height=600');
|
||||
|
||||
function done()
|
||||
{
|
||||
w.close();
|
||||
SimpleTest.finish();
|
||||
}
|
||||
</script>
|
||||
|
||||
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;" />
|
||||
</window>
|
||||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin/" 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">
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
|
||||
<script type="application/javascript" src="plugin-utils.js"></script>
|
||||
|
||||
<script>
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
|
||||
var w = window.open('xulbrowser_plugin_visibility.xul', '_blank', 'chrome,resizable=yes,width=400,height=600');
|
||||
|
||||
function done()
|
||||
{
|
||||
w.close();
|
||||
SimpleTest.finish();
|
||||
}
|
||||
</script>
|
||||
|
||||
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;" />
|
||||
</window>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user