Merge places to mozilla-central.

This commit is contained in:
Shawn Wilsher 2009-07-29 10:16:01 -07:00
Родитель 45fbc1cf20 0067af27eb
Коммит 7fb05d7a7c
515 изменённых файлов: 8916 добавлений и 49130 удалений

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

@ -40,7 +40,7 @@
#include "nsIAccessible.h"
#include "nsAccessibilityAtoms.h"
#include "nsHashtable.h"
#include "nsIAccessibilityService.h"
#include "nsAccessibilityService.h"
#include "nsIAccessibleDocument.h"
#include "nsIDocShell.h"
#include "nsIDocShellTreeItem.h"
@ -82,27 +82,19 @@ nsIStringBundle *nsAccessNode::gStringBundle = 0;
nsIStringBundle *nsAccessNode::gKeyStringBundle = 0;
nsITimer *nsAccessNode::gDoCommandTimer = 0;
nsIDOMNode *nsAccessNode::gLastFocusedNode = 0;
#ifdef DEBUG
PRBool nsAccessNode::gIsAccessibilityActive = PR_FALSE;
PRBool nsAccessNode::gIsShuttingDownApp = PR_FALSE;
#endif
PRBool nsAccessNode::gIsCacheDisabled = PR_FALSE;
PRBool nsAccessNode::gIsFormFillEnabled = PR_FALSE;
nsAccessNodeHashtable nsAccessNode::gGlobalDocAccessibleCache;
nsApplicationAccessibleWrap *nsAccessNode::gApplicationAccessible = nsnull;
nsIAccessibilityService *nsAccessNode::sAccService = nsnull;
nsIAccessibilityService *nsAccessNode::GetAccService()
nsIAccessibilityService*
nsAccessNode::GetAccService()
{
if (!gIsAccessibilityActive)
return nsnull;
if (!sAccService) {
nsresult rv = CallGetService("@mozilla.org/accessibilityService;1",
&sAccService);
NS_ASSERTION(NS_SUCCEEDED(rv), "No accessibility service");
}
return sAccService;
return nsAccessibilityService::GetAccessibilityService();
}
/*
@ -245,9 +237,7 @@ NS_IMETHODIMP nsAccessNode::GetOwnerWindow(void **aWindow)
already_AddRefed<nsApplicationAccessibleWrap>
nsAccessNode::GetApplicationAccessible()
{
if (!gIsAccessibilityActive) {
return nsnull;
}
NS_ASSERTION(gIsAccessibilityActive, "Accessibility wasn't initialized!");
if (!gApplicationAccessible) {
nsApplicationAccessibleWrap::PreCreate();
@ -273,9 +263,8 @@ nsAccessNode::GetApplicationAccessible()
void nsAccessNode::InitXPAccessibility()
{
if (gIsAccessibilityActive) {
return;
}
NS_ASSERTION(!gIsAccessibilityActive,
"Accessibility was initialized already!");
nsCOMPtr<nsIStringBundleService> stringBundleService =
do_GetService(NS_STRINGBUNDLE_CONTRACTID);
@ -297,11 +286,13 @@ void nsAccessNode::InitXPAccessibility()
prefBranch->GetBoolPref("browser.formfill.enable", &gIsFormFillEnabled);
}
#ifdef DEBUG
gIsAccessibilityActive = PR_TRUE;
NotifyA11yInitOrShutdown();
#endif
NotifyA11yInitOrShutdown(PR_TRUE);
}
void nsAccessNode::NotifyA11yInitOrShutdown()
void nsAccessNode::NotifyA11yInitOrShutdown(PRBool aIsInit)
{
nsCOMPtr<nsIObserverService> obsService =
do_GetService("@mozilla.org/observer-service;1");
@ -310,7 +301,7 @@ void nsAccessNode::NotifyA11yInitOrShutdown()
static const PRUnichar kInitIndicator[] = { '1', 0 };
static const PRUnichar kShutdownIndicator[] = { '0', 0 };
obsService->NotifyObservers(nsnull, "a11y-init-or-shutdown",
gIsAccessibilityActive ? kInitIndicator : kShutdownIndicator);
aIsInit ? kInitIndicator : kShutdownIndicator);
}
}
@ -320,16 +311,12 @@ void nsAccessNode::ShutdownXPAccessibility()
// which happens when xpcom is shutting down
// at exit of program
if (!gIsAccessibilityActive) {
return;
}
gIsShuttingDownApp = PR_TRUE;
NS_ASSERTION(gIsAccessibilityActive, "Accessibility was shutdown already!");
NS_IF_RELEASE(gStringBundle);
NS_IF_RELEASE(gKeyStringBundle);
NS_IF_RELEASE(gDoCommandTimer);
NS_IF_RELEASE(gLastFocusedNode);
NS_IF_RELEASE(sAccService);
nsApplicationAccessibleWrap::Unload();
ClearCache(gGlobalDocAccessibleCache);
@ -339,8 +326,10 @@ void nsAccessNode::ShutdownXPAccessibility()
NS_IF_RELEASE(gApplicationAccessible);
gApplicationAccessible = nsnull;
#ifdef DEBUG
gIsAccessibilityActive = PR_FALSE;
NotifyA11yInitOrShutdown();
#endif
NotifyA11yInitOrShutdown(PR_FALSE);
}
PRBool

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

@ -174,21 +174,21 @@ protected:
/**
* Notify global nsIObserver's that a11y is getting init'd or shutdown
*/
static void NotifyA11yInitOrShutdown();
static void NotifyA11yInitOrShutdown(PRBool aIsInit);
// Static data, we do our own refcounting for our static data
static nsIStringBundle *gStringBundle;
static nsIStringBundle *gKeyStringBundle;
static nsITimer *gDoCommandTimer;
#ifdef DEBUG
static PRBool gIsAccessibilityActive;
static PRBool gIsShuttingDownApp;
#endif
static PRBool gIsCacheDisabled;
static PRBool gIsFormFillEnabled;
static nsAccessNodeHashtable gGlobalDocAccessibleCache;
private:
static nsIAccessibilityService *sAccService;
static nsApplicationAccessibleWrap *gApplicationAccessible;
};

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

@ -113,6 +113,7 @@
#endif
nsAccessibilityService *nsAccessibilityService::gAccessibilityService = nsnull;
PRBool nsAccessibilityService::gIsShutdown = PR_TRUE;
/**
* nsAccessibilityService
@ -120,6 +121,7 @@ nsAccessibilityService *nsAccessibilityService::gAccessibilityService = nsnull;
nsAccessibilityService::nsAccessibilityService()
{
// Add observers.
nsCOMPtr<nsIObserverService> observerService =
do_GetService("@mozilla.org/observer-service;1");
if (!observerService)
@ -132,13 +134,15 @@ nsAccessibilityService::nsAccessibilityService()
nsIWebProgress::NOTIFY_STATE_DOCUMENT |
nsIWebProgress::NOTIFY_LOCATION);
}
// Initialize accessibility.
nsAccessNodeWrap::InitAccessibility();
}
nsAccessibilityService::~nsAccessibilityService()
{
nsAccessibilityService::gAccessibilityService = nsnull;
nsAccessNodeWrap::ShutdownAccessibility();
NS_ASSERTION(gIsShutdown, "Accessibility wasn't shutdown!");
gAccessibilityService = nsnull;
}
NS_IMPL_THREADSAFE_ISUPPORTS5(nsAccessibilityService, nsIAccessibilityService, nsIAccessibleRetrieval,
@ -151,6 +155,8 @@ nsAccessibilityService::Observe(nsISupports *aSubject, const char *aTopic,
const PRUnichar *aData)
{
if (!nsCRT::strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) {
// Remove observers.
nsCOMPtr<nsIObserverService> observerService =
do_GetService("@mozilla.org/observer-service;1");
if (observerService) {
@ -159,8 +165,8 @@ nsAccessibilityService::Observe(nsISupports *aSubject, const char *aTopic,
nsCOMPtr<nsIWebProgress> progress(do_GetService(NS_DOCUMENTLOADER_SERVICE_CONTRACTID));
if (progress)
progress->RemoveProgressListener(static_cast<nsIWebProgressListener*>(this));
nsAccessNodeWrap::ShutdownAccessibility();
// Cancel and release load timers
// Cancel and release load timers.
while (mLoadTimers.Count() > 0 ) {
nsCOMPtr<nsITimer> timer = mLoadTimers.ObjectAt(0);
void *closure = nsnull;
@ -172,7 +178,18 @@ nsAccessibilityService::Observe(nsISupports *aSubject, const char *aTopic,
timer->Cancel();
mLoadTimers.RemoveObjectAt(0);
}
// Application is going to be closed, shutdown accessibility and mark
// accessibility service as shutdown to prevent calls of its methods.
// Don't null accessibility service static member at this point to be safe
// if someone will try to operate with it.
NS_ASSERTION(!gIsShutdown, "Accessibility was shutdown already");
gIsShutdown = PR_TRUE;
nsAccessNodeWrap::ShutdownAccessibility();
}
return NS_OK;
}
@ -182,7 +199,8 @@ NS_IMETHODIMP nsAccessibilityService::OnStateChange(nsIWebProgress *aWebProgress
{
NS_ASSERTION(aStateFlags & STATE_IS_DOCUMENT, "Other notifications excluded");
if (!aWebProgress || 0 == (aStateFlags & (STATE_START | STATE_STOP))) {
if (gIsShutdown || !aWebProgress ||
(aStateFlags & (STATE_START | STATE_STOP)) == 0) {
return NS_OK;
}
@ -260,23 +278,26 @@ nsAccessibilityService::FireAccessibleEvent(PRUint32 aEvent,
void nsAccessibilityService::StartLoadCallback(nsITimer *aTimer, void *aClosure)
{
nsIAccessibilityService *accService = nsAccessNode::GetAccService();
if (accService)
accService->ProcessDocLoadEvent(aTimer, aClosure, nsIAccessibleEvent::EVENT_DOCUMENT_LOAD_START);
if (gAccessibilityService)
gAccessibilityService->
ProcessDocLoadEvent(aTimer, aClosure,
nsIAccessibleEvent::EVENT_DOCUMENT_LOAD_START);
}
void nsAccessibilityService::EndLoadCallback(nsITimer *aTimer, void *aClosure)
{
nsIAccessibilityService *accService = nsAccessNode::GetAccService();
if (accService)
accService->ProcessDocLoadEvent(aTimer, aClosure, nsIAccessibleEvent::EVENT_DOCUMENT_LOAD_COMPLETE);
if (gAccessibilityService)
gAccessibilityService->
ProcessDocLoadEvent(aTimer, aClosure,
nsIAccessibleEvent::EVENT_DOCUMENT_LOAD_COMPLETE);
}
void nsAccessibilityService::FailedLoadCallback(nsITimer *aTimer, void *aClosure)
{
nsIAccessibilityService *accService = nsAccessNode::GetAccService();
if (accService)
accService->ProcessDocLoadEvent(aTimer, aClosure, nsIAccessibleEvent::EVENT_DOCUMENT_LOAD_STOPPED);
if (gAccessibilityService)
gAccessibilityService->
ProcessDocLoadEvent(aTimer, aClosure,
nsIAccessibleEvent::EVENT_DOCUMENT_LOAD_STOPPED);
}
/* void onProgressChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long aCurSelfProgress, in long aMaxSelfProgress, in long aCurTotalProgress, in long aMaxTotalProgress); */
@ -1315,7 +1336,7 @@ NS_IMETHODIMP nsAccessibilityService::GetAccessible(nsIDOMNode *aNode,
NS_ENSURE_ARG_POINTER(aAccessible);
NS_ENSURE_ARG_POINTER(aFrameHint);
*aAccessible = nsnull;
if (!aPresShell || !aWeakShell) {
if (!aPresShell || !aWeakShell || gIsShutdown) {
return NS_ERROR_FAILURE;
}
@ -2056,22 +2077,28 @@ NS_IMETHODIMP nsAccessibilityService::InvalidateSubtreeFor(nsIPresShell *aShell,
nsresult
nsAccessibilityService::GetAccessibilityService(nsIAccessibilityService** aResult)
{
NS_PRECONDITION(aResult != nsnull, "null ptr");
if (! aResult)
return NS_ERROR_NULL_POINTER;
NS_ENSURE_TRUE(aResult, NS_ERROR_NULL_POINTER);
*aResult = nsnull;
if (!nsAccessibilityService::gAccessibilityService) {
if (!gAccessibilityService) {
gAccessibilityService = new nsAccessibilityService();
if (!gAccessibilityService ) {
return NS_ERROR_OUT_OF_MEMORY;
}
NS_ENSURE_TRUE(gAccessibilityService, NS_ERROR_OUT_OF_MEMORY);
gIsShutdown = PR_FALSE;
}
*aResult = nsAccessibilityService::gAccessibilityService;
NS_ADDREF(*aResult);
NS_ADDREF(*aResult = gAccessibilityService);
return NS_OK;
}
nsIAccessibilityService*
nsAccessibilityService::GetAccessibilityService()
{
NS_ASSERTION(!gIsShutdown,
"Going to deal with shutdown accessibility service!");
return gAccessibilityService;
}
nsresult
NS_GetAccessibilityService(nsIAccessibilityService** aResult)
{

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

@ -84,6 +84,16 @@ public:
*/
static nsresult GetAccessibilityService(nsIAccessibilityService** aResult);
/**
* Return cached accessibility service.
*/
static nsIAccessibilityService* GetAccessibilityService();
/**
* Indicates whether accessibility service was shutdown.
*/
static PRBool gIsShutdown;
private:
/**
* Return presentation shell, DOM node for the given frame.

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

@ -39,7 +39,7 @@
#include "nsRootAccessible.h"
#include "nsAccessibilityAtoms.h"
#include "nsAccessibleEventData.h"
#include "nsIAccessibilityService.h"
#include "nsAccessibilityService.h"
#include "nsIMutableArray.h"
#include "nsICommandManager.h"
#include "nsIDocShell.h"
@ -670,7 +670,7 @@ nsDocAccessible::Shutdown()
// Remove from the cache after other parts of Shutdown(), so that Shutdown() procedures
// can find the doc or root accessible in the cache if they need it.
// We don't do this during ShutdownAccessibility() because that is already clearing the cache
if (!gIsShuttingDownApp)
if (!nsAccessibilityService::gIsShutdown)
gGlobalDocAccessibleCache.Remove(static_cast<void*>(kungFuDeathGripDoc));
return NS_OK;

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

@ -157,9 +157,12 @@ NS_IMETHODIMP nsRootAccessible::GetParent(nsIAccessible * *aParent)
NS_ENSURE_ARG_POINTER(aParent);
*aParent = nsnull;
nsRefPtr<nsApplicationAccessibleWrap> root = GetApplicationAccessible();
NS_IF_ADDREF(*aParent = root);
if (!mParent) {
nsRefPtr<nsApplicationAccessibleWrap> root = GetApplicationAccessible();
mParent = root;
}
NS_IF_ADDREF(*aParent = mParent);
return NS_OK;
}
@ -956,14 +959,12 @@ void nsRootAccessible::FireFocusCallback(nsITimer *aTimer, void *aClosure)
nsresult
nsRootAccessible::Init()
{
nsresult rv = nsDocAccessibleWrap::Init();
NS_ENSURE_SUCCESS(rv, rv);
nsRefPtr<nsApplicationAccessibleWrap> root = GetApplicationAccessible();
NS_ENSURE_STATE(root);
root->AddRootAccessible(this);
return NS_OK;
return nsDocAccessibleWrap::Init();
}
nsresult

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

@ -336,21 +336,33 @@ nsTextEquivUtils::AppendFromValue(nsIAccessible *aAccessible,
NS_OK : NS_OK_NO_NAME_CLAUSE_HANDLED;
}
nsCOMPtr<nsIAccessible> nextSibling;
aAccessible->GetNextSibling(getter_AddRefs(nextSibling));
if (nextSibling) {
nsCOMPtr<nsIAccessible> parent;
aAccessible->GetParent(getter_AddRefs(parent));
if (parent) {
nsCOMPtr<nsIAccessible> firstChild;
parent->GetFirstChild(getter_AddRefs(firstChild));
if (firstChild && firstChild != aAccessible) {
nsresult rv = aAccessible->GetValue(text);
NS_ENSURE_SUCCESS(rv, rv);
nsRefPtr<nsAccessible> acc = nsAccUtils::QueryAccessible(aAccessible);
nsCOMPtr<nsIDOMNode> node;
acc->GetDOMNode(getter_AddRefs(node));
NS_ENSURE_STATE(node);
return AppendString(aString, text) ?
NS_OK : NS_OK_NO_NAME_CLAUSE_HANDLED;
nsCOMPtr<nsIContent> content(do_QueryInterface(node));
NS_ENSURE_STATE(content);
nsCOMPtr<nsIContent> parent = content->GetParent();
PRInt32 indexOf = parent->IndexOf(content);
for (PRInt32 i = indexOf - 1; i >= 0; i--) {
// check for preceding text...
if (!parent->GetChildAt(i)->TextIsOnlyWhitespace()) {
PRUint32 childCount = parent->GetChildCount();
for (PRUint32 j = indexOf + 1; j < childCount; j++) {
// .. and subsequent text
if (!parent->GetChildAt(j)->TextIsOnlyWhitespace()) {
nsresult rv = aAccessible->GetValue(text);
NS_ENSURE_SUCCESS(rv, rv);
return AppendString(aString, text) ?
NS_OK : NS_OK_NO_NAME_CLAUSE_HANDLED;
break;
}
}
break;
}
}

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

@ -1023,19 +1023,20 @@ void nsHTMLComboboxAccessible::CacheChildren()
if (!mListAccessible) {
mListAccessible =
new nsHTMLComboboxListAccessible(mParent, mDOMNode, mWeakShell);
if (!mListAccessible)
return;
mListAccessible->Init();
}
#ifdef COMBO_BOX_WITH_THREE_CHILDREN
buttonAccessible->SetNextSibling(mListAccessible);
#else
SetFirstChild(mListAccessible);
#endif
if (!mListAccessible) {
return;
}
mListAccessible->SetParent(this);
mListAccessible->SetNextSibling(nsnull);
mListAccessible->Init();
++ mAccChildCount; // List accessible child successfully added
}

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

@ -593,9 +593,8 @@ __try {
void nsAccessNodeWrap::InitAccessibility()
{
if (gIsAccessibilityActive) {
return;
}
NS_ASSERTION(!gIsAccessibilityActive,
"Accessibility was initialized already!");
nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID));
if (prefBranch) {
@ -623,9 +622,7 @@ void nsAccessNodeWrap::ShutdownAccessibility()
NS_IF_RELEASE(gTextEvent);
::DestroyCaret();
if (!gIsAccessibilityActive) {
return;
}
NS_ASSERTION(gIsAccessibilityActive, "Accessibility was shutdown already!");
nsAccessNode::ShutdownXPAccessibility();
}

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

@ -302,9 +302,50 @@ function testAccessibleTree(aAccOrElmOrID, aAccTree)
is(children.length, aAccTree.children.length,
"Different amount of expected children of " + prettyName(acc) + ".");
if (aAccTree.children.length == children.length) {
if (aAccTree.children.length == children.length) {
var childCount = children.length;
// nsIAccessible::firstChild
var expectedFirstChild = childCount > 0 ?
children.queryElementAt(0, nsIAccessible) : null;
var firstChild = null;
try { firstChild = acc.firstChild; } catch (e) {}
is(firstChild, expectedFirstChild,
"Wrong first child of " + prettyName(acc));
// nsIAccessible::lastChild
var expectedLastChild = childCount > 0 ?
children.queryElementAt(childCount - 1, nsIAccessible) : null;
var lastChild = null;
try { lastChild = acc.lastChild; } catch (e) {}
is(lastChild, expectedLastChild,
"Wrong last child of " + prettyName(acc));
for (var i = 0; i < children.length; i++) {
var child = children.queryElementAt(i, nsIAccessible);
// nsIAccessible::parent
var parent = null;
try { parent = child.parent; } catch (e) {}
is(parent, acc, "Wrong parent of " + prettyName(child));
// nsIAccessible::nextSibling
var expectedNextSibling = (i < childCount - 1) ?
children.queryElementAt(i + 1, nsIAccessible) : null;
var nextSibling = null;
try { nextSibling = child.nextSibling; } catch (e) {}
is(nextSibling, expectedNextSibling,
"Wrong next sibling of " + prettyName(child));
// nsIAccessible::previousSibling
var expectedPrevSibling = (i > 0) ?
children.queryElementAt(i - 1, nsIAccessible) : null;
var prevSibling = null;
try { prevSibling = child.previousSibling; } catch (e) {}
is(prevSibling, expectedPrevSibling,
"Wrong previous sibling of " + prettyName(child));
// Go down through subtree
testAccessibleTree(child, aAccTree.children[i]);
}
}

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

@ -1,6 +1,8 @@
////////////////////////////////////////////////////////////////////////////////
// Constants
const EVENT_DOCUMENT_LOAD_COMPLETE =
nsIAccessibleEvent.EVENT_DOCUMENT_LOAD_COMPLETE;
const EVENT_DOM_DESTROY = nsIAccessibleEvent.EVENT_DOM_DESTROY;
const EVENT_FOCUS = nsIAccessibleEvent.EVENT_FOCUS;
const EVENT_NAME_CHANGE = nsIAccessibleEvent.EVENT_NAME_CHANGE;
@ -86,6 +88,15 @@ function unregisterA11yEventListener(aEventType, aEventHandler)
*/
const INVOKER_ACTION_FAILED = 1;
/**
* Common invoker checker (see eventSeq of eventQueue).
*/
function invokerChecker(aEventType, aTarget)
{
this.type = aEventType;
this.target = aTarget;
}
/**
* Creates event queue for the given event type. The queue consists of invoker
* objects, each of them generates the event of the event type. When queue is
@ -319,7 +330,9 @@ function eventQueue(aEventType)
this.setEventHandler = function eventQueue_setEventHandler(aInvoker)
{
this.mEventSeq = ("eventSeq" in aInvoker) ?
aInvoker.eventSeq : [[this.mDefEventType, aInvoker.DOMNode]];
aInvoker.eventSeq :
[ new invokerChecker(this.mDefEventType, aInvoker.DOMNode) ];
this.mEventSeqIdx = -1;
if (this.mEventSeq) {
@ -352,20 +365,12 @@ function eventQueue(aEventType)
this.getEventType = function eventQueue_getEventType(aIdx)
{
var eventItem = this.mEventSeq[aIdx];
if ("type" in eventItem)
return eventItem.type;
return eventItem[0];
return this.mEventSeq[aIdx].type;
}
this.getEventTarget = function eventQueue_getEventTarget(aIdx)
{
var eventItem = this.mEventSeq[aIdx];
if ("target" in eventItem)
return eventItem.target;
return eventItem[1];
return this.mEventSeq[aIdx].target;
}
this.compareEvents = function eventQueue_compareEvents(aIdx, aEvent)

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

@ -3,6 +3,7 @@
const ROLE_ALERT = nsIAccessibleRole.ROLE_ALERT;
const ROLE_APPLICATION = nsIAccessibleRole.ROLE_APPLICATION;
const ROLE_APP_ROOT = nsIAccessibleRole.ROLE_APP_ROOT;
const ROLE_CELL = nsIAccessibleRole.ROLE_CELL;
const ROLE_CHROME_WINDOW = nsIAccessibleRole.ROLE_CHROME_WINDOW;
const ROLE_COMBOBOX = nsIAccessibleRole.ROLE_COMBOBOX;

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

@ -13,6 +13,8 @@
<script type="application/javascript"
src="chrome://mochikit/content/a11y/accessible/common.js"></script>
<script type="application/javascript"
src="chrome://mochikit/content/a11y/accessible/role.js"></script>
<script type="application/javascript"
src="chrome://mochikit/content/a11y/accessible/events.js"></script>
@ -24,6 +26,10 @@
{
this.DOMNode = getNode(aIdentifier);
this.eventSeq = [
new invokerChecker(EVENT_REORDER, getAccessible(this.DOMNode))
];
this.invoke = function changeIframeSrc_invoke()
{
this.DOMNode.src = aURL;
@ -35,6 +41,49 @@
}
}
function openDialogWnd(aURL)
{
// Get application root accessible.
var docAcc = getAccessible(document);
while (docAcc) {
this.mRootAcc = docAcc;
docAcc = docAcc.parent;
}
this.eventSeq = [
new invokerChecker(EVENT_REORDER, this.mRootAcc)
];
this.invoke = function openDialogWnd_invoke()
{
this.mDialog = window.openDialog(aURL);
}
this.check = function openDialogWnd_check()
{
var accTree = {
role: ROLE_APP_ROOT,
children: [
{
role: ROLE_CHROME_WINDOW
},
{
role: ROLE_CHROME_WINDOW
}
]
};
testAccessibleTree(this.mRootAcc, accTree);
this.mDialog.close();
}
this.getID = function openDialogWnd_getID()
{
return "open dialog '" + aURL + "'";
}
}
////////////////////////////////////////////////////////////////////////////
// Do tests
@ -44,10 +93,11 @@
function doTests()
{
gQueue = new eventQueue(EVENT_REORDER);
gQueue = new eventQueue();
gQueue.push(new changeIframeSrc("iframe", "about:"));
gQueue.push(new changeIframeSrc("iframe", "about:buildconfig"));
gQueue.push(new openDialogWnd("about:"));
gQueue.invoke(); // Will call SimpleTest.finish();
}
@ -64,6 +114,11 @@
title="Fire event_reorder on any embedded frames/iframes whos document has just loaded">
Mozilla Bug 420845
</a>
<a target="_blank"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=506206"
title="Fire event_reorder application root accessible">
Mozilla Bug 506206
</a>
<p id="display"></p>
<div id="content" style="display: none"></div>

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

@ -60,8 +60,8 @@
{
var type = this.getA11yEventType(aEventType);
for (var idx = 0; idx < this.eventSeq.length; idx++) {
if (this.eventSeq[idx][0] == type) {
this.eventSeq[idx][1] = aTarget;
if (this.eventSeq[idx].type == type) {
this.eventSeq[idx].target = aTarget;
return idx;
}
}
@ -76,8 +76,10 @@
var targetIdx = this.setTarget(aEventType, aTargets[0]);
var type = this.getA11yEventType(aEventType);
for (var i = 1; i < aTargets.length; i++)
this.eventSeq.splice(++targetIdx, 0, [type, aTargets[i]]);
for (var i = 1; i < aTargets.length; i++) {
var checker = new invokerChecker(type, aTargets[i]);
this.eventSeq.splice(++targetIdx, 0, checker);
}
}
// Implementation
@ -103,15 +105,23 @@
this.mIsDOMChange = aIsDOMChange;
if (aEventTypes & kHideEvent)
this.eventSeq.push([this.getA11yEventType(kHideEvent), this.DOMNode]);
if (aEventTypes & kHideEvent) {
var checker = new invokerChecker(this.getA11yEventType(kHideEvent),
this.DOMNode);
this.eventSeq.push(checker);
}
if (aEventTypes & kShowEvent)
this.eventSeq.push([this.getA11yEventType(kShowEvent), this.DOMNode]);
if (aEventTypes & kShowEvent) {
var checker = new invokerChecker(this.getA11yEventType(kShowEvent),
this.DOMNode);
this.eventSeq.push(checker);
}
if (aEventTypes & kReorderEvent)
this.eventSeq.push([this.getA11yEventType(kReorderEvent),
this.DOMNode.parentNode]);
if (aEventTypes & kReorderEvent) {
var checker = new invokerChecker(this.getA11yEventType(kReorderEvent),
this.DOMNode.parentNode);
this.eventSeq.push(checker);
}
}
/**

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

@ -122,7 +122,7 @@
this.getID = function setTreeView_getID() { return "TreeViewChanged"; }
this.eventSeq = [["TreeViewChanged", gTree]];
this.eventSeq = [ new invokerChecker("TreeViewChanged", gTree) ];
};
/**

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

@ -139,13 +139,13 @@
// textarea's name should have the value, which initially is specified by
// a text child.
testName("textareawithchild", "Story: Foo");
testName("textareawithchild", "Story Foo is ended.");
// new textarea name should reflect the value change.
var elem = document.getElementById("textareawithchild");
elem.value = "Bar";
testName("textareawithchild", "Story: Bar");
testName("textareawithchild", "Story Bar is ended.");
/////////////////////////////////////////////////////////////////////////
// label with nested combobox (test for 'f' item of name computation guide)
@ -153,6 +153,9 @@
testName("comboinstart", "One day(s).");
testName("combo3", "day(s).");
testName("textboxinstart", "Two days.");
testName("textbox1", "days.");
testName("comboinmiddle", "Subscribe to ATOM feed.");
testName("combo4", "Subscribe to ATOM feed.");
@ -163,6 +166,9 @@
testName("comboinend", "This day was sunny");
testName("combo6", "This day was");
testName("textboxinend", "This day was sunny");
testName("textbox2", "This day was");
SimpleTest.finish();
}
@ -345,13 +351,15 @@
<!-- A textarea nested in a label with a text child (bug #453371). -->
<form>
<label>Story:
<label>Story
<textarea id="textareawithchild" name="name">Foo</textarea>
is ended.
</label>
</form>
<!-- a label with a nested control in the start, middle and end -->
<form>
<!-- at the start (without and with whitespaces) -->
<label id="comboinstart"><select id="combo3">
<option>One</option>
<option>Two</option>
@ -359,6 +367,12 @@
day(s).
</label>
<label id="textboxinstart">
<input id="textbox1" value="Two">
days.
</label>
<!-- in the middle -->
<label id="comboinmiddle">
Subscribe to
<select id="combo4" name="occupation">
@ -377,12 +391,18 @@
</label>
<input id="checkbox" type="checkbox" />
<!-- at the end (without and with whitespaces) -->
<label id="comboinend">
This day was
<select id="combo6" name="occupation">
<option>sunny</option>
<option>rainy</option>
</select></label>
<label id="textboxinend">
This day was
<input id="textbox2" value="sunny">
</label>
</form>
</body>

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

@ -309,7 +309,6 @@ pref("browser.microsummary.updateGenerators", true);
// enable search suggestions by default
pref("browser.search.suggest.enabled", true);
pref("browser.history.grouping", "day");
pref("browser.history.showSessions", false);
pref("browser.sessionhistory.max_entries", 50);
pref("browser.history_expire_days", 180);

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

@ -524,10 +524,7 @@ var PlacesCommandHook = {
* A short description of the feed. Optional.
*/
addLiveBookmark: function PCH_addLiveBookmark(url, feedTitle, feedSubtitle) {
var ios =
Cc["@mozilla.org/network/io-service;1"].
getService(Ci.nsIIOService);
var feedURI = ios.newURI(url, null, null);
var feedURI = makeURI(url);
var doc = gBrowser.contentDocument;
var title = (arguments.length > 1) ? feedTitle : doc.title;

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

@ -2660,10 +2660,9 @@ var browserDragAndDrop = {
var file = dt.mozGetDataAt("application/x-moz-file", 0);
if (file) {
var name = file instanceof Ci.nsIFile ? file.leafName : "";
var ioService = Cc["@mozilla.org/network/io-service;1"]
.getService(Ci.nsIIOService);
var fileHandler = ioService.getProtocolHandler("file")
.QueryInterface(Ci.nsIFileProtocolHandler);
var fileHandler = ContentAreaUtils.ioService
.getProtocolHandler("file")
.QueryInterface(Ci.nsIFileProtocolHandler);
return [fileHandler.getURLSpecFromFile(file), name];
}
@ -2889,9 +2888,7 @@ const DOMLinkHandler = {
break;
var targetDoc = link.ownerDocument;
var ios = Cc["@mozilla.org/network/io-service;1"].
getService(Ci.nsIIOService);
var uri = ios.newURI(link.href, targetDoc.characterSet, null);
var uri = makeURI(link.href, targetDoc.characterSet);
if (gBrowser.isFailedIcon(uri))
break;
@ -4422,10 +4419,7 @@ nsBrowserAccess.prototype =
if (aURI) {
if (aOpener) {
location = aOpener.location;
referrer =
Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService)
.newURI(location, null, null);
referrer = makeURI(location);
}
newWindow.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIWebNavigation)
@ -4442,10 +4436,7 @@ nsBrowserAccess.prototype =
newWindow = aOpener.top;
if (aURI) {
location = aOpener.location;
referrer =
Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService)
.newURI(location, null, null);
referrer = makeURI(location);
newWindow.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(nsIWebNavigation)
@ -5418,11 +5409,8 @@ var OfflineApps = {
if (!attr) return null;
try {
var ios = Cc["@mozilla.org/network/io-service;1"].
getService(Ci.nsIIOService);
var contentURI = ios.newURI(aWindow.location.href, null, null);
return ios.newURI(attr, aWindow.document.characterSet, contentURI);
var contentURI = makeURI(aWindow.location.href, null, null);
return makeURI(attr, aWindow.document.characterSet, contentURI);
} catch (e) {
return null;
}
@ -5623,11 +5611,8 @@ var OfflineApps = {
if (!manifest)
return;
var ios = Cc["@mozilla.org/network/io-service;1"].
getService(Ci.nsIIOService);
var manifestURI = ios.newURI(manifest, aDocument.characterSet,
aDocument.documentURIObject);
var manifestURI = makeURI(manifest, aDocument.characterSet,
aDocument.documentURIObject);
var updateService = Cc["@mozilla.org/offlinecacheupdate-service;1"].
getService(Ci.nsIOfflineCacheUpdateService);
@ -5640,9 +5625,7 @@ var OfflineApps = {
{
if (aTopic == "dom-storage-warn-quota-exceeded") {
if (aSubject) {
var uri = Cc["@mozilla.org/network/io-service;1"].
getService(Ci.nsIIOService).
newURI(aSubject.location.href, null, null);
var uri = makeURI(aSubject.location.href);
if (OfflineApps._checkUsage(uri)) {
var browserWindow =
@ -5703,9 +5686,7 @@ var MailIntegration = {
mailtoUrl += "&subject=" + encodeURIComponent(aSubject);
}
var ioService = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
var uri = ioService.newURI(mailtoUrl, null, null);
var uri = makeURI(mailtoUrl);
// now pass this uri to the operating system
this._launchExternalUrl(uri);

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

@ -1182,10 +1182,8 @@ nsContextMenu.prototype = {
},
getLinkURI: function() {
var ioService = Cc["@mozilla.org/network/io-service;1"].
getService(Ci.nsIIOService);
try {
return ioService.newURI(this.linkURL, null, null);
return makeURI(this.linkURL);
}
catch (ex) {
// e.g. empty URL string

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

@ -622,17 +622,13 @@
<body>
<![CDATA[
var browser = this.getBrowserForTab(aTab);
browser.mIconURL = aURI;
browser.mIconURL = aURI instanceof Ci.nsIURI ? aURI.spec : aURI;
if (aURI) {
if (!(aURI instanceof Components.interfaces.nsIURI)) {
var ios = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
aURI = ios.newURI(aURI, null, null);
}
if (this.mFaviconService)
this.mFaviconService.setAndLoadFaviconForPage(browser.currentURI,
aURI, false);
if (aURI && this.mFaviconService) {
if (!(aURI instanceof Ci.nsIURI))
aURI = makeURI(aURI);
this.mFaviconService.setAndLoadFaviconForPage(browser.currentURI,
aURI, false);
}
this.updateIcon(aTab);
@ -706,7 +702,7 @@
req.image.height > sz)
return;
this.setIcon(aTab, browser.currentURI.spec);
this.setIcon(aTab, browser.currentURI);
} catch (e) { }
}
}
@ -725,14 +721,11 @@
<parameter name="aURI"/>
<body>
<![CDATA[
if (!(aURI instanceof Components.interfaces.nsIURI)) {
var ios = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
aURI = ios.newURI(aURI, null, null);
}
if (this.mFaviconService)
if (this.mFaviconService) {
if (!(aURI instanceof Ci.nsIURI))
aURI = makeURI(aURI);
return this.mFaviconService.isFailedFavicon(aURI);
}
return null;
]]>
</body>

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

@ -1,9 +1,6 @@
function test() {
var ioserv = Components.classes["@mozilla.org/network/io-service;1"].
getService(Components.interfaces.nsIIOService);
var exampleUri = ioserv.newURI("http://example.com/", null, null);
var secman = Components.classes["@mozilla.org/scriptsecuritymanager;1"].
getService(Components.interfaces.nsIScriptSecurityManager);
var exampleUri = makeURI("http://example.com/");
var secman = Cc["@mozilla.org/scriptsecuritymanager;1"].getService(Ci.nsIScriptSecurityManager);
var principal = secman.getCodebasePrincipal(exampleUri);
function testIsFeed(aTitle, aHref, aType, aKnown) {

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

@ -47,9 +47,7 @@ let currentInvoker = 0;
function initTest() {
// first, bookmark the page
let ios = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
Application.bookmarks.toolbar.addBookmark("Bug 432599 Test",
ios.newURI(testURL, null, null));
Application.bookmarks.toolbar.addBookmark("Bug 432599 Test", makeURI(testURL));
checkBookmarksPanel(invokers[currentInvoker], 1);
}

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

@ -1,9 +1,3 @@
function makeURI(aURL, aOriginCharset, aBaseURI) {
var ioService = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
return ioService.newURI(aURL, aOriginCharset, aBaseURI);
}
function getPostDataString(aIS) {
if (!aIS)
return null;

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

@ -1,13 +1,12 @@
// Bug 474792 - Clear "Never remember passwords for this site" when
// clearing site-specific settings in Clear Recent History dialog
Cc["@mozilla.org/moz/jssubscript-loader;1"].getService(Components.interfaces.mozIJSSubScriptLoader)
Cc["@mozilla.org/moz/jssubscript-loader;1"].getService(Ci.mozIJSSubScriptLoader)
.loadSubScript("chrome://browser/content/sanitize.js");
function test() {
var pwmgr = Components.classes["@mozilla.org/login-manager;1"]
.getService(Components.interfaces.nsILoginManager);
var pwmgr = Cc["@mozilla.org/login-manager;1"].getService(Ci.nsILoginManager);
// Add a disabled host
pwmgr.setLoginSavingEnabled("http://example.com", false);
@ -20,9 +19,7 @@ function test() {
let s = new Sanitizer();
s.ignoreTimespan = false;
s.prefDomain = "privacy.cpd.";
var itemPrefs = Cc["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefService)
.getBranch(s.prefDomain);
var itemPrefs = gPrefService.getBranch(s.prefDomain);
itemPrefs.setBoolPref("history", false);
itemPrefs.setBoolPref("downloads", false);
itemPrefs.setBoolPref("cache", false);

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

@ -1,14 +1,14 @@
// Bug 380852 - Delete permission manager entries in Clear Recent History
Cc["@mozilla.org/moz/jssubscript-loader;1"].getService(Components.interfaces.mozIJSSubScriptLoader)
Cc["@mozilla.org/moz/jssubscript-loader;1"].getService(Ci.mozIJSSubScriptLoader)
.loadSubScript("chrome://browser/content/sanitize.js");
function test() {
// Add a permission entry
var pm = Components.classes["@mozilla.org/permissionmanager;1"]
.getService(Components.interfaces.nsIPermissionManager);
pm.add(uri("http://example.com"), "testing", Ci.nsIPermissionManager.ALLOW_ACTION);
var pm = Cc["@mozilla.org/permissionmanager;1"]
.getService(Ci.nsIPermissionManager);
pm.add(makeURI("http://example.com"), "testing", pm.ALLOW_ACTION);
// Sanity check
ok(pm.enumerator.hasMoreElements(), "Permission manager should have elements, since we just added one");
@ -17,9 +17,7 @@ function test() {
let s = new Sanitizer();
s.ignoreTimespan = false;
s.prefDomain = "privacy.cpd.";
var itemPrefs = Cc["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefService)
.getBranch(s.prefDomain);
var itemPrefs = gPrefService.getBranch(s.prefDomain);
itemPrefs.setBoolPref("history", false);
itemPrefs.setBoolPref("downloads", false);
itemPrefs.setBoolPref("cache", false);
@ -36,8 +34,3 @@ function test() {
// Make sure it's gone
ok(!pm.enumerator.hasMoreElements(), "Permission manager shouldn't have entries after Sanitizing");
}
function uri(spec) {
return Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService)
.newURI(spec, null, null);
}

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

@ -3,10 +3,9 @@ var now_uSec = Date.now() * 1000;
const dm = Cc["@mozilla.org/download-manager;1"].getService(Ci.nsIDownloadManager);
const bhist = Cc["@mozilla.org/browser/global-history;2"].getService(Ci.nsIBrowserHistory);
const iosvc = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
const formhist = Cc["@mozilla.org/satchel/form-history;1"].getService(Ci.nsIFormHistory2);
Cc["@mozilla.org/moz/jssubscript-loader;1"].getService(Components.interfaces.mozIJSSubScriptLoader)
Cc["@mozilla.org/moz/jssubscript-loader;1"].getService(Ci.mozIJSSubScriptLoader)
.loadSubScript("chrome://browser/content/sanitize.js");
function test() {
@ -24,9 +23,7 @@ function test() {
let s = new Sanitizer();
s.ignoreTimespan = false;
s.prefDomain = "privacy.cpd.";
var itemPrefs = Cc["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefService)
.getBranch(s.prefDomain);
var itemPrefs = gPrefService.getBranch(s.prefDomain);
itemPrefs.setBoolPref("history", true);
itemPrefs.setBoolPref("downloads", true);
itemPrefs.setBoolPref("cache", false);
@ -42,17 +39,17 @@ function test() {
s.sanitize();
s.range = null;
ok(!bhist.isVisited(uri("http://10minutes.com")), "10minutes.com should now be deleted");
ok(bhist.isVisited(uri("http://1hour.com")), "Pretend visit to 1hour.com should still exist");
ok(bhist.isVisited(uri("http://1hour10minutes.com/")), "Pretend visit to 1hour10minutes.com should still exist");
ok(bhist.isVisited(uri("http://2hour.com")), "Pretend visit to 2hour.com should still exist");
ok(bhist.isVisited(uri("http://2hour10minutes.com/")), "Pretend visit to 2hour10minutes.com should still exist");
ok(bhist.isVisited(uri("http://4hour.com")), "Pretend visit to 4hour.com should still exist");
ok(bhist.isVisited(uri("http://4hour10minutes.com/")), "Pretend visit to 4hour10minutes.com should still exist");
ok(!bhist.isVisited(makeURI("http://10minutes.com")), "10minutes.com should now be deleted");
ok(bhist.isVisited(makeURI("http://1hour.com")), "Pretend visit to 1hour.com should still exist");
ok(bhist.isVisited(makeURI("http://1hour10minutes.com/")), "Pretend visit to 1hour10minutes.com should still exist");
ok(bhist.isVisited(makeURI("http://2hour.com")), "Pretend visit to 2hour.com should still exist");
ok(bhist.isVisited(makeURI("http://2hour10minutes.com/")), "Pretend visit to 2hour10minutes.com should still exist");
ok(bhist.isVisited(makeURI("http://4hour.com")), "Pretend visit to 4hour.com should still exist");
ok(bhist.isVisited(makeURI("http://4hour10minutes.com/")), "Pretend visit to 4hour10minutes.com should still exist");
if(minutesSinceMidnight > 10)
ok(bhist.isVisited(uri("http://today.com")), "Pretend visit to today.com should still exist");
ok(bhist.isVisited(uri("http://before-today.com")), "Pretend visit to before-today.com should still exist");
ok(bhist.isVisited(makeURI("http://today.com")), "Pretend visit to today.com should still exist");
ok(bhist.isVisited(makeURI("http://before-today.com")), "Pretend visit to before-today.com should still exist");
ok(!formhist.nameExists("10minutes"), "10minutes form entry should be deleted");
ok(formhist.nameExists("1hour"), "1hour form entry should still exist");
@ -81,16 +78,16 @@ function test() {
Sanitizer.prefs.setIntPref("timeSpan", 1);
s.sanitize();
ok(!bhist.isVisited(uri("http://1hour.com")), "1hour.com should now be deleted");
ok(bhist.isVisited(uri("http://1hour10minutes.com/")), "Pretend visit to 1hour10minutes.com should still exist");
ok(bhist.isVisited(uri("http://2hour.com")), "Pretend visit to 2hour.com should still exist");
ok(bhist.isVisited(uri("http://2hour10minutes.com/")), "Pretend visit to 2hour10minutes.com should still exist");
ok(bhist.isVisited(uri("http://4hour.com")), "Pretend visit to 4hour.com should still exist");
ok(bhist.isVisited(uri("http://4hour10minutes.com/")), "Pretend visit to 4hour10minutes.com should still exist");
ok(!bhist.isVisited(makeURI("http://1hour.com")), "1hour.com should now be deleted");
ok(bhist.isVisited(makeURI("http://1hour10minutes.com/")), "Pretend visit to 1hour10minutes.com should still exist");
ok(bhist.isVisited(makeURI("http://2hour.com")), "Pretend visit to 2hour.com should still exist");
ok(bhist.isVisited(makeURI("http://2hour10minutes.com/")), "Pretend visit to 2hour10minutes.com should still exist");
ok(bhist.isVisited(makeURI("http://4hour.com")), "Pretend visit to 4hour.com should still exist");
ok(bhist.isVisited(makeURI("http://4hour10minutes.com/")), "Pretend visit to 4hour10minutes.com should still exist");
if(hoursSinceMidnight > 1)
ok(bhist.isVisited(uri("http://today.com")), "Pretend visit to today.com should still exist");
ok(bhist.isVisited(uri("http://before-today.com")), "Pretend visit to before-today.com should still exist");
ok(bhist.isVisited(makeURI("http://today.com")), "Pretend visit to today.com should still exist");
ok(bhist.isVisited(makeURI("http://before-today.com")), "Pretend visit to before-today.com should still exist");
ok(!formhist.nameExists("1hour"), "1hour form entry should be deleted");
ok(formhist.nameExists("1hour10minutes"), "1hour10minutes form entry should still exist");
@ -118,14 +115,14 @@ function test() {
s.sanitize();
s.range = null;
ok(!bhist.isVisited(uri("http://1hour10minutes.com")), "Pretend visit to 1hour10minutes.com should now be deleted");
ok(bhist.isVisited(uri("http://2hour.com")), "Pretend visit to 2hour.com should still exist");
ok(bhist.isVisited(uri("http://2hour10minutes.com/")), "Pretend visit to 2hour10minutes.com should still exist");
ok(bhist.isVisited(uri("http://4hour.com")), "Pretend visit to 4hour.com should still exist");
ok(bhist.isVisited(uri("http://4hour10minutes.com/")), "Pretend visit to 4hour10minutes.com should still exist");
ok(!bhist.isVisited(makeURI("http://1hour10minutes.com")), "Pretend visit to 1hour10minutes.com should now be deleted");
ok(bhist.isVisited(makeURI("http://2hour.com")), "Pretend visit to 2hour.com should still exist");
ok(bhist.isVisited(makeURI("http://2hour10minutes.com/")), "Pretend visit to 2hour10minutes.com should still exist");
ok(bhist.isVisited(makeURI("http://4hour.com")), "Pretend visit to 4hour.com should still exist");
ok(bhist.isVisited(makeURI("http://4hour10minutes.com/")), "Pretend visit to 4hour10minutes.com should still exist");
if(minutesSinceMidnight > 70)
ok(bhist.isVisited(uri("http://today.com")), "Pretend visit to today.com should still exist");
ok(bhist.isVisited(uri("http://before-today.com")), "Pretend visit to before-today.com should still exist");
ok(bhist.isVisited(makeURI("http://today.com")), "Pretend visit to today.com should still exist");
ok(bhist.isVisited(makeURI("http://before-today.com")), "Pretend visit to before-today.com should still exist");
ok(!formhist.nameExists("1hour10minutes"), "1hour10minutes form entry should be deleted");
ok(formhist.nameExists("2hour"), "2hour form entry should still exist");
@ -149,13 +146,13 @@ function test() {
Sanitizer.prefs.setIntPref("timeSpan", 2);
s.sanitize();
ok(!bhist.isVisited(uri("http://2hour.com")), "Pretend visit to 2hour.com should now be deleted");
ok(bhist.isVisited(uri("http://2hour10minutes.com/")), "Pretend visit to 2hour10minutes.com should still exist");
ok(bhist.isVisited(uri("http://4hour.com")), "Pretend visit to 4hour.com should still exist");
ok(bhist.isVisited(uri("http://4hour10minutes.com/")), "Pretend visit to 4hour10minutes.com should still exist");
ok(!bhist.isVisited(makeURI("http://2hour.com")), "Pretend visit to 2hour.com should now be deleted");
ok(bhist.isVisited(makeURI("http://2hour10minutes.com/")), "Pretend visit to 2hour10minutes.com should still exist");
ok(bhist.isVisited(makeURI("http://4hour.com")), "Pretend visit to 4hour.com should still exist");
ok(bhist.isVisited(makeURI("http://4hour10minutes.com/")), "Pretend visit to 4hour10minutes.com should still exist");
if(hoursSinceMidnight > 2)
ok(bhist.isVisited(uri("http://today.com")), "Pretend visit to today.com should still exist");
ok(bhist.isVisited(uri("http://before-today.com")), "Pretend visit to before-today.com should still exist");
ok(bhist.isVisited(makeURI("http://today.com")), "Pretend visit to today.com should still exist");
ok(bhist.isVisited(makeURI("http://before-today.com")), "Pretend visit to before-today.com should still exist");
ok(!formhist.nameExists("2hour"), "2hour form entry should be deleted");
ok(formhist.nameExists("2hour10minutes"), "2hour10minutes form entry should still exist");
@ -179,12 +176,12 @@ function test() {
s.sanitize();
s.range = null;
ok(!bhist.isVisited(uri("http://2hour10minutes.com")), "Pretend visit to 2hour10minutes.com should now be deleted");
ok(bhist.isVisited(uri("http://4hour.com")), "Pretend visit to 4hour.com should still exist");
ok(bhist.isVisited(uri("http://4hour10minutes.com/")), "Pretend visit to 4hour10minutes.com should still exist");
ok(!bhist.isVisited(makeURI("http://2hour10minutes.com")), "Pretend visit to 2hour10minutes.com should now be deleted");
ok(bhist.isVisited(makeURI("http://4hour.com")), "Pretend visit to 4hour.com should still exist");
ok(bhist.isVisited(makeURI("http://4hour10minutes.com/")), "Pretend visit to 4hour10minutes.com should still exist");
if(minutesSinceMidnight > 130)
ok(bhist.isVisited(uri("http://today.com")), "Pretend visit to today.com should still exist");
ok(bhist.isVisited(uri("http://before-today.com")), "Pretend visit to before-today.com should still exist");
ok(bhist.isVisited(makeURI("http://today.com")), "Pretend visit to today.com should still exist");
ok(bhist.isVisited(makeURI("http://before-today.com")), "Pretend visit to before-today.com should still exist");
ok(!formhist.nameExists("2hour10minutes"), "2hour10minutes form entry should be deleted");
ok(formhist.nameExists("4hour"), "4hour form entry should still exist");
@ -204,11 +201,11 @@ function test() {
Sanitizer.prefs.setIntPref("timeSpan", 3);
s.sanitize();
ok(!bhist.isVisited(uri("http://4hour.com")), "Pretend visit to 4hour.com should now be deleted");
ok(bhist.isVisited(uri("http://4hour10minutes.com/")), "Pretend visit to 4hour10minutes.com should still exist");
ok(!bhist.isVisited(makeURI("http://4hour.com")), "Pretend visit to 4hour.com should now be deleted");
ok(bhist.isVisited(makeURI("http://4hour10minutes.com/")), "Pretend visit to 4hour10minutes.com should still exist");
if(hoursSinceMidnight > 4)
ok(bhist.isVisited(uri("http://today.com")), "Pretend visit to today.com should still exist");
ok(bhist.isVisited(uri("http://before-today.com")), "Pretend visit to before-today.com should still exist");
ok(bhist.isVisited(makeURI("http://today.com")), "Pretend visit to today.com should still exist");
ok(bhist.isVisited(makeURI("http://before-today.com")), "Pretend visit to before-today.com should still exist");
ok(!formhist.nameExists("4hour"), "4hour form entry should be deleted");
ok(formhist.nameExists("4hour10minutes"), "4hour10minutes form entry should still exist");
@ -227,10 +224,10 @@ function test() {
s.sanitize();
s.range = null;
ok(!bhist.isVisited(uri("http://4hour10minutes.com/")), "Pretend visit to 4hour10minutes.com should now be deleted");
ok(!bhist.isVisited(makeURI("http://4hour10minutes.com/")), "Pretend visit to 4hour10minutes.com should now be deleted");
if(minutesSinceMidnight > 250)
ok(bhist.isVisited(uri("http://today.com")), "Pretend visit to today.com should still exist");
ok(bhist.isVisited(uri("http://before-today.com")), "Pretend visit to before-today.com should still exist");
ok(bhist.isVisited(makeURI("http://today.com")), "Pretend visit to today.com should still exist");
ok(bhist.isVisited(makeURI("http://before-today.com")), "Pretend visit to before-today.com should still exist");
ok(!formhist.nameExists("4hour10minutes"), "4hour10minutes form entry should be deleted");
if(minutesSinceMidnight > 250)
@ -246,8 +243,8 @@ function test() {
Sanitizer.prefs.setIntPref("timeSpan", 4);
s.sanitize();
ok(!bhist.isVisited(uri("http://today.com")), "Pretend visit to today.com should now be deleted");
ok(bhist.isVisited(uri("http://before-today.com")), "Pretend visit to before-today.com should still exist");
ok(!bhist.isVisited(makeURI("http://today.com")), "Pretend visit to today.com should now be deleted");
ok(bhist.isVisited(makeURI("http://before-today.com")), "Pretend visit to before-today.com should still exist");
ok(!formhist.nameExists("today"), "today form entry should be deleted");
ok(formhist.nameExists("b4today"), "b4today form entry should still exist");
@ -259,7 +256,7 @@ function test() {
Sanitizer.prefs.setIntPref("timeSpan", 0);
s.sanitize();
ok(!bhist.isVisited(uri("http://before-today.com")), "Pretend visit to before-today.com should now be deleted");
ok(!bhist.isVisited(makeURI("http://before-today.com")), "Pretend visit to before-today.com should now be deleted");
ok(!formhist.nameExists("b4today"), "b4today form entry should be deleted");
@ -268,34 +265,34 @@ function test() {
}
function setupHistory() {
bhist.addPageWithDetails(uri("http://10minutes.com/"), "10 minutes ago", now_uSec - 10*60*1000000);
bhist.addPageWithDetails(uri("http://1hour.com/"), "Less than 1 hour ago", now_uSec - 45*60*1000000);
bhist.addPageWithDetails(uri("http://1hour10minutes.com/"), "1 hour 10 minutes ago", now_uSec - 70*60*1000000);
bhist.addPageWithDetails(uri("http://2hour.com/"), "Less than 2 hours ago", now_uSec - 90*60*1000000);
bhist.addPageWithDetails(uri("http://2hour10minutes.com/"), "2 hours 10 minutes ago", now_uSec - 130*60*1000000);
bhist.addPageWithDetails(uri("http://4hour.com/"), "Less than 4 hours ago", now_uSec - 180*60*1000000);
bhist.addPageWithDetails(uri("http://4hour10minutes.com/"), "4 hours 10 minutesago", now_uSec - 250*60*1000000);
bhist.addPageWithDetails(makeURI("http://10minutes.com/"), "10 minutes ago", now_uSec - 10*60*1000000);
bhist.addPageWithDetails(makeURI("http://1hour.com/"), "Less than 1 hour ago", now_uSec - 45*60*1000000);
bhist.addPageWithDetails(makeURI("http://1hour10minutes.com/"), "1 hour 10 minutes ago", now_uSec - 70*60*1000000);
bhist.addPageWithDetails(makeURI("http://2hour.com/"), "Less than 2 hours ago", now_uSec - 90*60*1000000);
bhist.addPageWithDetails(makeURI("http://2hour10minutes.com/"), "2 hours 10 minutes ago", now_uSec - 130*60*1000000);
bhist.addPageWithDetails(makeURI("http://4hour.com/"), "Less than 4 hours ago", now_uSec - 180*60*1000000);
bhist.addPageWithDetails(makeURI("http://4hour10minutes.com/"), "4 hours 10 minutesago", now_uSec - 250*60*1000000);
let today = new Date();
today.setHours(0);
today.setMinutes(0);
today.setSeconds(30);
bhist.addPageWithDetails(uri("http://today.com/"), "Today", today.valueOf() * 1000);
bhist.addPageWithDetails(makeURI("http://today.com/"), "Today", today.valueOf() * 1000);
let lastYear = new Date();
lastYear.setFullYear(lastYear.getFullYear() - 1);
bhist.addPageWithDetails(uri("http://before-today.com/"), "Before Today", lastYear.valueOf() * 1000);
bhist.addPageWithDetails(makeURI("http://before-today.com/"), "Before Today", lastYear.valueOf() * 1000);
// Confirm everything worked
ok(bhist.isVisited(uri("http://10minutes.com/")), "Pretend visit to 10minutes.com should exist");
ok(bhist.isVisited(uri("http://1hour.com")), "Pretend visit to 1hour.com should exist");
ok(bhist.isVisited(uri("http://1hour10minutes.com/")), "Pretend visit to 1hour10minutes.com should exist");
ok(bhist.isVisited(uri("http://2hour.com")), "Pretend visit to 2hour.com should exist");
ok(bhist.isVisited(uri("http://2hour10minutes.com/")), "Pretend visit to 2hour10minutes.com should exist");
ok(bhist.isVisited(uri("http://4hour.com")), "Pretend visit to 4hour.com should exist");
ok(bhist.isVisited(uri("http://4hour10minutes.com/")), "Pretend visit to 4hour10minutes.com should exist");
ok(bhist.isVisited(uri("http://today.com")), "Pretend visit to today.com should exist");
ok(bhist.isVisited(uri("http://before-today.com")), "Pretend visit to before-today.com should exist");
ok(bhist.isVisited(makeURI("http://10minutes.com/")), "Pretend visit to 10minutes.com should exist");
ok(bhist.isVisited(makeURI("http://1hour.com")), "Pretend visit to 1hour.com should exist");
ok(bhist.isVisited(makeURI("http://1hour10minutes.com/")), "Pretend visit to 1hour10minutes.com should exist");
ok(bhist.isVisited(makeURI("http://2hour.com")), "Pretend visit to 2hour.com should exist");
ok(bhist.isVisited(makeURI("http://2hour10minutes.com/")), "Pretend visit to 2hour10minutes.com should exist");
ok(bhist.isVisited(makeURI("http://4hour.com")), "Pretend visit to 4hour.com should exist");
ok(bhist.isVisited(makeURI("http://4hour10minutes.com/")), "Pretend visit to 4hour10minutes.com should exist");
ok(bhist.isVisited(makeURI("http://today.com")), "Pretend visit to today.com should exist");
ok(bhist.isVisited(makeURI("http://before-today.com")), "Pretend visit to before-today.com should exist");
}
function setupFormHistory() {
@ -598,7 +595,3 @@ function downloadExists(aID)
stmt.finalize();
return rows;
}
function uri(spec) {
return iosvc.newURI(spec, null, null);
}

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

@ -63,8 +63,6 @@ const dm = Cc["@mozilla.org/download-manager;1"].
getService(Ci.nsIDownloadManager);
const bhist = Cc["@mozilla.org/browser/global-history;2"].
getService(Ci.nsIBrowserHistory);
const iosvc = Cc["@mozilla.org/network/io-service;1"].
getService(Ci.nsIIOService);
const formhist = Cc["@mozilla.org/satchel/form-history;1"].
getService(Ci.nsIFormHistory2);
@ -608,7 +606,7 @@ function addFormEntryWithMinutesAgo(aMinutesAgo) {
* The visit will be visited this many minutes ago
*/
function addHistoryWithMinutesAgo(aMinutesAgo) {
let pURI = uri("http://" + aMinutesAgo + "-minutes-ago.com/");
let pURI = makeURI("http://" + aMinutesAgo + "-minutes-ago.com/");
bhist.addPageWithDetails(pURI,
aMinutesAgo + " minutes ago",
now_uSec - (aMinutesAgo * 60 * 1000 * 1000));
@ -638,10 +636,7 @@ function blankSlate() {
* Passed to is()
*/
function boolPrefIs(aPrefName, aExpectedVal, aMsg) {
let prefs = Cc["@mozilla.org/preferences-service;1"].
getService(Ci.nsIPrefService).
getBranch("privacy.");
is(prefs.getBoolPref(aPrefName), aExpectedVal, aMsg);
is(gPrefService.getBoolPref("privacy." + aPrefName), aExpectedVal, aMsg);
}
/**
@ -740,17 +735,7 @@ function ensureHistoryClearedState(aURIs, aShouldBeCleared) {
* Passed to is()
*/
function intPrefIs(aPrefName, aExpectedVal, aMsg) {
let prefs = Cc["@mozilla.org/preferences-service;1"].
getService(Ci.nsIPrefService).
getBranch("privacy.");
is(prefs.getIntPref(aPrefName), aExpectedVal, aMsg);
}
/**
* @return A new nsIURI from aSpec.
*/
function uri(aSpec) {
return iosvc.newURI(aSpec, null, null);
is(gPrefService.getIntPref("privacy." + aPrefName), aExpectedVal, aMsg);
}
///////////////////////////////////////////////////////////////////////////////

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

@ -63,8 +63,6 @@ const dm = Cc["@mozilla.org/download-manager;1"].
getService(Ci.nsIDownloadManager);
const bhist = Cc["@mozilla.org/browser/global-history;2"].
getService(Ci.nsIBrowserHistory);
const iosvc = Cc["@mozilla.org/network/io-service;1"].
getService(Ci.nsIIOService);
const formhist = Cc["@mozilla.org/satchel/form-history;1"].
getService(Ci.nsIFormHistory2);
@ -509,7 +507,7 @@ function addFormEntryWithMinutesAgo(aMinutesAgo) {
* The visit will be visited this many minutes ago
*/
function addHistoryWithMinutesAgo(aMinutesAgo) {
let pURI = uri("http://" + aMinutesAgo + "-minutes-ago.com/");
let pURI = makeURI("http://" + aMinutesAgo + "-minutes-ago.com/");
bhist.addPageWithDetails(pURI,
aMinutesAgo + " minutes ago",
now_uSec - (aMinutesAgo * 60 * 1000 * 1000));
@ -652,13 +650,6 @@ function openWindow(aOnloadCallback) {
null);
}
/**
* @return A new nsIURI from aSpec.
*/
function uri(aSpec) {
return iosvc.newURI(aSpec, null, null);
}
///////////////////////////////////////////////////////////////////////////////
function test() {

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

@ -283,10 +283,8 @@
if (val == this.value &&
this.getAttribute("pageproxystate") == "valid") {
let uri;
let ioService = Cc["@mozilla.org/network/io-service;1"]
.getService(Ci.nsIIOService);
try {
uri = ioService.newURI(val, null, null);
uri = makeURI(val);
} catch (e) {}
if (uri && !uri.schemeIs("javascript") && !uri.schemeIs("data")) {
@ -387,10 +385,7 @@
<setter>
<![CDATA[
try {
let uri = Cc["@mozilla.org/network/io-service;1"].
getService(Ci.nsIIOService).
newURI(val, null, null);
val = losslessDecodeURI(uri);
val = losslessDecodeURI(makeURI(val));
} catch (ex) { }
this.value = val;

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

@ -909,7 +909,6 @@ var Module = {
registerType("image/bmp");
registerType("image/x-icon");
registerType("image/vnd.microsoft.icon");
registerType("image/x-xbitmap");
registerType("application/http-index-format");
var catMan = Components.classes["@mozilla.org/categorymanager;1"]

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

@ -62,6 +62,7 @@ _BROWSER_TEST_FILES = \
browser_library_middleclick.js \
browser_library_views_liveupdate.js \
browser_views_liveupdate.js \
browser_sidebarpanels_click.js \
$(NULL)
libs:: $(_BROWSER_TEST_FILES)

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

@ -0,0 +1,206 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Places test code.
*
* The Initial Developer of the Original Code is
* Ehsan Akhgari.
* Portions created by the Initial Developer are Copyright (C) 2009
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Ehsan Akhgari <ehsan.akhgari@gmail.com> (Original Author)
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
// This test makes sure that the items in the bookmarks and history sidebar
// panels are clickable in both LTR and RTL modes.
function test() {
const BOOKMARKS_SIDEBAR_ID = "viewBookmarksSidebar";
const BOOKMARKS_SIDEBAR_TREE_ID = "bookmarks-view";
const HISTORY_SIDEBAR_ID = "viewHistorySidebar";
const HISTORY_SIDEBAR_TREE_ID = "historyTree";
// Initialization.
let ww = Cc["@mozilla.org/embedcomp/window-watcher;1"].
getService(Ci.nsIWindowWatcher);
let bs = PlacesUtils.bookmarks;
let hs = PlacesUtils.history;
let sidebarBox = document.getElementById("sidebar-box");
let sidebar = document.getElementById("sidebar");
waitForExplicitFinish();
// If a sidebar is already open, close it.
if (!sidebarBox.hidden) {
info("Unexpected sidebar found - a previous test failed to cleanup correctly");
toggleSidebar();
}
const TEST_URL = "javascript:alert(\"test\");";
let tests = [];
tests.push({
_itemID: null,
init: function() {
// Add a bookmark to the Unfiled Bookmarks folder.
this._itemID = bs.insertBookmark(bs.unfiledBookmarksFolder,
PlacesUtils._uri(TEST_URL),
bs.DEFAULT_INDEX, "test");
},
prepare: function() {
},
selectNode: function(tree) {
tree.selectItems([this._itemID]);
},
cleanup: function() {
bs.removeFolderChildren(bs.unfiledBookmarksFolder);
},
sidebarName: BOOKMARKS_SIDEBAR_ID,
treeName: BOOKMARKS_SIDEBAR_TREE_ID,
desc: "Bookmarks sidebar test"
});
tests.push({
init: function() {
// Add a history entry.
this.cleanup();
hs.addVisit(PlacesUtils._uri(TEST_URL), Date.now() * 1000,
null, hs.TRANSITION_TYPED, false, 0);
},
prepare: function() {
sidebar.contentDocument.getElementById("byvisited").doCommand();
},
selectNode: function(tree) {
tree.selectNode(tree.view.nodeForTreeIndex(0));
is(tree.selectedNode.uri, TEST_URL, "The correct visit has been selected");
is(tree.selectedNode.itemId, -1, "The selected node is not bookmarked");
},
cleanup: function() {
hs.QueryInterface(Ci.nsIBrowserHistory)
.removeAllPages();
},
sidebarName: HISTORY_SIDEBAR_ID,
treeName: HISTORY_SIDEBAR_TREE_ID,
desc: "History sidebar test"
});
let currentTest;
function testPlacesPanel(preFunc, postFunc) {
currentTest.init();
sidebar.addEventListener("load", function() {
sidebar.removeEventListener("load", arguments.callee, true);
let doc = sidebar.contentDocument;
let tree = doc.getElementById(currentTest.treeName);
let tbo = tree.treeBoxObject;
executeSoon(function() {
currentTest.prepare();
if (preFunc)
preFunc();
let observer = {
observe: function(aSubject, aTopic, aData) {
if (aTopic === "domwindowopened") {
ww.unregisterNotification(this);
let alertDialog = aSubject.QueryInterface(Ci.nsIDOMWindow);
alertDialog.addEventListener("load", function() {
alertDialog.removeEventListener("load", arguments.callee, false);
info("alert dialog observed as expected");
executeSoon(function() {
alertDialog.close();
toggleSidebar(currentTest.sidebarName);
currentTest.cleanup();
postFunc();
});
}, false);
}
}
};
ww.registerNotification(observer);
// Select the inserted places item.
currentTest.selectNode(tree);
is(tbo.view.selection.count, 1,
"The test node should be successfully selected");
// Get its row ID.
let min = {}, max = {};
tbo.view.selection.getRangeAt(0, min, max);
let rowID = min.value;
tbo.ensureRowIsVisible(rowID);
// Calculate the click coordinates.
let x = {}, y = {}, width = {}, height = {};
tbo.getCoordsForCellItem(rowID, tree.columns[0], "text",
x, y, width, height);
x = x.value + width.value / 2;
y = y.value + height.value / 2;
// Simulate the click.
EventUtils.synthesizeMouse(tree.body, x, y, {}, doc.defaultView);
// Now, wait for the domwindowopened observer to catch the alert dialog.
// If something goes wrong, the test will time out at this stage.
// Note that for the history sidebar, the URL itself is not opened,
// and Places will show the load-js-data-url-error prompt as an alert
// box, which means that the click actually worked, so it's good enough
// for the purpose of this test.
});
}, true);
toggleSidebar(currentTest.sidebarName);
}
function changeSidebarDirection(aDirection) {
document.getElementById("sidebar")
.contentDocument
.documentElement
.style.direction = aDirection;
}
function runNextTest() {
if (tests.length == 0)
finish();
else {
currentTest = tests.shift();
testPlacesPanel(function() {
changeSidebarDirection("ltr");
info("Running " + currentTest.desc + " in LTR mode");
}, function() {
executeSoon(function() {
testPlacesPanel(function() {
// Run the test in RTL mode.
changeSidebarDirection("rtl");
info("Running " + currentTest.desc + " in RTL mode");
}, function() {
executeSoon(runNextTest);
});
});
});
}
}
runNextTest();
}

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

@ -56,9 +56,8 @@ var gAdvancedPane = {
advancedPrefs.selectedTab = document.getElementById(extraArgs["advancedTab"]);
} else {
var preference = document.getElementById("browser.preferences.advanced.selectedTabIndex");
if (preference.value === null)
return;
advancedPrefs.selectedIndex = preference.value;
if (preference.value !== null)
advancedPrefs.selectedIndex = preference.value;
}
#ifdef MOZ_UPDATER

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

@ -5,6 +5,18 @@
dnl AM_PATH_NSPR([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for NSPR, and define NSPR_CFLAGS and NSPR_LIBS
dnl
dnl If the nspr-config script is available, use it to find the
dnl appropriate CFLAGS and LIBS, and to check for the required
dnl version, and run ACTION-IF-FOUND.
dnl
dnl Otherwise, if NO_NSPR_CONFIG_SYSTEM_VERSION is set, we use it,
dnl NO_NSPR_CONFIG_SYSTEM_CFLAGS, and NO_NSPR_CONFIG_SYSTEM_LIBS to
dnl provide default values, and run ACTION-IF-FOUND. (Some systems
dnl ship NSPR without nspr-config, but can glean the appropriate flags
dnl and version.)
dnl
dnl Otherwise, run ACTION-IF-NOT-FOUND.
AC_DEFUN([AM_PATH_NSPR],
[dnl
@ -38,17 +50,24 @@ AC_ARG_WITH(nspr-exec-prefix,
AC_MSG_CHECKING(for NSPR - version >= $min_nspr_version)
no_nspr=""
if test "$NSPR_CONFIG" = "no"; then
no_nspr="yes"
else
if test "$NSPR_CONFIG" != "no"; then
NSPR_CFLAGS=`$NSPR_CONFIG $nspr_config_args --cflags`
NSPR_LIBS=`$NSPR_CONFIG $nspr_config_args --libs`
NSPR_VERSION_STRING=`$NSPR_CONFIG $nspr_config_args --version`
elif test -n "${NO_NSPR_CONFIG_SYSTEM_VERSION}"; then
NSPR_CFLAGS="${NO_NSPR_CONFIG_SYSTEM_CFLAGS}"
NSPR_LIBS="${NO_NSPR_CONFIG_SYSTEM_LDFLAGS}"
NSPR_VERSION_STRING="$NO_NSPR_CONFIG_SYSTEM_VERSION"
else
no_nspr="yes"
fi
nspr_config_major_version=`$NSPR_CONFIG $nspr_config_args --version | \
if test -z "$no_nspr"; then
nspr_config_major_version=`echo $NSPR_VERSION_STRING | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
nspr_config_minor_version=`$NSPR_CONFIG $nspr_config_args --version | \
nspr_config_minor_version=`echo $NSPR_VERSION_STRING | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
nspr_config_micro_version=`$NSPR_CONFIG $nspr_config_args --version | \
nspr_config_micro_version=`echo $NSPR_VERSION_STRING | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
min_nspr_major_version=`echo $min_nspr_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`

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

@ -139,7 +139,8 @@ PRUint32 nsAutoInPrincipalDomainOriginSetter::sInPrincipalDomainOrigin;
static
nsresult
GetOriginFromURI(nsIURI* aURI, nsACString& aOrigin)
GetPrincipalDomainOrigin(nsIPrincipal* aPrincipal,
nsACString& aOrigin)
{
if (nsAutoInPrincipalDomainOriginSetter::sInPrincipalDomainOrigin > 1) {
// Allow a single recursive call to GetPrincipalDomainOrigin, since that
@ -150,8 +151,16 @@ GetOriginFromURI(nsIURI* aURI, nsACString& aOrigin)
}
nsAutoInPrincipalDomainOriginSetter autoSetter;
aOrigin.Truncate();
nsCOMPtr<nsIURI> uri = NS_GetInnermostURI(aURI);
nsCOMPtr<nsIURI> uri;
aPrincipal->GetDomain(getter_AddRefs(uri));
if (!uri) {
aPrincipal->GetURI(getter_AddRefs(uri));
}
NS_ENSURE_TRUE(uri, NS_ERROR_UNEXPECTED);
uri = NS_GetInnermostURI(uri);
NS_ENSURE_TRUE(uri, NS_ERROR_UNEXPECTED);
nsCAutoString hostPort;
@ -173,22 +182,6 @@ GetOriginFromURI(nsIURI* aURI, nsACString& aOrigin)
return NS_OK;
}
static
nsresult
GetPrincipalDomainOrigin(nsIPrincipal* aPrincipal,
nsACString& aOrigin)
{
nsCOMPtr<nsIURI> uri;
aPrincipal->GetDomain(getter_AddRefs(uri));
if (!uri) {
aPrincipal->GetURI(getter_AddRefs(uri));
}
NS_ENSURE_TRUE(uri, NS_ERROR_UNEXPECTED);
return GetOriginFromURI(uri, aOrigin);
}
// Inline copy of JS_GetPrivate() for better inlining and optimization
// possibilities. Also doesn't take a cx argument as it's not
// needed. We access the private data only on objects whose private
@ -838,81 +831,35 @@ nsScriptSecurityManager::CheckPropertyAccessImpl(PRUint32 aAction,
NS_ConvertUTF8toUTF16 className(classInfoData.GetName());
nsCAutoString subjectOrigin;
nsCAutoString subjectDomain;
if (!nsAutoInPrincipalDomainOriginSetter::sInPrincipalDomainOrigin) {
nsCOMPtr<nsIURI> uri, domain;
subjectPrincipal->GetURI(getter_AddRefs(uri));
// Subject can't be system if we failed the security
// check, so |uri| is non-null.
NS_ASSERTION(uri, "How did that happen?");
GetOriginFromURI(uri, subjectOrigin);
subjectPrincipal->GetDomain(getter_AddRefs(domain));
if (domain) {
GetOriginFromURI(domain, subjectDomain);
}
GetPrincipalDomainOrigin(subjectPrincipal, subjectOrigin);
} else {
subjectOrigin.AssignLiteral("the security manager");
}
NS_ConvertUTF8toUTF16 subjectOriginUnicode(subjectOrigin);
NS_ConvertUTF8toUTF16 subjectDomainUnicode(subjectDomain);
nsCAutoString objectOrigin;
nsCAutoString objectDomain;
if (!nsAutoInPrincipalDomainOriginSetter::sInPrincipalDomainOrigin &&
objectPrincipal) {
nsCOMPtr<nsIURI> uri, domain;
objectPrincipal->GetURI(getter_AddRefs(uri));
if (uri) { // Object principal might be system
GetOriginFromURI(uri, objectOrigin);
}
objectPrincipal->GetDomain(getter_AddRefs(domain));
if (domain) {
GetOriginFromURI(domain, objectDomain);
}
GetPrincipalDomainOrigin(objectPrincipal, objectOrigin);
}
NS_ConvertUTF8toUTF16 objectOriginUnicode(objectOrigin);
NS_ConvertUTF8toUTF16 objectDomainUnicode(objectDomain);
nsXPIDLString errorMsg;
const PRUnichar *formatStrings[] =
{
subjectOriginUnicode.get(),
className.get(),
JSValIDToString(cx, aProperty),
objectOriginUnicode.get(),
subjectDomainUnicode.get(),
objectDomainUnicode.get()
objectOriginUnicode.get()
};
PRUint32 length = NS_ARRAY_LENGTH(formatStrings);
// XXXbz Our localization system is stupid and can't handle not showing
// some strings that get passed in. Which means that we have to get
// our length precisely right: it has to be exactly the number of
// strings our format string wants. This means we'll have to move
// strings in the array as needed, sadly...
if (nsAutoInPrincipalDomainOriginSetter::sInPrincipalDomainOrigin ||
!objectPrincipal) {
stringName.AppendLiteral("OnlySubject");
length -= 3;
} else {
// default to a length that doesn't include the domains, then
// increase it as needed.
length -= 2;
if (!subjectDomainUnicode.IsEmpty()) {
stringName.AppendLiteral("SubjectDomain");
length += 1;
}
if (!objectDomainUnicode.IsEmpty()) {
stringName.AppendLiteral("ObjectDomain");
length += 1;
if (length != NS_ARRAY_LENGTH(formatStrings)) {
// We have an object domain but not a subject domain.
// Scoot our string over one slot. See the XXX comment
// above for why we need to do this.
formatStrings[length-1] = formatStrings[length];
}
}
--length;
}
// We need to keep our existing failure rv and not override it

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

@ -4508,7 +4508,7 @@ MOZ_DBGRINFO_MODULES=
MOZ_ENABLE_CANVAS=1
MOZ_ENABLE_CANVAS3D=
MOZ_FEEDS=1
MOZ_IMG_DECODERS_DEFAULT="png gif jpeg bmp xbm icon"
MOZ_IMG_DECODERS_DEFAULT="png gif jpeg bmp icon"
MOZ_IMG_ENCODERS_DEFAULT="png jpeg"
MOZ_JAVAXPCOM=
MOZ_JSDEBUGGER=1

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

@ -250,9 +250,9 @@ nsStyleLinkElement::DoUpdateStyleSheet(nsIDocument *aOldDocument,
return NS_OK;
}
nsCOMPtr<nsIURI> uri;
PRBool isInline;
GetStyleSheetURL(&isInline, getter_AddRefs(uri));
nsCOMPtr<nsIURI> uri = GetStyleSheetURL(&isInline);
if (!aForceUpdate && mStyleSheet && !isInline && uri) {
nsCOMPtr<nsIURI> oldURI;

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

@ -95,8 +95,7 @@ protected:
nsresult UpdateStyleSheetInternal(nsIDocument *aOldDocument,
PRBool aForceUpdate = PR_FALSE);
virtual void GetStyleSheetURL(PRBool* aIsInline,
nsIURI** aURI) = 0;
virtual already_AddRefed<nsIURI> GetStyleSheetURL(PRBool* aIsInline) = 0;
virtual void GetStyleSheetInfo(nsAString& aTitle,
nsAString& aType,
nsAString& aMedia,

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

@ -0,0 +1,11 @@
<html>
<head>
<title>Test for Bug 484200</title>
<style>
p { background:lime }
</style>
</head>
<body>
<p>xxxxx</p>
</body>
</html>

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

@ -0,0 +1,11 @@
<html>
<head>
<title>Test for Bug 484200</title>
<style src=style>
p { background:lime }
</style>
</head>
<body>
<p>xxxxx</p>
</body>
</html>

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

@ -4,3 +4,4 @@
!= 468263-1d.html about:blank
== 468263-2.html 468263-2-ref.html
== 468263-2.html 468263-2-alternate-ref.html
== 484200-1.html 484200-1-ref.html

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

@ -116,8 +116,7 @@ public:
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
protected:
virtual void GetStyleSheetURL(PRBool* aIsInline,
nsIURI** aURI);
virtual already_AddRefed<nsIURI> GetStyleSheetURL(PRBool* aIsInline);
virtual void GetStyleSheetInfo(nsAString& aTitle,
nsAString& aType,
nsAString& aMedia,
@ -395,13 +394,11 @@ nsHTMLLinkElement::GetHrefURI() const
return GetHrefURIForAnchors();
}
void
nsHTMLLinkElement::GetStyleSheetURL(PRBool* aIsInline,
nsIURI** aURI)
already_AddRefed<nsIURI>
nsHTMLLinkElement::GetStyleSheetURL(PRBool* aIsInline)
{
*aIsInline = PR_FALSE;
*aURI = GetHrefURIForAnchors().get();
return;
return GetHrefURIForAnchors();
}
void

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

@ -103,8 +103,7 @@ public:
NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED
protected:
void GetStyleSheetURL(PRBool* aIsInline,
nsIURI** aURI);
already_AddRefed<nsIURI> GetStyleSheetURL(PRBool* aIsInline);
void GetStyleSheetInfo(nsAString& aTitle,
nsAString& aType,
nsAString& aMedia,
@ -312,24 +311,11 @@ nsHTMLStyleElement::SetInnerHTML(const nsAString& aInnerHTML)
return rv;
}
void
nsHTMLStyleElement::GetStyleSheetURL(PRBool* aIsInline,
nsIURI** aURI)
already_AddRefed<nsIURI>
nsHTMLStyleElement::GetStyleSheetURL(PRBool* aIsInline)
{
*aURI = nsnull;
*aIsInline = !HasAttr(kNameSpaceID_None, nsGkAtoms::src);
if (*aIsInline) {
return;
}
if (!IsInHTMLDocument()) {
// We stopped supporting <style src="..."> for XHTML as it is
// non-standard.
*aIsInline = PR_TRUE;
return;
}
*aURI = GetHrefURIForAnchors().get();
return;
*aIsInline = PR_TRUE;
return nsnull;
}
void

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

@ -74,6 +74,7 @@
#include "nsIMarkupDocumentViewer.h"
#define AUTOMATIC_IMAGE_RESIZING_PREF "browser.enable_automatic_image_resizing"
#define CLICK_IMAGE_RESIZING_PREF "browser.enable_click_image_resizing"
class nsImageDocument;
@ -146,6 +147,7 @@ protected:
PRInt32 mImageHeight;
PRPackedBool mResizeImageByDefault;
PRPackedBool mClickResizingEnabled;
PRPackedBool mImageIsOverflowing;
// mImageIsResized is true if the image is currently resized
PRPackedBool mImageIsResized;
@ -307,6 +309,8 @@ nsImageDocument::Init()
mResizeImageByDefault =
nsContentUtils::GetBoolPref(AUTOMATIC_IMAGE_RESIZING_PREF);
mClickResizingEnabled =
nsContentUtils::GetBoolPref(CLICK_IMAGE_RESIZING_PREF);
mShouldResize = mResizeImageByDefault;
mFirstResize = PR_TRUE;
@ -560,7 +564,7 @@ nsImageDocument::HandleEvent(nsIDOMEvent* aEvent)
if (eventType.EqualsLiteral("resize")) {
CheckOverflowing(PR_FALSE);
}
else if (eventType.EqualsLiteral("click")) {
else if (eventType.EqualsLiteral("click") && mClickResizingEnabled) {
SetZoomLevel(1.0);
mShouldResize = PR_TRUE;
if (mImageIsResized) {

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

@ -99,8 +99,8 @@ protected:
}
// nsStyleLinkElement overrides
void GetStyleSheetURL(PRBool* aIsInline,
nsIURI** aURI);
already_AddRefed<nsIURI> GetStyleSheetURL(PRBool* aIsInline);
void GetStyleSheetInfo(nsAString& aTitle,
nsAString& aType,
nsAString& aMedia,
@ -311,14 +311,11 @@ NS_IMETHODIMP nsSVGStyleElement::SetTitle(const nsAString & aTitle)
//----------------------------------------------------------------------
// nsStyleLinkElement methods
void
nsSVGStyleElement::GetStyleSheetURL(PRBool* aIsInline,
nsIURI** aURI)
already_AddRefed<nsIURI>
nsSVGStyleElement::GetStyleSheetURL(PRBool* aIsInline)
{
*aURI = nsnull;
*aIsInline = PR_TRUE;
return;
return nsnull;
}
void

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

@ -78,8 +78,7 @@ public:
protected:
nsCOMPtr<nsIURI> mOverriddenBaseURI;
void GetStyleSheetURL(PRBool* aIsInline,
nsIURI** aURI);
already_AddRefed<nsIURI> GetStyleSheetURL(PRBool* aIsInline);
void GetStyleSheetInfo(nsAString& aTitle,
nsAString& aType,
nsAString& aMedia,
@ -166,16 +165,14 @@ nsXMLStylesheetPI::OverrideBaseURI(nsIURI* aNewBaseURI)
mOverriddenBaseURI = aNewBaseURI;
}
void
nsXMLStylesheetPI::GetStyleSheetURL(PRBool* aIsInline,
nsIURI** aURI)
already_AddRefed<nsIURI>
nsXMLStylesheetPI::GetStyleSheetURL(PRBool* aIsInline)
{
*aIsInline = PR_FALSE;
*aURI = nsnull;
nsAutoString href;
if (!GetAttrValue(nsGkAtoms::href, href)) {
return;
return nsnull;
}
nsIURI *baseURL;
@ -188,7 +185,9 @@ nsXMLStylesheetPI::GetStyleSheetURL(PRBool* aIsInline,
baseURL = mOverriddenBaseURI;
}
NS_NewURI(aURI, href, charset.get(), baseURL);
nsCOMPtr<nsIURI> aURI;
NS_NewURI(getter_AddRefs(aURI), href, charset.get(), baseURL);
return aURI.forget();
}
void

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

@ -392,11 +392,8 @@ typedef struct {
#endif
PR_BEGIN_EXTERN_C
#if defined(__WATCOMC__) || defined(__WATCOM_CPLUSPLUS__)
extern DB *
#else
PR_EXTERN(DB *)
#endif
dbopen (const char *, int, int, DBTYPE, const void *);
/* set or unset a global lock flag to disable the

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

@ -64,11 +64,7 @@ dbSetOrClearDBLock(DBLockFlagEnum type)
all_databases_locked_closed = 0;
}
#if defined(__WATCOMC__) || defined(__WATCOM_CPLUSPLUS__)
DB *
#else
PR_IMPLEMENT(DB *)
#endif
dbopen(const char *fname, int flags,int mode, DBTYPE type, const void *openinfo)
{

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

@ -339,7 +339,7 @@ init_hash(HTAB *hashp, const char *file, HASHINFO *info)
if (stat(file, &statbuf))
return (NULL);
#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) && !defined(VMS) && !defined(XP_OS2)
#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) && !defined(XP_OS2)
#if defined(__QNX__) && !defined(__QNXNTO__)
hashp->BSIZE = 512; /* preferred blk size on qnx4 */
#else

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

@ -78,11 +78,13 @@ mkstempflags(char *path, int extraFlags)
return (_gettemp(path, &fd, extraFlags) ? fd : -1);
}
#ifdef WINCE /* otherwise, use the one in libc */
char *
mktemp(char *path)
{
return(_gettemp(path, (int *)NULL, 0) ? path : (char *)NULL);
}
#endif
/* NB: This routine modifies its input string, and does not always restore it.
** returns 1 on success, 0 on failure.

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

@ -27,19 +27,6 @@
tests.next();
}
////
// Enter a string in the find bar's search field, by issuing
// a series of key events to it.
//
function enterStringIntoFindField(aString) {
for (var i=0; i < aString.length; i++) {
var event = document.createEvent("KeyEvents");
event.initKeyEvent("keypress", true, true, null, false, false,
false, false, 0, aString.charCodeAt(i));
gFindBar._findField.inputField.dispatchEvent(event);
}
}
////
// Generator function for test steps for bug 298622:
// Find should work correctly on a page loaded from the
@ -85,7 +72,15 @@
};
document.getElementById("cmd_find").doCommand();
ok(!gFindBar.hidden, "failed to open findbar");
enterStringIntoFindField("A generic page");
gFindBar._findField.value = "A generic page";
gFindBar._find();
SimpleTest.executeSoon(nextTest);
yield;
// Make sure Find bar's internal status is not 'notfound'
isnot(gFindBar._findField.getAttribute("status"), "notfound",
"Findfield status attribute should not have been 'notfound'" +
" after Find");
// Make sure the key events above have time to be processed
// before continuing
@ -122,8 +117,16 @@
gFindBar = document.getElementById("FindToolbar");
document.getElementById("cmd_find").doCommand();
ok(!gFindBar.hidden, "failed to open findbar");
enterStringIntoFindField("find this");
gFindBar._findField.value = "find this";
gFindBar._find();
SimpleTest.executeSoon(nextTest);
yield;
// Make sure Find bar's internal status is not 'notfound'
isnot(gFindBar._findField.getAttribute("status"), "notfound",
"Findfield status attribute should not have been 'notfound'" +
" after Find");
// Make sure the key events above have time to be processed
// before continuing
waitForTrue(function() {

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

@ -0,0 +1,22 @@
<html class="reftest-wait">
<head>
<title>Crash [@ nsFocusManager::GetCommonAncestor], part 2</title>
</head>
<body>
<iframe src="data:text/html;charset=utf-8,%3Chtml%3E%3Chead%3E%3C/head%3E%0A%3Cbody%20onunload%3D%22window.frameElement.parentNode.removeChild%28window.frameElement%29%22%20tabindex%3D%221%22%3E%0A%3Cscript%3E%0Adocument.body.focus%28%29%3B%0A%3C/script%3E%0A%3C/body%3E%0A%3C/html%3E" id="content"></iframe>
<script>
var src=document.getElementById('src');
setInterval(function() {
if (!document.getElementById('content')) {
var x=document.createElement('iframe');
x.src=src;
x.id = 'content';
document.body.appendChild(x);
setTimeout(function() { window.focus(); document.documentElement.removeAttribute('class'); }, 100);
} else
window.frames[0].location.reload();
}, 500);
</script>
</body>
</html>

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

@ -17,3 +17,4 @@ load 462947.html
load 439206-1.html
load 473284.xul
load 502617.html
load 504224.html

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

@ -727,9 +727,6 @@ nsFocusManager::ContentRemoved(nsIDocument* aDocument, nsIContent* aContent)
// if the content is currently focused in the window, or is an ancestor
// of the currently focused element, reset the focus within that window.
// Note that nothing special needs to happen when the focused node is an
// iframe; in that case, DocumentUnloaded should be called to invalidate the
// child frame.
nsCOMPtr<nsIContent> content = window->GetFocusedNode();
if (content && nsContentUtils::ContentIsDescendantOf(content, aContent)) {
window->SetFocusedNode(nsnull);
@ -743,8 +740,24 @@ nsFocusManager::ContentRemoved(nsIDocument* aDocument, nsIContent* aContent)
// if this window is currently focused, clear the global focused
// element as well, but don't fire any events.
if (window == mFocusedWindow)
if (window == mFocusedWindow) {
mFocusedContent = nsnull;
}
else {
// Check if the node that was focused is an iframe or similar by looking
// if it has a subdocument. This would indicate that this focused iframe
// and its descendants will be going away. We will need to move the
// focus somewhere else, so just clear the focus in the toplevel window
// so that no element is focused.
nsIDocument* subdoc = aDocument->GetSubDocumentFor(content);
if (subdoc) {
nsCOMPtr<nsISupports> container = subdoc->GetContainer();
nsCOMPtr<nsPIDOMWindow> childWindow = do_GetInterface(container);
if (childWindow && IsSameOrAncestor(childWindow, mFocusedWindow)) {
ClearFocus(mActiveWindow);
}
}
}
}
return NS_OK;
@ -1118,9 +1131,11 @@ nsFocusManager::GetCommonAncestor(nsPIDOMWindow* aWindow1,
{
nsCOMPtr<nsIWebNavigation> webnav(do_GetInterface(aWindow1));
nsCOMPtr<nsIDocShellTreeItem> dsti1 = do_QueryInterface(webnav);
NS_ENSURE_TRUE(dsti1, nsnull);
webnav = do_GetInterface(aWindow2);
nsCOMPtr<nsIDocShellTreeItem> dsti2 = do_QueryInterface(webnav);
NS_ENSURE_TRUE(dsti2, nsnull);
nsAutoTPtrArray<nsIDocShellTreeItem, 30> parents1, parents2;
do {

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

@ -43,106 +43,9 @@ EnableCapabilityQuery = A script from "%S" is requesting enhanced abilities that
EnableCapabilityDenied = A script from "%S" was denied %S privileges.
CheckLoadURIError = Security Error: Content at %S may not load or link to %S.
CheckSameOriginError = Security Error: Content at %S may not load data from %S.
# LOCALIZATION NOTE (GetPropertyDeniedOrigins):
# %1$S is the origin of the script which was denied access.
# %2$S is the origin of the object access was denied to.
# %3$S is the type of object it was.
# %4$S is the property of that object that access was denied for.
GetPropertyDeniedOrigins = Permission denied for <%1$S> to get property %2$S.%3$S from <%4$S>.
# LOCALIZATION NOTE (GetPropertyDeniedOriginsSubjectDomain):
# %1$S is the origin of the script which was denied access.
# %2$S is the origin of the object access was denied to.
# %3$S is the type of object it was.
# %4$S is the property of that object that access was denied for.
# %5$S is the value of document.domain for the script which was denied access;
# don't translate "document.domain".
GetPropertyDeniedOriginsSubjectDomain = Permission denied for <%1$S> (document.domain=<%5$S>) to get property %2$S.%3$S from <%4$S> (document.domain has not been set).
# LOCALIZATION NOTE (GetPropertyDeniedOriginsObjectDomain):
# %1$S is the origin of the script which was denied access.
# %2$S is the origin of the object access was denied to.
# %3$S is the type of object it was.
# %4$S is the property of that object that access was denied for.
# %5$S is the value of document.domain for the object being accessed;
# don't translate "document.domain".
GetPropertyDeniedOriginsObjectDomain = Permission denied for <%1$S> (document.domain has not been set) to get property %2$S.%3$S from <%4$S> (document.domain=<%5$S>).
# LOCALIZATION NOTE (GetPropertyDeniedOriginsSubjectDomainObjectDomain):
# %1$S is the origin of the script which was denied access.
# %2$S is the origin of the object access was denied to.
# %3$S is the type of object it was.
# %4$S is the property of that object that access was denied for.
# %5$S is the value of document.domain for the script which was denied access;
# don't translate "document.domain"
# %6$S is the value of document.domain for the object being accessed;
# don't translate "document.domain".
GetPropertyDeniedOriginsSubjectDomainObjectDomain = Permission denied for <%1$S> (document.domain=<%5$S>) to get property %2$S.%3$S from <%4$S> (document.domain=<%6$S>).
# LOCALIZATION NOTE (SetPropertyDeniedOrigins):
# %1$S is the origin of the script which was denied access.
# %2$S is the origin of the object access was denied to.
# %3$S is the type of object it was.
# %4$S is the property of that object that access was denied for.
SetPropertyDeniedOrigins = Permission denied for <%1$S> to set property %2$S.%3$S on <%4$S>.
# LOCALIZATION NOTE (SetPropertyDeniedOriginsSubjectDomain):
# %1$S is the origin of the script which was denied access.
# %2$S is the origin of the object access was denied to.
# %3$S is the type of object it was.
# %4$S is the property of that object that access was denied for.
# %5$S is the value of document.domain for the script which was denied access;
# don't translate "document.domain".
SetPropertyDeniedOriginsSubjectDomain = Permission denied for <%1$S> (document.domain=<%5$S>) to set property %2$S.%3$S on <%4$S> (document.domain has not been set).
# LOCALIZATION NOTE (SetPropertyDeniedOriginsObjectDomain):
# %1$S is the origin of the script which was denied access.
# %2$S is the origin of the object access was denied to.
# %3$S is the type of object it was.
# %4$S is the property of that object that access was denied for.
# %5$S is the value of document.domain for the object being accessed;
# don't translate "document.domain".
SetPropertyDeniedOriginsObjectDomain = Permission denied for <%1$S> (document.domain has not been set) to set property %2$S.%3$S on <%4$S> (document.domain=<%5$S>).
# LOCALIZATION NOTE (SetPropertyDeniedOriginsSubjectDomainObjectDomain):
# %1$S is the origin of the script which was denied access.
# %2$S is the origin of the object access was denied to.
# %3$S is the type of object it was.
# %4$S is the property of that object that access was denied for.
# %5$S is the value of document.domain for the script which was denied access;
# don't translate "document.domain"
# %6$S is the value of document.domain for the object being accessed;
# don't translate "document.domain".
SetPropertyDeniedOriginsSubjectDomainObjectDomain = Permission denied for <%1$S> (document.domain=<%5$S>) to set property %2$S.%3$S on <%4$S> (document.domain=<%6$S>).
# LOCALIZATION NOTE (CallMethodDeniedOrigins):
# %1$S is the origin of the script which was denied access.
# %2$S is the origin of the object access was denied to.
# %3$S is the type of object it was.
# %4$S is the method of that object that access was denied for.
CallMethodDeniedOrigins = Permission denied for <%1$S> to call method %2$S.%3$S on <%4$S>.
# LOCALIZATION NOTE (CallMethodDeniedOriginsSubjectDomain):
# %1$S is the origin of the script which was denied access.
# %2$S is the origin of the object access was denied to.
# %3$S is the type of object it was.
# %4$S is the method of that object that access was denied for.
# %5$S is the value of document.domain for the script which was denied access;
# don't translate "document.domain".
CallMethodDeniedOriginsSubjectDomain = Permission denied for <%1$S> (document.domain=<%5$S>) to call method %2$S.%3$S on <%4$S> (document.domain has not been set).
# LOCALIZATION NOTE (CallMethodDeniedOriginsObjectDomain):
# %1$S is the origin of the script which was denied access.
# %2$S is the origin of the object access was denied to.
# %3$S is the type of object it was.
# %4$S is the method of that object that access was denied for.
# %5$S is the value of document.domain for the object being accessed;
# don't translate "document.domain".
CallMethodDeniedOriginsObjectDomain = Permission denied for <%1$S> (document.domain has not been set) to call method %2$S.%3$S on <%4$S> (document.domain=<%5$S>).
# LOCALIZATION NOTE (CallMethodDeniedOriginsSubjectDomainObjectDomain):
# %1$S is the origin of the script which was denied access.
# %2$S is the origin of the object access was denied to.
# %3$S is the type of object it was.
# %4$S is the method of that object that access was denied for.
# %5$S is the value of document.domain for the script which was denied access;
# don't translate "document.domain"
# %6$S is the value of document.domain for the object being accessed;
# don't translate "document.domain".
CallMethodDeniedOriginsSubjectDomainObjectDomain = Permission denied for <%1$S> (document.domain=<%5$S>) to call method %2$S.%3$S on <%4$S> (document.domain=<%6$S>).
GetPropertyDeniedOrigins = Permission denied for <%S> to get property %S.%S from <%S>.
SetPropertyDeniedOrigins = Permission denied for <%S> to set property %S.%S on <%S>.
CallMethodDeniedOrigins = Permission denied for <%S> to call method %S.%S on <%S>.
GetPropertyDeniedOriginsOnlySubject = Permission denied for <%S> to get property %S.%S
SetPropertyDeniedOriginsOnlySubject = Permission denied for <%S> to set property %S.%S
CallMethodDeniedOriginsOnlySubject = Permission denied for <%S> to call method %S.%S

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

@ -38,7 +38,6 @@ components\htmlparser.xpt
; imagelib
;
components\imgbmp.dll
components\imgxbm.dll
components\imgicon.dll
components\imgicon.xpt
components\imglib2.xpt

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

@ -26,7 +26,6 @@ components\htmlparser.xpt
; imagelib
;
components\imgbmp.dll
components\imgxbm.dll
components\imgicon.dll
components\imgicon.xpt
components\imglib2.xpt

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

@ -1,46 +0,0 @@
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is Mozilla QA Tests.
#
# The Initial Developer of the Original Code is
# Josh Soref.
# Portions created by the Initial Developer are Copyright (C) 2004
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS=mozembed testembed/components testembed
include $(topsrcdir)/config/rules.mk

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

@ -1,320 +0,0 @@
<!-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is Netscape Communications
- Corp. Portions created by Netscape Communications Corp. are
- Copyright (C) 1999 Netscape Communications Corp. All
- Rights Reserved.
-
- Contributor(s):
- dsirnapalli@netscape.com
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the LGPL or the GPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<title> Component List </title>
<!-- Descrpt: Component List Test
Author: dsirnapalli@netscape.com
Revs: 10.12.01 - Created
-->
<head>
<!-- script below is ngdriverspecific -->
<script TYPE="text/javascript" SRC="http://bubblegum/ngdriver/suites/testlib.js">
</script>
<script TYPE="text/javascript">
function getBrowserVersion()
{
var res = "";
res = res + '<b><h3><font color="#CC6600"> Browser Info </font></h3></b>' + '\n';
res = res + '<table BORDER COLS=2 WIDTH="70%">' + '\n';
res = res + ' <tr>' + '\n';
res = res + ' <td WIDTH="30%"><b> App Name: </b></td>' + '\n';
res = res + ' <td>' + navigator.appName + '</td>' + '\n';
res = res + ' </tr>' + '\n';
res = res + ' <tr>' + '\n';
res = res + ' <td><b> User Agent: </b></td>' + '\n';
res = res + ' <td>' + navigator.userAgent + '</td>' + '\n';
res = res + ' </tr>' + '\n';
res = res + ' <tr>' + '\n';
res = res + ' <td><b> Code Name:: </b></td>' + '\n';
res = res + ' <td>' + navigator.appCodeName + '</td>' + '\n';
res = res + ' </tr>' + '\n';
res = res + ' <tr>' + '\n';
res = res + ' <td><b> App Version: </b></td>' + '\n';
res = res + ' <td>' + navigator.appVersion + '</td>' + '\n';
res = res + ' </tr>' + '\n';
res = res + ' <tr>' + '\n';
res = res + ' <td><b> Language: </b></td>' + '\n';
res = res + ' <td>' + navigator.language + '</td>' + '\n';
res = res + ' </tr>' + '\n';
res = res + ' <tr>' + '\n';
res = res + ' <td><b> Platform: </b></td>' + '\n';
res = res + ' <td>' + navigator.platform + '</td>' + '\n';
res = res + ' </tr>' + '\n';
res = res + '</table>' + '\n';
return res;
}
</script>
<script TYPE="text/javascript">
function getShortPluginsList()
{
var res="";
navigator.plugins.refresh(false);
var numPlugins = navigator.plugins.length;
res = res + '<b><h3><font color="#CC6600"> Plugins </font></h3></b>' + '\n';
res = res + 'For Complete description of Plugins ';
res = res + '<a href="plugins.html">Click here</a>';
res = res + '<br><br>';
res = res + '<table BORDER COLS=1 WIDTH="30%">' + '\n';
if(numPlugins > 0)
res = res + '<caption><b><h3> Installed plug-ins </h3></b></caption>' + '\n';
else
{
res = res + '<caption><b><h3> No plug-ins are installed. </h3></b></caption>' + '\n';
res = res + ' <tr>' + '\n';
res = res + ' <td> Empty </td>' + '\n';
res = res + ' </tr>' + '\n';
}
for (var i=0;i<numPlugins;i++)
{
var plugin = navigator.plugins[i];
res = res + ' <tr>' + '\n';
res = res + ' <td>' + plugin.name + '</td>' + '\n';
res = res + ' </tr>' + '\n';
}
res = res + '</table>' + '\n';
return res;
}
</script>
<script TYPE="text/javascript">
complist = new Array();
noncomplist = new Array();
i = 0;
j = 0;
function getComponentList()
{
var servicecontractidlist = new Array("@mozilla.org/cookieService;1",
"@mozilla.org/file/directory_service;1",
"@mozilla.org/browser/global-history;1",
"@mozilla.org/preferences-service;1",
"@mozilla.org/embedcomp/window-watcher;1",
"@mozilla.org/embedcomp/prompt-service;1");
var serviceinterfacelist = new Array("nsICookieService",
"nsIDirectoryService",
"nsIGlobalHistory",
"nsIPrefService",
"nsIWindowWatcher",
"nsIPromptService");
var contractidlist = new Array("@mozilla.org/network/standard-url;1",
"@mozilla.org/network/standard-url;1",
"@mozilla.org/browser/shistory;1",
"@mozilla.org/helperapplauncherdialog;1",
"@mozilla.org/file/local;1",
"@mozilla.org/xpcom/observer;1",
"@mozilla.org/preferences-service;1",
"@mozilla.org/gfx/fontlist;1");
var interfacelist = new Array("nsIURI",
"nsIURL",
"nsISHistory",
"nsIHelperAppLauncherDialog",
"nsILocalFile",
"nsIObserver",
"nsIPrefBranch");
for (var m=0; m<serviceinterfacelist.length; m++)
checkservice(servicecontractidlist[m], serviceinterfacelist[m]);
for (var n=0; n<interfacelist.length; n++)
checkinterface(contractidlist[n], interfacelist[n]);
}
function getAdditionalComponentList()
{
// additional interface objects which cannot be got directly.
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var domWindow = window.QueryInterface(Components.interfaces.nsIDOMWindow);
if (domWindow)
complist[i++] = "nsIDOMWindow";
}
catch(e){
noncomplist[j++] = "nsIDOMWindow";
}
try
{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var charsetObj = domWindow.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
.getInterface(Components.interfaces.nsIDocCharset);
if (charsetObj)
complist[i++] = "nsIDocCharset";
}
catch(e){
noncomplist[j++] = "nsIDocCharset";
}
}
function checkservice(contractid, interfacename)
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var iID = Components.interfaces[interfacename];
var obj = Components.classes[contractid].getService(iID);
if (obj)
complist[i++] = interfacename;
}
catch(e){
noncomplist[j++] = interfacename;
}
}
function checkinterface(contractid, interfacename)
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var iID = Components.interfaces[interfacename];
var obj = Components.classes[contractid].createInstance(iID);
if (obj)
complist[i++] = interfacename;
}
catch(e){
noncomplist[j++] = interfacename;
}
}
function getComponentResults()
{
var res = "";
res = res + '<b><h3><font color="#CC6600"> Embedding Components </font></h3></b>' + '\n';
res = res + '<table BORDER COLS=1 WIDTH="30%">' + '\n';
res = res + '<caption><b><h3> Components Available </h3></b></caption>' + '\n';
for (var i=0; i<complist.length; i++)
{
res = res + ' <tr>' + '\n';
res = res + ' <td>' + complist[i] + '</td>' + '\n';
res = res + ' </tr>' + '\n';
}
if(complist.length == 0)
{
res = res + ' <tr>' + '\n';
res = res + ' <td> Empty </td>' + '\n';
res = res + ' </tr>' + '\n';
}
res = res + '</table>' + '\n';
res = res + '<br>' + '\n';
res = res + '<table BORDER COLS=1 WIDTH="30%">' + '\n';
res = res + '<caption><b><h3> Components Not Available </h3></b></caption>' + '\n';
for (var j=0; j<noncomplist.length; j++)
{
res = res + ' <tr>' + '\n';
res = res + ' <td>' + noncomplist[j] + '</td>' + '\n';
res = res + ' </tr>' + '\n';
}
if(noncomplist.length == 0)
{
res = res + ' <tr>' + '\n';
res = res + ' <td> Empty </td>' + '\n';
res = res + ' </tr>' + '\n';
}
res = res + '</table>' + '\n';
return res;
}
</script>
<script TYPE="text/javascript">
function displayResults(results)
{
document.results.textarea.value = results;
if (top.name == "testWindow")
{
fixSubmit();
}
else
{
document.write(document.results.textarea.value);
}
}
</script>
</head>
<body>
<!-- form below is ngdriverspecific -->
<form name="results" action="/ngdriver/cgi-bin/writeresults.cgi" method="post">
<script TYPE="text/javascript">
document.write('<input name="resultsfile" type="hidden" value="' + window.opener.document.resultsform.resultsfile.value + '">');
</script>
<input type="hidden" name="textarea">
</form>
<script TYPE="text/javascript">
var result = "";
result = result + "<font color='#CC6600'> NOTE: </font>" + "<br>";
result = result + "For the Test Case to run correctly include the following line into your prefs.js file." + "<br>";
result = result + 'user_pref("signed.applets.codebase_principal_support", true);' + "<br>";
result = result + 'prefs.js can be found at' + '<br>';
result = result + 'WINNT:C:\\WINNT\\Profiles\\profileyouareusing\\Application Data\\MfcEmbed\\Profiles\\default\\somefolder.slt\\prefs.js' + '<br>';
result = result + 'WIN98:C:\\WINDOWS\\Application Data\\MfcEmbed\\Profiles\\default\\somefolder.slt\\prefs.js' + '<br>';
result = result + '<br><hr ALIGN=LEFT SIZE=5 NOSHADE WIDTH="80%">' + '\n';
browserres = getBrowserVersion();
result = result + browserres;
result = result + '<br><hr ALIGN=LEFT SIZE=5 NOSHADE WIDTH="80%">' + '\n';
pluginres = getShortPluginsList();
result = result + pluginres;
result = result + '<br><hr ALIGN=LEFT SIZE=5 NOSHADE WIDTH="80%">' + '\n';
getComponentList();
getAdditionalComponentList();
componentres = getComponentResults();
result = result + componentres;
result = result + '<br><hr ALIGN=LEFT SIZE=5 NOSHADE WIDTH="80%">' + '\n';
displayResults(result);
</script>
</body>
</html>

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

@ -1,397 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<title> Embed Smoke Test </title>
<!-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corporation.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the LGPL or the GPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<head>
<!-- script below is ngdriverspecific -->
<script TYPE="text/javascript" SRC="http://bubblegum/ngdriver/suites/testlib.js">
</script>
<script TYPE="text/javascript">
var linkclick = "Fail";
var urlload = "Fail";
var fileurlload = "Fail";
var mozload = "Fail";
var seamonkeyload = "Fail";
executeAllTestCases = "false";
mozimageload = "false";
seamonkeyimageload = "false";
function createCookie(name,value,days)
{
if (days)
{
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}
function readCookie(name)
{
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++)
{
var c = ca[i];
while (c.charAt(0)==' ')
c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}
function eraseCookie(name)
{
createCookie(name,"",-1);
}
function linkfun()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var val = win.document.getElementsByTagName("title").item(0);
if(val)
{
var val1 = val.firstChild.data;
if(val1)
{
linkclick = "Pass";
}
}
}
catch(e)
{
alert("exception: " + e);
}
win.close();
linkwin.close();
}
function urlloaded()
{
// if(scrollbarsvisible)
// {
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var val = loadurlwin.document.getElementsByTagName("title").item(0);
if(val)
{
var val1 = val.firstChild.data;
if(val1)
{
urlload = "Pass";
}
}
}
catch(e)
{
alert("exception: " + e);
}
// }
loadurlwin.close();
}
function fileurlloaded()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var file = fileurl.document.getElementsByTagName("h2").item(0);
if(file)
{
if(file.firstChild.data == "This is a test file")
fileurlload = "Pass";
}
}
catch(e)
{
alert("exception: " + e);
}
fileurl.close();
}
function mozillaimageLoaded()
{
mozimageload = "true";
}
function seamonkeyimageLoaded()
{
seamonkeyimageload = "true";
}
function constructResults()
{
var results = "";
var linkclickcolor = "white";
var urlloadcolor = "white";
var fileurlloadcolor = "white";
var mozloadcolor = "white";
var seamonkeyloadcolor = "white";
results = results + "<html><br>";
results = results + " <table bgcolor='white' border='4'>";
results = results + " <tbody>";
results = results + " <caption> <center> <b> Embed SmokeTest Results </b> </center> </caption>";
results = results + " <tr>";
results = results + " <td> <b> Description </b> </td>";
results = results + " <td> <b> Result </b> </td>";
results = results + " <td> <b> Comments </b> </td>";
results = results + " </tr>";
if( (document.form1.linkclickcheckbox.checked==true) || (executeAllTestCases=="true") )
{
if (linkclick == "Fail") linkclickcolor = "red";
results = results + " <tr bgcolor = '" + linkclickcolor + "'>";
results = results + " <td> Link Clicking </td>";
results = results + " <td>" + linkclick + "</td>";
if (linkclick == "Fail")
results = results + " <td>" + "Link could not be clicked" + "</td>";
results = results + " </tr>";
}
if( (document.form1.loadurlcheckbox.checked==true) || (executeAllTestCases=="true") )
{
if (urlload == "Fail") urlloadcolor = "red";
results = results + " <tr bgcolor = '" + urlloadcolor + "'>";
results = results + " <td> URL Loading </td>";
results = results + " <td>" + urlload + "</td>";
if (urlload == "Fail")
results = results + " <td>" + "Either the URL could not be loaded or the Scrollbars donot appear" + "</td>";
results = results + " </tr>";
}
if( (document.form1.loadfileurlcheckbox.checked==true) || (executeAllTestCases=="true") )
{
if (fileurlload == "Fail") fileurlloadcolor = "red";
results = results + " <tr bgcolor = '" + fileurlloadcolor + "'>";
results = results + " <td> File URL Loading </td>";
results = results + " <td>" + fileurlload + "</td>";
if (fileurlload == "Fail")
results = results + " <td>" + "Either the file could not be found or the content is not displayed" + "</td>";
results = results + " </tr>";
}
if( (document.form1.mozillaloadcheckbox.checked==true) || (executeAllTestCases=="true") )
{
if (mozload == "Fail") mozloadcolor = "red";
results = results + " <tr bgcolor = '" + mozloadcolor + "'>";
results = results + " <td> Load GIF Image </td>";
results = results + " <td>" + mozload + "</td>";
if (mozload == "Fail")
results = results + " <td>" + "Image could not be found or Image could not be loaded properly" + "</td>";
results = results + " </tr>";
}
if( (document.form1.seamonkeyloadcheckbox.checked==true) || (executeAllTestCases=="true") )
{
if (seamonkeyload == "Fail") seamonkeyloadcolor = "red";
results = results + " <tr bgcolor = '" + seamonkeyloadcolor + "'>";
results = results + " <td> Load JPEG Image </td>";
results = results + " <td>" + seamonkeyload + "</td>";
if (seamonkeyload == "Fail")
results = results + " <td>" + "Image could not be found or Image could not be loaded properly" + "</td>";
results = results + " </tr>";
}
results = results + " </tbody>";
results = results + " </table>";
results = results + "</html>";
createCookie("embedsmoketest", results, 14);
window.location.reload();
}
function displayResults(results)
{
document.results.textarea.value = results;
if (top.name == "testWindow")
{
fixSubmit();
}
else
{
document.write(document.results.textarea.value);
}
}
function onSubmitAll()
{
executeAllTestCases = "true";
onSubmit();
}
function onSubmit()
{
if( (document.form1.linkclickcheckbox.checked==true) || (executeAllTestCases=="true") )
{
// link clicking
try
{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
linkwin = window.open("");
if(linkwin)
{
linkwin.document.write("<a href='http://www.mozilla.org'> Click here to go to Mozilla site </a><br><br>");
var link1 = linkwin.document.getElementsByTagName("a").item(0);
if (link1)
{
win = window.open(link1);
if (win)
{
win.onload = setTimeout("linkfun();", 1000);
}
}
}
}
catch(e)
{
alert("exception:" + e);
}
}
if( (document.form1.loadurlcheckbox.checked==true) || (executeAllTestCases=="true") )
{
// Loading new window
try
{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
loadurlwin = window.open("http://www.mozilla.org");
if (loadurlwin)
{
//scrollbarsvisible = loadurlwin.scrollbars.visible;
loadurlwin.onload = setTimeout("urlloaded();", 1000);
}
}
catch(e)
{
alert("exception:" + e);
}
}
if( (document.form1.loadfileurlcheckbox.checked==true) || (executeAllTestCases=="true") )
{
fileurl = window.open("test.html");
if (fileurl)
{
fileurl.onload = setTimeout("fileurlloaded();", 1000);
}
}
if( (document.form1.mozillaloadcheckbox.checked==true) || (executeAllTestCases=="true") )
{
if(mozimageload=="true")
mozload = "Pass";
}
if( (document.form1.seamonkeyloadcheckbox.checked==true) || (executeAllTestCases=="true") )
{
if(seamonkeyimageload=="true")
seamonkeyload = "Pass";
}
setTimeout("constructResults();", 6000);
}
</script>
</head>
<body>
<!-- form below is ngdriverspecific -->
<form name="results" action="/ngdriver/cgi-bin/writeresults.cgi" method="post">
<script TYPE="text/javascript">
document.write('<input name="resultsfile" type="hidden" value="' + window.opener.document.resultsform.resultsfile.value + '">');
</script>
<input type="hidden" name="textarea">
</form>
<script TYPE="text/javascript">
if(readCookie("embedsmoketest") == null)
{
document.write("<h2> Choose the test cases you want to run: </h2>");
document.write("<br><br>");
document.write("<form NAME='form1'>");
document.write("<input type='checkbox' name='linkclickcheckbox'><b> Click a Link on a Page </b></input>");
document.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
document.write(" [");
document.write("<a href='http://mozilla.org/quality/embed/plans/EmbedSmokeTestPlan.html#first'>Click to see description</a> ");
document.write("]<br>");
document.write("<input type='checkbox' name='loadurlcheckbox'><b> Load a URL </b></input>");
document.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
document.write(" [");
document.write("<a href='http://mozilla.org/quality/embed/plans/EmbedSmokeTestPlan.html#second'>Click to see description</a> ");
document.write("]<br>");
document.write("<input type='checkbox' name='loadfileurlcheckbox'><b> Load a File URL [Content Loading]</b></input>");
document.write("&nbsp;");
document.write(" [");
document.write("<a href='http://mozilla.org/quality/embed/plans/EmbedSmokeTestPlan.html#third'>Click to see description</a> ");
document.write("]<br>");
document.write("<input type='checkbox' name='mozillaloadcheckbox'><b> Load GIF Image</b></input>");
document.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
document.write(" [");
document.write("<a href='http://mozilla.org/quality/embed/plans/EmbedSmokeTestPlan.html#fourth'>Click to see description</a> ");
document.write("]<br>");
document.write("<input type='checkbox' name='seamonkeyloadcheckbox'><b> Load JPEG Image</b></input>");
document.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
document.write(" [");
document.write("<a href='http://mozilla.org/quality/embed/plans/EmbedSmokeTestPlan.html#fifth'>Click to see description</a> ");
document.write("]<br>");
document.write("</form>");
document.write("<br>");
document.write("<button type='button' onClick='onSubmit()'> Execute Selected Testcases </button>");
document.write(" ");
document.write("<button type='button' onClick='onSubmitAll()'> Execute All Testcases </button>");
document.write('<img src="images/mozilla-banner.gif" height=0 width=0 onLoad = "mozillaimageLoaded();">');
document.write('<img src="images/seamonkey.jpg" height=0 width=0 onLoad = "seamonkeyimageLoaded();">');
}
else
{
cookieValue = readCookie("embedsmoketest");
eraseCookie("embedsmoketest");
displayResults(cookieValue);
}
</script>
</body>
</html>

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

@ -1,183 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<title> nsIAccessible Interface Test Case </title>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for HTML ANCHOR Node
Author: dsirnapalli@netscape.com
Created:01.13.02
Last Updated:06.25.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<head>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </script>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </script>
<script type="text/javascript">
function getDomNodeAnchor()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("a").item(0);
return node;
}
catch(e){
alert("Exception: " + e);
}
}
function executeTestCase()
{
var domNode = getDomNodeAnchor();
domNode.addEventListener('focus',nodeFocused,true);
accNode = getAccessibleNode(domNode);
tempaccNode = accNode;
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
accNode.accTakeFocus();
}
catch(e){
alert("Exception**: " + e);
}
setTimeout("constructResults();", 2000);
}
function constructResults()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if(tempaccNode.accGetDOMNode() == accNode.accFocused.accGetDOMNode())
{
varaccFocused = "Focused";
}
else
{
varaccFocused = "Not Focused";
}
var name = getName();
var role = getRole();
var state = getState();
var value = getValue();
var newvalue = value.toString();
var numActions = getNumActions();
if(numActions > 1)
alert("When i last modified the test case numActions was 1. Now numActions is more than 1. Add tests for other numActions");
var actionName = getActionName();
var keyboardShortcut = getAccKeyboardShortcut();
var expectedName = "External Link";
var expectedRole = "30";
var expectedState = "13631492";
var expectedValue = "http://home.netscape.com";
var expectednodeFocus = "Focused";
var expectedaccFocused = "Focused";
var expectednumActions = "1";
var expectedactionName = "Jump";
var expectedkeyboardShortcut = "Alt+a";
var row0 = new Array("Property/Method", "Expected Values", "Actual Values", "Result");
var row1 = new Array("Name->", expectedName, name);
var row2 = new Array("Role->", expectedRole, role);
var row3 = new Array("State->", expectedState, state);
var row4 = new Array("Value->", expectedValue, value);
var row5 = new Array("accTakeFocus()->", expectednodeFocus, nodeFocus);
var row6 = new Array("accFocused->", expectedaccFocused, varaccFocused);
var row7 = new Array("accNumActions->", expectednumActions, numActions);
var row8 = new Array("getAccActionName()->", expectedactionName, actionName);
var row9 = new Array("accKeyboardShortcut->", expectedkeyboardShortcut, keyboardShortcut);
row = new Array(row0, row1, row2, row3, row4, row5, row6, row7, row8, row9);
if (name == expectedName) row1[3] = "PASS"; else row1[3] = "FAIL";
if (role == expectedRole) row2[3] = "PASS"; else row2[3] = "FAIL";
if (state == expectedState) row3[3] = "PASS"; else row3[3] = "FAIL";
if (newvalue.match(expectedValue)) row4[3] = "PASS"; else row4[3] = "FAIL";
if (nodeFocus == expectednodeFocus) row5[3] = "PASS"; else row5[3] = "FAIL";
if (varaccFocused == expectedaccFocused) row6[3] = "PASS"; else row6[3] = "FAIL";
if (numActions == expectednumActions) row7[3] = "PASS"; else row7[3] = "FAIL";
if (actionName == expectedactionName) row8[3] = "PASS"; else row8[3] = "FAIL";
if (keyboardShortcut == expectedkeyboardShortcut)
row9[3] = "PASS"; else row9[3] = "FAIL";
appendTableRes();
if(!isRunningStandalone())
WriteResults(res);
else
submitToCookie();
}
catch(e){
alert("Exception**: " + e);
}
}
</script>
</head>
<body>
<script type="text/javascript">
nodeFocus = "Not Focused";
cookieName = "nsIAccessibleTestAnchorNode";
var res = "<b><u> Results for HTML Anchor Node:</u></b><br><br>";
if(readCookie(cookieName) == null)
{
<!-- Test Anchor -->
<!-- Anchor linking to external file -->
document.write('Testing HTML Link' + '<br>');
document.write('<a href="http://home.netscape.com" accesskey="a">External Link</a>');
setTimeout("executeTestCase();", 2000);
}
else
{
var cookieValue = readCookie(cookieName);
eraseCookie(cookieName);
document.write(cookieValue);
}
</script>
</body>
</html>

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

@ -1,175 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<title> nsIAccessible Interface Test Case </title>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for HTML ANCHOR TEXT Node
Author: dsirnapalli@netscape.com
Created:01.13.02
Last Updated:09.16.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<head>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </script>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </script>
<script type="text/javascript">
function getDomNodeAnchorText()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("a").item(0);
return node;
}
catch(e){
alert("Exception: " + e);
}
}
function executeTestCase()
{
var domNode = getDomNodeAnchorText();
domNode.addEventListener('focus',nodeFocused,true);
domNode = domNode.firstChild;
accNode = getAccessibleNode(domNode);
tempaccNode = accNode;
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
// Even though you tell it to focus the textnode, the focus doesnot happen to the
// text node, the focus happens to the link node. textnodes cannot get focus
// by design. That's the reason I attached focus listener to the anchor node above.
accNode.accTakeFocus();
accNode = getAccessibleNode(domNode);
setTimeout("constructResults();", 2000);
}
catch(e){
alert("Exception**: " + e);
}
}
function constructResults()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var name = getName();
var role = getRole();
var state = getState();
var value = getValue();
var newvalue = value.toString();
var numActions = getNumActions();
var actionName = getActionName();
var keyboardShortcut = getAccKeyboardShortcut();
var expectedName = "External Link";
var expectedRole = "42";
var expectedState = "15728708";
var expectedValue = "http://home.netscape.com";
var expectednodeFocus = "Focused";
var expectednumActions = "1";
var expectedactionName = "Jump";
var expectedkeyboardShortcut = "Alt+a";
var row0 = new Array("Property/Method", "Expected Values", "Actual Values", "Result");
var row1 = new Array("Name->", expectedName, name);
var row2 = new Array("Role->", expectedRole, role);
var row3 = new Array("State->", expectedState, state);
var row4 = new Array("Value->", expectedValue, value);
var row5 = new Array("accTakeFocus()->", expectednodeFocus, nodeFocus);
var row6 = new Array("accNumActions->", expectednumActions, numActions);
var row7 = new Array("getAccActionName()->", expectedactionName, actionName);
var row8 = new Array("accKeyboardShortcut->", expectedkeyboardShortcut, keyboardShortcut);
row = new Array(row0, row1, row2, row3, row4, row5, row6, row7, row8);
if (name == expectedName) row1[3] = "PASS"; else row1[3] = "FAIL";
if (role == expectedRole) row2[3] = "PASS"; else row2[3] = "FAIL";
if (state == expectedState) row3[3] = "PASS"; else row3[3] = "FAIL";
if (newvalue.match(expectedValue)) row4[3] = "PASS"; else row4[3] = "FAIL";
if (nodeFocus == expectednodeFocus) row5[3] = "PASS"; else row5[3] = "FAIL";
if (numActions == expectednumActions) row6[3] = "PASS"; else row6[3] = "FAIL";
if (actionName == expectedactionName) row7[3] = "PASS"; else row7[3] = "FAIL";
if (keyboardShortcut == expectedkeyboardShortcut)
row8[3] = "PASS"; else row8[3] = "FAIL";
appendTableRes();
if(!isRunningStandalone())
WriteResults(res);
else
submitToCookie();
}
catch(e){
alert("Exception**: " + e);
}
}
</script>
</head>
<body>
<script type="text/javascript">
nodeFocus = "Not Focused";
cookieName = "nsIAccessibleTestAnchorTextNode";
var res = "<b><u> Results for HTML Anchor Text Node:</u></b><br><br>";
if(readCookie(cookieName) == null)
{
<!-- Test Anchor -->
<!-- Anchor linking to external file -->
document.write('Testing Link' + '<br>');
document.write('<a href="http://home.netscape.com" accesskey="a">External Link</a>');
setTimeout("executeTestCase();", 2000);
}
else
{
var cookieValue = readCookie(cookieName);
eraseCookie(cookieName);
document.write(cookieValue);
}
</script>
</body>
</html>

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

@ -1,194 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<title> nsIAccessible Interface Test Case </title>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for HTML BUTTON Node
Author: dsirnapalli@netscape.com
Created:01.08.02
Last Updated:06.25.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<head>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </script>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </script>
<script type="text/javascript">
function getDomNodeButton()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("button").item(0);
return node;
}
catch(e){
alert("Exception: " + e);
}
}
function executeTestCase()
{
var domNode = getDomNodeButton();
domNode.addEventListener('focus',nodeFocused,true);
domNode.addEventListener('click', nodeClicked,true);
accNode = getAccessibleNode(domNode);
tempaccNode = accNode;
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
accNode.accTakeFocus();
}
catch(e){
alert("Exception**: " + e);
}
setTimeout("constructResults();", 2000);
}
function nodeClicked()
{
nodeClick = "Button Pressed";
}
function constructResults()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if(tempaccNode.accGetDOMNode() == accNode.accFocused.accGetDOMNode())
{
varaccFocused = "Focused";
}
else
{
varaccFocused = "Not Focused";
}
var name = getName();
var role = getRole();
var state = getState();
var value = getValue();
var newvalue = value.toString();
var numActions = getNumActions();
if(numActions > 1)
alert("When i last modified the test case numActions was 1. Now numActions is more than 1. Add tests for other numActions");
var actionName = getActionName();
var action = doAction();
var keyboardShortcut = getAccKeyboardShortcut();
var expectedName = "Submit";
var expectedRole = "43";
var expectedState = "1048580";
var expectedValue = "NS_ERROR_NOT_IMPLEMENTED";
var expectednodeFocus = "Focused";
var expectedaccFocused = "Focused";
var expectednumActions = "1";
var expectedactionName = "Press";
var expectednodeClick = "Button Pressed";
var expectedkeyboardShortcut = "Alt+b";
var row0 = new Array("Property/Method", "Expected Values", "Actual Values", "Result");
var row1 = new Array("Name->", expectedName, name);
var row2 = new Array("Role->", expectedRole, role);
var row3 = new Array("State->", expectedState, state);
var row4 = new Array("Value->", expectedValue, value);
var row5 = new Array("accTakeFocus()->", expectednodeFocus, nodeFocus);
var row6 = new Array("accFocused->", expectedaccFocused, varaccFocused);
var row7 = new Array("accNumActions->", expectednumActions, numActions);
var row8 = new Array("getAccActionName()->", expectedactionName, actionName);
var row9 = new Array("accDoAction()->", expectednodeClick, nodeClick);
var row10 = new Array("accKeyboardShortcut->", expectedkeyboardShortcut, keyboardShortcut);
row = new Array(row0, row1, row2, row3, row4, row5, row6, row7, row8, row9, row10);
if (name == expectedName) row1[3] = "PASS"; else row1[3] = "FAIL";
if (role == expectedRole) row2[3] = "PASS"; else row2[3] = "FAIL";
if (state == expectedState) row3[3] = "PASS"; else row3[3] = "FAIL";
if (newvalue.match(expectedValue)) row4[3] = "PASS"; else row4[3] = "FAIL";
if (nodeFocus == expectednodeFocus) row5[3] = "PASS"; else row5[3] = "FAIL";
if (varaccFocused == expectedaccFocused) row6[3] = "PASS"; else row6[3] = "FAIL";
if (numActions == expectednumActions) row7[3] = "PASS"; else row7[3] = "FAIL";
if (actionName == expectedactionName) row8[3] = "PASS"; else row8[3] = "FAIL";
if (nodeClick == expectednodeClick) row9[3] = "PASS"; else row9[3] = "FAIL";
if (keyboardShortcut == expectedkeyboardShortcut)
row10[3] = "PASS"; else row10[3] = "FAIL";
appendTableRes();
if(!isRunningStandalone())
WriteResults(res);
else
submitToCookie();
}
catch(e){
alert("Exception**: " + e);
}
}
</script>
</head>
<body>
<script type="text/javascript">
nodeFocus = "Not Focused";
nodeClick = "Button Not Pressed";
cookieName = "nsIAccessibleTestButtonNode";
res = "<b><u> Results for HTML Button Node:</u></b><br><br>";
if(readCookie(cookieName) == null)
{
<!-- Test Button -->
document.write('<br>');
document.write('<b>Testing HTML Button for Accessibility..</b><br><br>');
document.write('<button value="submit" accesskey="b"> Submit </button>');
setTimeout("executeTestCase();", 2000);
}
else
{
var cookieValue = readCookie(cookieName);
eraseCookie(cookieName);
document.write(cookieValue);
}
</script>
</body>
</html>

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

@ -1,151 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<title> nsIAccessible Interface Test Case </title>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for HTML BUTTON TEXT Node
Author: dsirnapalli@netscape.com
Created:01.08.02
Last Updated:06.25.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<head>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </script>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </script>
<script type="text/javascript">
function getDomNodeButtonText()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("button").item(0);
return node;
}
catch(e){
alert("Exception: " + e);
}
}
function executeTestCase()
{
var domNode = getDomNodeButtonText();
accNode = getAccessibleNode(domNode);
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
accNode.accTakeFocus();
domNode = domNode.firstChild;
accNode = getAccessibleNode(domNode);
setTimeout("constructResults();", 2000);
}
catch(e){
alert("Exception**: " + e);
}
}
function constructResults()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var name = getName(accNode);
var role = getRole(accNode);
var state = getState(accNode);
var value = getValue(accNode);
var newvalue = value.toString();
var expectedName = "Submit";
var expectedRole = "42";
var expectedState = "2097216";
var expectedValue = "NS_ERROR_NOT_IMPLEMENTED";
var row0 = new Array("Property/Method", "Expected Values", "Actual Values", "Result");
var row1 = new Array("Name->", expectedName, name);
var row2 = new Array("Role->", expectedRole, role);
var row3 = new Array("State->", expectedState, state);
var row4 = new Array("Value->", expectedValue, value);
row = new Array(row0, row1, row2, row3, row4);
if (name == expectedName) row1[3] = "PASS"; else row1[3] = "FAIL";
if (role == expectedRole) row2[3] = "PASS"; else row2[3] = "FAIL";
if (state == expectedState) row3[3] = "PASS"; else row3[3] = "FAIL";
if (newvalue.match(expectedValue)) row4[3] = "PASS"; else row4[3] = "FAIL";
appendTableRes();
if(!isRunningStandalone())
WriteResults(res);
else
submitToCookie();
}
catch(e){
alert("Exception**: " + e);
}
}
</script>
</head>
<body>
<script type="text/javascript">
cookieName = "nsIAccessibleTestButtonNodeText";
var res = "<b><u> Results for HTML Button Text Node:</u></b><br><br>";
if(readCookie(cookieName) == null)
{
<!-- Test Button -->
document.write('<br>');
document.write('<b>Testing Button Text for Accessibility..</b><br><br>');
document.write('<button value="submit">Submit</button>');
setTimeout("executeTestCase();", 2000);
}
else
{
var cookieValue = readCookie(cookieName);
eraseCookie(cookieName);
document.write(cookieValue);
}
</script>
</body>
</html>

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

@ -1,203 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<title> nsIAccessible Interface Test Case </title>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for HTML CHECKBOX CHECKED Node
Author: dsirnapalli@netscape.com
Created:01.18.02
Last Updated:06.25.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<head>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </script>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </script>
<script type="text/javascript">
function getDomNodeCheckBoxChecked()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("form").item(0);
arr = new Array(5);
arr = node.elements;
return arr[0];
}
catch(e){
alert("Exception: " + e);
}
}
function executeTestCase()
{
var domNode = getDomNodeCheckBoxChecked();
domNode.addEventListener('focus',nodeFocused,true);
domNode.addEventListener('click', nodeUnChecked,true);
accNode = getAccessibleNode(domNode);
tempaccNode = accNode;
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
accNode.accTakeFocus();
}
catch(e){
alert("Exception**: " + e);
}
setTimeout("constructResults();", 2000);
}
function nodeUnChecked()
{
nodeCheck = "Check Box Not Checked";
}
function constructResults()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if(tempaccNode.accGetDOMNode() == accNode.accFocused.accGetDOMNode())
{
varaccFocused = "Focused";
}
else
{
varaccFocused = "Not Focused";
}
var name = getName();
var role = getRole();
var state = getState();
var value = getValue();
var newvalue = value.toString();
var numActions = getNumActions();
if(numActions > 1)
alert("When i last modified the test case numActions was 1. Now numActions is more than 1. Add tests for other numActions");
var actionName = getActionName();
var action = doAction();
var keyboardShortcut = getAccKeyboardShortcut();
var expectedName = null;
var expectedRole = "44";
var expectedState = "1048596";
var expectedValue = "NS_ERROR_NOT_IMPLEMENTED";
var expectednodeFocus = "Focused";
var expectedaccFocused = "Focused";
var expectednumActions = "1";
var expectedactionName = "Uncheck";
var expectednodeCheck = "Check Box Not Checked";
var expectedkeyboardShortcut = "Alt+c";
var row0 = new Array("Property/Method", "Expected Values", "Actual Values", "Result");
var row1 = new Array("Name->", expectedName, name);
var row2 = new Array("Role->", expectedRole, role);
var row3 = new Array("State->", expectedState, state);
var row4 = new Array("Value->", expectedValue, value);
var row5 = new Array("accTakeFocus()->", expectednodeFocus, nodeFocus);
var row6 = new Array("accFocused->", expectedaccFocused, varaccFocused);
var row7 = new Array("accNumActions->", expectednumActions, numActions);
var row8 = new Array("getAccActionName()->", expectedactionName, actionName);
var row9 = new Array("accDoAction()->", expectednodeCheck, nodeCheck);
var row10 = new Array("accKeyboardShortcut->", expectedkeyboardShortcut, keyboardShortcut);
row = new Array(row0, row1, row2, row3, row4, row5, row6, row7, row8, row9, row10);
if (name == expectedName) row1[3] = "PASS"; else row1[3] = "FAIL";
if (role == expectedRole) row2[3] = "PASS"; else row2[3] = "FAIL";
if (state == expectedState) row3[3] = "PASS"; else row3[3] = "FAIL";
if (newvalue.match(expectedValue)) row4[3] = "PASS"; else row4[3] = "FAIL";
if (nodeFocus == expectednodeFocus) row5[3] = "PASS"; else row5[3] = "FAIL";
if (varaccFocused == expectedaccFocused) row6[3] = "PASS"; else row6[3] = "FAIL";
if (numActions == expectednumActions) row7[3] = "PASS"; else row7[3] = "FAIL";
if (actionName == expectedactionName) row8[3] = "PASS"; else row8[3] = "FAIL";
if (nodeCheck == expectednodeCheck) row9[3] = "PASS"; else row9[3] = "FAIL";
if (keyboardShortcut == expectedkeyboardShortcut)
row10[3] = "PASS"; else row10[3] = "FAIL";
appendTableRes();
if(!isRunningStandalone())
WriteResults(res);
else
submitToCookie();
}
catch(e){
alert("Exception**: " + e);
}
}
</script>
</head>
<body>
<script type="text/javascript">
nodeFocus = "Not Focused";
nodeCheck = "Check Box Checked";
cookieName = "nsIAccessibleTestCheckBoxCheckedNode";
var res = "<b><u> Results for HTML Check Box Checked Node:</u></b><br><br>";
if(readCookie(cookieName) == null)
{
<!-- Test Form -->
document.write('<br><br><b> Testing Check Box Checked </b><br><br>');
document.write('<form>');
document.write('Is your age: <br>');
document.write('<input type="checkbox" name="sex" checked accesskey="c" onClick="nodeUnChecked();" onFocus="nodeFocused();"> Above 30');
document.write('<input type="checkbox" name="sex"> Below 30');
document.write('</form>');
setTimeout("executeTestCase();", 2000);
}
else
{
var cookieValue = readCookie(cookieName);
eraseCookie(cookieName);
document.write(cookieValue);
}
</script>
</body>
</html>

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

@ -1,204 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<title> nsIAccessible Interface Test Case </title>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for HTML CHECKBOX UNCHECKED Node
Author: dsirnapalli@netscape.com
Created:01.18.02
Last Updated:06.25.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<head>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </script>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </script>
<script type="text/javascript">
function getDomNodeCheckBoxUnchecked()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("form").item(0);
arr = new Array(5);
arr = node.elements;
return arr[0];
}
catch(e){
alert("Exception: " + e);
}
}
function executeTestCase()
{
var domNode = getDomNodeCheckBoxUnchecked();
domNode.addEventListener('focus',nodeFocused,true);
domNode.addEventListener('click', nodeChecked,true);
accNode = getAccessibleNode(domNode);
tempaccNode = accNode;
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
accNode.accTakeFocus();
}
catch(e){
alert("Exception**: " + e);
}
setTimeout("constructResults();", 2000);
}
function nodeChecked()
{
nodeCheck = "Check Box Checked";
}
function constructResults()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if(tempaccNode.accGetDOMNode() == accNode.accFocused.accGetDOMNode())
{
varaccFocused = "Focused";
}
else
{
varaccFocused = "Not Focused";
}
var name = getName();
var role = getRole();
var state = getState();
var value = getValue();
var newvalue = value.toString();
var numActions = getNumActions();
if(numActions > 1)
alert("When i last modified the test case numActions was 1. Now numActions is more than 1. Add tests for other numActions");
var actionName = getActionName();
var action = doAction();
var keyboardShortcut = getAccKeyboardShortcut();
var expectedName = null;
var expectedRole = "44";
var expectedState = "1048580";
var expectedValue = "NS_ERROR_NOT_IMPLEMENTED";
var expectednodeFocus = "Focused";
var expectedaccFocused = "Focused";
var expectednumActions = "1";
var expectedactionName = "Check";
var expectednodeCheck = "Check Box Checked";
var expectedkeyboardShortcut = "Alt+c";
var row0 = new Array("Property/Method", "Expected Values", "Actual Values", "Result");
var row1 = new Array("Name->", expectedName, name);
var row2 = new Array("Role->", expectedRole, role);
var row3 = new Array("State->", expectedState, state);
var row4 = new Array("Value->", expectedValue, value);
var row5 = new Array("accTakeFocus()->", expectednodeFocus, nodeFocus);
var row6 = new Array("accFocused->", expectedaccFocused, varaccFocused);
var row7 = new Array("accNumActions->", expectednumActions, numActions);
var row8 = new Array("getAccActionName()->", expectedactionName, actionName);
var row9 = new Array("accDoAction()->", expectednodeCheck, nodeCheck);
var row10 = new Array("accKeyboardShortcut->", expectedkeyboardShortcut, keyboardShortcut);
row = new Array(row0, row1, row2, row3, row4, row5, row6, row7, row8, row9, row10);
if (name == expectedName) row1[3] = "PASS"; else row1[3] = "FAIL";
if (role == expectedRole) row2[3] = "PASS"; else row2[3] = "FAIL";
if (state == expectedState) row3[3] = "PASS"; else row3[3] = "FAIL";
if (newvalue.match(expectedValue)) row4[3] = "PASS"; else row4[3] = "FAIL";
if (nodeFocus == expectednodeFocus) row5[3] = "PASS"; else row5[3] = "FAIL";
if (varaccFocused == expectedaccFocused) row6[3] = "PASS"; else row6[3] = "FAIL";
if (numActions == expectednumActions) row7[3] = "PASS"; else row7[3] = "FAIL";
if (actionName == expectedactionName) row8[3] = "PASS"; else row8[3] = "FAIL";
if (nodeCheck == expectednodeCheck) row9[3] = "PASS"; else row9[3] = "FAIL";
if (keyboardShortcut == expectedkeyboardShortcut)
row10[3] = "PASS"; else row10[3] = "FAIL";
appendTableRes();
if(!isRunningStandalone())
WriteResults(res);
else
submitToCookie();
}
catch(e){
alert("Exception**: " + e);
}
}
</script>
</head>
<body>
<script type="text/javascript">
nodeFocus = "Not Focused";
nodeCheck = "Check Box Not Checked";
cookieName = "nsIAccessibleTestCheckBoxNode";
var res = "<b><u> Results for HTML Check Box Unchecked Node:</u></b><br><br>";
if(readCookie(cookieName) == null)
{
<!-- Test Form -->
document.write('<br><br><b> Testing Check Box Unchecked for Accessibility </b><br><br>');
document.write('<form>');
document.write('Is your age: <br>');
document.write('<input type="checkbox" name="sex" accesskey="c"> Above 30');
document.write('<input type="checkbox" name="sex"> Below 30');
document.write('</form>');
setTimeout("executeTestCase();", 2000);
}
else
{
var cookieValue = readCookie(cookieName);
eraseCookie(cookieName);
document.write(cookieValue);
}
</script>
</body>
</html>

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

@ -1,160 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<title> nsIAccessible Interface Test Case </title>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for HTML FIELDSET WITH LEGEND Node
Author: dsirnapalli@netscape.com
Created:03.01.02
Last Updated:06.25.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<head>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </script>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </script>
<script type="text/javascript">
function getDomNodeFieldset()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("form").item(0);
arr = new Array(5);
arr = node.elements;
return arr[0];
}
catch(e){
alert("Exception: " + e);
}
}
function executeTestCase()
{
var domNode = getDomNodeFieldset();
accNode = getAccessibleNode(domNode);
setTimeout("constructResults();", 2000);
}
function constructResults()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var name = getName();
var role = getRole();
var state = getState();
var value = getValue();
var newvalue = value.toString();
var keyboardShortcut = getAccKeyboardShortcut();
var expectedName = "Customer Identification";
var expectedRole = "20";
var expectedState = "0";
var expectedValue = "NS_ERROR_NOT_IMPLEMENTED";
var expectedkeyboardShortcut = "Alt+f";
var row0 = new Array("Property/Method", "Expected Values", "Actual Values", "Result");
var row1 = new Array("Name->", expectedName, name);
var row2 = new Array("Role->", expectedRole, role);
var row3 = new Array("State->", expectedState, state);
var row4 = new Array("Value->", expectedValue, value);
var row5 = new Array("accKeyboardShortcut->", expectedkeyboardShortcut, keyboardShortcut);
row = new Array(row0, row1, row2, row3, row4, row5);
if (name == expectedName) row1[3] = "PASS"; else row1[3] = "FAIL";
if (role == expectedRole) row2[3] = "PASS"; else row2[3] = "FAIL";
if (state == expectedState) row3[3] = "PASS"; else row3[3] = "FAIL";
if (newvalue.match(expectedValue)) row4[3] = "PASS"; else row4[3] = "FAIL";
if (keyboardShortcut == expectedkeyboardShortcut)
row5[3] = "PASS"; else row5[3] = "FAIL";
appendTableRes();
if(!isRunningStandalone())
WriteResults(res);
else
submitToCookie();
}
catch(e){
alert("Exception**: " + e);
}
}
</script>
</head>
<body>
<script type="text/javascript">
cookieName = "nsIAccessibleTestFieldsetWithLegendNode";
res = "<b><u> Results for HTML Fieldset(with Legend) Node:</u></b><br><br>";
if(readCookie(cookieName) == null)
{
<!-- Test HTML FieldSet(with Legend) -->
document.write('<br>');
document.write('<b>Testing HTML FieldSet(with Legend) for Accessibility..</b><br><br>');
document.write('<br>');
document.write('<form action="http://www.democompany.com/cgi-bin/postquery.pl" method="post" enctype="multipart/form-data">');
document.write('<fieldset accesskey="f">');
document.write('<legend>Customer Identification</legend>');
document.write('<br><br>');
document.write('<label>Customer Name:</label>');
document.write('<input type="text" name="CustomerName" size="25">');
document.write('<br><br>');
document.write('<label>Password:</label>');
document.write('<input type="password" name="CustomerID" size="8" maxlength="8">');
document.write('<br>');
document.write('</fieldset>');
document.write('</form>');
setTimeout("executeTestCase();", 2000);
}
else
{
var cookieValue = readCookie(cookieName);
eraseCookie(cookieName);
document.write(cookieValue);
}
</script>
</body>
</html>

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

@ -1,159 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<title> nsIAccessible Interface Test Case </title>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for HTML FIELDSET WITHOUT LEGEND Node
Author: dsirnapalli@netscape.com
Created:03.01.02
Last Updated:06.25.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<head>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </script>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </script>
<script type="text/javascript">
function getDomNodeFieldset()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("form").item(0);
arr = new Array(5);
arr = node.elements;
return arr[0];
}
catch(e){
alert("Exception: " + e);
}
}
function executeTestCase()
{
var domNode = getDomNodeFieldset();
accNode = getAccessibleNode(domNode);
setTimeout("constructResults();", 2000);
}
function constructResults()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var name = getName();
var role = getRole();
var state = getState();
var value = getValue();
var newvalue = value.toString();
var keyboardShortcut = getAccKeyboardShortcut();
var expectedName = "";
var expectedRole = "20";
var expectedState = "0";
var expectedValue = "NS_ERROR_NOT_IMPLEMENTED";
var expectedkeyboardShortcut = "Alt+f";
var row0 = new Array("Property/Method", "Expected Values", "Actual Values", "Result");
var row1 = new Array("Name->", expectedName, name);
var row2 = new Array("Role->", expectedRole, role);
var row3 = new Array("State->", expectedState, state);
var row4 = new Array("Value->", expectedValue, value);
var row5 = new Array("accKeyboardShortcut->", expectedkeyboardShortcut, keyboardShortcut);
row = new Array(row0, row1, row2, row3, row4, row5);
if (name == expectedName) row1[3] = "PASS"; else row1[3] = "FAIL";
if (role == expectedRole) row2[3] = "PASS"; else row2[3] = "FAIL";
if (state == expectedState) row3[3] = "PASS"; else row3[3] = "FAIL";
if (newvalue.match(expectedValue)) row4[3] = "PASS"; else row4[3] = "FAIL";
if (keyboardShortcut == expectedkeyboardShortcut)
row5[3] = "PASS"; else row5[3] = "FAIL";
appendTableRes();
if(!isRunningStandalone())
WriteResults(res);
else
submitToCookie();
}
catch(e){
alert("Exception**: " + e);
}
}
</script>
</head>
<body>
<script type="text/javascript">
cookieName = "nsIAccessibleTestFieldsetWithoutLegendNode";
res = "<b><u> Results for HTML Fieldset(without Legend) Node:</u></b><br><br>";
if(readCookie(cookieName) == null)
{
<!-- Test HTML FieldSet(without Legend) -->
document.write('<br>');
document.write('<b>Testing HTML FieldSet(without Legend) for Accessibility..</b><br><br>');
document.write('<br>');
document.write('<form action="http://www.democompany.com/cgi-bin/postquery.pl" method="post" enctype="multipart/form-data">');
document.write('<fieldset accesskey="f">');
document.write('<br><br>');
document.write('<label>Customer Name:</label>');
document.write('<input type="text" name="CustomerName" size="25">');
document.write('<br><br>');
document.write('<label>Password:</label>');
document.write('<input type="password" name="CustomerID" size="8" maxlength="8">');
document.write('<br>');
document.write('</fieldset>');
document.write('</form>');
setTimeout("executeTestCase();", 2000);
}
else
{
var cookieValue = readCookie(cookieName);
eraseCookie(cookieName);
document.write(cookieValue);
}
</script>
</body>
</html>

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

@ -1,204 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<title> nsIAccessible Interface Test Case </title>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for HTML RADIOBUTTON CHECKED Node
Author: dsirnapalli@netscape.com
Created:01.18.02
Last Updated:06.25.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<head>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </script>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </script>
<script type="text/javascript">
function getDomNodeRadioButtonChecked()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("form").item(0);
arr = new Array(5);
arr = node.elements;
return arr[3];
}
catch(e){
alert("Exception: " + e);
}
}
function executeTestCase()
{
var domNode = getDomNodeRadioButtonChecked();
domNode.addEventListener('focus',nodeFocused,true);
domNode.addEventListener('click', nodeClicked,true);
accNode = getAccessibleNode(domNode);
tempaccNode = accNode;
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
accNode.accTakeFocus();
}
catch(e){
alert("Exception**: " + e);
}
setTimeout("constructResults();", 2000);
}
function nodeClicked()
{
nodeClick = "Radio Button Unchecked";
}
function constructResults()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if(tempaccNode.accGetDOMNode() == accNode.accFocused.accGetDOMNode())
{
varaccFocused = "Focused";
}
else
{
varaccFocused = "Not Focused";
}
var name = getName();
var role = getRole();
var state = getState();
var value = getValue();
var newvalue = value.toString();
var numActions = getNumActions();
if(numActions > 1)
alert("When i last modified the test case numActions was 1. Now numActions is more than 1. Add tests for other numActions");
var actionName = getActionName();
var action = doAction();
var keyboardShortcut = getAccKeyboardShortcut();
var expectedName = null;
var expectedRole = "45";
var expectedState = "1048596";
var expectedValue = "NS_ERROR_NOT_IMPLEMENTED";
var expectednodeFocus = "Focused";
var expectedaccFocused = "Focused";
var expectednumActions = "1";
var expectedactionName = "Select";
var expectednodeClick = "Radio Button Unchecked";
var expectedkeyboardShortcut = "Alt+r";
var row0 = new Array("Property/Method", "Expected Values", "Actual Values", "Result");
var row1 = new Array("Name->", expectedName, name);
var row2 = new Array("Role->", expectedRole, role);
var row3 = new Array("State->", expectedState, state);
var row4 = new Array("Value->", expectedValue, value);
var row5 = new Array("accTakeFocus()->", expectednodeFocus, nodeFocus);
var row6 = new Array("accFocused->", expectedaccFocused, varaccFocused);
var row7 = new Array("accNumActions->", expectednumActions, numActions);
var row8 = new Array("getAccActionName()->", expectedactionName, actionName);
var row9 = new Array("accDoAction()->", expectednodeClick, nodeClick);
var row10 = new Array("accKeyboardShortcut->", expectedkeyboardShortcut, keyboardShortcut);
row = new Array(row0, row1, row2, row3, row4, row5, row6, row7, row8, row9, row10);
if (name == expectedName) row1[3] = "PASS"; else row1[3] = "FAIL";
if (role == expectedRole) row2[3] = "PASS"; else row2[3] = "FAIL";
if (state == expectedState) row3[3] = "PASS"; else row3[3] = "FAIL";
if (newvalue.match(expectedValue)) row4[3] = "PASS"; else row4[3] = "FAIL";
if (nodeFocus == expectednodeFocus) row5[3] = "PASS"; else row5[3] = "FAIL";
if (varaccFocused == expectedaccFocused) row6[3] = "PASS"; else row6[3] = "FAIL";
if (numActions == expectednumActions) row7[3] = "PASS"; else row7[3] = "FAIL";
if (actionName == expectedactionName) row8[3] = "PASS"; else row8[3] = "FAIL";
if (nodeClick == expectednodeClick) row9[3] = "PASS"; else row9[3] = "FAIL";
if (keyboardShortcut == expectedkeyboardShortcut)
row10[3] = "PASS"; else row10[3] = "FAIL";
appendTableRes();
if(!isRunningStandalone())
WriteResults(res);
else
submitToCookie();
}
catch(e){
alert("Exception**: " + e);
}
}
</script>
</head>
<body>
<script type="text/javascript">
nodeFocus = "Not Focused";
nodeClick = "Radio Button Checked";
cookieName = "nsIAccessibleTestRadioButtonCheckedNode";
var res = "<b><u> Results for HTML Radio Button Checked Node:</u></b><br><br>";
if(readCookie(cookieName) == null)
{
<!-- Test Form -->
document.write('<br><br><b> Testing Radio Button Checked </b><br><br>');
document.write('<form>');
document.write(' Which is your favorite food');
document.write(' <input type="radio" name="favorite" value="mexican"> Mexican');
document.write(' <input type="radio" name="favorite" value="italian"> Italian');
document.write(' <input type="radio" name="favorite" value="japanese"> Japanese');
document.write(' <input type="radio" checked accesskey="r" name="favorite" value="other"> Other');
document.write('</form>');
setTimeout("executeTestCase();", 2000);
}
else
{
var cookieValue = readCookie(cookieName);
eraseCookie(cookieName);
document.write(cookieValue);
}
</script>
</body>
</html>

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

@ -1,201 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<title> nsIAccessible Interface Test Case </title>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for HTML RADIOBUTTON UNCHECKED Node
Author: dsirnapalli@netscape.com
Created:01.18.02
Last Updated:06.25.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<head>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </script>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </script>
<script type="text/javascript">
function getDomNodeRadioButtonUnchecked()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("form").item(0);
arr = new Array(5);
arr = node.elements;
return arr[0];
}
catch(e){
alert("Exception: " + e);
}
}
function executeTestCase()
{
var domNode = getDomNodeRadioButtonUnchecked();
domNode.addEventListener('focus',nodeFocused,true);
domNode.addEventListener('click', nodeClicked,true);
accNode = getAccessibleNode(domNode);
tempaccNode = accNode;
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
accNode.accTakeFocus();
}
catch(e){
alert("Exception**: " + e);
}
setTimeout("constructResults();", 2000);
}
function nodeClicked()
{
nodeClick = "Radio Button Checked";
}
function constructResults()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if(tempaccNode.accGetDOMNode() == accNode.accFocused.accGetDOMNode())
{
varaccFocused = "Focused";
}
else
{
varaccFocused = "Not Focused";
}
var name = getName();
var role = getRole();
var state = getState();
var value = getValue();
var newvalue = value.toString();
var numActions = getNumActions();
if(numActions > 1)
alert("When i last modified the test case numActions was 1. Now numActions is more than 1. Add tests for other numActions");
var actionName = getActionName();
var action = doAction();
var keyboardShortcut = getAccKeyboardShortcut();
var expectedName = null;
var expectedRole = "45";
var expectedState = "1048580";
var expectedValue = "NS_ERROR_NOT_IMPLEMENTED";
var expectednodeFocus = "Focused";
var expectedaccFocused = "Focused";
var expectednumActions = "1";
var expectedactionName = "Select";
var expectednodeClick = "Radio Button Checked";
var expectedkeyboardShortcut = "Alt+r";
var row0 = new Array("Property/Method", "Expected Values", "Actual Values", "Result");
var row1 = new Array("Name->", expectedName, name);
var row2 = new Array("Role->", expectedRole, role);
var row3 = new Array("State->", expectedState, state);
var row4 = new Array("Value->", expectedValue, value);
var row5 = new Array("accTakeFocus()->", expectednodeFocus, nodeFocus);
var row6 = new Array("accFocused->", expectedaccFocused, varaccFocused);
var row7 = new Array("accNumActions->", expectednumActions, numActions);
var row8 = new Array("getAccActionName()->", expectedactionName, actionName);
var row9 = new Array("accDoAction()->", expectednodeClick, nodeClick);
var row10 = new Array("accKeyboardShortcut->", expectedkeyboardShortcut, keyboardShortcut);
row = new Array(row0, row1, row2, row3, row4, row5, row6, row7, row8, row9, row10);
if (name == expectedName) row1[3] = "PASS"; else row1[3] = "FAIL";
if (role == expectedRole) row2[3] = "PASS"; else row2[3] = "FAIL";
if (state == expectedState) row3[3] = "PASS"; else row3[3] = "FAIL";
if (newvalue.match(expectedValue)) row4[3] = "PASS"; else row4[3] = "FAIL";
if (nodeFocus == expectednodeFocus) row5[3] = "PASS"; else row5[3] = "FAIL";
if (varaccFocused == expectedaccFocused) row6[3] = "PASS"; else row6[3] = "FAIL";
if (numActions == expectednumActions) row7[3] = "PASS"; else row7[3] = "FAIL";
if (actionName == expectedactionName) row8[3] = "PASS"; else row8[3] = "FAIL";
if (nodeClick == expectednodeClick) row9[3] = "PASS"; else row9[3] = "FAIL";
if (keyboardShortcut == expectedkeyboardShortcut)
row10[3] = "PASS"; else row10[3] = "FAIL";
appendTableRes();
if(!isRunningStandalone())
WriteResults(res);
else
submitToCookie();
}
catch(e){
alert("Exception**: " + e);
}
}
</script>
</head>
<body>
<script type="text/javascript">
nodeFocus = "Not Focused";
nodeClick = "Radio Button Unchecked";
cookieName = "nsIAccessibleTestRadioButtonNode";
var res = "<b><u> Results for HTML Radio Button Unchecked Node:</u></b><br><br>";
if(readCookie(cookieName) == null)
{
<!-- Test Form -->
document.write('<br><br><b> Testing Radio Button Unchecked </b><br><br>');
document.write('<form>');
document.write(' Which is your favorite food');
document.write(' <input type="radio" name="favorite" value="mexican" accesskey="r"> Mexican');
document.write(' <input type="radio" name="favorite" value="italian"> Italian');
document.write(' <input type="radio" name="favorite" value="japanese"> Japanese');
document.write(' <input type="radio" checked name="favorite" value="other"> Other');
document.write('</form>');
setTimeout("executeTestCase();", 2000);
}
else
{
var cookieValue = readCookie(cookieName);
eraseCookie(cookieName);
document.write(cookieValue);
}
</script>
</body>
</html>

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

@ -1,180 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<title> nsIAccessible Interface Test Case </title>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for HTML SELECT Node
Author: dsirnapalli@netscape.com
Created:03.27.02
Last Updated:06.25.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<head>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </script>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </script>
<script type="text/javascript">
function getDomNodeSelect()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("select").item(0);
return node;
}
catch(e){
alert("Exception: " + e);
}
}
function executeTestCase()
{
var domNode = getDomNodeSelect();
domNode.addEventListener('focus',nodeFocused,true);
accNode = getAccessibleNode(domNode);
tempaccNode = accNode;
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
accNode.accTakeFocus();
}
catch(e){
alert("Exception**: " + e);
}
setTimeout("constructResults();", 2000);
}
function constructResults()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if(tempaccNode.accGetDOMNode() == accNode.accFocused.accGetDOMNode())
{
varaccFocused = "Focused";
}
else
{
varaccFocused = "Not Focused";
}
var name = getName();
var role = getRole();
var state = getState();
var value = getValue();
var newvalue = value.toString();
var keyboardShortcut = getAccKeyboardShortcut();
var expectedName = null;
var expectedRole = "46";
var expectedState = "1074791492";
var expectedValue = "Red";
var expectednodeFocus = "Focused";
var expectedaccFocused = "Focused";
var expectedkeyboardShortcut = "Alt+s";
var row0 = new Array("Property/Method", "Expected Values", "Actual Values", "Result");
var row1 = new Array("Name->", expectedName, name);
var row2 = new Array("Role->", expectedRole, role);
var row3 = new Array("State->", expectedState, state);
var row4 = new Array("Value->", expectedValue, value);
var row5 = new Array("accTakeFocus()->", expectednodeFocus, nodeFocus);
var row6 = new Array("accFocused->", expectedaccFocused, varaccFocused);
var row7 = new Array("accKeyboardShortcut->", expectedkeyboardShortcut, keyboardShortcut);
row = new Array(row0, row1, row2, row3, row4, row5, row6, row7);
if (name == expectedName) row1[3] = "PASS"; else row1[3] = "FAIL";
if (role == expectedRole) row2[3] = "PASS"; else row2[3] = "FAIL";
if (state == expectedState) row3[3] = "PASS"; else row3[3] = "FAIL";
if (newvalue.match(expectedValue)) row4[3] = "PASS"; else row4[3] = "FAIL";
if (nodeFocus == expectednodeFocus) row5[3] = "PASS"; else row5[3] = "FAIL";
if (varaccFocused == expectedaccFocused) row6[3] = "PASS"; else row6[3] = "FAIL";
if (keyboardShortcut == expectedkeyboardShortcut)
row7[3] = "PASS"; else row7[3] = "FAIL";
appendTableRes();
if(!isRunningStandalone())
WriteResults(res);
else
submitToCookie();
}
catch(e){
alert("Exception**: " + e);
}
}
</script>
</head>
<body>
<script type="text/javascript">
cookieName = "nsIAccessibleTestSelectNode";
nodeFocus = "Not Focused";
res = "<b><u> Results for HTML Select Combobox's Select Node:</u></b><br><br>";
if(readCookie(cookieName) == null)
{
<!-- Test Select List -->
document.write('<b>Testing Select Combobox Select Node..</b>');
document.write('<br><br>');
document.write('Choose your favorite color ');
document.write('<select accesskey="s">');
document.write(' <option> Red </option>');
document.write(' <option> Blue </option>');
document.write(' <option> Green </option>');
document.write(' <option> Yellow </option>');
document.write('</select>');
setTimeout("executeTestCase();", 2000);
}
else
{
var cookieValue = readCookie(cookieName);
eraseCookie(cookieName);
document.write(cookieValue);
}
</script>
</body>
</html>

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

@ -1,189 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<title> nsIAccessible Interface Test Case </title>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for HTML SELECT COMBOBOX OPTION Node
Author: dsirnapalli@netscape.com
Created:03.27.02
Last Updated:06.25.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<head>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </script>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </script>
<script type="text/javascript">
function getDomNodeSelectComboboxOption()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("select").item(0);
node = node.firstChild;
return node;
}
catch(e){
alert("Exception: " + e);
}
}
function executeTestCase()
{
var domNode = getDomNodeSelectComboboxOption();
domNode.addEventListener('focus',nodeFocused,true);
accNode = getAccessibleNode(domNode);
tempaccNode = accNode;
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
accNode.accTakeFocus();
}
catch(e){
alert("Exception**: " + e);
}
setTimeout("constructResults();", 2000);
}
function constructResults()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if(tempaccNode.accGetDOMNode() == accNode.accFocused.accGetDOMNode())
{
varaccFocused = "Focused";
}
else
{
varaccFocused = "Not Focused";
}
var name = getName();
var role = getRole();
var state = getState();
var value = getValue();
var newvalue = value.toString();
var numActions = getNumActions();
var actionName = getActionName();
var keyboardShortcut = getAccKeyboardShortcut();
var expectedName = "Red";
var expectedRole = "34";
var expectedState = "3145734";
var expectedValue = "NS_ERROR_NOT_IMPLEMENTED";
var expectednodeFocus = "Focused";
var expectedaccFocused = "Focused";
var expectednumActions = 1;
var expectedactionName = "Select";
var expectedkeyboardShortcut = "Alt+o";
var row0 = new Array("Property/Method", "Expected Values", "Actual Values", "Result");
var row1 = new Array("Name->", expectedName, name);
var row2 = new Array("Role->", expectedRole, role);
var row3 = new Array("State->", expectedState, state);
var row4 = new Array("Value->", expectedValue, value);
var row5 = new Array("accTakeFocus()->", expectednodeFocus, nodeFocus);
var row6 = new Array("accFocused->", expectedaccFocused, varaccFocused);
var row7 = new Array("accNumActions->", expectednumActions, numActions);
var row8 = new Array("getAccActionName()->", expectedactionName, actionName);
var row9 = new Array("accKeyboardShortcut->", expectedkeyboardShortcut, keyboardShortcut);
row = new Array(row0, row1, row2, row3, row4, row5, row6, row7, row8, row9);
if (name == expectedName) row1[3] = "PASS"; else row1[3] = "FAIL";
if (role == expectedRole) row2[3] = "PASS"; else row2[3] = "FAIL";
if (state == expectedState) row3[3] = "PASS"; else row3[3] = "FAIL";
if (newvalue.match(expectedValue)) row4[3] = "PASS"; else row4[3] = "FAIL";
if (nodeFocus == expectednodeFocus) row5[3] = "PASS"; else row5[3] = "FAIL";
if (varaccFocused == expectedaccFocused) row6[3] = "PASS"; else row6[3] = "FAIL";
if (numActions == expectednumActions) row7[3] = "PASS"; else row7[3] = "FAIL";
if (actionName == expectedactionName) row8[3] = "PASS"; else row8[3] = "FAIL";
if (keyboardShortcut == expectedkeyboardShortcut)
row9[3] = "PASS"; else row9[3] = "FAIL";
appendTableRes();
if(!isRunningStandalone())
WriteResults(res);
else
submitToCookie();
}
catch(e){
alert("Exception**: " + e);
}
}
</script>
</head>
<body>
<script type="text/javascript">
cookieName = "nsIAccessibleTestSelectComboboxOptionNode";
nodeFocus = "Not Focused";
res = "<b><u> Results for HTML Select Combobox Option Node:</u></b><br><br>";
if(readCookie(cookieName) == null)
{
<!-- Test Select List -->
document.write('<b>Testing Select Combobox Option Node..</b>');
document.write('<br><br>');
document.write('Choose your favorite color ');
document.write('<select>');
document.write(' <option accesskey="o"> Red </option>');
document.write(' <option> Blue </option>');
document.write(' <option> Green </option>');
document.write(' <option> Yellow </option>');
document.write('</select>');
setTimeout("executeTestCase();", 2000);
}
else
{
var cookieValue = readCookie(cookieName);
eraseCookie(cookieName);
document.write(cookieValue);
}
</script>
</body>
</html>

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

@ -1,154 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<title> nsIAccessible Interface Test Case </title>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for HTML TABLE Node
Author: dsirnapalli@netscape.com
Created:11.20.01
Last Updated:06.25.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<head>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </script>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </script>
<script type="text/javascript">
function getDomNodeTable()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("table").item(0);
return node;
}
catch(e){
alert("Exception: " + e);
}
}
function executeTestCase()
{
var domNode = getDomNodeTable();
accNode = getAccessibleNode(domNode);
setTimeout("constructResults();", 2000);
}
function constructResults()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var name = getName(accNode);
var role = getRole(accNode);
var state = getState(accNode);
var value = getValue(accNode);
var newvalue = value.toString();
var expectedName = "Test Table";
var expectedRole = "24";
var expectedState = "0";
var expectedValue = "NS_ERROR_NOT_IMPLEMENTED";
var row0 = new Array("Property/Method", "Expected Values", "Actual Values", "Result");
var row1 = new Array("Name->", expectedName, name);
var row2 = new Array("Role->", expectedRole, role);
var row3 = new Array("State->", expectedState, state);
var row4 = new Array("Value->", expectedValue, value);
row = new Array(row0, row1, row2, row3, row4);
if (name == expectedName) row1[3] = "PASS"; else row1[3] = "FAIL";
if (role == expectedRole) row2[3] = "PASS"; else row2[3] = "FAIL";
if (state == expectedState) row3[3] = "PASS"; else row3[3] = "FAIL";
if (newvalue.match(expectedValue)) row4[3] = "PASS"; else row4[3] = "FAIL";
appendTableRes();
if(!isRunningStandalone())
WriteResults(res);
else
submitToCookie();
}
catch(e){
alert("Exception**: " + e);
}
}
</script>
</head>
<body>
<script type="text/javascript">
cookieName = "nsIAccessibleTestTableNode";
res = "<b><u> Results for HTML Table Node:</u></b><br><br>";
if(readCookie(cookieName) == null)
{
<!-- Test Table -->
document.write('<center>');
document.write('<table border cols=2 width="50%">');
document.write('<caption>Test Table</caption>');
document.write('<tr>');
document.write(' <td> Row1,Col1</td>');
document.write(' <td> Row1,Col2</td>');
document.write('</tr>');
document.write('<tr>');
document.write(' <td> Row2,Col1</td>');
document.write(' <td> Row2,Col2</td>');
document.write('</tr>');
document.write('<tr>');
document.write(' <td> Row3,Col1</td>');
document.write(' <td> Row3,Col2</td>');
document.write('</tr>');
document.write('</table>');
document.write('</center>');
setTimeout("executeTestCase();", 2000);
}
else
{
var cookieValue = readCookie(cookieName);
eraseCookie(cookieName);
document.write(cookieValue);
}
</script>
</body>
</html>

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

@ -1,127 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<title> nsIAccessible Interface Test Case </title>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for HTML TABLE CAPTION Node
Author: dsirnapalli@netscape.com
Created:01.20.02
Last Updated:06.25.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<head>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </script>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </script>
<script type="text/javascript">
function getDomNodeTableCaption()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("table").item(0);
node = node.firstChild;
return node;
}
catch(e){
alert("Exception: " + e);
}
}
function executeTestCase()
{
var domNode = getDomNodeTableCaption();
accNode = getAccessibleNode(domNode);
if(accNode == "Exception")
{
temp = "<table border cols=2 width='70%'>";
temp += "<tr>";
temp += "<td> The Node you selected is not an Accessible Node </td>";
temp += "<td> PASS </td>";
temp += "</tr>";
temp += "</table>";
res = res + temp;
}
if(!isRunningStandalone())
WriteResults(res);
else
submitToCookie();
}
</script>
</head>
<body>
<script type="text/javascript">
cookieName = "nsIAccessibleTestTableCaptionNode";
var res = "<b><u> Results for HTML Table Caption Node:</u></b><br><br>";
if(readCookie(cookieName) == null)
{
<!-- Test Table -->
document.write('<center>');
document.write('<table border cols=2 width="50%">');
document.write('<caption>Test Table</caption>');
document.write('<tr>');
document.write(' <td> Row1,Col1</td>');
document.write(' <td> Row1,Col2</td>');
document.write('</tr>');
document.write('<tr>');
document.write(' <td> Row2,Col1</td>');
document.write(' <td> Row2,Col2</td>');
document.write('</tr>');
document.write('<tr>');
document.write(' <td> Row3,Col1</td>');
document.write(' <td> Row3,Col2</td>');
document.write('</tr>');
document.write('</table>');
document.write('</center>');
setTimeout("executeTestCase();", 2000);
}
else
{
var cookieValue = readCookie(cookieName);
eraseCookie(cookieName);
document.write(cookieValue);
}
</script>
</body>
</html>

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

@ -1,156 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<title> nsIAccessible Interface Test Case </title>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for HTML TABLE CAPTION TEXT Node
Author: dsirnapalli@netscape.com
Created:01.20.02
Last Updated:06.25.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<head>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </script>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </script>
<script type="text/javascript">
function getDomNodeTableCaptionText()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("table").item(0);
node = node.firstChild.firstChild;
return node;
}
catch(e){
alert("Exception: " + e);
}
}
function executeTestCase()
{
var domNode = getDomNodeTableCaptionText();
accNode = getAccessibleNode(domNode);
setTimeout("constructResults();", 2000);
}
function constructResults()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var name = getName(accNode);
var role = getRole(accNode);
var state = getState(accNode);
var value = getValue(accNode);
var newvalue = value.toString();
var expectedName = "Test Table";
var expectedRole = "42";
var expectedState = "2097216";
var expectedValue = "NS_ERROR_NOT_IMPLEMENTED";
var row0 = new Array("Property/Method", "Expected Values", "Actual Values", "Result");
var row1 = new Array("Name->", expectedName, name);
var row2 = new Array("Role->", expectedRole, role);
var row3 = new Array("State->", expectedState, state);
var row4 = new Array("Value->", expectedValue, value);
row = new Array(row0, row1, row2, row3, row4);
if (name == expectedName) row1[3] = "PASS"; else row1[3] = "FAIL";
if (role == expectedRole) row2[3] = "PASS"; else row2[3] = "FAIL";
if (state == expectedState) row3[3] = "PASS"; else row3[3] = "FAIL";
if (newvalue.match(expectedValue)) row4[3] = "PASS"; else row4[3] = "FAIL";
appendTableRes();
if(!isRunningStandalone())
WriteResults(res);
else
submitToCookie();
}
catch(e){
alert("Exception**: " + e);
}
}
</script>
</head>
<body>
<script type="text/javascript">
cookieName = "nsIAccessibleTestTableCaptionTextNode";
var res = "<b><u> Results for HTML Table Caption Text Node:</u></b><br><br>";
if(readCookie(cookieName) == null)
{
<!-- Test Table -->
document.write('<center>');
document.write('<table border cols=2 width="50%">');
document.write('<caption>Test Table</caption>');
document.write('<tr>');
document.write(' <td> Row1,Col1</td>');
document.write(' <td> Row1,Col2</td>');
document.write('</tr>');
document.write('<tr>');
document.write(' <td> Row2,Col1</td>');
document.write(' <td> Row2,Col2</td>');
document.write('</tr>');
document.write('<tr>');
document.write(' <td> Row3,Col1</td>');
document.write(' <td> Row3,Col2</td>');
document.write('</tr>');
document.write('</table>');
document.write('</center>');
setTimeout("executeTestCase();", 2000);
}
else
{
var cookieValue = readCookie(cookieName);
eraseCookie(cookieName);
document.write(cookieValue);
}
</script>
</body>
</html>

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

@ -1,154 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<title> nsIAccessible Interface Test Case </title>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for HTML TABLE CELL Node
Author: dsirnapalli@netscape.com
Created:01.20.02
Last Updated:06.25.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<head>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </script>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </script>
<script type="text/javascript">
function getDomNodeTableCell()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("td").item(0);
return node;
}
catch(e){
alert("Exception: " + e);
}
}
function executeTestCase()
{
var domNode = getDomNodeTableCell();
accNode = getAccessibleNode(domNode);
setTimeout("constructResults();", 2000);
}
function constructResults()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var name = getName(accNode);
var role = getRole(accNode);
var state = getState(accNode);
var value = getValue(accNode);
var newvalue = value.toString();
var expectedName = null;
var expectedRole = "29";
var expectedState = "0";
var expectedValue = "NS_ERROR_NOT_IMPLEMENTED";
var row0 = new Array("Property/Method", "Expected Values", "Actual Values", "Result");
var row1 = new Array("Name->", expectedName, name);
var row2 = new Array("Role->", expectedRole, role);
var row3 = new Array("State->", expectedState, state);
var row4 = new Array("Value->", expectedValue, value);
row = new Array(row0, row1, row2, row3, row4);
if (name == expectedName) row1[3] = "PASS"; else row1[3] = "FAIL";
if (role == expectedRole) row2[3] = "PASS"; else row2[3] = "FAIL";
if (state == expectedState) row3[3] = "PASS"; else row3[3] = "FAIL";
if (newvalue.match(expectedValue)) row4[3] = "PASS"; else row4[3] = "FAIL";
appendTableRes();
if(!isRunningStandalone())
WriteResults(res);
else
submitToCookie();
}
catch(e){
alert("Exception**: " + e);
}
}
</script>
</head>
<body>
<script type="text/javascript">
cookieName = "nsIAccessibleTestButtonNode";
var res = "<b><u> Results for HTML Table Cell Node:</u></b><br><br>";
if(readCookie(cookieName) == null)
{
<!-- Test Table -->
document.write('<center>');
document.write('<table border cols=2 width="50%">');
document.write('<caption>Test Table</caption>');
document.write('<tr>');
document.write(' <td> Row1,Col1</td>');
document.write(' <td> Row1,Col2</td>');
document.write('</tr>');
document.write('<tr>');
document.write(' <td> Row2,Col1</td>');
document.write(' <td> Row2,Col2</td>');
document.write('</tr>');
document.write('<tr>');
document.write(' <td> Row3,Col1</td>');
document.write(' <td> Row3,Col2</td>');
document.write('</tr>');
document.write('</table>');
document.write('</center>');
setTimeout("executeTestCase();", 2000);
}
else
{
var cookieValue = readCookie(cookieName);
eraseCookie(cookieName);
document.write(cookieValue);
}
</script>
</body>
</html>

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

@ -1,155 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<title> nsIAccessible Interface Test Case </title>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for HTML TABLE CELL TEXT Node
Author: dsirnapalli@netscape.com
Created:01.20.02
Last Updated:06.25.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<head>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </script>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </script>
<script type="text/javascript">
function getDomNodeTableCellText()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("td").item(0);
node = node.firstChild;
return node;
}
catch(e){
alert("Exception: " + e);
}
}
function executeTestCase()
{
var domNode = getDomNodeTableCellText();
accNode = getAccessibleNode(domNode);
setTimeout("constructResults();", 2000);
}
function constructResults()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var name = getName(accNode);
var role = getRole(accNode);
var state = getState(accNode);
var value = getValue(accNode);
var newvalue = value.toString();
var expectedName = "Row1,Col1";
var expectedRole = "42";
var expectedState = "2097216";
var expectedValue = "NS_ERROR_NOT_IMPLEMENTED";
var row0 = new Array("Property/Method", "Expected Values", "Actual Values", "Result");
var row1 = new Array("Name->", expectedName, name);
var row2 = new Array("Role->", expectedRole, role);
var row3 = new Array("State->", expectedState, state);
var row4 = new Array("Value->", expectedValue, value);
row = new Array(row0, row1, row2, row3, row4);
if (name == expectedName) row1[3] = "PASS"; else row1[3] = "FAIL";
if (role == expectedRole) row2[3] = "PASS"; else row2[3] = "FAIL";
if (state == expectedState) row3[3] = "PASS"; else row3[3] = "FAIL";
if (newvalue.match(expectedValue)) row4[3] = "PASS"; else row4[3] = "FAIL";
appendTableRes();
if(!isRunningStandalone())
WriteResults(res);
else
submitToCookie();
}
catch(e){
alert("Exception**: " + e);
}
}
</script>
</head>
<body>
<script type="text/javascript">
cookieName = "nsIAccessibleTestTableCellTextNode";
var res = "<b><u> Results for HTML Table Cell Text Node:</u></b><br><br>";
if(readCookie(cookieName) == null)
{
<!-- Test Table -->
document.write('<center>');
document.write('<table border cols=2 width="50%">');
document.write('<caption>Test Table</caption>');
document.write('<tr>');
document.write(' <td> Row1,Col1</td>');
document.write(' <td> Row1,Col2</td>');
document.write('</tr>');
document.write('<tr>');
document.write(' <td> Row2,Col1</td>');
document.write(' <td> Row2,Col2</td>');
document.write('</tr>');
document.write('<tr>');
document.write(' <td> Row3,Col1</td>');
document.write(' <td> Row3,Col2</td>');
document.write('</tr>');
document.write('</table>');
document.write('</center>');
setTimeout("executeTestCase();", 2000);
}
else
{
var cookieValue = readCookie(cookieName);
eraseCookie(cookieName);
document.write(cookieValue);
}
</script>
</body>
</html>

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

@ -1,126 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<title> nsIAccessible Interface Test Case </title>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for HTML TABLE ROW Node
Author: dsirnapalli@netscape.com
Created:01.20.02
Last Updated:06.25.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<head>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </script>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </script>
<script type="text/javascript">
function getDomNodeTableRow()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("tr").item(0);
return node;
}
catch(e){
alert("Exception: " + e);
}
}
function executeTestCase()
{
var domNode = getDomNodeTableRow();
var accNode = getAccessibleNode(domNode);
if(accNode == "Exception")
{
temp = "<table border cols=2 width='70%'>";
temp += "<tr>";
temp += "<td> The Node you selected is not an Accessible Node </td>";
temp += "<td> PASS </td>";
temp += "</tr>";
temp += "</table>";
res = res + temp;
}
if(!isRunningStandalone())
WriteResults(res);
else
submitToCookie();
}
</script>
</head>
<body>
<script type="text/javascript">
cookieName = "nsIAccessibleTestTableRowNode";
var res = "<b><u> Results for HTML Table Row Node:</u></b><br><br>";
if(readCookie(cookieName) == null)
{
<!-- Test Table -->
document.write('<center>');
document.write('<table border cols=2 width="50%">');
document.write('<caption>Test Table</caption>');
document.write('<tr>');
document.write(' <td> Row1,Col1</td>');
document.write(' <td> Row1,Col2</td>');
document.write('</tr>');
document.write('<tr>');
document.write(' <td> Row2,Col1</td>');
document.write(' <td> Row2,Col2</td>');
document.write('</tr>');
document.write('<tr>');
document.write(' <td> Row3,Col1</td>');
document.write(' <td> Row3,Col2</td>');
document.write('</tr>');
document.write('</table>');
document.write('</center>');
setTimeout("executeTestCase();", 2000);
}
else
{
var cookieValue = readCookie(cookieName);
eraseCookie(cookieName);
document.write(cookieValue);
}
</script>
</body>
</html>

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

@ -1,179 +0,0 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<title> nsIAccessible Interface Test Case </title>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for HTML TEXTAREA Node
Author: dsirnapalli@netscape.com
Created:01.26.02
Last Updated:06.25.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<head>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </script>
<script type="text/javascript" src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </script>
<script type="text/javascript">
function getDomNodeTextArea()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("textarea").item(0);
return node;
}
catch(e){
alert("Exception: " + e);
}
}
function executeTestCase()
{
var domNode = getDomNodeTextArea();
domNode.addEventListener('focus',nodeFocused,true);
accNode = getAccessibleNode(domNode);
tempaccNode = accNode;
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
accNode.accTakeFocus();
}
catch(e){
alert("Exception**: " + e);
}
setTimeout("constructResults();", 2000);
}
function constructResults()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if(tempaccNode.accGetDOMNode() == accNode.accFocused.accGetDOMNode())
{
varaccFocused = "Focused";
}
else
{
varaccFocused = "Not Focused";
}
var name = getName();
var role = getRole();
var state = getState();
var value = getValue();
var newvalue = value.toString();
var numActions = getNumActions();
var newnumActions = numActions.toString();
var keyboardShortcut = getAccKeyboardShortcut();
var expectedName = null;
var expectedRole = "42";
var expectedState = "1048580";
var expectedValue = "Default text..";
var expectednodeFocus = "Focused";
var expectedaccFocused = "Focused";
var expectednumActions = "NS_ERROR_NOT_IMPLEMENTED";
var expectedkeyboardShortcut = "Alt+t";
var row0 = new Array("Property/Method", "Expected Values", "Actual Values", "Result");
var row1 = new Array("Name->", expectedName, name);
var row2 = new Array("Role->", expectedRole, role);
var row3 = new Array("State->", expectedState, state);
var row4 = new Array("Value->", expectedValue, value);
var row5 = new Array("accTakeFocus()->", expectednodeFocus, nodeFocus);
var row6 = new Array("accFocused->", expectedaccFocused, varaccFocused);
var row7 = new Array("accNumActions->", expectednumActions, numActions);
var row8 = new Array("accKeyboardShortcut->", expectedkeyboardShortcut, keyboardShortcut);
row = new Array(row0, row1, row2, row3, row4, row5, row6, row7, row8);
if (name == expectedName) row1[3] = "PASS"; else row1[3] = "FAIL";
if (role == expectedRole) row2[3] = "PASS"; else row2[3] = "FAIL";
if (state == expectedState) row3[3] = "PASS"; else row3[3] = "FAIL";
if (newvalue.match(expectedValue)) row4[3] = "PASS"; else row4[3] = "FAIL";
if (nodeFocus == expectednodeFocus) row5[3] = "PASS"; else row5[3] = "FAIL";
if (varaccFocused == expectedaccFocused) row6[3] = "PASS"; else row6[3] = "FAIL";
if (newnumActions.match(expectednumActions)) row7[3] = "PASS"; else row7[3] = "FAIL";
if (keyboardShortcut == expectedkeyboardShortcut)
row8[3] = "PASS"; else row8[3] = "FAIL";
appendTableRes();
if(!isRunningStandalone())
WriteResults(res);
else
submitToCookie();
}
catch(e){
alert("Exception**: " + e);
}
}
</script>
</head>
<body>
<script type="text/javascript">
nodeFocus = "Not Focused";
cookieName = "nsIAccessibleTestTextAreaNode";
var res = "<b><u> Results for HTML Text Area Node:</u></b><br><br>";
if(readCookie(cookieName) == null)
{
<!-- Test Text Area -->
document.write('<b> Testing Text Area </b><br><br>');
document.write('<textarea name="Comment Box" accesskey="t" cols="40" rows="8" onFocus="nodeFocused();">');
document.write('Default text..');
document.write('</textarea>');
setTimeout("executeTestCase();", 2000);
}
else
{
var cookieValue = readCookie(cookieName);
eraseCookie(cookieName);
document.write(cookieValue);
}
</script>
</body>
</html>

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

@ -1,123 +0,0 @@
<?xml version="1.0"?>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for XUL ARROWSCROLLBOX Node
Author: dsirnapalli@netscape.com
Created:06.12.02
Last Updated On:06.12.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window
id="arrowscrollbox-window"
title="XUL Arrowscrollbox"
orient="vertical"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </html:script>
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </html:script>
<html:script>
<![CDATA[
function getDomNodeArrowscrollbox()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("arrowscrollbox").item(0);
return node;
}
catch(e){
alert("Exception: " + e);
}
}
function executeTestCase()
{
var domNode = getDomNodeArrowscrollbox();
accNode = getAccessibleNode(domNode);
if(accNode == "Exception")
{
temp = "<table border cols=2 width='70%'>";
temp += "<tr>";
temp += "<td> The Node you selected is not an Accessible Node </td>";
temp += "<td> PASS </td>";
temp += "</tr>";
temp += "</table>";
res = res + temp;
}
WriteResults(res);
}
]]>
</html:script>
<description>
<html:b> Testing XUL Arrowscrollbox for Accessibility.. </html:b>
</description>
<box orient="horizontal" flex="1">
//A box which provides scroll arrows along its edges for scolling through the
//contents of the box. The user only needs to hover the mouse over the arrows
//to scroll the box. This element is typically used for large popup menus.
<arrowscrollbox orient="vertical">
<button label="Red"/>
<button label="Blue"/>
<button label="Green"/>
<button label="Yellow"/>
<button label="Orange"/>
<button label="Silver"/>
<button label="Lavender"/>
<button label="Gold"/>
<button label="Turquoise"/>
<button label="Peach"/>
<button label="Maroon"/>
<button label="Black"/>
</arrowscrollbox>
<spacer flex="1"/>
</box>
<html:script>
<![CDATA[
res = "<b><u> Results for XUL Arrowscrollbox Node:</u></b><br><br>";
setTimeout("executeTestCase();", 2000);
]]>
</html:script>
</window>

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

@ -1,102 +0,0 @@
<?xml version="1.0"?>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for XUL BOX Node
Author: dsirnapalli@netscape.com
Created: 05.28.02 - Created
Last Updated:06.12.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window
id="box-window"
title="XUL Box"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </html:script>
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </html:script>
<html:script>
<![CDATA[
function getDomNodeBox()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("box").item(0);
return node;
}
catch(e){
alert("Exception: " + e);
}
}
function executeTestCase()
{
var domNode = getDomNodeBox();
accNode = getAccessibleNode(domNode);
if(accNode == "Exception")
{
temp = "<table border cols=2 width='70%'>";
temp += "<tr>";
temp += "<td> The Node you selected is not an Accessible Node </td>";
temp += "<td> PASS </td>";
temp += "</tr>";
temp += "</table>";
res = res + temp;
}
WriteResults(res);
}
]]>
</html:script>
<description>
<html:b> Testing XUL Box for Accessibility.. </html:b>
</description>
<box orient="horizontal" flex="1"/>
<html:script>
<![CDATA[
res = "<b><u> Results for XUL Box Node:</u></b><br><br>";
setTimeout("executeTestCase();", 2000);
]]>
</html:script>
</window>

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

@ -1,190 +0,0 @@
<?xml version="1.0"?>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for XUL BUTTON Node
Author: dsirnapalli@netscape.com
Created:05.22.02
Last Updated:06.11.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window
id="button-window"
title="XUL Button"
orient="vertical"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </html:script>
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </html:script>
<html:script>
<![CDATA[
function getDomNodeButton()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("button").item(0);
return node;
}
catch(e){
alert("Exception: " + e);
}
}
function nodeClicked()
{
nodeClick = "Button Pressed";
}
function executeTestCase()
{
var domNode = getDomNodeButton();
domNode.addEventListener('focus',nodeFocused,true);
domNode.addEventListener('click', nodeClicked,true);
accNode = getAccessibleNode(domNode);
tempaccNode = accNode;
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
accNode.accTakeFocus();
}
catch(e){
alert("Exception**: " + e);
}
setTimeout("constructResults();", 2000);
}
function constructResults()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if(tempaccNode.accGetDOMNode() == accNode.accFocused.accGetDOMNode())
{
varaccFocused = "Focused";
}
else
{
varaccFocused = "Not Focused";
}
var name = getName();
var role = getRole();
var state = getState();
var value = getValue();
var newvalue = value.toString();
var numActions = getNumActions();
var actionName = getActionName();
var action = doAction();
var keyboardShortcut = getAccKeyboardShortcut();
var expectedName = "Normal";
var expectedRole = "43";
var expectedState = "1048580";
var expectedValue = "NS_ERROR_NOT_IMPLEMENTED";
var expectednodeFocus = "Focused";
var expectedaccFocused = "Focused";
var expectednumActions = "1";
var expectedactionName = "Press";
var expectednodeClick = "Button Pressed";
var expectedkeyboardShortcut = "Alt+n";
var row0 = new Array("Property/Method", "Expected Values", "Actual Values", "Result");
var row1 = new Array("Name->", expectedName, name);
var row2 = new Array("Role->", expectedRole, role);
var row3 = new Array("State->", expectedState, state);
var row4 = new Array("Value->", expectedValue, value);
var row5 = new Array("accTakeFocus()->", expectednodeFocus, nodeFocus);
var row6 = new Array("accFocused->", expectedaccFocused, varaccFocused);
var row7 = new Array("accNumActions->", expectednumActions, numActions);
var row8 = new Array("getAccActionName()->", expectedactionName, actionName);
var row9 = new Array("accDoAction()->", expectednodeClick, nodeClick);
var row10 = new Array("accKeyboardShortcut->", expectedkeyboardShortcut, keyboardShortcut);
row = new Array(row0, row1, row2, row3, row4, row5, row6, row7, row8, row9, row10);
if (name == expectedName) row1[3] = "PASS"; else row1[3] = "FAIL";
if (role == expectedRole) row2[3] = "PASS"; else row2[3] = "FAIL";
if (state == expectedState) row3[3] = "PASS"; else row3[3] = "FAIL";
if (newvalue.match(expectedValue)) row4[3] = "PASS"; else row4[3] = "FAIL";
if (nodeFocus == expectednodeFocus) row5[3] = "PASS"; else row5[3] = "FAIL";
if (varaccFocused == expectedaccFocused) row6[3] = "PASS"; else row6[3] = "FAIL";
if (numActions == expectednumActions) row7[3] = "PASS"; else row7[3] = "FAIL";
if (actionName == expectedactionName) row8[3] = "PASS"; else row8[3] = "FAIL";
if (nodeClick == expectednodeClick) row9[3] = "PASS"; else row9[3] = "FAIL";
if (keyboardShortcut == expectedkeyboardShortcut)
row10[3] = "PASS"; else row10[3] = "FAIL";
appendTableRes();
WriteResults(res);
}
catch(e){
alert("Exception**: " + e);
}
}
]]>
</html:script>
<box orient="vertical" flex="1">
<description>
<html:b> Testing XUL Button for Accessibility.. </html:b>
</description>
<box orient="horizontal">
<!-- Simple Button with Label only -->
<button label="Normal" accesskey="n"/>
<spacer flex="1"/>
</box>
</box>
<html:script>
<![CDATA[
res = "<b><u> Results for XUL Button Node:</u></b><br><br>";
nodeFocus = "Not Focused";
nodeClick = "Button Not Pressed";
setTimeout("executeTestCase();", 2000);
]]>
</html:script>
</window>

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

@ -1,190 +0,0 @@
<?xml version="1.0"?>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for XUL CHECKBOX Checked Node
Author: dsirnapalli@netscape.com
Created: 05.23.02 - Created
Last Updated:06.12.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window
id="checkboxchecked-window"
title="XUL Checkbox Checked"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </html:script>
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </html:script>
<html:script>
<![CDATA[
function getDomNodeCheckBoxChecked()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("checkbox").item(0);
return node;
}
catch(e){
alert("Exception: " + e);
}
}
function nodeUnChecked()
{
nodeCheck = "Check Box Not Checked";
}
function executeTestCase()
{
var domNode = getDomNodeCheckBoxChecked();
domNode.addEventListener('focus',nodeFocused,true);
domNode.addEventListener('click', nodeUnChecked,true);
accNode = getAccessibleNode(domNode);
tempaccNode = accNode;
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
accNode.accTakeFocus();
}
catch(e){
alert("Exception**: " + e);
}
setTimeout("constructResults();", 2000);
}
function constructResults()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if(tempaccNode.accGetDOMNode() == accNode.accFocused.accGetDOMNode())
{
varaccFocused = "Focused";
}
else
{
varaccFocused = "Not Focused";
}
var name = getName();
var role = getRole();
var state = getState();
var value = getValue();
var newvalue = value.toString();
var numActions = getNumActions();
var actionName = getActionName();
var action = doAction();
var keyboardShortcut = getAccKeyboardShortcut();
var expectedName = "Checkbox Label";
var expectedRole = "44";
var expectedState = "1048596";
var expectedValue = "NS_ERROR_NOT_IMPLEMENTED";
var expectednodeFocus = "Focused";
var expectedaccFocused = "Focused";
var expectednumActions = "1";
var expectedactionName = "uncheck";
var expectednodeCheck = "Check Box Not Checked";
var expectedkeyboardShortcut = "Alt+c";
var row0 = new Array("Property/Method", "Expected Values", "Actual Values", "Result");
var row1 = new Array("Name->", expectedName, name);
var row2 = new Array("Role->", expectedRole, role);
var row3 = new Array("State->", expectedState, state);
var row4 = new Array("Value->", expectedValue, value);
var row5 = new Array("accTakeFocus()->", expectednodeFocus, nodeFocus);
var row6 = new Array("accFocused->", expectedaccFocused, varaccFocused);
var row7 = new Array("accNumActions->", expectednumActions, numActions);
var row8 = new Array("getAccActionName()->", expectedactionName, actionName);
var row9 = new Array("accDoAction()->", expectednodeCheck, nodeCheck);
var row10 = new Array("accKeyboardShortcut->", expectedkeyboardShortcut, keyboardShortcut);
row = new Array(row0, row1, row2, row3, row4, row5, row6, row7, row8, row9, row10);
if (name == expectedName) row1[3] = "PASS"; else row1[3] = "FAIL";
if (role == expectedRole) row2[3] = "PASS"; else row2[3] = "FAIL";
if (state == expectedState) row3[3] = "PASS"; else row3[3] = "FAIL";
if (newvalue.match(expectedValue)) row4[3] = "PASS"; else row4[3] = "FAIL";
if (nodeFocus == expectednodeFocus) row5[3] = "PASS"; else row5[3] = "FAIL";
if (varaccFocused == expectedaccFocused) row6[3] = "PASS"; else row6[3] = "FAIL";
if (numActions == expectednumActions) row7[3] = "PASS"; else row7[3] = "FAIL";
if (actionName == expectedactionName) row8[3] = "PASS"; else row8[3] = "FAIL";
if (nodeCheck == expectednodeCheck) row9[3] = "PASS"; else row9[3] = "FAIL";
if (keyboardShortcut == expectedkeyboardShortcut)
row10[3] = "PASS"; else row10[3] = "FAIL";
appendTableRes();
WriteResults(res);
}
catch(e){
alert("Exception**: " + e);
}
}
]]>
</html:script>
<box orient="vertical">
<description>
<html:b> Testing XUL Checkbox Checked for Accessibility.. </html:b>
</description>
<box orient="horizontal">
<!-- Checkbox Checked -->
<checkbox id="case-sensitive" checked="true" label="Checkbox Label" accesskey="c"/>
<spacer flex="1"/>
</box>
</box>
<html:script>
<![CDATA[
res = "<b><u> Results for XUL Checkbox Checked Node:</u></b><br><br>";
nodeFocus = "Not Focused";
nodeCheck = "Check Box Checked";
setTimeout("executeTestCase();", 2000);
]]>
</html:script>
</window>

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

@ -1,190 +0,0 @@
<?xml version="1.0"?>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for XUL CHECKBOX Unchecked Node
Author: dsirnapalli@netscape.com
Created: 05.23.02 - Created
Last Updated:06.12.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window
id="checkboxunchecked-window"
title="XUL Checkbox Unchecked"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </html:script>
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </html:script>
<html:script>
<![CDATA[
function getDomNodeCheckBoxUnchecked()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("checkbox").item(0);
return node;
}
catch(e){
alert("Exception: " + e);
}
}
function nodeChecked()
{
nodeCheck = "Check Box Checked";
}
function executeTestCase()
{
var domNode = getDomNodeCheckBoxUnchecked();
domNode.addEventListener('focus',nodeFocused,true);
domNode.addEventListener('click', nodeChecked,true);
accNode = getAccessibleNode(domNode);
tempaccNode = accNode;
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
accNode.accTakeFocus();
}
catch(e){
alert("Exception**: " + e);
}
setTimeout("constructResults();", 2000);
}
function constructResults()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if(tempaccNode.accGetDOMNode() == accNode.accFocused.accGetDOMNode())
{
varaccFocused = "Focused";
}
else
{
varaccFocused = "Not Focused";
}
var name = getName();
var role = getRole();
var state = getState();
var value = getValue();
var newvalue = value.toString();
var numActions = getNumActions();
var actionName = getActionName();
var action = doAction();
var keyboardShortcut = getAccKeyboardShortcut();
var expectedName = "Checkbox Label";
var expectedRole = "44";
var expectedState = "1048580";
var expectedValue = "NS_ERROR_NOT_IMPLEMENTED";
var expectednodeFocus = "Focused";
var expectedaccFocused = "Focused";
var expectednumActions = "1";
var expectedactionName = "check";
var expectednodeCheck = "Check Box Checked";
var expectedkeyboardShortcut = "Alt+b";
var row0 = new Array("Property/Method", "Expected Values", "Actual Values", "Result");
var row1 = new Array("Name->", expectedName, name);
var row2 = new Array("Role->", expectedRole, role);
var row3 = new Array("State->", expectedState, state);
var row4 = new Array("Value->", expectedValue, value);
var row5 = new Array("accTakeFocus()->", expectednodeFocus, nodeFocus);
var row6 = new Array("accFocused->", expectedaccFocused, varaccFocused);
var row7 = new Array("accNumActions->", expectednumActions, numActions);
var row8 = new Array("getAccActionName()->", expectedactionName, actionName);
var row9 = new Array("accDoAction()->", expectednodeCheck, nodeCheck);
var row10 = new Array("accKeyboardShortcut->", expectedkeyboardShortcut, keyboardShortcut);
row = new Array(row0, row1, row2, row3, row4, row5, row6, row7, row8, row9, row10);
if (name == expectedName) row1[3] = "PASS"; else row1[3] = "FAIL";
if (role == expectedRole) row2[3] = "PASS"; else row2[3] = "FAIL";
if (state == expectedState) row3[3] = "PASS"; else row3[3] = "FAIL";
if (newvalue.match(expectedValue)) row4[3] = "PASS"; else row4[3] = "FAIL";
if (nodeFocus == expectednodeFocus) row5[3] = "PASS"; else row5[3] = "FAIL";
if (varaccFocused == expectedaccFocused) row6[3] = "PASS"; else row6[3] = "FAIL";
if (numActions == expectednumActions) row7[3] = "PASS"; else row7[3] = "FAIL";
if (actionName == expectedactionName) row8[3] = "PASS"; else row8[3] = "FAIL";
if (nodeCheck == expectednodeCheck) row9[3] = "PASS"; else row9[3] = "FAIL";
if (keyboardShortcut == expectedkeyboardShortcut)
row10[3] = "PASS"; else row10[3] = "FAIL";
appendTableRes();
WriteResults(res);
}
catch(e){
alert("Exception**: " + e);
}
}
]]>
</html:script>
<box orient="vertical">
<description>
<html:b> Testing XUL Checkbox Unchecked for Accessibility.. </html:b>
</description>
<box orient="horizontal">
<!-- Checkbox Unchecked -->
<checkbox id="case-sensitive" label="Checkbox Label" accesskey="b"/>
<spacer flex="1"/>
</box>
</box>
<html:script>
<![CDATA[
res = "<b><u> Results for XUL Checkbox Unchecked Node:</u></b><br><br>";
nodeFocus = "Not Focused";
nodeCheck = "Check Box Not Checked";
setTimeout("executeTestCase();", 2000);
]]>
</html:script>
</window>

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

@ -1,118 +0,0 @@
<?xml version="1.0"?>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for XUL DECK Node
Author: dsirnapalli@netscape.com
Created:05.28.02
Last Updated:06.12.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window
id="deck-window"
title="XUL Deck"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </html:script>
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </html:script>
<html:script>
<![CDATA[
function getDomNodeDeck()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("deck").item(0);
return node;
}
catch(e){
alert("Exception: " + e);
}
}
function executeTestCase()
{
var domNode = getDomNodeDeck();
accNode = getAccessibleNode(domNode);
if(accNode == "Exception")
{
temp = "<table border cols=2 width='70%'>";
temp += "<tr>";
temp += "<td> The Node you selected is not an Accessible Node </td>";
temp += "<td> PASS </td>";
temp += "</tr>";
temp += "</table>";
res = res + temp;
}
WriteResults(res);
}
]]>
</html:script>
<description>
<html:b> Testing XUL Deck for Accessibility.. </html:b>
</description>
<!-- A deck element also lays out its children on top of each other much like
the stack element, however decks only display one of thier children at a time.
Like stacks, the direct children of the deck element form the pages of the deck.
If there are three children of the deck element, the deck will have three children.
The displayed page of the deck can be changed by setting an index attribute on
the deck element. The index is a number that identifies which page to display.
Pages are numbered starting from zero. So the first clild of the deck is page 0,
the second is page 1 and so on. -->
<deck selectedIndex ="2">
<description value="This is the first page"/>
<button label="This is the second page"/>
<box>
<description value="This is the third page"/>
<button label="This is also the third page"/>
</box>
</deck>
<html:script>
<![CDATA[
res = "<b><u> Results for XUL Deck Node:</u></b><br><br>";
setTimeout("executeTestCase();", 2000);
]]>
</html:script>
</window>

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

@ -1,137 +0,0 @@
<?xml version="1.0"?>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for XUL DESCRIPTION Node
Author: dsirnapalli@netscape.com
Created:05.30.02
Last Updated On:05.30.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window
id="description-window"
title="XUL Description"
orient="vertical"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </html:script>
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </html:script>
<html:script>
<![CDATA[
function getDomNodeDescription()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("description").item(0);
return node;
}
catch(e){
alert("Exception: " + e);
}
}
function executeTestCase()
{
var domNode = getDomNodeDescription();
accNode = getAccessibleNode(domNode);
setTimeout("constructResults();", 2000);
}
function constructResults()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var name = getName();
var role = getRole();
var state = getState();
var value = getValue();
var newvalue = value.toString();
var keyboardShortcut = getAccKeyboardShortcut();
var expectedName = "Testing XUL Description for Accessibility..";
var expectedRole = "42";
var expectedState = "64";
var expectedValue = "NS_ERROR_NOT_IMPLEMENTED";
var expectedkeyboardShortcut = "Alt+d";
var row0 = new Array("Property/Method", "Expected Values", "Actual Values", "Result");
var row1 = new Array("Name->", expectedName, name);
var row2 = new Array("Role->", expectedRole, role);
var row3 = new Array("State->", expectedState, state);
var row4 = new Array("Value->", expectedValue, value);
var row5 = new Array("accKeyboardShortcut->", expectedkeyboardShortcut, keyboardShortcut);
row = new Array(row0, row1, row2, row3, row4, row5);
if (name == expectedName) row1[3] = "PASS"; else row1[3] = "FAIL";
if (role == expectedRole) row2[3] = "PASS"; else row2[3] = "FAIL";
if (state == expectedState) row3[3] = "PASS"; else row3[3] = "FAIL";
if (newvalue.match(expectedValue)) row4[3] = "PASS"; else row4[3] = "FAIL";
if (keyboardShortcut == expectedkeyboardShortcut)
row5[3] = "PASS"; else row5[3] = "FAIL";
appendTableRes();
WriteResults(res);
}
catch(e){
alert("Exception**: " + e);
}
}
]]>
</html:script>
<!-- The most basic way to include text in a window is to use the description element -->
<description accesskey="d">
<html:b> Testing XUL Description for Accessibility.. </html:b>
</description>
<html:script>
<![CDATA[
res = "<b><u> Results for XUL Description Node:</u></b><br><br>";
setTimeout("executeTestCase();", 2000);
]]>
</html:script>
</window>

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

@ -1,130 +0,0 @@
<?xml version="1.0"?>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for XUL GRID Node
Author: dsirnapalli@netscape.com
Created:05.30.02
Last Updated:05.30.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window
id="grid-window"
title="XUL Grid"
orient="vertical"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </html:script>
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </html:script>
<html:script>
<![CDATA[
function getDomNodeGrid()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("grid").item(0);
return node;
}
catch(e){
alert("Exception: " + e);
}
}
function executeTestCase()
{
var domNode = getDomNodeGrid();
accNode = getAccessibleNode(domNode);
if(accNode == "Exception")
{
temp = "<table border cols=2 width='70%'>";
temp += "<tr>";
temp += "<td> The Node you selected is not an Accessible Node </td>";
temp += "<td> PASS </td>";
temp += "</tr>";
temp += "</table>";
res = res + temp;
}
WriteResults(res);
}
]]>
</html:script>
<description>
<html:b> Testing XUL Grid for Accessibility.. </html:b>
</description>
<!-- HTML pages typically use tables for layout or for displaying a grid of data.
XUL has a set of elements for doing this type of thing. The grid element is used
to declare a grid of data. A grid contains elements that are aligned in rows just
like tables. Inside a grid, you declare two things, the columns that are used and
the rows that are used. Just like html tables, you put content such as labels and
buttons inside the rows. You donot put content inside the columns but you can use
them to specify the size and appearance of the columns in a grid. Alternatively
you can put the content inside the cols, and use the rows to specify the appearance. -->
<box orient="horizontal">
<grid flex="1">
<columns>
<column flex="2"/>
<column flex="1"/>
</columns>
<rows>
<row>
<button label="Rabbit"/>
<button label="Elephant"/>
</row>
<row>
<button label="Koala"/>
<button label="Gorilla"/>
</row>
</rows>
</grid>
<spacer flex="2"/>
</box>
<html:script>
<![CDATA[
res = "<b><u> Results for XUL Grid Node:</u></b><br><br>";
setTimeout("executeTestCase();", 2000);
]]>
</html:script>
</window>

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

@ -1,144 +0,0 @@
<?xml version="1.0"?>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for XUL GROUPBOX Node
Author: dsirnapalli@netscape.com
Created:05.28.02
Last Updated:06.13.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window
id="groupbox-window"
title="XUL Groupbox"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </html:script>
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </html:script>
<html:script>
<![CDATA[
function getDomNodeGroupbox()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("groupbox").item(0);
return node;
}
catch(e){
alert("Exception: " + e);
}
}
function executeTestCase()
{
var domNode = getDomNodeGroupbox();
accNode = getAccessibleNode(domNode);
setTimeout("constructResults();", 2000);
}
function constructResults()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var name = getName();
var role = getRole();
var state = getState();
var value = getValue();
var newvalue = value.toString();
var keyboardShortcut = getAccKeyboardShortcut();
var expectedName = "Answer";
var expectedRole = "20";
var expectedState = "0";
var expectedValue = "NS_ERROR_NOT_IMPLEMENTED";
var expectedkeyboardShortcut = "Alt+g";
var row0 = new Array("Property/Method", "Expected Values", "Actual Values", "Result");
var row1 = new Array("Name->", expectedName, name);
var row2 = new Array("Role->", expectedRole, role);
var row3 = new Array("State->", expectedState, state);
var row4 = new Array("Value->", expectedValue, value);
var row5 = new Array("accKeyboardShortcut->", expectedkeyboardShortcut, keyboardShortcut);
row = new Array(row0, row1, row2, row3, row4, row5);
if (name == expectedName) row1[3] = "PASS"; else row1[3] = "FAIL";
if (role == expectedRole) row2[3] = "PASS"; else row2[3] = "FAIL";
if (state == expectedState) row3[3] = "PASS"; else row3[3] = "FAIL";
if (newvalue.match(expectedValue)) row4[3] = "PASS"; else row4[3] = "FAIL";
if (keyboardShortcut == expectedkeyboardShortcut)
row5[3] = "PASS"; else row5[3] = "FAIL";
appendTableRes();
WriteResults(res);
}
catch(e){
alert("Exception**: " + e);
}
}
]]>
</html:script>
<box orient="vertical" flex="1">
<description>
<html:b> Testing XUL Groupbox for Accessibility.. </html:b>
</description>
<groupbox accesskey="g">
<caption label="Answer"/>
<description value="Banana"/>
<description value="Tangerine"/>
<description value="Phone Booth"/>
<description value="Kiwi"/>
</groupbox>
</box>
<html:script>
<![CDATA[
res = "<b><u> Results for XUL Groupbox Node:</u></b><br><br>";
setTimeout("executeTestCase();", 2000);
]]>
</html:script>
</window>

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

@ -1,111 +0,0 @@
<?xml version="1.0"?>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for XUL IMAGE Node
Author: dsirnapalli@netscape.com
Created:06.13.02
Last Updated:06.13.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window
id="image-window"
title="XUL Image"
orient="vertical"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </html:script>
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </html:script>
<html:script>
<![CDATA[
function getDomNodeImage()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("image").item(0);
return node;
}
catch(e){
alert("Exception: " + e);
}
}
function executeTestCase()
{
var domNode = getDomNodeImage();
accNode = getAccessibleNode(domNode);
if(accNode == "Exception")
{
temp = "<table border cols=2 width='70%'>";
temp += "<tr>";
temp += "<td> The Node you selected is not an Accessible Node </td>";
temp += "<td> PASS </td>";
temp += "</tr>";
temp += "</table>";
res = res + temp;
}
WriteResults(res);
}
]]>
</html:script>
<box orient="vertical" flex="1">
<description>
<html:b> Testing XUL Image for Accessibility.. </html:b>
</description>
<box orient="horizontal">
<!-- image element is used to display images within a window -->
<image src="mozilla-banner.gif"/>
<spacer flex="1"/>
</box>
</box>
<html:script>
<![CDATA[
res = "<b><u> Results for XUL Image Node:</u></b><br><br>";
setTimeout("executeTestCase();", 2000);
]]>
</html:script>
</window>

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

@ -1,142 +0,0 @@
<?xml version="1.0"?>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for XUL Label Node
Author: dsirnapalli@netscape.com
Created:05.31.02
Last Updated:05.31.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window
id="label-window"
title="XUL Label"
orient="vertical"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </html:script>
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </html:script>
<html:script>
<![CDATA[
function getDomNodeLabel()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("label").item(0);
return node;
}
catch(e){
alert("Exception: " + e);
}
}
function executeTestCase()
{
var domNode = getDomNodeLabel();
accNode = getAccessibleNode(domNode);
setTimeout("constructResults();", 2000);
}
function constructResults()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var name = getName();
var role = getRole();
var state = getState();
var value = getValue();
var newvalue = value.toString();
var keyboardShortcut = getAccKeyboardShortcut();
var expectedName = "Click here";
var expectedRole = "42";
var expectedState = "64";
var expectedValue = "NS_ERROR_NOT_IMPLEMENTED";
var expectedkeyboardShortcut = "Alt+h";
var row0 = new Array("Property/Method", "Expected Values", "Actual Values", "Result");
var row1 = new Array("Name->", expectedName, name);
var row2 = new Array("Role->", expectedRole, role);
var row3 = new Array("State->", expectedState, state);
var row4 = new Array("Value->", expectedValue, value);
var row5 = new Array("accKeyboardShortcut->", expectedkeyboardShortcut, keyboardShortcut);
row = new Array(row0, row1, row2, row3, row4, row5);
if (name == expectedName) row1[3] = "PASS"; else row1[3] = "FAIL";
if (role == expectedRole) row2[3] = "PASS"; else row2[3] = "FAIL";
if (state == expectedState) row3[3] = "PASS"; else row3[3] = "FAIL";
if (newvalue.match(expectedValue)) row4[3] = "PASS"; else row4[3] = "FAIL";
if (keyboardShortcut == expectedkeyboardShortcut)
row5[3] = "PASS"; else row5[3] = "FAIL";
appendTableRes();
WriteResults(res);
}
catch(e){
alert("Exception**: " + e);
}
}
]]>
</html:script>
<description>
<html:b> Testing XUL Label for Accessibility.. </html:b>
</description>
<!-- Label element is intended for labels of controls such as buttons and textboxes -->
<label value="Click here" control="open-button" accesskey="h"/>
<box orient="horizontal">
<button id="open-button" label="Open"/>
<spacer flex="1"/>
</box>
<html:script>
<![CDATA[
res = "<b><u> Results for XUL Label Node:</u></b><br><br>";
setTimeout("executeTestCase();", 2000);
]]>
</html:script>
</window>

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

@ -1,176 +0,0 @@
<?xml version="1.0"?>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for XUL LISTBOX Node
Author: dsirnapalli@netscape.com
Create: 05.28.02
Last Updated:06.13.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window
id="listbox-window"
title="XUL Listbox"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </html:script>
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </html:script>
<html:script>
<![CDATA[
function getDomNodeListbox()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("listbox").item(0);
return node;
}
catch(e){
alert("Exception: " + e);
}
}
function executeTestCase()
{
var domNode = getDomNodeListbox();
domNode.addEventListener('focus',nodeFocused,true);
accNode = getAccessibleNode(domNode);
tempaccNode = accNode;
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
accNode.accTakeFocus();
}
catch(e){
alert("Exception**: " + e);
}
setTimeout("constructResults();", 2000);
}
function constructResults()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if(tempaccNode.accGetDOMNode() == accNode.accFocused.accGetDOMNode())
{
varaccFocused = "Focused";
}
else
{
varaccFocused = "Not Focused";
}
var name = getName();
var role = getRole();
var state = getState();
var value = getValue();
var newvalue = value.toString();
var keyboardShortcut = getAccKeyboardShortcut();
var expectedName = "";
var expectedRole = "33";
var expectedState = "1048644";
var expectedValue = "NS_ERROR_FAILURE";
var expectednodeFocus = "Focused";
var expectedaccFocused = "Focused";
var expectedkeyboardShortcut = "Alt+l";
var row0 = new Array("Property/Method", "Expected Values", "Actual Values", "Result");
var row1 = new Array("Name->", expectedName, name);
var row2 = new Array("Role->", expectedRole, role);
var row3 = new Array("State->", expectedState, state);
var row4 = new Array("Value->", expectedValue, value);
var row5 = new Array("accTakeFocus()->", expectednodeFocus, nodeFocus);
var row6 = new Array("accFocused->", expectedaccFocused, varaccFocused);
var row7 = new Array("accKeyboardShortcut->", expectedkeyboardShortcut, keyboardShortcut);
row = new Array(row0, row1, row2, row3, row4, row5, row6, row7);
if (name == expectedName) row1[3] = "PASS"; else row1[3] = "FAIL";
if (role == expectedRole) row2[3] = "PASS"; else row2[3] = "FAIL";
if (state == expectedState) row3[3] = "PASS"; else row3[3] = "FAIL";
if (newvalue.match(expectedValue)) row4[3] = "PASS"; else row4[3] = "FAIL";
if (nodeFocus == expectednodeFocus) row5[3] = "PASS"; else row5[3] = "FAIL";
if (varaccFocused == expectedaccFocused) row6[3] = "PASS"; else row6[3] = "FAIL";
if (keyboardShortcut == expectedkeyboardShortcut)
row7[3] = "PASS"; else row7[3] = "FAIL";
appendTableRes();
WriteResults(res);
}
catch(e){
alert("Exception**: " + e);
}
}
]]>
</html:script>
<box orient="vertical">
<description>
<html:b> Testing XUL Listbox for Accessibility.. </html:b>
</description>
<label value="Select a List Item:" control="get-item"/>
<box orient="horizontal">
<!-- listbox element is used to create multi-row list boxes -->
<listbox id="get-item" accesskey="l">
<listitem label="First Item" value="firstitem"/>
<listitem label="Second Item" value="seconditem"/>
<listitem label="Third Item" value="thirditem"/>
<listitem label="Fourth Item" value="fourthitem"/>
</listbox>
<spacer flex="1"/>
</box>
</box>
<html:script>
<![CDATA[
res = "<b><u> Results for XUL Listbox Node:</u></b><br><br>";
nodeFocus = "Not Focused";
setTimeout("executeTestCase();", 2000);
]]>
</html:script>
</window>

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

@ -1,194 +0,0 @@
<?xml version="1.0"?>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for XUL Listbox's LISTITEM Node
Author: dsirnapalli@netscape.com
Created:05.28.02
Last Updated:06.14.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window
id="listitem-window"
title="XUL Listitem"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </html:script>
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </html:script>
<html:script>
<![CDATA[
function getDomNodeListItem()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("listitem").item(0);
return node;
}
catch(e){
alert("Exception: " + e);
}
}
function executeTestCase()
{
var domNode = getDomNodeListItem();
domNode.addEventListener('focus',nodeFocused,true);
accNode = getAccessibleNode(domNode);
tempaccNode = accNode;
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
accNode.accTakeFocus();
var action = doAction();
}
catch(e){
alert("Exception**: " + e);
}
setTimeout("constructResults();", 2000);
}
function nodeSelected()
{
nodeClick = "List Item Selected";
}
function constructResults()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if(tempaccNode.accGetDOMNode() == accNode.accFocused.accGetDOMNode())
{
varaccFocused = "Focused";
}
else
{
varaccFocused = "Not Focused";
}
var name = getName();
var role = getRole();
var state = getState();
var value = getValue();
var newvalue = value.toString();
var numActions = getNumActions();
var actionName = getActionName();
var keyboardShortcut = getAccKeyboardShortcut();
var expectedName = "First Item";
var expectedRole = "34";
var expectedState = "3145734";
var expectedValue = "NS_ERROR_NOT_IMPLEMENTED";
var expectednodeFocus = "Focused";
var expectedaccFocused = "Focused";
var expectednumActions = "1";
var expectedactionName = "Select";
var expectednodeClick = "List Item Selected";
var expectedkeyboardShortcut = "I";
var row0 = new Array("Property/Method", "Expected Values", "Actual Values", "Result");
var row1 = new Array("Name->", expectedName, name);
var row2 = new Array("Role->", expectedRole, role);
var row3 = new Array("State->", expectedState, state);
var row4 = new Array("Value->", expectedValue, value);
var row5 = new Array("accTakeFocus()->", expectednodeFocus, nodeFocus);
var row6 = new Array("accFocused->", expectedaccFocused, varaccFocused);
var row7 = new Array("accNumActions->", expectednumActions, numActions);
var row8 = new Array("getAccActionName()->", expectedactionName, actionName);
var row9 = new Array("accDoAction()->", expectednodeClick, nodeClick);
var row10 = new Array("accKeyboardShortcut->", expectedkeyboardShortcut, keyboardShortcut);
row = new Array(row0, row1, row2, row3, row4, row5, row6, row7, row8, row9, row10);
if (name == expectedName) row1[3] = "PASS"; else row1[3] = "FAIL";
if (role == expectedRole) row2[3] = "PASS"; else row2[3] = "FAIL";
if (state == expectedState) row3[3] = "PASS"; else row3[3] = "FAIL";
if (newvalue.match(expectedValue)) row4[3] = "PASS"; else row4[3] = "FAIL";
if (nodeFocus == expectednodeFocus) row5[3] = "PASS"; else row5[3] = "FAIL";
if (varaccFocused == expectedaccFocused) row6[3] = "PASS"; else row6[3] = "FAIL";
if (numActions == expectednumActions) row7[3] = "PASS"; else row7[3] = "FAIL";
if (actionName == expectedactionName) row8[3] = "PASS"; else row8[3] = "FAIL";
if (nodeClick == expectednodeClick) row9[3] = "PASS"; else row9[3] = "FAIL";
if (keyboardShortcut == expectedkeyboardShortcut)
row10[3] = "PASS"; else row10[3] = "FAIL";
appendTableRes();
WriteResults(res);
}
catch(e){
alert("Exception**: " + e);
}
}
]]>
</html:script>
<box orient="vertical">
<description>
<html:b> Testing XUL Listbox's ListItem for Accessibility.. </html:b>
</description>
<label value="Select a List Item:" control="get-item"/>
<box orient="horizontal">
<!-- listbox element is used to create multi-row list boxes -->
<listbox id="get-item">
<listitem label="First Item" value="firstitem" oncommand="nodeSelected();" accesskey="I"/>
<listitem label="Second Item" value="seconditem" selected ="true"/>
<listitem label="Third Item" value="thirditem"/>
<listitem label="Fourth Item" value="fourthitem"/>
</listbox>
<spacer flex="1"/>
</box>
</box>
<html:script>
<![CDATA[
res = "<b><u> Results for XUL Listbox's Listitem Node:</u></b><br><br>";
nodeFocus = "Not Focused";
nodeClick = "List Item Not Selected";
setTimeout("executeTestCase();", 2000);
]]>
</html:script>
</window>

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

@ -1,171 +0,0 @@
<?xml version="1.0"?>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for XUL MENUBAR Node
Author: dsirnapalli@netscape.com
Created:06.14.02
Last Updated:06.14.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window
id="menubar-window"
title="XUL Menubar"
orient="vertical"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </html:script>
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </html:script>
<html:script>
<![CDATA[
function getDomNodeMenubar()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("menubar").item(0);
return node;
}
catch(e){
alert("Exception: " + e);
}
}
function executeTestCase()
{
var domNode = getDomNodeMenubar();
accNode = getAccessibleNode(domNode);
setTimeout("constructResults();", 2000);
}
function constructResults()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var name = getName();
var role = getRole();
var state = getState();
var value = getValue();
var newvalue = value.toString();
var keyboardShortcut = getAccKeyboardShortcut();
var expectedName = "Application";
var expectedRole = "2";
var expectedState = "0";
var expectedValue = "NS_ERROR_NOT_IMPLEMENTED";
var expectedkeyboardShortcut = "Alt+b";
var row0 = new Array("Property/Method", "Expected Values", "Actual Values", "Result");
var row1 = new Array("Name->", expectedName, name);
var row2 = new Array("Role->", expectedRole, role);
var row3 = new Array("State->", expectedState, state);
var row4 = new Array("Value->", expectedValue, value);
var row5 = new Array("accKeyboardShortcut->", expectedkeyboardShortcut, keyboardShortcut);
row = new Array(row0, row1, row2, row3, row4, row5);
if (name == expectedName) row1[3] = "PASS"; else row1[3] = "FAIL";
if (role == expectedRole) row2[3] = "PASS"; else row2[3] = "FAIL";
if (state == expectedState) row3[3] = "PASS"; else row3[3] = "FAIL";
if (newvalue.match(expectedValue)) row4[3] = "PASS"; else row4[3] = "FAIL";
if (keyboardShortcut == expectedkeyboardShortcut)
row5[3] = "PASS"; else row5[3] = "FAIL";
appendTableRes();
WriteResults(res);
}
catch(e){
alert("Exception**: " + e);
}
}
]]>
</html:script>
<box orient="vertical" flex="1">
<description>
<html:b> Testing XUL Menubar for Accessibility.. </html:b>
</description>
<box orient="horizontal">
<!-- There are five elements associated with creating a menu bar and its menus.
menubar - The container for the row of menus.
menu - Despite the name, this is actually only the title of the menu on the menubar.
This element can be placed on a menubar or can be placed separately.
menupopup - The popup box that appears when you click on the menu title. This box
contains the list of menu commands.
menuitem - An individual command on the menu. This would be placed on a menupopup.
menuseparator - A separator bar on a menu. This would be placed on a menupopup.
IMP: You can customize the menus to have whatever you want on them on all platforms
except the Macintosh. This is because the Macintosh has its own special menu along
the top of the screen controlled by the system. -->
<toolbox flex="1">
<menubar id="sample-menubar" accesskey="b">
<menu id="file-menu" label="File">
<menupopup id="file-popup">
<menuitem label="New"/>
<menuitem label="Open"/>
<menuitem label="Save"/>
<menuseparator/>
<menuitem label="Exit"/>
</menupopup>
</menu>
<menu id="edit-menu" label="Edit">
<menupopup id="edit-popup">
<menuitem label="Undo"/>
<menuitem label="Redo"/>
</menupopup>
</menu>
</menubar>
</toolbox>
<spacer flex="1"/>
</box>
</box>
<html:script>
<![CDATA[
res = "<b><u> Results for XUL Menubar Node:</u></b><br><br>";
setTimeout("executeTestCase();", 2000);
]]>
</html:script>
</window>

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

@ -1,197 +0,0 @@
<?xml version="1.0"?>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for XUL MENU MENUITEM Node
Author: dsirnapalli@netscape.com
Created:06.18.02
Last Updated:06.18.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window
id="menuitem-window"
title="XUL Menuitem"
orient="vertical"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </html:script>
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </html:script>
<html:script>
<![CDATA[
function getDomNodeMenuItem()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("menuitem").item(0);
return node;
}
catch(e){
alert("Exception: " + e);
}
}
function nodeClicked()
{
nodeClick = "Menu Item Selected";
}
function executeTestCase()
{
var domNode = getDomNodeMenuItem();
domNode.addEventListener('focus',nodeFocused,true);
// domNode.addEventListener('click', nodeClicked,true);
accNode = getAccessibleNode(domNode);
tempaccNode = accNode;
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
accNode.accTakeFocus();
}
catch(e){
alert("Exception**: " + e);
}
setTimeout("constructResults();", 2000);
}
function constructResults()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if(tempaccNode.accGetDOMNode() == accNode.accFocused.accGetDOMNode())
{
varaccFocused = "Focused";
}
else
{
varaccFocused = "Not Focused";
}
var name = getName();
var role = getRole();
var state = getState();
var value = getValue();
var newvalue = value.toString();
var numActions = getNumActions();
var actionName = getActionName();
var action = doAction();
var keyboardShortcut = getAccKeyboardShortcut();
var expectedName = "Open";
var expectedRole = "12";
var expectedState = "1146884";
var expectedValue = "NS_ERROR_NOT_IMPLEMENTED";
var expectednodeFocus = "Focused";
var expectedaccFocused = "Focused";
var expectednumActions = "1";
var expectedactionName = "Select";
var expectednodeClick = "Menu Item Selected";
var expectedkeyboardShortcut = "t";
var row0 = new Array("Property/Method", "Expected Values", "Actual Values", "Result");
var row1 = new Array("Name->", expectedName, name);
var row2 = new Array("Role->", expectedRole, role);
var row3 = new Array("State->", expectedState, state);
var row4 = new Array("Value->", expectedValue, value);
var row5 = new Array("accTakeFocus()->", expectednodeFocus, nodeFocus);
var row6 = new Array("accFocused->", expectedaccFocused, varaccFocused);
var row7 = new Array("accNumActions->", expectednumActions, numActions);
var row8 = new Array("getAccActionName()->", expectedactionName, actionName);
var row9 = new Array("accDoAction()->", expectednodeClick, nodeClick);
var row10 = new Array("accKeyboardShortcut->", expectedkeyboardShortcut, keyboardShortcut);
row = new Array(row0, row1, row2, row3, row4, row5, row6, row7, row8, row9, row10);
if (name == expectedName) row1[3] = "PASS"; else row1[3] = "FAIL";
if (role == expectedRole) row2[3] = "PASS"; else row2[3] = "FAIL";
if (state == expectedState) row3[3] = "PASS"; else row3[3] = "FAIL";
if (newvalue.match(expectedValue)) row4[3] = "PASS"; else row4[3] = "FAIL";
if (nodeFocus == expectednodeFocus) row5[3] = "PASS"; else row5[3] = "FAIL";
if (varaccFocused == expectedaccFocused) row6[3] = "PASS"; else row6[3] = "FAIL";
if (numActions == expectednumActions) row7[3] = "PASS"; else row7[3] = "FAIL";
if (actionName == expectedactionName) row8[3] = "PASS"; else row8[3] = "FAIL";
if (nodeClick == expectednodeClick) row9[3] = "PASS"; else row9[3] = "FAIL";
if (keyboardShortcut == expectedkeyboardShortcut)
row10[3] = "PASS"; else row10[3] = "FAIL";
appendTableRes();
WriteResults(res);
}
catch(e){
alert("Exception**: " + e);
}
}
]]>
</html:script>
<box orient="vertical" flex="1">
<description>
<html:b> Testing XUL Menu's Menuitem for Accessibility.. </html:b>
</description>
<box orient="horizontal">
<menu label="File">
<menupopup>
<menuitem label="Open" oncommand="nodeClicked();" accesskey="t"/>
<menuitem label="Close"/>
<menuseparator/>
<menuitem label="Save" />
<menuitem label="Exit"/>
</menupopup>
</menu>
<spacer flex="1"/>
</box>
</box>
<html:script>
<![CDATA[
res = "<b><u> Results for XUL Menu's Menuitem Node:</u></b><br><br>";
nodeFocus = "Not Focused";
nodeClick = "Menu Item Not Selected";
setTimeout("executeTestCase();", 2000);
]]>
</html:script>
</window>

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

@ -1,181 +0,0 @@
<?xml version="1.0"?>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for XUL MENULIST Node
Author: dsirnapalli@netscape.com
Created:06.17.02
Last Updated:06.17.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window
id="menulist-window"
title="XUL Menulist"
orient="vertical"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </html:script>
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </html:script>
<html:script>
<![CDATA[
function getDomNodeMenulist()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("menulist").item(0);
return node;
}
catch(e){
alert("Exception: " + e);
}
}
function executeTestCase()
{
var domNode = getDomNodeMenulist();
domNode.addEventListener('focus',nodeFocused,true);
accNode = getAccessibleNode(domNode);
tempaccNode = accNode;
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
accNode.accTakeFocus();
}
catch(e){
alert("Exception**: " + e);
}
setTimeout("constructResults();", 2000);
}
function constructResults()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if(tempaccNode.accGetDOMNode() == accNode.accFocused.accGetDOMNode())
{
varaccFocused = "Focused";
}
else
{
varaccFocused = "Not Focused";
}
var name = getName();
var role = getRole();
var state = getState();
var value = getValue();
var newvalue = value.toString();
var keyboardShortcut = getAccKeyboardShortcut();
var expectedName = "Second Menu Item";
var expectedRole = "46";
var expectedState = "1074791492";
var expectedValue = "Second Menu Item";
var expectednodeFocus = "Focused";
var expectedaccFocused = "Focused";
var expectedkeyboardShortcut = "Alt+m";
var row0 = new Array("Property/Method", "Expected Values", "Actual Values", "Result");
var row1 = new Array("Name->", expectedName, name);
var row2 = new Array("Role->", expectedRole, role);
var row3 = new Array("State->", expectedState, state);
var row4 = new Array("Value->", expectedValue, value);
var row5 = new Array("accTakeFocus()->", expectednodeFocus, nodeFocus);
var row6 = new Array("accFocused->", expectedaccFocused, varaccFocused);
var row7 = new Array("accKeyboardShortcut->", expectedkeyboardShortcut, keyboardShortcut);
row = new Array(row0, row1, row2, row3, row4, row5, row6, row7);
if (name == expectedName) row1[3] = "PASS"; else row1[3] = "FAIL";
if (role == expectedRole) row2[3] = "PASS"; else row2[3] = "FAIL";
if (state == expectedState) row3[3] = "PASS"; else row3[3] = "FAIL";
if (newvalue == expectedValue) row4[3] = "PASS"; else row4[3] = "FAIL";
if (nodeFocus == expectednodeFocus) row5[3] = "PASS"; else row5[3] = "FAIL";
if (varaccFocused == expectedaccFocused) row6[3] = "PASS"; else row6[3] = "FAIL";
if (keyboardShortcut == expectedkeyboardShortcut)
row7[3] = "PASS"; else row7[3] = "FAIL";
appendTableRes();
WriteResults(res);
}
catch(e){
alert("Exception**: " + e);
}
}
]]>
</html:script>
<box orient="vertical" flex="1">
<description>
<html:b> Testing XUL MenuList for Accessibility.. </html:b>
</description>
<label value="Select a Menu Item:" control="get-item"/>
<!-- menulist element is used to create drop-down list boxes -->
<!-- Three elements are needed to describe a drop-down box.
The first is the menulist element, which create the textbox with the button beside it.
The second is the menupopup element,which creates the popup window which appears when
the button is clicked.
The third is the menuitem element, which creates the individual choices. -->
<menulist accesskey="m">
<menupopup>
<menuitem label="First Menu Item"/>
<menuitem label="Second Menu Item" selected="true"/>
<menuitem label="Third Menu Item" src="images/findpic.gif"/>
<menuitem label="Fourth Menu Item"/>
</menupopup>
</menulist>
</box>
<html:script>
<![CDATA[
res = "<b><u> Results for XUL Menulist Node:</u></b><br><br>";
nodeFocus = "Not Focused";
setTimeout("executeTestCase();", 2000);
]]>
</html:script>
</window>

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

@ -1,145 +0,0 @@
<?xml version="1.0"?>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for XUL PROGRESSMETER Node
Author: dsirnapalli@netscape.com
Created:05.30.02
Last Updated:05.30.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window
id="progressmeter-window"
title="XUL Progressmeter"
orient="vertical"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </html:script>
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </html:script>
<html:script>
<![CDATA[
function getDomNodeProgressmeter()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("progressmeter").item(0);
return node;
}
catch(e){
alert("Exception: " + e);
}
}
function executeTestCase()
{
var domNode = getDomNodeProgressmeter();
accNode = getAccessibleNode(domNode);
setTimeout("constructResults();", 2000);
}
function constructResults()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var name = getName();
var role = getRole();
var state = getState();
var value = getValue();
var newvalue = value.toString();
var keyboardShortcut = getAccKeyboardShortcut();
var expectedName = "Determinate Progress Meter:";
var expectedRole = "48";
var expectedState = "0";
var expectedValue = "50%";
var expectedkeyboardShortcut = "Alt+p";
var row0 = new Array("Property/Method", "Expected Values", "Actual Values", "Result");
var row1 = new Array("Name->", expectedName, name);
var row2 = new Array("Role->", expectedRole, role);
var row3 = new Array("State->", expectedState, state);
var row4 = new Array("Value->", expectedValue, value);
var row5 = new Array("accKeyboardShortcut->", expectedkeyboardShortcut, keyboardShortcut);
row = new Array(row0, row1, row2, row3, row4, row5);
if (name == expectedName) row1[3] = "PASS"; else row1[3] = "FAIL";
if (role == expectedRole) row2[3] = "PASS"; else row2[3] = "FAIL";
if (state == expectedState) row3[3] = "PASS"; else row3[3] = "FAIL";
if (newvalue ==expectedValue) row4[3] = "PASS"; else row4[3] = "FAIL";
if (keyboardShortcut == expectedkeyboardShortcut)
row5[3] = "PASS"; else row5[3] = "FAIL";
appendTableRes();
WriteResults(res);
}
catch(e){
alert("Exception**: " + e);
}
}
]]>
</html:script>
<description>
<html:b> Testing XUL Progressmeter for Accessibility.. </html:b>
</description>
<!-- A progress meter is a bar that indicates how much of the task has been completed.
There are two types of progress meters. determinate and undeterminate.
Determinate progress meters are used when you know the length of time that an
operation will take.
Undeterminate progress meters are used when you donot know the length of time of
an operation. -->
<!-- Determined Progress Meter -->
<label control="det_progress" value="Determinate Progress Meter:"/>
<progressmeter id="det_progress" mode="determined" value="50%" accesskey="p"/>
<html:script>
<![CDATA[
res = "<b><u> Results for XUL Progressmeter Node:</u></b><br><br>";
setTimeout("executeTestCase();", 2000);
]]>
</html:script>
</window>

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

@ -1,190 +0,0 @@
<?xml version="1.0"?>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for XUL Radio Button Checked Node
Author: dsirnapalli@netscape.com
Created:05.30.02
Last Updated:06.11.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window
id="radiobuttonchecked-window"
title="XUL Radio Button Checked"
orient="vertical"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </html:script>
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </html:script>
<html:script>
<![CDATA[
function getDomNodeRadioButtonChecked()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("radio").item(0);
return node;
}
catch(e){
alert("Exception: " + e);
}
}
function nodeClicked()
{
nodeClick = "Radio Button Not checked";
}
function executeTestCase()
{
var domNode = getDomNodeRadioButtonChecked();
domNode.addEventListener('focus',nodeFocused,true);
domNode.addEventListener('click', nodeClicked,true);
accNode = getAccessibleNode(domNode);
tempaccNode = accNode;
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
accNode.accTakeFocus();
}
catch(e){
alert("Exception**: " + e);
}
setTimeout("constructResults();", 2000);
}
function constructResults()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if(tempaccNode.accGetDOMNode() == accNode.accFocused.accGetDOMNode())
{
varaccFocused = "Focused";
}
else
{
varaccFocused = "Not Focused";
}
var name = getName();
var role = getRole();
var state = getState();
var value = getValue();
var newvalue = value.toString();
var numActions = getNumActions();
var actionName = getActionName();
var action = doAction();
var keyboardShortcut = getAccKeyboardShortcut();
var expectedName = "First Radio Button";
var expectedRole = "45";
var expectedState = "1048596";
var expectedValue = "NS_ERROR_NOT_IMPLEMENTED";
var expectednodeFocus = "Focused";
var expectedaccFocused = "Focused";
var expectednumActions = "1";
var expectedactionName = "Select";
var expectednodeClick = "Radio Button Not checked";
var expectedkeyboardShortcut = "Alt+r";
var row0 = new Array("Property/Method", "Expected Values", "Actual Values", "Result");
var row1 = new Array("Name->", expectedName, name);
var row2 = new Array("Role->", expectedRole, role);
var row3 = new Array("State->", expectedState, state);
var row4 = new Array("Value->", expectedValue, value);
var row5 = new Array("accTakeFocus()->", expectednodeFocus, nodeFocus);
var row6 = new Array("accFocused->", expectedaccFocused, varaccFocused);
var row7 = new Array("accNumActions->", expectednumActions, numActions);
var row8 = new Array("getAccActionName()->", expectedactionName, actionName);
var row9 = new Array("accDoAction()->", expectednodeClick, nodeClick);
var row10 = new Array("accKeyboardShortcut->", expectedkeyboardShortcut, keyboardShortcut);
row = new Array(row0, row1, row2, row3, row4, row5, row6, row7, row8, row9, row10);
if (name == expectedName) row1[3] = "PASS"; else row1[3] = "FAIL";
if (role == expectedRole) row2[3] = "PASS"; else row2[3] = "FAIL";
if (state == expectedState) row3[3] = "PASS"; else row3[3] = "FAIL";
if (newvalue.match(expectedValue)) row4[3] = "PASS"; else row4[3] = "FAIL";
if (nodeFocus == expectednodeFocus) row5[3] = "PASS"; else row5[3] = "FAIL";
if (varaccFocused == expectedaccFocused) row6[3] = "PASS"; else row6[3] = "FAIL";
if (numActions == expectednumActions) row7[3] = "PASS"; else row7[3] = "FAIL";
if (actionName == expectedactionName) row8[3] = "PASS"; else row8[3] = "FAIL";
if (nodeClick == expectednodeClick) row9[3] = "PASS"; else row9[3] = "FAIL";
if (keyboardShortcut == expectedkeyboardShortcut)
row10[3] = "PASS"; else row10[3] = "FAIL";
appendTableRes();
WriteResults(res);
}
catch(e){
alert("Exception**: " + e);
}
}
]]>
</html:script>
<box orient="vertical">
<description>
<html:b> Testing XUL Radio Button Checked for Accessibility.. </html:b>
</description>
<radiogroup id="test-radiogrp">
<radio group="test-radiogrp" label="First Radio Button" selected="true" accesskey="r"/>
<radio group="test-radiogrp" label="Second Radio Button"/>
<radio group="test-radiogrp" label="Third Radio Button"/>
</radiogroup>
</box>
<html:script>
<![CDATA[
res = "<b><u> Results for XUL Radio Button Checked Node:</u></b><br><br>";
nodeFocus = "Not Focused";
nodeClick = "Radio Button Checked";
setTimeout("executeTestCase();", 2000);
]]>
</html:script>
</window>

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

@ -1,190 +0,0 @@
<?xml version="1.0"?>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for XUL Radio Button UnChecked Node
Author: dsirnapalli@netscape.com
Created:06.11.02
Last Updated:06.11.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window
id="radiobuttonunchecked-window"
title="XUL Radio Button Unchecked"
orient="vertical"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </html:script>
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </html:script>
<html:script>
<![CDATA[
function getDomNodeRadioButtonUnChecked()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("radio").item(0);
return node;
}
catch(e){
alert("Exception: " + e);
}
}
function nodeClicked()
{
nodeClick = "Radio Button Checked";
}
function executeTestCase()
{
var domNode = getDomNodeRadioButtonUnChecked();
domNode.addEventListener('focus',nodeFocused,true);
domNode.addEventListener('click', nodeClicked,true);
accNode = getAccessibleNode(domNode);
tempaccNode = accNode;
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
accNode.accTakeFocus();
}
catch(e){
alert("Exception**: " + e);
}
setTimeout("constructResults();", 2000);
}
function constructResults()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if(tempaccNode.accGetDOMNode() == accNode.accFocused.accGetDOMNode())
{
varaccFocused = "Focused";
}
else
{
varaccFocused = "Not Focused";
}
var name = getName();
var role = getRole();
var state = getState();
var value = getValue();
var newvalue = value.toString();
var numActions = getNumActions();
var actionName = getActionName();
var action = doAction();
var keyboardShortcut = getAccKeyboardShortcut();
var expectedName = "First Radio Button";
var expectedRole = "45";
var expectedState = "1048580";
var expectedValue = "NS_ERROR_NOT_IMPLEMENTED";
var expectednodeFocus = "Focused";
var expectedaccFocused = "Focused";
var expectednumActions = "1";
var expectedactionName = "Select";
var expectednodeClick = "Radio Button Checked";
var expectedkeyboardShortcut = "Alt+r";
var row0 = new Array("Property/Method", "Expected Values", "Actual Values", "Result");
var row1 = new Array("Name->", expectedName, name);
var row2 = new Array("Role->", expectedRole, role);
var row3 = new Array("State->", expectedState, state);
var row4 = new Array("Value->", expectedValue, value);
var row5 = new Array("accTakeFocus()->", expectednodeFocus, nodeFocus);
var row6 = new Array("accFocused->", expectedaccFocused, varaccFocused);
var row7 = new Array("accNumActions->", expectednumActions, numActions);
var row8 = new Array("getAccActionName()->", expectedactionName, actionName);
var row9 = new Array("accDoAction()->", expectednodeClick, nodeClick);
var row10 = new Array("accKeyboardShortcut->", expectedkeyboardShortcut, keyboardShortcut);
row = new Array(row0, row1, row2, row3, row4, row5, row6, row7, row8, row9, row10);
if (name == expectedName) row1[3] = "PASS"; else row1[3] = "FAIL";
if (role == expectedRole) row2[3] = "PASS"; else row2[3] = "FAIL";
if (state == expectedState) row3[3] = "PASS"; else row3[3] = "FAIL";
if (newvalue.match(expectedValue)) row4[3] = "PASS"; else row4[3] = "FAIL";
if (nodeFocus == expectednodeFocus) row5[3] = "PASS"; else row5[3] = "FAIL";
if (varaccFocused == expectedaccFocused) row6[3] = "PASS"; else row6[3] = "FAIL";
if (numActions == expectednumActions) row7[3] = "PASS"; else row7[3] = "FAIL";
if (actionName == expectedactionName) row8[3] = "PASS"; else row8[3] = "FAIL";
if (nodeClick == expectednodeClick) row9[3] = "PASS"; else row9[3] = "FAIL";
if (keyboardShortcut == expectedkeyboardShortcut)
row10[3] = "PASS"; else row10[3] = "FAIL";
appendTableRes();
WriteResults(res);
}
catch(e){
alert("Exception**: " + e);
}
}
]]>
</html:script>
<box orient="vertical">
<description>
<html:b> Testing XUL Radio Button Unchecked for Accessibility.. </html:b>
</description>
<radiogroup id="test-radiogrp">
<radio group="test-radiogrp" label="First Radio Button" accesskey="r"/>
<radio group="test-radiogrp" label="Second Radio Button" selected="true"/>
<radio group="test-radiogrp" label="Third Radio Button"/>
</radiogroup>
</box>
<html:script>
<![CDATA[
res = "<b><u> Results for XUL Radio Button Unchecked Node:</u></b><br><br>";
nodeFocus = "Not Focused";
nodeClick = "Radio Button Not Checked";
setTimeout("executeTestCase();", 2000);
]]>
</html:script>
</window>

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

@ -1,146 +0,0 @@
<?xml version="1.0"?>
<!-- Descrpt: Test nsIAccessible Interface attributes and methods
for XUL RADIOGROUP Node
Author: dsirnapalli@netscape.com
Created:06.21.02
Last Updated:06.21.02.
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator Test Cases.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corp.
- Portions created by the Initial Developer are Copyright (C) 1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window
id="radiogroup-window"
title="XUL Radiogroup"
orient="vertical"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/accesslib.js"> </html:script>
<html:script src="http://www.mozilla.org/quality/embed/jstests/accessibility/jslib/bridge.js"> </html:script>
<html:script>
<![CDATA[
function getDomNodeRadioGroup()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = document.getElementsByTagName("radiogroup").item(0);
return node;
}
catch(e){
alert("Exception: " + e);
}
}
function executeTestCase()
{
var domNode = getDomNodeRadioGroup();
accNode = getAccessibleNode(domNode);
setTimeout("constructResults();", 2000);
}
function constructResults()
{
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var name = getName();
var role = getRole();
var state = getState();
var value = getValue();
var newvalue = value.toString();
var keyboardShortcut = getAccKeyboardShortcut();
var expectedName = "";
var expectedRole = "20";
var expectedState = "0";
var expectedValue = "NS_ERROR_NOT_IMPLEMENTED";
var expectedkeyboardShortcut = "Alt+a";
var row0 = new Array("Property/Method", "Expected Values", "Actual Values", "Result");
var row1 = new Array("Name->", expectedName, name);
var row2 = new Array("Role->", expectedRole, role);
var row3 = new Array("State->", expectedState, state);
var row4 = new Array("Value->", expectedValue, value);
var row5 = new Array("accKeyboardShortcut->", expectedkeyboardShortcut, keyboardShortcut);
row = new Array(row0, row1, row2, row3, row4, row5);
if (name == expectedName) row1[3] = "PASS"; else row1[3] = "FAIL";
if (role == expectedRole) row2[3] = "PASS"; else row2[3] = "FAIL";
if (state == expectedState) row3[3] = "PASS"; else row3[3] = "FAIL";
if (newvalue.match(expectedValue)) row4[3] = "PASS"; else row4[3] = "FAIL";
if (keyboardShortcut == expectedkeyboardShortcut)
row5[3] = "PASS"; else row5[3] = "FAIL";
appendTableRes();
WriteResults(res);
}
catch(e){
alert("Exception**: " + e);
}
}
]]>
</html:script>
<box orient="vertical" flex="1">
<description>
<html:b> Testing XUL Radiogroup for Accessibility.. </html:b>
</description>
<box orient="horizontal">
<radiogroup id="test-radiogrp" accesskey="a">
<radio group="test-radiogrp" label="First Radio Button" selected="true"/>
<radio group="test-radiogrp" label="Second Radio Button"/>
<radio group="test-radiogrp" label="Third Radio Button"/>
</radiogroup>
<spacer flex="1"/>
</box>
</box>
<html:script>
<![CDATA[
res = "<b><u> Results for XUL Radiogroup Node:</u></b><br><br>";
setTimeout("executeTestCase();", 2000);
]]>
</html:script>
</window>

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше