Merge m-c to s-c.
@ -162,13 +162,17 @@ LogDocState(nsIDocument* aDocumentNode)
|
||||
printf(", %sshowing", aDocumentNode->IsShowing() ? "" : "not ");
|
||||
printf(", %svisible", aDocumentNode->IsVisible() ? "" : "not ");
|
||||
printf(", %sactive", aDocumentNode->IsActive() ? "" : "not ");
|
||||
printf(", %sresource", aDocumentNode->IsResourceDoc() ? "" : "not ");
|
||||
printf(", has %srole content",
|
||||
nsCoreUtils::GetRoleContent(aDocumentNode) ? "" : "no ");
|
||||
}
|
||||
|
||||
static void
|
||||
LogPresShell(nsIDocument* aDocumentNode)
|
||||
{
|
||||
nsIPresShell* ps = aDocumentNode->GetShell();
|
||||
printf("presshell: %p", static_cast<void*>(ps));
|
||||
printf("presshell: %p, is %s destroying", static_cast<void*>(ps),
|
||||
(ps->IsDestroying() ? "" : "not"));
|
||||
nsIScrollableFrame *sf = ps ?
|
||||
ps->GetRootScrollFrameAsScrollableExternal() : nullptr;
|
||||
printf(", root scroll frame: %p", static_cast<void*>(sf));
|
||||
@ -196,7 +200,7 @@ LogDocParent(nsIDocument* aDocumentNode)
|
||||
static void
|
||||
LogDocInfo(nsIDocument* aDocumentNode, DocAccessible* aDocument)
|
||||
{
|
||||
printf(" DOM id: %p, acc id: %p\n ",
|
||||
printf(" DOM document: %p, acc document: %p\n ",
|
||||
static_cast<void*>(aDocumentNode), static_cast<void*>(aDocument));
|
||||
|
||||
// log document info
|
||||
@ -322,6 +326,20 @@ LogRequest(nsIRequest* aRequest)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
LogDocAccState(DocAccessible* aDocument)
|
||||
{
|
||||
printf("document acc state: ");
|
||||
if (aDocument->HasLoadState(DocAccessible::eCompletelyLoaded))
|
||||
printf("completely loaded;");
|
||||
else if (aDocument->HasLoadState(DocAccessible::eReady))
|
||||
printf("ready;");
|
||||
else if (aDocument->HasLoadState(DocAccessible::eDOMLoaded))
|
||||
printf("DOM loaded;");
|
||||
else if (aDocument->HasLoadState(DocAccessible::eTreeConstructed))
|
||||
printf("tree constructed;");
|
||||
}
|
||||
|
||||
static void
|
||||
GetDocLoadEventType(AccEvent* aEvent, nsACString& aEventType)
|
||||
{
|
||||
@ -406,6 +424,29 @@ logging::DocLoad(const char* aMsg, nsIDocument* aDocumentNode)
|
||||
MsgEnd();
|
||||
}
|
||||
|
||||
void
|
||||
logging::DocCompleteLoad(DocAccessible* aDocument, bool aIsLoadEventTarget)
|
||||
{
|
||||
MsgBegin(sDocLoadTitle, "document loaded *completely*");
|
||||
|
||||
printf(" DOM document: %p, acc document: %p\n",
|
||||
static_cast<void*>(aDocument->DocumentNode()),
|
||||
static_cast<void*>(aDocument));
|
||||
|
||||
printf(" ");
|
||||
LogDocURI(aDocument->DocumentNode());
|
||||
printf("\n");
|
||||
|
||||
printf(" ");
|
||||
LogDocAccState(aDocument);
|
||||
printf("\n");
|
||||
|
||||
printf(" document is load event target: %s\n",
|
||||
(aIsLoadEventTarget ? "true" : "false"));
|
||||
|
||||
MsgEnd();
|
||||
}
|
||||
|
||||
void
|
||||
logging::DocLoadEventFired(AccEvent* aEvent)
|
||||
{
|
||||
@ -494,7 +535,7 @@ logging::FocusNotificationTarget(const char* aMsg, const char* aTargetDescr,
|
||||
if (aTargetThing) {
|
||||
nsCOMPtr<nsINode> targetNode(do_QueryInterface(aTargetThing));
|
||||
if (targetNode)
|
||||
Node(aTargetDescr, targetNode);
|
||||
AccessibleNNode(aTargetDescr, targetNode);
|
||||
else
|
||||
printf(" %s: %p, window\n", aTargetDescr,
|
||||
static_cast<void*>(aTargetThing));
|
||||
@ -619,7 +660,7 @@ logging::Address(const char* aDescr, Accessible* aAcc)
|
||||
}
|
||||
|
||||
DocAccessible* doc = aAcc->Document();
|
||||
nsIDocument* docNode = aAcc->GetDocumentNode();
|
||||
nsIDocument* docNode = doc->DocumentNode();
|
||||
printf(" document: %p, node: %p\n",
|
||||
static_cast<void*>(doc), static_cast<void*>(docNode));
|
||||
|
||||
@ -672,6 +713,18 @@ logging::Node(const char* aDescr, nsINode* aNode)
|
||||
aDescr, static_cast<void*>(elm), tag.get(), id.get(), idxInParent);
|
||||
}
|
||||
|
||||
void
|
||||
logging::Document(DocAccessible* aDocument)
|
||||
{
|
||||
printf(" Document: %p, document node: %p\n",
|
||||
static_cast<void*>(aDocument),
|
||||
static_cast<void*>(aDocument->DocumentNode()));
|
||||
|
||||
printf(" Document ");
|
||||
LogDocURI(aDocument->DocumentNode());
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
void
|
||||
logging::AccessibleNNode(const char* aDescr, Accessible* aAccessible)
|
||||
{
|
||||
@ -691,13 +744,7 @@ logging::AccessibleNNode(const char* aDescr, Accessible* aAccessible)
|
||||
nodeDescr.AppendLiteral(" node");
|
||||
Node(nodeDescr.get(), aAccessible->GetNode());
|
||||
|
||||
printf(" Document: %p, document node: %p\n",
|
||||
static_cast<void*>(aAccessible->Document()),
|
||||
static_cast<void*>(aAccessible->GetDocumentNode()));
|
||||
|
||||
printf(" Document ");
|
||||
LogDocURI(static_cast<nsIDocument*>(aAccessible->GetDocumentNode()));
|
||||
printf("\n");
|
||||
Document(aAccessible->Document());
|
||||
}
|
||||
|
||||
void
|
||||
@ -714,9 +761,18 @@ logging::AccessibleNNode(const char* aDescr, nsINode* aNode)
|
||||
}
|
||||
}
|
||||
|
||||
nsAutoCString nodeDescr("Not accessible ");
|
||||
nsAutoCString nodeDescr("[not accessible] ");
|
||||
nodeDescr.Append(aDescr);
|
||||
Node(nodeDescr.get(), aNode);
|
||||
|
||||
if (document) {
|
||||
Document(document);
|
||||
return;
|
||||
}
|
||||
|
||||
printf(" [contained by not accessible document]:\n");
|
||||
LogDocInfo(aNode->OwnerDoc(), document);
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -56,6 +56,7 @@ bool IsEnabled(uint32_t aModules);
|
||||
void DocLoad(const char* aMsg, nsIWebProgress* aWebProgress,
|
||||
nsIRequest* aRequest, uint32_t aStateFlags);
|
||||
void DocLoad(const char* aMsg, nsIDocument* aDocumentNode);
|
||||
void DocCompleteLoad(DocAccessible* aDocument, bool aIsLoadEventTarget);
|
||||
|
||||
/**
|
||||
* Log that document load event was fired.
|
||||
@ -149,6 +150,11 @@ void Address(const char* aDescr, Accessible* aAcc);
|
||||
*/
|
||||
void Node(const char* aDescr, nsINode* aNode);
|
||||
|
||||
/**
|
||||
* Log the document accessible info as message entry.
|
||||
*/
|
||||
void Document(DocAccessible* aDocument);
|
||||
|
||||
/**
|
||||
* Log the accessible and its DOM node as a message entry.
|
||||
*/
|
||||
|
@ -243,8 +243,8 @@ NotificationController::WillRefresh(mozilla::TimeStamp aTime)
|
||||
if (childDoc->IsDefunct())
|
||||
continue;
|
||||
|
||||
nsIContent* ownerContent = mDocument->GetDocumentNode()->
|
||||
FindContentForSubDocument(childDoc->GetDocumentNode());
|
||||
nsIContent* ownerContent = mDocument->DocumentNode()->
|
||||
FindContentForSubDocument(childDoc->DocumentNode());
|
||||
if (ownerContent) {
|
||||
Accessible* outerDocAcc = mDocument->GetAccessible(ownerContent);
|
||||
if (outerDocAcc && outerDocAcc->AppendChild(childDoc)) {
|
||||
|
@ -111,12 +111,6 @@ nsAccessNode::GetNode() const
|
||||
return mContent;
|
||||
}
|
||||
|
||||
nsIDocument*
|
||||
nsAccessNode::GetDocumentNode() const
|
||||
{
|
||||
return mContent ? mContent->OwnerDoc() : nullptr;
|
||||
}
|
||||
|
||||
void
|
||||
nsAccessNode::Language(nsAString& aLanguage)
|
||||
{
|
||||
|
@ -64,7 +64,6 @@ public:
|
||||
*/
|
||||
virtual nsINode* GetNode() const;
|
||||
nsIContent* GetContent() const { return mContent; }
|
||||
virtual nsIDocument* GetDocumentNode() const;
|
||||
|
||||
/**
|
||||
* Return node type information of DOM node associated with the accessible.
|
||||
|
@ -896,7 +896,7 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (aNode->OwnerDoc() != aDoc->GetDocumentNode()) {
|
||||
if (aNode->OwnerDoc() != aDoc->DocumentNode()) {
|
||||
NS_ERROR("Creating accessible for wrong document");
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -1469,6 +1469,14 @@ DocAccessible::ContentRemoved(nsIContent* aContainerNode,
|
||||
void
|
||||
DocAccessible::RecreateAccessible(nsIContent* aContent)
|
||||
{
|
||||
#ifdef A11Y_LOG
|
||||
if (logging::IsEnabled(logging::eTree)) {
|
||||
logging::MsgBegin("TREE", "accessible recreated");
|
||||
logging::Node("content", aContent);
|
||||
logging::MsgEnd();
|
||||
}
|
||||
#endif
|
||||
|
||||
// XXX: we shouldn't recreate whole accessible subtree, instead we should
|
||||
// subclass hide and show events to handle them separately and implement their
|
||||
// coalescence with normal hide and show events. Note, in this case they
|
||||
@ -1579,6 +1587,11 @@ DocAccessible::ProcessLoad()
|
||||
{
|
||||
mLoadState |= eCompletelyLoaded;
|
||||
|
||||
#ifdef A11Y_LOG
|
||||
if (logging::IsEnabled(logging::eDocLoad))
|
||||
logging::DocCompleteLoad(this, IsLoadEventTarget());
|
||||
#endif
|
||||
|
||||
// Do not fire document complete/stop events for root chrome document
|
||||
// accessibles and for frame/iframe documents because
|
||||
// a) screen readers start working on focus event in the case of root chrome
|
||||
@ -2064,25 +2077,31 @@ bool
|
||||
DocAccessible::IsLoadEventTarget() const
|
||||
{
|
||||
nsCOMPtr<nsISupports> container = mDocument->GetContainer();
|
||||
nsCOMPtr<nsIDocShellTreeItem> docShellTreeItem =
|
||||
do_QueryInterface(container);
|
||||
NS_ASSERTION(docShellTreeItem, "No document shell for document!");
|
||||
nsCOMPtr<nsIDocShellTreeItem> treeItem = do_QueryInterface(container);
|
||||
NS_ASSERTION(treeItem, "No document shell for document!");
|
||||
|
||||
nsCOMPtr<nsIDocShellTreeItem> parentTreeItem;
|
||||
docShellTreeItem->GetParent(getter_AddRefs(parentTreeItem));
|
||||
treeItem->GetParent(getter_AddRefs(parentTreeItem));
|
||||
|
||||
// Return true if it's not a root document (either tab document or
|
||||
// frame/iframe document) and its parent document is not in loading state.
|
||||
// Note: we can get notifications while document is loading (and thus
|
||||
// while there's no parent document yet).
|
||||
// Not a root document.
|
||||
if (parentTreeItem) {
|
||||
// Return true if it's either:
|
||||
// a) tab document;
|
||||
nsCOMPtr<nsIDocShellTreeItem> rootTreeItem;
|
||||
treeItem->GetRootTreeItem(getter_AddRefs(rootTreeItem));
|
||||
if (parentTreeItem == rootTreeItem)
|
||||
return true;
|
||||
|
||||
// b) frame/iframe document and its parent document is not in loading state
|
||||
// Note: we can get notifications while document is loading (and thus
|
||||
// while there's no parent document yet).
|
||||
DocAccessible* parentDoc = ParentDocument();
|
||||
return parentDoc && parentDoc->HasLoadState(eCompletelyLoaded);
|
||||
}
|
||||
|
||||
// It's content (not chrome) root document.
|
||||
int32_t contentType;
|
||||
docShellTreeItem->GetItemType(&contentType);
|
||||
treeItem->GetItemType(&contentType);
|
||||
return (contentType == nsIDocShellTreeItem::typeContent);
|
||||
}
|
||||
|
||||
|
@ -83,7 +83,7 @@ public:
|
||||
virtual void Shutdown();
|
||||
virtual nsIFrame* GetFrame() const;
|
||||
virtual nsINode* GetNode() const { return mDocument; }
|
||||
virtual nsIDocument* GetDocumentNode() const { return mDocument; }
|
||||
nsIDocument* DocumentNode() const { return mDocument; }
|
||||
|
||||
// Accessible
|
||||
virtual mozilla::a11y::ENameValueFlag Name(nsString& aName);
|
||||
|
@ -1485,7 +1485,7 @@ HyperTextAccessible::GetEditor() const
|
||||
return nullptr; // No editing session interface
|
||||
|
||||
nsCOMPtr<nsIEditor> editor;
|
||||
nsIDocument* docNode = mDoc->GetDocumentNode();
|
||||
nsIDocument* docNode = mDoc->DocumentNode();
|
||||
editingSession->GetEditorForWindow(docNode->GetWindow(),
|
||||
getter_AddRefs(editor));
|
||||
return editor.forget();
|
||||
@ -1531,7 +1531,7 @@ HyperTextAccessible::SetSelectionRange(int32_t aStartPos, int32_t aEndPos)
|
||||
nsFocusManager* DOMFocusManager = nsFocusManager::GetFocusManager();
|
||||
if (DOMFocusManager) {
|
||||
NS_ENSURE_TRUE(mDoc, NS_ERROR_FAILURE);
|
||||
nsIDocument* docNode = mDoc->GetDocumentNode();
|
||||
nsIDocument* docNode = mDoc->DocumentNode();
|
||||
NS_ENSURE_TRUE(docNode, NS_ERROR_FAILURE);
|
||||
nsCOMPtr<nsPIDOMWindow> window = docNode->GetWindow();
|
||||
nsCOMPtr<nsIDOMElement> result;
|
||||
|
@ -133,7 +133,7 @@ OuterDocAccessible::Shutdown()
|
||||
#ifdef A11Y_LOG
|
||||
if (logging::IsEnabled(logging::eDocDestroy)) {
|
||||
logging::DocDestroy("outerdoc's child document shutdown",
|
||||
childAcc->GetDocumentNode());
|
||||
childAcc->AsDoc()->DocumentNode());
|
||||
}
|
||||
#endif
|
||||
childAcc->Shutdown();
|
||||
@ -177,7 +177,7 @@ OuterDocAccessible::AppendChild(Accessible* aAccessible)
|
||||
#ifdef A11Y_LOG
|
||||
if (logging::IsEnabled(logging::eDocCreate)) {
|
||||
logging::DocCreate("append document to outerdoc",
|
||||
aAccessible->GetDocumentNode());
|
||||
aAccessible->AsDoc()->DocumentNode());
|
||||
logging::Address("outerdoc", this);
|
||||
}
|
||||
#endif
|
||||
@ -196,8 +196,8 @@ OuterDocAccessible::RemoveChild(Accessible* aAccessible)
|
||||
|
||||
#ifdef A11Y_LOG
|
||||
if (logging::IsEnabled(logging::eDocDestroy)) {
|
||||
logging::DocDestroy("remove document from outerdoc", child->GetDocumentNode(),
|
||||
child->AsDoc());
|
||||
logging::DocDestroy("remove document from outerdoc",
|
||||
child->AsDoc()->DocumentNode(), child->AsDoc());
|
||||
logging::Address("outerdoc", this);
|
||||
}
|
||||
#endif
|
||||
|
@ -54,12 +54,12 @@ var Utils = {
|
||||
|
||||
get AndroidSdkVersion() {
|
||||
if (!this._AndroidSdkVersion) {
|
||||
let shellVersion = Services.sysinfo.get('shellVersion') || '';
|
||||
let matches = shellVersion.match(/\((\d+)\)$/);
|
||||
if (matches)
|
||||
this._AndroidSdkVersion = parseInt(matches[1]);
|
||||
else
|
||||
this._AndroidSdkVersion = 15; // Most useful in desktop debugging.
|
||||
if (Services.appinfo.OS == 'Android') {
|
||||
this._AndroidSdkVersion = Services.sysinfo.getPropertyAsInt32('version');
|
||||
} else {
|
||||
// Most useful in desktop debugging.
|
||||
this._AndroidSdkVersion = 15;
|
||||
}
|
||||
}
|
||||
return this._AndroidSdkVersion;
|
||||
},
|
||||
|
@ -166,7 +166,7 @@ __try {
|
||||
// accessibles.
|
||||
if (!doc->ParentDocument() ||
|
||||
nsWinUtils::IsWindowEmulationStarted() &&
|
||||
nsCoreUtils::IsTabDocument(doc->GetDocumentNode())) {
|
||||
nsCoreUtils::IsTabDocument(doc->DocumentNode())) {
|
||||
HWND hwnd = static_cast<HWND>(doc->GetNativeWindow());
|
||||
if (hwnd && SUCCEEDED(::AccessibleObjectFromWindow(hwnd, OBJID_WINDOW,
|
||||
IID_IAccessible,
|
||||
|
@ -35,7 +35,7 @@ void
|
||||
RootAccessibleWrap::DocumentActivated(DocAccessible* aDocument)
|
||||
{
|
||||
if (Compatibility::IsDolphin() &&
|
||||
nsCoreUtils::IsTabDocument(aDocument->GetDocumentNode())) {
|
||||
nsCoreUtils::IsTabDocument(aDocument->DocumentNode())) {
|
||||
uint32_t count = mChildDocuments.Length();
|
||||
for (uint32_t idx = 0; idx < count; idx++) {
|
||||
DocAccessible* childDoc = mChildDocuments[idx];
|
||||
|
@ -271,7 +271,7 @@ nsXFormsEditableAccessible::GetEditor() const
|
||||
|
||||
nsXFormsSelectableAccessible::
|
||||
nsXFormsSelectableAccessible(nsIContent* aContent, DocAccessible* aDoc) :
|
||||
nsXFormsEditableAccessible(aContent, aDoc), mIsSelect1Element(nullptr)
|
||||
nsXFormsEditableAccessible(aContent, aDoc), mIsSelect1Element(false)
|
||||
{
|
||||
mIsSelect1Element =
|
||||
mContent->NodeInfo()->Equals(nsGkAtoms::select1);
|
||||
|
@ -621,6 +621,7 @@ function prettyName(aIdentifier)
|
||||
return " '" + aIdentifier + "' ";
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Private
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -98,13 +98,23 @@ function waitForEvent(aEventType, aTarget, aFunc, aContext, aArg1, aArg2)
|
||||
registerA11yEventListener(aEventType, handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate mouse move over image map what creates image map accessible (async).
|
||||
* See waitForImageMap() function.
|
||||
*/
|
||||
function waveOverImageMap(aImageMapID)
|
||||
{
|
||||
var imageMapNode = getNode(aImageMapID);
|
||||
synthesizeMouse(imageMapNode, 10, 10, { type: "mousemove" },
|
||||
imageMapNode.ownerDocument.defaultView);
|
||||
}
|
||||
|
||||
/**
|
||||
* Call the given function when the tree of the given image map is built.
|
||||
*/
|
||||
function waitForImageMap(aImageMapID, aTestFunc)
|
||||
{
|
||||
synthesizeMouse(aImageMapID, 10, 10, { type: "mousemove" },
|
||||
aImageMapID.ownerDocument.defaultView);
|
||||
waveOverImageMap(aImageMapID);
|
||||
|
||||
var imageMapAcc = getAccessible(aImageMapID);
|
||||
if (imageMapAcc.firstChild)
|
||||
|
@ -19,8 +19,7 @@
|
||||
<script type="application/javascript">
|
||||
function doPreTest()
|
||||
{
|
||||
var imgMap = document.getElementById("imgmap");
|
||||
waitForImageMap(imgMap, doTest);
|
||||
waitForImageMap("imgmap", doTest);
|
||||
}
|
||||
|
||||
function doTest()
|
||||
|
@ -60,8 +60,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=418368
|
||||
//gA11yEventDumpToConsole = true; // debug stuff
|
||||
function doPreTest()
|
||||
{
|
||||
var imgMap = document.getElementById("imgmap");
|
||||
waitForImageMap(imgMap, doTest);
|
||||
waitForImageMap("imgmap", doTest);
|
||||
}
|
||||
|
||||
var gQueue = null;
|
||||
|
@ -44,8 +44,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=428248
|
||||
//gA11yEventDumpToConsole = true;
|
||||
function doPreTest()
|
||||
{
|
||||
var imgMap = document.getElementById("imgmap");
|
||||
waitForImageMap(imgMap, doTest);
|
||||
waitForImageMap("imgmap", doTest);
|
||||
}
|
||||
|
||||
function doTest()
|
||||
|
@ -22,8 +22,7 @@
|
||||
//gA11yEventDumpToConsole = true;
|
||||
function doPreTest()
|
||||
{
|
||||
var imgMap = document.getElementById("imagemap");
|
||||
waitForImageMap(imgMap, doTest);
|
||||
waitForImageMap("imagemap", doTest);
|
||||
}
|
||||
|
||||
function doTest()
|
||||
|
@ -21,7 +21,7 @@
|
||||
src="../events.js"></script>
|
||||
|
||||
<script type="application/javascript">
|
||||
gA11yEventDumpToConsole = true; // debug stuff
|
||||
//gA11yEventDumpToConsole = true; // debug stuff
|
||||
|
||||
function doTest()
|
||||
{
|
||||
@ -50,7 +50,7 @@
|
||||
// a: traversal state
|
||||
testStates("link_traversed", 0, 0, STATE_TRAVERSED);
|
||||
|
||||
enableLogging("docload");
|
||||
//enableLogging("docload"); // debug stuff
|
||||
registerA11yEventListener(EVENT_DOCUMENT_LOAD_COMPLETE,
|
||||
traversedLinkTester);
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
aEvent.accessible.rootDocument.window.close();
|
||||
|
||||
testStates("link_traversed", STATE_TRAVERSED);
|
||||
disableLogging();
|
||||
//disableLogging();
|
||||
SimpleTest.finish();
|
||||
}
|
||||
};
|
||||
|
@ -20,8 +20,6 @@
|
||||
<![CDATA[
|
||||
function doTest()
|
||||
{
|
||||
disableLogging(); // a hack from failing test_link.html to stop logging.
|
||||
|
||||
// label with popup
|
||||
testStates("labelWithPopup", STATE_HASPOPUP);
|
||||
|
||||
|
@ -22,8 +22,7 @@
|
||||
//gA11yEventDumpToConsole = true;
|
||||
function doPreTest()
|
||||
{
|
||||
var imgMap = document.getElementById("imagemap");
|
||||
waitForImageMap(imgMap, doTest);
|
||||
waitForImageMap("imagemap", doTest);
|
||||
}
|
||||
|
||||
function doTest()
|
||||
|
@ -21,8 +21,7 @@
|
||||
//gA11yEventDumpToConsole = true;
|
||||
function doPreTest()
|
||||
{
|
||||
var imgMap = document.getElementById("imgmap");
|
||||
waitForImageMap(imgMap, doTest);
|
||||
waitForImageMap("imgmap", doTest);
|
||||
}
|
||||
|
||||
function doTest()
|
||||
|
@ -20,7 +20,7 @@ MOCHITEST_A11Y_FILES =\
|
||||
test_doc.html \
|
||||
test_gencontent.html \
|
||||
test_hidden.html \
|
||||
$(warning test_imagemap.html temporarily disabled because of very frequent oranges, see bug 745788) \
|
||||
test_imagemap.html \
|
||||
test_list_editabledoc.html \
|
||||
test_list.html \
|
||||
test_listbox.xul \
|
||||
|
@ -228,6 +228,9 @@
|
||||
{
|
||||
this.imageMap = getAccessible(aImageMapID);
|
||||
this.mapNode.setAttribute("name", "atoz_map");
|
||||
|
||||
// XXXhack: force repainting of the image (see bug 745788 for details).
|
||||
waveOverImageMap(aImageMapID);
|
||||
}
|
||||
|
||||
this.finalCheck = function removeNameOnMap_finalCheck()
|
||||
@ -324,10 +327,6 @@
|
||||
map.appendChild(area);
|
||||
|
||||
this.containerNode.appendChild(map);
|
||||
|
||||
// force repainting of the image
|
||||
// XXX this is a hack. Fix bug 745788.
|
||||
document.getElementById(aImageID).style.opacity = 0.8;
|
||||
}
|
||||
|
||||
this.finalCheck = function insertMap_finalCheck()
|
||||
@ -382,11 +381,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
gA11yEventDumpToConsole = true;
|
||||
//gA11yEventDumpToConsole = true; // debug stuff
|
||||
function doPreTest()
|
||||
{
|
||||
var imgMap = document.getElementById("imgmap");
|
||||
waitForImageMap(imgMap, doTest);
|
||||
waitForImageMap("imgmap", doTest);
|
||||
}
|
||||
|
||||
var gQueue = null;
|
||||
@ -403,6 +401,9 @@
|
||||
gQueue.push(new insertMap("container", "imgmap"));
|
||||
gQueue.push(new hideImageMap("container", "imgmap"));
|
||||
|
||||
//enableLogging("tree"); // debug stuff
|
||||
//gQueue.onFinish = function() { disableLogging("tree"); }
|
||||
|
||||
gQueue.invoke(); // Will call SimpleTest.finish();
|
||||
}
|
||||
|
||||
|
@ -172,8 +172,6 @@ pref("content.sink.pending_event_mode", 0);
|
||||
pref("content.sink.perf_deflect_count", 1000000);
|
||||
pref("content.sink.perf_parse_time", 50000000);
|
||||
|
||||
pref("javascript.options.mem.high_water_mark", 32);
|
||||
|
||||
// Maximum scripts runtime before showing an alert
|
||||
pref("dom.max_chrome_script_run_time", 0); // disable slow script dialog for chrome
|
||||
pref("dom.max_script_run_time", 20);
|
||||
@ -523,7 +521,7 @@ pref("javascript.options.mem.gc_high_frequency_heap_growth_min", 101);
|
||||
pref("javascript.options.mem.gc_high_frequency_high_limit_mb", 40);
|
||||
pref("javascript.options.mem.gc_high_frequency_low_limit_mb", 10);
|
||||
pref("javascript.options.mem.gc_low_frequency_heap_growth", 105);
|
||||
pref("javascript.options.mem.high_water_mark", 16);
|
||||
pref("javascript.options.mem.high_water_mark", 6);
|
||||
|
||||
// Show/Hide scrollbars when active/inactive
|
||||
pref("ui.showHideScrollbars", 1);
|
||||
|
@ -18,9 +18,7 @@ ifdef MOZ_EXTENSIONS
|
||||
tier_app_dirs += extensions
|
||||
endif
|
||||
|
||||
ifdef MOZ_SERVICES_SYNC
|
||||
tier_app_dirs += services
|
||||
endif
|
||||
|
||||
tier_app_dirs += \
|
||||
$(MOZ_BRANDING_DIRECTORY) \
|
||||
|
@ -80,11 +80,12 @@ var shell = {
|
||||
return this.CrashSubmit;
|
||||
},
|
||||
|
||||
reportCrash: function shell_reportCrash() {
|
||||
let crashID;
|
||||
reportCrash: function shell_reportCrash(aCrashID) {
|
||||
let crashID = aCrashID;
|
||||
try {
|
||||
crashID = Cc["@mozilla.org/xre/app-info;1"]
|
||||
.getService(Ci.nsIXULRuntime).lastRunCrashID;
|
||||
if (crashID == undefined || crashID == "")
|
||||
crashID = Cc["@mozilla.org/xre/app-info;1"]
|
||||
.getService(Ci.nsIXULRuntime).lastRunCrashID;
|
||||
} catch(e) { }
|
||||
if (Services.prefs.getBoolPref('app.reportCrashes') &&
|
||||
crashID) {
|
||||
@ -775,6 +776,18 @@ window.addEventListener('ContentStart', function ss_onContentStart() {
|
||||
});
|
||||
});
|
||||
|
||||
(function contentCrashTracker() {
|
||||
Services.obs.addObserver(function(aSubject, aTopic, aData) {
|
||||
let cs = Cc["@mozilla.org/consoleservice;1"]
|
||||
.getService(Ci.nsIConsoleService);
|
||||
let props = aSubject.QueryInterface(Ci.nsIPropertyBag2);
|
||||
if (props.hasKey("abnormal") && props.hasKey("dumpID")) {
|
||||
shell.reportCrash(props.getProperty("dumpID"));
|
||||
}
|
||||
},
|
||||
"ipc:content-shutdown", false);
|
||||
})();
|
||||
|
||||
(function geolocationStatusTracker() {
|
||||
let gGeolocationActiveCount = 0;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
[
|
||||
{
|
||||
"clang_version": "r163716"
|
||||
"clang_version": "r164411"
|
||||
},
|
||||
{
|
||||
"size": 47,
|
||||
@ -9,8 +9,8 @@
|
||||
"filename": "setup.sh"
|
||||
},
|
||||
{
|
||||
"size": 54033946,
|
||||
"digest": "50eb6fa636403f444bab10aee2370f1ac624a1e0105566639c7c266e784dbc6e4cd3901bbd11f53c4c63b2a6d2d07a603b3d9c333f5049bdc7a816b7d225631b",
|
||||
"size": 54336567,
|
||||
"digest": "f692fb99c0faae0e850d0fba1ea1905064c00b7c65c03367369fec685771511c4e97445139be8eaa1bb6380055594cebef1e23cc0fd0717203411cd8082f37fa",
|
||||
"algorithm": "sha512",
|
||||
"filename": "clang.tar.bz2"
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ MOZ_OFFICIAL_BRANDING_DIRECTORY=b2g/branding/official
|
||||
# MOZ_APP_DISPLAYNAME is set by branding/configure.sh
|
||||
|
||||
MOZ_SAFE_BROWSING=
|
||||
MOZ_SERVICES_SYNC=
|
||||
MOZ_SERVICES_COMMON=1
|
||||
|
||||
MOZ_WEBSMS_BACKEND=1
|
||||
MOZ_DISABLE_DOMCRYPTO=1
|
||||
|
@ -359,6 +359,8 @@
|
||||
@BINPATH@/components/nsLoginInfo.js
|
||||
@BINPATH@/components/nsLoginManager.js
|
||||
@BINPATH@/components/nsLoginManagerPrompter.js
|
||||
@BINPATH@/components/SiteSpecificUserAgent.js
|
||||
@BINPATH@/components/SiteSpecificUserAgent.manifest
|
||||
@BINPATH@/components/storage-Legacy.js
|
||||
@BINPATH@/components/storage-mozStorage.js
|
||||
@BINPATH@/components/crypto-SDR.js
|
||||
|
@ -221,10 +221,7 @@ pref("general.autoScroll", false);
|
||||
pref("general.autoScroll", true);
|
||||
#endif
|
||||
|
||||
// Send aol.com the legacy build date instead of the version number in the UA's
|
||||
// Gecko token as a temporary measure against bug 778408 (mail.aol.com defaults
|
||||
// to basic web UI when accessed with a user agent without Gecko/20100101).
|
||||
pref("general.useragent.override.aol.com", "Gecko/[^ ]*#Gecko/20100101");
|
||||
pref("general.useragent.complexOverride.moodle", true); // bug 797703
|
||||
|
||||
// At startup, check if we're the default browser and prompt user if not.
|
||||
pref("browser.shell.checkDefaultBrowser", true);
|
||||
|
@ -27,6 +27,12 @@
|
||||
label="&newNavigatorCmd.label;"
|
||||
command="cmd_newNavigator"
|
||||
key="key_newNavigator"/>
|
||||
#ifdef MOZ_PER_WINDOW_PRIVATE_BROWSING
|
||||
<menuitem id="appmenu_newPrivateWindow"
|
||||
label="&newPrivateWindow.label;"
|
||||
command="Tools:PrivateBrowsing"
|
||||
key="key_privatebrowsing"/>
|
||||
#endif
|
||||
<menuseparator/>
|
||||
<menuitem id="appmenu_openFile"
|
||||
label="&openFileCmd.label;"
|
||||
@ -34,6 +40,7 @@
|
||||
key="openFileKb"/>
|
||||
</menupopup>
|
||||
</splitmenu>
|
||||
#ifndef MOZ_PER_WINDOW_PRIVATE_BROWSING
|
||||
<menuitem id="appmenu_privateBrowsing"
|
||||
class="menuitem-iconic menuitem-iconic-tooltip"
|
||||
label="&privateBrowsingCmd.start.label;"
|
||||
@ -41,6 +48,7 @@
|
||||
stoplabel="&privateBrowsingCmd.stop.label;"
|
||||
command="Tools:PrivateBrowsing"
|
||||
key="key_privatebrowsing"/>
|
||||
#endif
|
||||
<menuitem label="&goOfflineCmd.label;"
|
||||
id="appmenu_offlineModeRecovery"
|
||||
type="checkbox"
|
||||
|
@ -22,6 +22,13 @@
|
||||
accesskey="&newNavigatorCmd.accesskey;"
|
||||
key="key_newNavigator"
|
||||
command="cmd_newNavigator"/>
|
||||
#ifdef MOZ_PER_WINDOW_PRIVATE_BROWSING
|
||||
<menuitem id="menu_newPrivateWindow"
|
||||
label="&newPrivateWindow.label;"
|
||||
accesskey="&newPrivateWindow.accesskey;"
|
||||
command="Tools:PrivateBrowsing"
|
||||
key="key_privatebrowsing"/>
|
||||
#endif
|
||||
<menuitem id="menu_openLocation"
|
||||
class="show-only-for-keyboard"
|
||||
label="&openLocationCmd.label;"
|
||||
@ -475,7 +482,9 @@
|
||||
accesskey="&toolsMenu.accesskey;">
|
||||
<menupopup id="menu_ToolsPopup"
|
||||
#ifdef MOZ_SERVICES_SYNC
|
||||
onpopupshowing="gSyncUI.updateUI();"
|
||||
onpopupshowing="gSyncUI.updateUI(); SocialMenu.populate();"
|
||||
#else
|
||||
onpopupshowing="SocialMenu.populate();"
|
||||
#endif
|
||||
>
|
||||
<menuitem id="menu_search"
|
||||
@ -500,6 +509,11 @@
|
||||
type="checkbox"
|
||||
autocheck="false"
|
||||
command="Social:Toggle"/>
|
||||
<menu id="menu_socialAmbientMenu"
|
||||
class="show-only-for-keyboard"
|
||||
command="Social:Toggle">
|
||||
<menupopup id="menu_socialAmbientMenuPopup"/>
|
||||
</menu>
|
||||
#ifdef MOZ_SERVICES_SYNC
|
||||
<!-- only one of sync-setup or sync-menu will be showing at once -->
|
||||
<menuitem id="sync-setup"
|
||||
@ -541,6 +555,7 @@
|
||||
#endif
|
||||
command="View:PageInfo"/>
|
||||
<menuseparator id="sanitizeSeparator"/>
|
||||
#ifndef MOZ_PER_WINDOW_PRIVATE_BROWSING
|
||||
<menuitem id="privateBrowsingItem"
|
||||
label="&privateBrowsingCmd.start.label;"
|
||||
accesskey="&privateBrowsingCmd.start.accesskey;"
|
||||
@ -550,6 +565,7 @@
|
||||
stopaccesskey="&privateBrowsingCmd.stop.accesskey;"
|
||||
key="key_privatebrowsing"
|
||||
command="Tools:PrivateBrowsing"/>
|
||||
#endif
|
||||
<menuitem id="sanitizeItem"
|
||||
accesskey="&clearRecentHistory.accesskey;"
|
||||
label="&clearRecentHistory.label;"
|
||||
|
@ -262,14 +262,14 @@ var gPluginHandler = {
|
||||
|
||||
// Callback for user clicking on a missing (unsupported) plugin.
|
||||
installSinglePlugin: function (plugin) {
|
||||
var missingPluginsArray = {};
|
||||
var missingPlugins = new Map();
|
||||
|
||||
var pluginInfo = getPluginInfo(plugin);
|
||||
missingPluginsArray[pluginInfo.mimetype] = pluginInfo;
|
||||
missingPlugins.set(pluginInfo.mimetype, pluginInfo);
|
||||
|
||||
openDialog("chrome://mozapps/content/plugins/pluginInstallerWizard.xul",
|
||||
"PFSWindow", "chrome,centerscreen,resizable=yes",
|
||||
{plugins: missingPluginsArray, browser: gBrowser.selectedBrowser});
|
||||
{plugins: missingPlugins, browser: gBrowser.selectedBrowser});
|
||||
},
|
||||
|
||||
// Callback for user clicking on a disabled plugin
|
||||
@ -423,19 +423,20 @@ var gPluginHandler = {
|
||||
let contentWindow = aBrowser.contentWindow;
|
||||
let cwu = contentWindow.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDOMWindowUtils);
|
||||
let pluginsDictionary = {};
|
||||
let pluginsDictionary = new Map();
|
||||
for (let plugin of cwu.plugins) {
|
||||
let objLoadingContent = plugin.QueryInterface(Ci.nsIObjectLoadingContent);
|
||||
if (gPluginHandler.canActivatePlugin(objLoadingContent)) {
|
||||
let pluginName = getPluginInfo(plugin).pluginName;
|
||||
if (!pluginsDictionary[pluginName]) pluginsDictionary[pluginName] = [];
|
||||
pluginsDictionary[pluginName].push(objLoadingContent);
|
||||
if (!pluginsDictionary.has(pluginName))
|
||||
pluginsDictionary.set(pluginName, []);
|
||||
pluginsDictionary.get(pluginName).push(objLoadingContent);
|
||||
}
|
||||
}
|
||||
|
||||
let centerActions = [];
|
||||
for (let pluginName in pluginsDictionary) {
|
||||
let plugin = pluginsDictionary[pluginName][0];
|
||||
for (let [pluginName, namedPluginArray] of pluginsDictionary) {
|
||||
let plugin = namedPluginArray[0];
|
||||
let warn = false;
|
||||
let warningText = "";
|
||||
let updateLink = Services.urlFormatter.formatURLPref("plugins.update.url");
|
||||
@ -539,10 +540,10 @@ var gPluginHandler = {
|
||||
let browser = gBrowser.getBrowserForDocument(plugin.ownerDocument
|
||||
.defaultView.top.document);
|
||||
if (!browser.missingPlugins)
|
||||
browser.missingPlugins = {};
|
||||
browser.missingPlugins = new Map();
|
||||
|
||||
var pluginInfo = getPluginInfo(plugin);
|
||||
browser.missingPlugins[pluginInfo.mimetype] = pluginInfo;
|
||||
browser.missingPlugins.set(pluginInfo.mimetype, pluginInfo);
|
||||
|
||||
var notificationBox = gBrowser.getNotificationBox(browser);
|
||||
|
||||
@ -568,11 +569,11 @@ var gPluginHandler = {
|
||||
|
||||
function showPluginsMissing() {
|
||||
// get the urls of missing plugins
|
||||
var missingPluginsArray = gBrowser.selectedBrowser.missingPlugins;
|
||||
if (missingPluginsArray) {
|
||||
var missingPlugins = gBrowser.selectedBrowser.missingPlugins;
|
||||
if (missingPlugins) {
|
||||
openDialog("chrome://mozapps/content/plugins/pluginInstallerWizard.xul",
|
||||
"PFSWindow", "chrome,centerscreen,resizable=yes",
|
||||
{plugins: missingPluginsArray, browser: gBrowser.selectedBrowser});
|
||||
{plugins: missingPlugins, browser: gBrowser.selectedBrowser});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -102,7 +102,12 @@
|
||||
<command id="Tools:ErrorConsole" oncommand="toJavaScriptConsole()" hidden="true"/>
|
||||
<command id="Tools:Sanitize"
|
||||
oncommand="Cc['@mozilla.org/browser/browserglue;1'].getService(Ci.nsIBrowserGlue).sanitize(window);"/>
|
||||
<command id="Tools:PrivateBrowsing" oncommand="gPrivateBrowsingUI.toggleMode();"/>
|
||||
<command id="Tools:PrivateBrowsing"
|
||||
#ifdef MOZ_PER_WINDOW_PRIVATE_BROWSING
|
||||
oncommand="OpenBrowserWindow({private: true});"/>
|
||||
#else
|
||||
oncommand="gPrivateBrowsingUI.toggleMode();"/>
|
||||
#endif
|
||||
<command id="History:UndoCloseTab" oncommand="undoCloseTab();"/>
|
||||
<command id="History:UndoCloseWindow" oncommand="undoCloseWindow();"/>
|
||||
<command id="Browser:ToggleAddonBar" oncommand="toggleAddonBar();"/>
|
||||
|
@ -62,6 +62,7 @@ let SocialUI = {
|
||||
break;
|
||||
case "social:ambient-notification-changed":
|
||||
SocialToolbar.updateButton();
|
||||
SocialMenu.updateMenu();
|
||||
break;
|
||||
case "social:profile-changed":
|
||||
SocialToolbar.updateProfile();
|
||||
@ -107,7 +108,7 @@ let SocialUI = {
|
||||
// FIXME: bug 772808: menu items don't inherit the "hidden" state properly,
|
||||
// need to update them manually.
|
||||
// This should just be: toggleCommand.hidden = !Social.active;
|
||||
for (let id of ["appmenu_socialToggle", "menu_socialToggle"]) {
|
||||
for (let id of ["appmenu_socialToggle", "menu_socialToggle", "menu_socialAmbientMenu"]) {
|
||||
let el = document.getElementById(id);
|
||||
if (!el)
|
||||
continue;
|
||||
@ -584,6 +585,31 @@ let SocialShareButton = {
|
||||
}
|
||||
};
|
||||
|
||||
var SocialMenu = {
|
||||
populate: function SocialMenu_populate() {
|
||||
// This menu is only accessible through keyboard navigation.
|
||||
let submenu = document.getElementById("menu_socialAmbientMenuPopup");
|
||||
while (submenu.hasChildNodes())
|
||||
submenu.removeChild(submenu.firstChild);
|
||||
let provider = Social.provider;
|
||||
if (Social.active && provider) {
|
||||
let iconNames = Object.keys(provider.ambientNotificationIcons);
|
||||
for (let name of iconNames) {
|
||||
let icon = provider.ambientNotificationIcons[name];
|
||||
if (!icon.label || !icon.menuURL)
|
||||
continue;
|
||||
let menuitem = document.createElement("menuitem");
|
||||
menuitem.setAttribute("label", icon.label);
|
||||
menuitem.addEventListener("command", function() {
|
||||
openUILinkIn(icon.menuURL, "tab");
|
||||
}, false);
|
||||
submenu.appendChild(menuitem);
|
||||
}
|
||||
}
|
||||
document.getElementById("menu_socialAmbientMenu").hidden = !submenu.querySelector("menuitem");
|
||||
}
|
||||
};
|
||||
|
||||
var SocialToolbar = {
|
||||
// Called once, after window load, when the Social.provider object is initialized
|
||||
init: function SocialToolbar_init() {
|
||||
@ -623,7 +649,7 @@ var SocialToolbar = {
|
||||
if (profile.userName) {
|
||||
notLoggedInLabel.hidden = true;
|
||||
userNameBtn.hidden = false;
|
||||
userNameBtn.label = profile.userName;
|
||||
userNameBtn.value = profile.userName;
|
||||
} else {
|
||||
notLoggedInLabel.hidden = false;
|
||||
userNameBtn.hidden = true;
|
||||
@ -717,6 +743,9 @@ var SocialToolbar = {
|
||||
let box = document.createElement("box");
|
||||
box.classList.add("toolbarbutton-1");
|
||||
box.setAttribute("id", iconId);
|
||||
// Use the accessibility menuitem label as tooltiptext.
|
||||
if (icon.label)
|
||||
box.setAttribute("tooltiptext", icon.label);
|
||||
box.addEventListener("mousedown", function (e) {
|
||||
if (e.button == 0)
|
||||
SocialToolbar.showAmbientPopup(box);
|
||||
|
@ -1563,7 +1563,9 @@ var gBrowserInit = {
|
||||
|
||||
PlacesStarButton.uninit();
|
||||
|
||||
#ifndef MOZ_PER_WINDOW_PRIVATE_BROWSING
|
||||
gPrivateBrowsingUI.uninit();
|
||||
#endif
|
||||
|
||||
TabsOnTop.uninit();
|
||||
|
||||
@ -1711,7 +1713,9 @@ var gBrowserInit = {
|
||||
|
||||
BrowserOffline.uninit();
|
||||
|
||||
#ifndef MOZ_PER_WINDOW_PRIVATE_BROWSING
|
||||
gPrivateBrowsingUI.uninit();
|
||||
#endif
|
||||
},
|
||||
#endif
|
||||
|
||||
@ -3498,7 +3502,7 @@ function toOpenWindowByType(inType, uri, features)
|
||||
window.open(uri, "_blank", "chrome,extrachrome,menubar,resizable,scrollbars,status,toolbar");
|
||||
}
|
||||
|
||||
function OpenBrowserWindow()
|
||||
function OpenBrowserWindow(options)
|
||||
{
|
||||
var telemetryObj = {};
|
||||
TelemetryStopwatch.start("FX_NEW_WINDOW_MS", telemetryObj);
|
||||
@ -3519,6 +3523,17 @@ function OpenBrowserWindow()
|
||||
var defaultArgs = handler.defaultArgs;
|
||||
var wintype = document.documentElement.getAttribute('windowtype');
|
||||
|
||||
var extraFeatures = "";
|
||||
#ifdef MOZ_PER_WINDOW_PRIVATE_BROWSING
|
||||
if (typeof options == "object" &&
|
||||
"private" in options &&
|
||||
options.private) {
|
||||
extraFeatures = ",private";
|
||||
// Force the new window to load about:privatebrowsing instead of the default home page
|
||||
defaultArgs = "about:privatebrowsing";
|
||||
}
|
||||
#endif
|
||||
|
||||
// if and only if the current window is a browser window and it has a document with a character
|
||||
// set, then extract the current charset menu setting from the current document and use it to
|
||||
// initialize the new browser window...
|
||||
@ -3529,11 +3544,11 @@ function OpenBrowserWindow()
|
||||
charsetArg = "charset="+DocCharset;
|
||||
|
||||
//we should "inherit" the charset menu setting in a new window
|
||||
win = window.openDialog("chrome://browser/content/", "_blank", "chrome,all,dialog=no", defaultArgs, charsetArg);
|
||||
win = window.openDialog("chrome://browser/content/", "_blank", "chrome,all,dialog=no" + extraFeatures, defaultArgs, charsetArg);
|
||||
}
|
||||
else // forget about the charset information.
|
||||
{
|
||||
win = window.openDialog("chrome://browser/content/", "_blank", "chrome,all,dialog=no", defaultArgs);
|
||||
win = window.openDialog("chrome://browser/content/", "_blank", "chrome,all,dialog=no" + extraFeatures, defaultArgs);
|
||||
}
|
||||
|
||||
return win;
|
||||
@ -7043,12 +7058,46 @@ function getTabModalPromptBox(aWindow) {
|
||||
function getBrowser() gBrowser;
|
||||
function getNavToolbox() gNavToolbox;
|
||||
|
||||
#ifdef MOZ_PER_WINDOW_PRIVATE_BROWSING
|
||||
|
||||
# We define a new gPrivateBrowsingUI object, as the per-window PB implementation
|
||||
# is completely different to the global PB one. Specifically, the per-window
|
||||
# PB implementation does not expose many APIs on the gPrivateBrowsingUI object,
|
||||
# and only uses it as a way to initialize and uninitialize private browsing
|
||||
# windows. While we could use #ifdefs all around the global PB mode code to
|
||||
# make it work in both modes, the amount of duplicated code is small and the
|
||||
# code is much more readable this way.
|
||||
let gPrivateBrowsingUI = {
|
||||
init: function PBUI_init() {
|
||||
// Do nothing for normal windows
|
||||
if (!PrivateBrowsingUtils.isWindowPrivate(window)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Disable the Clear Recent History... menu item when in PB mode
|
||||
// temporary fix until bug 463607 is fixed
|
||||
document.getElementById("Tools:Sanitize").setAttribute("disabled", "true");
|
||||
|
||||
// Adjust the window's title
|
||||
if (window.location.href == getBrowserURL()) {
|
||||
let docElement = document.documentElement;
|
||||
docElement.setAttribute("title",
|
||||
docElement.getAttribute("title_privatebrowsing"));
|
||||
docElement.setAttribute("titlemodifier",
|
||||
docElement.getAttribute("titlemodifier_privatebrowsing"));
|
||||
docElement.setAttribute("privatebrowsingmode", "temporary");
|
||||
gBrowser.updateTitlebar();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
let gPrivateBrowsingUI = {
|
||||
_privateBrowsingService: null,
|
||||
_searchBarValue: null,
|
||||
_findBarValue: null,
|
||||
_inited: false,
|
||||
_initCallbacks: [],
|
||||
|
||||
init: function PBUI_init() {
|
||||
Services.obs.addObserver(this, "private-browsing", false);
|
||||
@ -7061,9 +7110,6 @@ let gPrivateBrowsingUI = {
|
||||
this.onEnterPrivateBrowsing(true);
|
||||
|
||||
this._inited = true;
|
||||
|
||||
this._initCallbacks.forEach(function (callback) callback.apply());
|
||||
this._initCallbacks = [];
|
||||
},
|
||||
|
||||
uninit: function PBUI_unint() {
|
||||
@ -7074,17 +7120,6 @@ let gPrivateBrowsingUI = {
|
||||
Services.obs.removeObserver(this, "private-browsing-transition-complete");
|
||||
},
|
||||
|
||||
get initialized() {
|
||||
return this._inited;
|
||||
},
|
||||
|
||||
addInitializationCallback: function PBUI_addInitializationCallback(aCallback) {
|
||||
if (this._inited)
|
||||
return;
|
||||
|
||||
this._initCallbacks.push(aCallback);
|
||||
},
|
||||
|
||||
get _disableUIOnToggle() {
|
||||
if (this._privateBrowsingService.autoStarted)
|
||||
return false;
|
||||
@ -7287,15 +7322,13 @@ let gPrivateBrowsingUI = {
|
||||
!this.privateBrowsingEnabled;
|
||||
},
|
||||
|
||||
get autoStarted() {
|
||||
return this._privateBrowsingService.autoStarted;
|
||||
},
|
||||
|
||||
get privateBrowsingEnabled() {
|
||||
return this._privateBrowsingService.privateBrowsingEnabled;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* Switch to a tab that has a given URI, and focusses its browser window.
|
||||
@ -7523,14 +7556,14 @@ var StyleEditor = {
|
||||
this.StyleEditorManager.selectEditor(win);
|
||||
return win;
|
||||
} else {
|
||||
return this.StyleEditorManager.newEditor(contentWindow,
|
||||
return this.StyleEditorManager.newEditor(contentWindow, window,
|
||||
aSelectedStyleSheet, aLine, aCol);
|
||||
}
|
||||
},
|
||||
|
||||
toggle: function SE_toggle()
|
||||
{
|
||||
this.StyleEditorManager.toggleEditor(gBrowser.contentWindow);
|
||||
this.StyleEditorManager.toggleEditor(gBrowser.contentWindow, window);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -669,21 +669,30 @@
|
||||
class="toolbarbutton-1"
|
||||
type="menu">
|
||||
<menupopup id="social-statusarea-popup">
|
||||
<hbox id="social-statusarea-user" pack="start" align="center"
|
||||
<menuitem id="social-statusarea-user" pack="start" align="center" class="menuitem-iconic"
|
||||
onclick="SocialUI.showProfile(); document.getElementById('social-statusarea-popup').hidePopup();">
|
||||
<image id="social-statusarea-user-portrait"/>
|
||||
<vbox>
|
||||
<button id="social-statusarea-notloggedin"
|
||||
class="link" label="&social.notLoggedIn.label;"/>
|
||||
<button id="social-statusarea-username" class="link"/>
|
||||
<label id="social-statusarea-notloggedin"
|
||||
value="&social.notLoggedIn.label;"/>
|
||||
<label id="social-statusarea-username"/>
|
||||
</vbox>
|
||||
</hbox>
|
||||
</menuitem>
|
||||
#ifndef XP_WIN
|
||||
<menuseparator/>
|
||||
#endif
|
||||
<menuitem id="social-toggle-sidebar-menuitem"
|
||||
type="checkbox"
|
||||
autocheck="false"
|
||||
command="Social:ToggleSidebar"
|
||||
label="&social.toggleSidebar.label;"
|
||||
accesskey="&social.toggleSidebar.accesskey;"/>
|
||||
<menuitem id="social-toggle-notifications-menuitem"
|
||||
type="checkbox"
|
||||
autocheck="false"
|
||||
command="Social:ToggleNotifications"
|
||||
label="&social.toggleNotifications.label;"
|
||||
accesskey="&social.toggleNotifications.accesskey;"/>
|
||||
</menupopup>
|
||||
</toolbarbutton>
|
||||
</toolbaritem>
|
||||
|
@ -836,8 +836,11 @@
|
||||
if (this.mCurrentBrowser == newBrowser && !aForceUpdate)
|
||||
return;
|
||||
|
||||
if (!aForceUpdate)
|
||||
if (!aForceUpdate) {
|
||||
TelemetryStopwatch.start("FX_TAB_SWITCH_UPDATE_MS");
|
||||
window.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils)
|
||||
.beginTabSwitch();
|
||||
}
|
||||
|
||||
var oldTab = this.mCurrentTab;
|
||||
|
||||
|
@ -158,6 +158,7 @@ _BROWSER_FILES = \
|
||||
browser_bug763468.js \
|
||||
browser_bug767836.js \
|
||||
browser_bug783614.js \
|
||||
browser_bug797677.js \
|
||||
browser_canonizeURL.js \
|
||||
browser_customize.js \
|
||||
browser_findbarClose.js \
|
||||
@ -240,6 +241,7 @@ _BROWSER_FILES = \
|
||||
plugin_clickToPlayAllow.html \
|
||||
plugin_clickToPlayDeny.html \
|
||||
plugin_bug749455.html \
|
||||
plugin_bug797677.html \
|
||||
plugin_hidden_to_visible.html \
|
||||
plugin_two_types.html \
|
||||
alltabslistener.html \
|
||||
@ -296,6 +298,12 @@ _BROWSER_FILES += \
|
||||
|
||||
endif
|
||||
|
||||
ifdef MOZ_PER_WINDOW_PRIVATE_BROWSING
|
||||
_BROWSER_FILES += \
|
||||
browser_private_browsing_window.js \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
libs:: $(_BROWSER_FILES)
|
||||
|
47
browser/base/content/test/browser_bug797677.js
Normal file
@ -0,0 +1,47 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
var rootDir = getRootDirectory(gTestPath);
|
||||
const gHttpTestRoot = rootDir.replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
var gTestBrowser = null;
|
||||
var gConsoleErrors = 0;
|
||||
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
var newTab = gBrowser.addTab();
|
||||
gBrowser.selectedTab = newTab;
|
||||
gTestBrowser = gBrowser.selectedBrowser;
|
||||
gTestBrowser.addEventListener("PluginNotFound", pluginNotFound, true);
|
||||
var consoleService = Cc["@mozilla.org/consoleservice;1"]
|
||||
.getService(Ci.nsIConsoleService);
|
||||
var errorListener = {
|
||||
observe: function(aMessage) {
|
||||
if (aMessage.message.contains("NS_ERROR"))
|
||||
gConsoleErrors++;
|
||||
}
|
||||
};
|
||||
consoleService.registerListener(errorListener);
|
||||
registerCleanupFunction(function() {
|
||||
gTestBrowser.removeEventListener("PluginNotFound", pluginNotFound, true);
|
||||
consoleService.unregisterListener(errorListener);
|
||||
gBrowser.removeCurrentTab();
|
||||
window.focus();
|
||||
});
|
||||
gTestBrowser.contentWindow.location = gHttpTestRoot + "plugin_bug797677.html";
|
||||
}
|
||||
|
||||
function pluginNotFound() {
|
||||
// Let browser-plugins.js handle the PluginNotFound event, then run the test
|
||||
executeSoon(runTest);
|
||||
}
|
||||
|
||||
function runTest() {
|
||||
var doc = gTestBrowser.contentDocument;
|
||||
var plugin = doc.getElementById("plugin");
|
||||
ok(plugin, "plugin should be in the page");
|
||||
is(gConsoleErrors, 0, "should have no console errors");
|
||||
finish();
|
||||
}
|
@ -97,8 +97,8 @@ function test1() {
|
||||
ok(notificationBox.getNotificationWithValue("missing-plugins"), "Test 1, Should have displayed the missing plugin notification");
|
||||
ok(!notificationBox.getNotificationWithValue("blocked-plugins"), "Test 1, Should not have displayed the blocked plugin notification");
|
||||
ok(gTestBrowser.missingPlugins, "Test 1, Should be a missing plugin list");
|
||||
ok("application/x-unknown" in gTestBrowser.missingPlugins, "Test 1, Should know about application/x-unknown");
|
||||
ok(!("application/x-test" in gTestBrowser.missingPlugins), "Test 1, Should not know about application/x-test");
|
||||
ok(gTestBrowser.missingPlugins.has("application/x-unknown"), "Test 1, Should know about application/x-unknown");
|
||||
ok(!gTestBrowser.missingPlugins.has("application/x-test"), "Test 1, Should not know about application/x-test");
|
||||
|
||||
var pluginNode = gTestBrowser.contentDocument.getElementById("unknown");
|
||||
ok(pluginNode, "Test 1, Found plugin in page");
|
||||
@ -162,8 +162,8 @@ function test5() {
|
||||
ok(!notificationBox.getNotificationWithValue("missing-plugins"), "Test 5, Should not have displayed the missing plugin notification");
|
||||
ok(notificationBox.getNotificationWithValue("blocked-plugins"), "Test 5, Should have displayed the blocked plugin notification");
|
||||
ok(gTestBrowser.missingPlugins, "Test 5, Should be a missing plugin list");
|
||||
ok("application/x-test" in gTestBrowser.missingPlugins, "Test 5, Should know about application/x-test");
|
||||
ok(!("application/x-unknown" in gTestBrowser.missingPlugins), "Test 5, Should not know about application/x-unknown");
|
||||
ok(gTestBrowser.missingPlugins.has("application/x-test"), "Test 5, Should know about application/x-test");
|
||||
ok(!gTestBrowser.missingPlugins.has("application/x-unknown"), "Test 5, Should not know about application/x-unknown");
|
||||
var pluginNode = gTestBrowser.contentDocument.getElementById("test");
|
||||
ok(pluginNode, "Test 5, Found plugin in page");
|
||||
var objLoadingContent = pluginNode.QueryInterface(Ci.nsIObjectLoadingContent);
|
||||
@ -178,8 +178,8 @@ function test6() {
|
||||
ok(notificationBox.getNotificationWithValue("missing-plugins"), "Test 6, Should have displayed the missing plugin notification");
|
||||
ok(!notificationBox.getNotificationWithValue("blocked-plugins"), "Test 6, Should not have displayed the blocked plugin notification");
|
||||
ok(gTestBrowser.missingPlugins, "Test 6, Should be a missing plugin list");
|
||||
ok("application/x-unknown" in gTestBrowser.missingPlugins, "Test 6, Should know about application/x-unknown");
|
||||
ok("application/x-test" in gTestBrowser.missingPlugins, "Test 6, Should know about application/x-test");
|
||||
ok(gTestBrowser.missingPlugins.has("application/x-unknown"), "Test 6, Should know about application/x-unknown");
|
||||
ok(gTestBrowser.missingPlugins.has("application/x-test"), "Test 6, Should know about application/x-test");
|
||||
|
||||
prepareTest(test7, gTestRoot + "plugin_both2.html");
|
||||
}
|
||||
@ -190,8 +190,8 @@ function test7() {
|
||||
ok(notificationBox.getNotificationWithValue("missing-plugins"), "Test 7, Should have displayed the missing plugin notification");
|
||||
ok(!notificationBox.getNotificationWithValue("blocked-plugins"), "Test 7, Should not have displayed the blocked plugin notification");
|
||||
ok(gTestBrowser.missingPlugins, "Test 7, Should be a missing plugin list");
|
||||
ok("application/x-unknown" in gTestBrowser.missingPlugins, "Test 7, Should know about application/x-unknown");
|
||||
ok("application/x-test" in gTestBrowser.missingPlugins, "Test 7, Should know about application/x-test");
|
||||
ok(gTestBrowser.missingPlugins.has("application/x-unknown"), "Test 7, Should know about application/x-unknown");
|
||||
ok(gTestBrowser.missingPlugins.has("application/x-test"), "Test 7, Should know about application/x-test");
|
||||
|
||||
var plugin = getTestPlugin();
|
||||
plugin.disabled = false;
|
||||
|
11
browser/base/content/test/browser_private_browsing_window.js
Normal file
@ -0,0 +1,11 @@
|
||||
// Make sure that we can open private browsing windows
|
||||
|
||||
function test() {
|
||||
var nonPrivateWin = OpenBrowserWindow();
|
||||
ok(!PrivateBrowsingUtils.isWindowPrivate(nonPrivateWin), "OpenBrowserWindow() should open a normal window");
|
||||
nonPrivateWin.close();
|
||||
var privateWin = OpenBrowserWindow({private: true});
|
||||
ok(PrivateBrowsingUtils.isWindowPrivate(privateWin), "OpenBrowserWindow({private: true}) should open a private window");
|
||||
privateWin.close();
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ function test() {
|
||||
origin: "https://example.com",
|
||||
sidebarURL: "https://example.com/browser/browser/base/content/test/social_sidebar.html",
|
||||
workerURL: "https://example.com/browser/browser/base/content/test/social_worker.js",
|
||||
iconURL: "chrome://branding/content/icon48.png"
|
||||
iconURL: "https://example.com/browser/browser/base/content/test/moz.png"
|
||||
};
|
||||
runSocialTestWithProvider(manifest, function (finishcb) {
|
||||
runSocialTests(tests, undefined, undefined, function () {
|
||||
|
@ -10,7 +10,7 @@ function test() {
|
||||
origin: "https://example.com",
|
||||
sidebarURL: "https://example.com/browser/browser/base/content/test/social_sidebar.html",
|
||||
workerURL: "https://example.com/browser/browser/base/content/test/social_worker.js",
|
||||
iconURL: "chrome://branding/content/icon48.png"
|
||||
iconURL: "https://example.com/browser/browser/base/content/test/moz.png"
|
||||
};
|
||||
runSocialTestWithProvider(manifest, function (finishcb) {
|
||||
runSocialTests(tests, undefined, undefined, finishcb);
|
||||
|
@ -10,7 +10,7 @@ function test() {
|
||||
origin: "https://example.com",
|
||||
sidebarURL: "https://example.com/browser/browser/base/content/test/social_sidebar.html",
|
||||
workerURL: "https://example.com/browser/browser/base/content/test/social_worker.js",
|
||||
iconURL: "chrome://branding/content/icon48.png"
|
||||
iconURL: "https://example.com/browser/browser/base/content/test/moz.png"
|
||||
};
|
||||
runSocialTestWithProvider(manifest, function (finishcb) {
|
||||
runSocialTests(tests, undefined, undefined, finishcb);
|
||||
|
@ -29,7 +29,7 @@ function tabLoaded() {
|
||||
origin: "https://example.com",
|
||||
sidebarURL: "https://example.com/browser/browser/base/content/test/social_sidebar.html",
|
||||
workerURL: "https://example.com/browser/browser/base/content/test/social_worker.js",
|
||||
iconURL: "chrome://branding/content/icon48.png"
|
||||
iconURL: "https://example.com/browser/browser/base/content/test/moz.png"
|
||||
};
|
||||
runSocialTestWithProvider(manifest, function (finishcb) {
|
||||
gFinishCB = finishcb;
|
||||
|
@ -10,7 +10,7 @@ function test() {
|
||||
origin: "https://example.com",
|
||||
sidebarURL: "https://example.com/browser/browser/base/content/test/social_sidebar.html",
|
||||
workerURL: "https://example.com/browser/browser/base/content/test/social_worker.js",
|
||||
iconURL: "chrome://branding/content/icon48.png"
|
||||
iconURL: "https://example.com/browser/browser/base/content/test/moz.png"
|
||||
};
|
||||
runSocialTestWithProvider(manifest, doTest);
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ function test() {
|
||||
name: "provider 1",
|
||||
origin: "https://example.com",
|
||||
workerURL: "https://example.com/browser/browser/base/content/test/social_worker.js",
|
||||
iconURL: "chrome://branding/content/icon48.png"
|
||||
iconURL: "https://example.com/browser/browser/base/content/test/moz.png"
|
||||
};
|
||||
runSocialTestWithProvider(manifest, function (finishcb) {
|
||||
runSocialTests(tests, undefined, undefined, finishcb);
|
||||
@ -30,15 +30,36 @@ var tests = {
|
||||
is(profile.portrait, portrait, "portrait is set");
|
||||
let userButton = document.getElementById("social-statusarea-username");
|
||||
ok(!userButton.hidden, "username is visible");
|
||||
is(userButton.label, profile.userName, "username is set");
|
||||
is(userButton.value, profile.userName, "username is set");
|
||||
next();
|
||||
},
|
||||
testNoAmbientNotificationsIsNoKeyboardMenu: function(next) {
|
||||
// The menu bar isn't as easy to instrument on Mac.
|
||||
if (navigator.platform.contains("Mac")) {
|
||||
info("Skipping checking the menubar on Mac OS");
|
||||
next();
|
||||
}
|
||||
|
||||
// Test that keyboard accessible menuitem doesn't exist when no ambient icons specified.
|
||||
let toolsPopup = document.getElementById("menu_ToolsPopup");
|
||||
toolsPopup.addEventListener("popupshown", function ontoolspopupshownNoAmbient() {
|
||||
toolsPopup.removeEventListener("popupshown", ontoolspopupshownNoAmbient);
|
||||
let socialToggleMore = document.getElementById("menu_socialAmbientMenu");
|
||||
ok(socialToggleMore, "Keyboard accessible social menu should exist");
|
||||
is(socialToggleMore.hidden, true, "Menu should be hidden when no ambient notifications.");
|
||||
toolsPopup.hidePopup();
|
||||
next();
|
||||
}, false);
|
||||
document.getElementById("menu_ToolsPopup").openPopup();
|
||||
},
|
||||
testAmbientNotifications: function(next) {
|
||||
let ambience = {
|
||||
name: "testIcon",
|
||||
iconURL: "chrome://branding/content/icon48.png",
|
||||
iconURL: "https://example.com/browser/browser/base/content/test/moz.png",
|
||||
contentPanel: "about:blank",
|
||||
counter: 42
|
||||
counter: 42,
|
||||
label: "Test Ambient 1",
|
||||
menuURL: "https://example.com/testAmbient1"
|
||||
};
|
||||
Social.provider.setAmbientNotification(ambience);
|
||||
|
||||
@ -53,7 +74,24 @@ var tests = {
|
||||
ambience.counter = 0;
|
||||
Social.provider.setAmbientNotification(ambience);
|
||||
is(statusIconLabel.value, "", "status value is correct");
|
||||
next();
|
||||
|
||||
// The menu bar isn't as easy to instrument on Mac.
|
||||
if (navigator.platform.contains("Mac"))
|
||||
next();
|
||||
|
||||
// Test that keyboard accessible menuitem was added.
|
||||
let toolsPopup = document.getElementById("menu_ToolsPopup");
|
||||
toolsPopup.addEventListener("popupshown", function ontoolspopupshownAmbient() {
|
||||
toolsPopup.removeEventListener("popupshown", ontoolspopupshownAmbient);
|
||||
let socialToggleMore = document.getElementById("menu_socialAmbientMenu");
|
||||
ok(socialToggleMore, "Keyboard accessible social menu should exist");
|
||||
is(socialToggleMore.hidden, false, "Menu is visible when ambient notifications have label & menuURL");
|
||||
let menuitem = socialToggleMore.querySelector("menuitem");
|
||||
is(menuitem.getAttribute("label"), "Test Ambient 1", "Keyboard accessible ambient menuitem should have specified label");
|
||||
toolsPopup.hidePopup();
|
||||
next();
|
||||
}, false);
|
||||
document.getElementById("menu_ToolsPopup").openPopup();
|
||||
}, "statusIcon was never found");
|
||||
},
|
||||
testProfileUnset: function(next) {
|
||||
@ -66,6 +104,16 @@ var tests = {
|
||||
ok(ambientIcon.collapsed, "ambient icon (" + ambientIcon.id + ") is collapsed");
|
||||
}
|
||||
|
||||
next();
|
||||
},
|
||||
testShowSidebarMenuitemExists: function(next) {
|
||||
let toggleSidebarMenuitem = document.getElementById("social-toggle-sidebar-menuitem");
|
||||
ok(toggleSidebarMenuitem, "Toggle Sidebar menuitem exists");
|
||||
next();
|
||||
},
|
||||
testShowDesktopNotificationsMenuitemExists: function(next) {
|
||||
let toggleDesktopNotificationsMenuitem = document.getElementById("social-toggle-notifications-menuitem");
|
||||
ok(toggleDesktopNotificationsMenuitem, "Toggle notifications menuitem exists");
|
||||
next();
|
||||
}
|
||||
}
|
||||
|
@ -132,6 +132,7 @@ function runSocialTestWithProvider(manifest, callback) {
|
||||
|
||||
// Now that we've set the UI's provider, enable the social functionality
|
||||
Services.prefs.setBoolPref("social.enabled", true);
|
||||
Services.prefs.setBoolPref("social.active", true);
|
||||
|
||||
// Need to re-call providerReady since it is actually called before the test
|
||||
// framework is loaded and the provider state won't be set in the browser yet.
|
||||
@ -149,6 +150,7 @@ function runSocialTestWithProvider(manifest, callback) {
|
||||
}
|
||||
Social.provider = oldProvider;
|
||||
Services.prefs.clearUserPref("social.enabled");
|
||||
Services.prefs.clearUserPref("social.active");
|
||||
});
|
||||
|
||||
function finishSocialTest() {
|
||||
|
5
browser/base/content/test/plugin_bug797677.html
Normal file
@ -0,0 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head><meta charset="utf-8"/></head>
|
||||
<body><embed id="plugin" type="9000"></embed></body>
|
||||
</html>
|
@ -1714,15 +1714,39 @@
|
||||
<field name="_brandBundle" readonly="true">
|
||||
Services.strings.createBundle("chrome://branding/locale/brand.properties");
|
||||
</field>
|
||||
<property name="_viewsLeftMap">
|
||||
<getter><![CDATA[
|
||||
let viewsLeftMap = {};
|
||||
try {
|
||||
viewsLeftMap = JSON.parse(Services.prefs.getCharPref("browser.syncPromoViewsLeftMap"));
|
||||
} catch (ex) {
|
||||
// If the old preference exists, migrate it to the new one.
|
||||
try {
|
||||
let oldPref = Services.prefs.getIntPref("browser.syncPromoViewsLeft");
|
||||
Services.prefs.clearUserPref("browser.syncPromoViewsLeft");
|
||||
viewsLeftMap.bookmarks = oldPref;
|
||||
viewsLeftMap.passwords = oldPref;
|
||||
Services.prefs.setCharPref("browser.syncPromoViewsLeftMap",
|
||||
JSON.stringify(viewsLeftMap));
|
||||
} catch (ex2) {}
|
||||
}
|
||||
return viewsLeftMap;
|
||||
]]></getter>
|
||||
</property>
|
||||
<property name="_viewsLeft">
|
||||
<getter><![CDATA[
|
||||
try {
|
||||
return Services.prefs.getIntPref("browser.syncPromoViewsLeft");
|
||||
} catch(ex) {}
|
||||
return 5;
|
||||
let views = 5;
|
||||
let map = this._viewsLeftMap;
|
||||
if (this._notificationType in map) {
|
||||
views = map[this._notificationType];
|
||||
}
|
||||
return views;
|
||||
]]></getter>
|
||||
<setter><![CDATA[
|
||||
Services.prefs.setIntPref("browser.syncPromoViewsLeft", val);
|
||||
let map = this._viewsLeftMap;
|
||||
map[this._notificationType] = val;
|
||||
Services.prefs.setCharPref("browser.syncPromoViewsLeftMap",
|
||||
JSON.stringify(map));
|
||||
return val;
|
||||
]]></setter>
|
||||
</property>
|
||||
@ -1814,13 +1838,16 @@
|
||||
// thus set a width on it, based on the available space, before
|
||||
// setting its textContent. Then set its height as well, to
|
||||
// fix wrong height calculation on Linux (bug 659578).
|
||||
let self = this;
|
||||
this._panel.addEventListener("popupshown", function (evt) {
|
||||
self._panel.removeEventListener("popupshown", arguments.callee, true);
|
||||
self._promomessage.width = self._promomessage.getBoundingClientRect().width;
|
||||
self._promomessage.firstChild.textContent = self._notificationMessage;
|
||||
self._promomessage.height = self._promomessage.getBoundingClientRect().height;
|
||||
}, true);
|
||||
this._panel.addEventListener("popupshown", function panelShown() {
|
||||
this._panel.removeEventListener("popupshown", panelShown, true);
|
||||
// Previous popupShown events may close the panel or change
|
||||
// its contents, so ensure this is still valid.
|
||||
if (this._panel.state != "open" || !this._notificationType)
|
||||
return;
|
||||
this._promomessage.width = this._promomessage.getBoundingClientRect().width;
|
||||
this._promomessage.firstChild.textContent = this._notificationMessage;
|
||||
this._promomessage.height = this._promomessage.getBoundingClientRect().height;
|
||||
}.bind(this), true);
|
||||
}
|
||||
]]></body>
|
||||
</method>
|
||||
|
@ -13,14 +13,9 @@ XPCOMUtils.defineLazyGetter(this, "BROWSER_NEW_TAB_URL", function () {
|
||||
const TOPIC = "private-browsing-transition-complete";
|
||||
|
||||
function getNewTabPageURL() {
|
||||
if (("gPrivateBrowsingUI" in window) &&
|
||||
!Services.prefs.prefHasUserValue(PREF)) {
|
||||
// gPrivateBrowsingUI may not be initialized yet, in that case we'll
|
||||
// update BROWSER_NEW_TAB_URL when it gets initialized.
|
||||
if (!gPrivateBrowsingUI.initialized)
|
||||
gPrivateBrowsingUI.addInitializationCallback(update);
|
||||
else if (PrivateBrowsingUtils.isWindowPrivate(window) &&
|
||||
!gPrivateBrowsingUI.autoStarted)
|
||||
if (!Services.prefs.prefHasUserValue(PREF)) {
|
||||
if (PrivateBrowsingUtils.isWindowPrivate(window) &&
|
||||
!PrivateBrowsingUtils.permanentPrivateBrowsing)
|
||||
return "about:privatebrowsing";
|
||||
}
|
||||
return Services.prefs.getCharPref(PREF) || "about:blank";
|
||||
|
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 134 KiB |
@ -14,7 +14,7 @@
|
||||
!define URLUpdateInfo "http://www.mozilla.org/projects/firefox"
|
||||
|
||||
!define URLStubDownload "http://download.mozilla.org/?product=firefox-aurora-latest&os=win&lang=${AB_CD}"
|
||||
!define URLManualDownload "http://download.mozilla.org/?product=firefox-aurora-latest&os=win&lang=${AB_CD}"
|
||||
!define URLManualDownload "https://www.mozilla.org/firefox/installer-help/?channel=aurora"
|
||||
|
||||
# The installer's certificate name and issuer expected by the stub installer
|
||||
!define CertNameDownload "Mozilla Corporation"
|
||||
@ -24,7 +24,7 @@
|
||||
# settings.
|
||||
# The dialog units for the bitmap's dimensions should match exactly with the
|
||||
# bitmap's width and height in pixels.
|
||||
!define APPNAME_BMP_WIDTH_DU 157u
|
||||
!define APPNAME_BMP_WIDTH_DU 158u
|
||||
!define APPNAME_BMP_HEIGHT_DU 21u
|
||||
!define INTRO_BLURB_WIDTH_DU "232u"
|
||||
!define INTRO_BLURB_EDGE_DU "196u"
|
||||
|
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 121 KiB |
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 121 KiB |
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 121 KiB |
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 121 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 173 KiB |
@ -14,7 +14,7 @@
|
||||
!define URLUpdateInfo "http://www.mozilla.org/projects/firefox"
|
||||
|
||||
!define URLStubDownload "http://download.mozilla.org/?product=firefox-nightly-latest&os=win&lang=${AB_CD}"
|
||||
!define URLManualDownload "http://download.mozilla.org/?product=firefox-nightly-latest&os=win&lang=${AB_CD}"
|
||||
!define URLManualDownload "https://www.mozilla.org/firefox/installer-help/?channel=nightly"
|
||||
|
||||
# The installer's certificate name and issuer expected by the stub installer
|
||||
!define CertNameDownload "Mozilla Corporation"
|
||||
@ -25,7 +25,7 @@
|
||||
# The dialog units for the bitmap's dimensions should match exactly with the
|
||||
# bitmap's width and height in pixels.
|
||||
!define APPNAME_BMP_WIDTH_DU 159u
|
||||
!define APPNAME_BMP_HEIGHT_DU 26u
|
||||
!define APPNAME_BMP_HEIGHT_DU 28u
|
||||
!define INTRO_BLURB_WIDTH_DU "230u"
|
||||
!define INTRO_BLURB_EDGE_DU "198u"
|
||||
!define INTRO_BLURB_LTR_TOP_DU "16u"
|
||||
|
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 121 KiB |
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 121 KiB |
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 121 KiB |
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 121 KiB |
@ -17,7 +17,7 @@
|
||||
; official branding
|
||||
!define Official
|
||||
!define URLStubDownload "http://download.mozilla.org/?product=firefox-latest&os=win&lang=${AB_CD}"
|
||||
!define URLManualDownload "https://www.mozilla.org/firefox/installer-help/"
|
||||
!define URLManualDownload "https://www.mozilla.org/firefox/installer-help/?channel=release"
|
||||
|
||||
# The installer's certificate name and issuer expected by the stub installer
|
||||
!define CertNameDownload "Mozilla Corporation"
|
||||
|
@ -14,7 +14,7 @@
|
||||
!define URLUpdateInfo "http://www.mozilla.org/projects/firefox"
|
||||
|
||||
!define URLStubDownload "http://download.mozilla.org/?product=firefox-latest&os=win&lang=${AB_CD}"
|
||||
!define URLManualDownload "http://download.mozilla.org/?product=firefox-latest&os=win&lang=${AB_CD}"
|
||||
!define URLManualDownload "https://www.mozilla.org/firefox/installer-help/?channel=release"
|
||||
|
||||
# The installer's certificate name and issuer expected by the stub installer
|
||||
!define CertNameDownload "Mozilla Corporation"
|
||||
|
@ -177,15 +177,25 @@ const DownloadsButton = {
|
||||
},
|
||||
|
||||
/**
|
||||
* Indicates whether the indicator is visible in the browser window.
|
||||
* Checks whether the indicator is, or will soon be visible in the browser
|
||||
* window.
|
||||
*
|
||||
* @param aCallback
|
||||
* Called once the indicator overlay has loaded. Gets a boolean
|
||||
* argument representing the indicator visibility.
|
||||
*/
|
||||
get isVisible()
|
||||
checkIsVisible: function DB_checkIsVisible(aCallback)
|
||||
{
|
||||
if (!this._placeholder) {
|
||||
return false;
|
||||
function DB_CEV_callback() {
|
||||
if (!this._placeholder) {
|
||||
aCallback(false);
|
||||
} else {
|
||||
let element = DownloadsIndicatorView.indicator || this._placeholder;
|
||||
aCallback(isElementVisible(element.parentNode));
|
||||
}
|
||||
}
|
||||
let element = DownloadsIndicatorView.indicator || this._placeholder;
|
||||
return isElementVisible(element.parentNode);
|
||||
DownloadsOverlayLoader.ensureOverlayLoaded(this.kIndicatorOverlay,
|
||||
DB_CEV_callback.bind(this));
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -68,17 +68,24 @@ DownloadsUI.prototype = {
|
||||
}
|
||||
|
||||
if (aReason == Ci.nsIDownloadManagerUI.REASON_NEW_DOWNLOAD) {
|
||||
// If the indicator is visible, then new download notifications are
|
||||
// already handled by the panel service.
|
||||
const kMinimized = Ci.nsIDOMChromeWindow.STATE_MINIMIZED;
|
||||
let browserWin = gBrowserGlue.getMostRecentBrowserWindow();
|
||||
if (browserWin &&
|
||||
browserWin.windowState != Ci.nsIDOMChromeWindow.STATE_MINIMIZED &&
|
||||
browserWin.DownloadsButton.isVisible) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
this._toolkitUI.show(aWindowContext, aID, aReason);
|
||||
if (!browserWin || browserWin.windowState == kMinimized) {
|
||||
this._toolkitUI.show(aWindowContext, aID, aReason);
|
||||
}
|
||||
else {
|
||||
// If the indicator is visible, then new download notifications are
|
||||
// already handled by the panel service.
|
||||
browserWin.DownloadsButton.checkIsVisible(function(isVisible) {
|
||||
if (!isVisible) {
|
||||
this._toolkitUI.show(aWindowContext, aID, aReason);
|
||||
}
|
||||
}.bind(this));
|
||||
}
|
||||
} else {
|
||||
this._toolkitUI.show(aWindowContext, aID, aReason);
|
||||
}
|
||||
},
|
||||
|
||||
get visible()
|
||||
|
@ -5,7 +5,6 @@
|
||||
|
||||
#include "nsFeedSniffer.h"
|
||||
|
||||
#include "prmem.h"
|
||||
|
||||
#include "nsNetCID.h"
|
||||
#include "nsXPCOM.h"
|
||||
|
@ -351,7 +351,8 @@ BrowserGlue.prototype = {
|
||||
// handle any UI migration
|
||||
this._migrateUI();
|
||||
|
||||
UserAgentOverrides.init();
|
||||
this._setUpUserAgentOverrides();
|
||||
|
||||
webappsUI.init();
|
||||
PageThumbs.init();
|
||||
NewTabUtils.init();
|
||||
@ -363,6 +364,22 @@ BrowserGlue.prototype = {
|
||||
Services.obs.notifyObservers(null, "browser-ui-startup-complete", "");
|
||||
},
|
||||
|
||||
_setUpUserAgentOverrides: function BG__setUpUserAgentOverrides() {
|
||||
UserAgentOverrides.init();
|
||||
|
||||
if (Services.prefs.getBoolPref("general.useragent.complexOverride.moodle")) {
|
||||
UserAgentOverrides.addComplexOverride(function (aHttpChannel, aOriginalUA) {
|
||||
let cookies;
|
||||
try {
|
||||
cookies = aHttpChannel.getRequestHeader("Cookie");
|
||||
} catch (e) { /* no cookie sent */ }
|
||||
if (cookies && cookies.indexOf("MoodleSession") > -1)
|
||||
return aOriginalUA.replace(/Gecko\/[^ ]*/, "Gecko/20100101");
|
||||
return null;
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// the first browser window has finished initializing
|
||||
_onFirstWindowLoaded: function BG__onFirstWindowLoaded() {
|
||||
#ifdef XP_WIN
|
||||
|
@ -528,30 +528,30 @@ PlacesController.prototype = {
|
||||
}
|
||||
|
||||
var selectionAttr = aMenuItem.getAttribute("selection");
|
||||
if (selectionAttr) {
|
||||
if (selectionAttr == "any")
|
||||
return true;
|
||||
|
||||
var showRules = selectionAttr.split("|");
|
||||
var anyMatched = false;
|
||||
function metaDataNodeMatches(metaDataNode, rules) {
|
||||
for (var i=0; i < rules.length; i++) {
|
||||
if (rules[i] in metaDataNode)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
for (var i = 0; i < aMetaData.length; ++i) {
|
||||
if (metaDataNodeMatches(aMetaData[i], showRules))
|
||||
anyMatched = true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
return anyMatched;
|
||||
if (!selectionAttr) {
|
||||
return !aMenuItem.hidden;
|
||||
}
|
||||
|
||||
return !aMenuItem.hidden;
|
||||
if (selectionAttr == "any")
|
||||
return true;
|
||||
|
||||
var showRules = selectionAttr.split("|");
|
||||
var anyMatched = false;
|
||||
function metaDataNodeMatches(metaDataNode, rules) {
|
||||
for (var i = 0; i < rules.length; i++) {
|
||||
if (rules[i] in metaDataNode)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
for (var i = 0; i < aMetaData.length; ++i) {
|
||||
if (metaDataNodeMatches(aMetaData[i], showRules))
|
||||
anyMatched = true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
return anyMatched;
|
||||
},
|
||||
|
||||
/**
|
||||
@ -1021,22 +1021,22 @@ PlacesController.prototype = {
|
||||
if (!didSuppressNotifications)
|
||||
result.suppressNotifications = true;
|
||||
|
||||
function addData(type, index, overrideURI) {
|
||||
let wrapNode = PlacesUtils.wrapNode(node, type, overrideURI, doCopy);
|
||||
dt.mozSetDataAt(type, wrapNode, index);
|
||||
}
|
||||
|
||||
function addURIData(index, overrideURI) {
|
||||
addData(PlacesUtils.TYPE_X_MOZ_URL, index, overrideURI);
|
||||
addData(PlacesUtils.TYPE_UNICODE, index, overrideURI);
|
||||
addData(PlacesUtils.TYPE_HTML, index, overrideURI);
|
||||
}
|
||||
|
||||
try {
|
||||
let nodes = this._view.draggableSelection;
|
||||
for (let i = 0; i < nodes.length; ++i) {
|
||||
var node = nodes[i];
|
||||
|
||||
function addData(type, index, overrideURI) {
|
||||
let wrapNode = PlacesUtils.wrapNode(node, type, overrideURI, doCopy);
|
||||
dt.mozSetDataAt(type, wrapNode, index);
|
||||
}
|
||||
|
||||
function addURIData(index, overrideURI) {
|
||||
addData(PlacesUtils.TYPE_X_MOZ_URL, index, overrideURI);
|
||||
addData(PlacesUtils.TYPE_UNICODE, index, overrideURI);
|
||||
addData(PlacesUtils.TYPE_HTML, index, overrideURI);
|
||||
}
|
||||
|
||||
// This order is _important_! It controls how this and other
|
||||
// applications select data to be inserted based on type.
|
||||
addData(PlacesUtils.TYPE_X_MOZ_PLACE, i);
|
||||
|
@ -31,24 +31,12 @@ var gAdvancedPane = {
|
||||
#ifdef HAVE_SHELL_SERVICE
|
||||
this.updateSetDefaultBrowser();
|
||||
#ifdef XP_WIN
|
||||
let shellSvc = getShellService();
|
||||
// In Windows 8 we launch the control panel since it's the only
|
||||
// way to get all file type association prefs. So we don't know
|
||||
// when the user will select the default. We refresh here periodically
|
||||
// in case the default changes.
|
||||
if (!shellSvc.isDefaultBrowser(false, true)) {
|
||||
var isWin8OrHigher = false;
|
||||
try {
|
||||
let version = Components.classes["@mozilla.org/system-info;1"].
|
||||
getService(Components.interfaces.nsIPropertyBag2).
|
||||
getProperty("version");
|
||||
isWin8OrHigher = parseFloat(version) >= 6.2;
|
||||
} catch (ex) { }
|
||||
|
||||
if (isWin8OrHigher) {
|
||||
window.setInterval(this.updateSetDefaultBrowser, 1000);
|
||||
}
|
||||
}
|
||||
// in case the default changes. On other Windows OS's defaults can also
|
||||
// be set while the prefs are open.
|
||||
window.setInterval(this.updateSetDefaultBrowser, 1000);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -23,24 +23,12 @@ var gAdvancedPane = {
|
||||
#ifdef HAVE_SHELL_SERVICE
|
||||
this.updateSetDefaultBrowser();
|
||||
#ifdef XP_WIN
|
||||
let shellSvc = getShellService();
|
||||
// In Windows 8 we launch the control panel since it's the only
|
||||
// way to get all file type association prefs. So we don't know
|
||||
// when the user will select the default. We refresh here periodically
|
||||
// in case the default changes.
|
||||
if (!shellSvc.isDefaultBrowser(false, true)) {
|
||||
var isWin8OrHigher = false;
|
||||
try {
|
||||
let version = Components.classes["@mozilla.org/system-info;1"].
|
||||
getService(Components.interfaces.nsIPropertyBag2).
|
||||
getProperty("version");
|
||||
isWin8OrHigher = parseFloat(version) >= 6.2;
|
||||
} catch (ex) { }
|
||||
|
||||
if (isWin8OrHigher) {
|
||||
window.setInterval(this.updateSetDefaultBrowser, 1000);
|
||||
}
|
||||
}
|
||||
// in case the default changes. On other Windows OS's defaults can also
|
||||
// be set while the prefs are open.
|
||||
window.setInterval(this.updateSetDefaultBrowser, 1000);
|
||||
#endif
|
||||
#endif
|
||||
#ifdef MOZ_UPDATER
|
||||
|
@ -42,10 +42,9 @@
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
|
||||
var pb = Cc["@mozilla.org/privatebrowsing;1"].
|
||||
getService(Ci.nsIPrivateBrowsingService);
|
||||
Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
|
||||
|
||||
if (!pb.privateBrowsingEnabled) {
|
||||
if (!PrivateBrowsingUtils.isWindowPrivate(window)) {
|
||||
document.title = "]]>&privatebrowsingpage.title.normal;<![CDATA[";
|
||||
setFavIcon("chrome://global/skin/icons/question-16.png");
|
||||
} else {
|
||||
@ -81,7 +80,7 @@
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
if (!pb.privateBrowsingEnabled) {
|
||||
if (!PrivateBrowsingUtils.isWindowPrivate(window)) {
|
||||
document.body.setAttribute("class", "normal");
|
||||
}
|
||||
|
||||
|
@ -29,8 +29,4 @@ EXTRA_PP_COMPONENTS = \
|
||||
nsPrivateBrowsingService.js \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_JS_MODULES = \
|
||||
ForgetAboutSite.jsm \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
@ -102,6 +102,12 @@ PrivateBrowsingService.prototype = {
|
||||
},
|
||||
|
||||
_onBeforePrivateBrowsingModeChange: function PBS__onBeforePrivateBrowsingModeChange() {
|
||||
var windowsEnum = Services.wm.getEnumerator(null);
|
||||
while (windowsEnum.hasMoreElements()) {
|
||||
var window = windowsEnum.getNext();
|
||||
this._setPerWindowPBFlag(window, this._inPrivateBrowsing);
|
||||
}
|
||||
|
||||
// nothing needs to be done here if we're enabling at startup
|
||||
if (!this._autoStarted) {
|
||||
let ss = Cc["@mozilla.org/browser/sessionstore;1"].
|
||||
@ -174,12 +180,6 @@ PrivateBrowsingService.prototype = {
|
||||
}
|
||||
else
|
||||
this._saveSession = false;
|
||||
|
||||
var windowsEnum = Services.wm.getEnumerator("navigator:browser");
|
||||
while (windowsEnum.hasMoreElements()) {
|
||||
var window = windowsEnum.getNext();
|
||||
this._setPerWindowPBFlag(window, this._inPrivateBrowsing);
|
||||
}
|
||||
},
|
||||
|
||||
_onAfterPrivateBrowsingModeChange: function PBS__onAfterPrivateBrowsingModeChange() {
|
||||
|
@ -12,7 +12,14 @@ include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = test_privatebrowsing
|
||||
|
||||
# Most xpcshell PB tests use the global PB service, which means that we should
|
||||
# not attempt to run them in regular builds. We should look at the list and
|
||||
# decide which ones of them should be ported to the browser/perwindow suite
|
||||
# in the future.
|
||||
|
||||
ifndef MOZ_PER_WINDOW_PRIVATE_BROWSING
|
||||
XPCSHELL_TESTS = unit
|
||||
endif
|
||||
|
||||
DIRS += browser \
|
||||
$(NULL)
|
||||
|
@ -10,67 +10,23 @@ relativesrcdir = @relativesrcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MOCHITEST_BROWSER_FILES = \
|
||||
head.js \
|
||||
browser_console_clear.js \
|
||||
browser_privatebrowsing_certexceptionsui.js \
|
||||
browser_privatebrowsing_clearplugindata.js \
|
||||
browser_privatebrowsing_clearplugindata.html \
|
||||
browser_privatebrowsing_commandline_toggle.js \
|
||||
browser_privatebrowsing_concurrent.js \
|
||||
browser_privatebrowsing_concurrent_page.html \
|
||||
browser_privatebrowsing_crh.js \
|
||||
browser_privatebrowsing_fastswitch.js \
|
||||
browser_privatebrowsing_findbar.js \
|
||||
browser_privatebrowsing_forgetthissite.js \
|
||||
browser_privatebrowsing_geoprompt.js \
|
||||
browser_privatebrowsing_geoprompt_page.html \
|
||||
browser_privatebrowsing_import.js \
|
||||
browser_privatebrowsing_lastpbcontextexited.js \
|
||||
browser_privatebrowsing_localStorage.js \
|
||||
browser_privatebrowsing_localStorage_before_after.js \
|
||||
browser_privatebrowsing_localStorage_before_after_page.html \
|
||||
browser_privatebrowsing_localStorage_before_after_page2.html \
|
||||
browser_privatebrowsing_localStorage_page1.html \
|
||||
browser_privatebrowsing_localStorage_page2.html \
|
||||
browser_privatebrowsing_newwindow_stopcmd.js \
|
||||
browser_privatebrowsing_opendir.js \
|
||||
browser_privatebrowsing_openlocation.js \
|
||||
browser_privatebrowsing_openLocationLastURL.js \
|
||||
browser_privatebrowsing_pageinfo.js \
|
||||
browser_privatebrowsing_placestitle.js \
|
||||
browser_privatebrowsing_popupblocker.js \
|
||||
browser_privatebrowsing_popupmode.js \
|
||||
browser_privatebrowsing_protocolhandler.js \
|
||||
browser_privatebrowsing_protocolhandler_page.html \
|
||||
browser_privatebrowsing_searchbar.js \
|
||||
browser_privatebrowsing_sslsite_transition.js \
|
||||
browser_privatebrowsing_theming.js \
|
||||
browser_privatebrowsing_transition.js \
|
||||
browser_privatebrowsing_ui.js \
|
||||
browser_privatebrowsing_urlbarfocus.js \
|
||||
browser_privatebrowsing_urlbarundo.js \
|
||||
browser_privatebrowsing_viewsource.js \
|
||||
browser_privatebrowsing_windowtitle.js \
|
||||
browser_privatebrowsing_windowtitle_page.html \
|
||||
browser_privatebrowsing_zoom.js \
|
||||
browser_privatebrowsing_zoomrestore.js \
|
||||
ctxmenu.html \
|
||||
ctxmenu-image.png \
|
||||
popup.html \
|
||||
staller.sjs \
|
||||
title.sjs \
|
||||
$(NULL)
|
||||
MODULE = test_privatebrowsing
|
||||
|
||||
# Disabled until bug 564934 is fixed:
|
||||
# browser_privatebrowsing_downloadmonitor.js \
|
||||
# We have three category of browser-chrome tests:
|
||||
# global: these tests focus on the global PB service implementation.
|
||||
# perwindow: these tests focus on the per-window PB implementation.
|
||||
# obsolete: these tests focus on the global mode, but the functionality
|
||||
# that they are testing is specific to the global mode, and
|
||||
# will never have a per-window counterpart.
|
||||
#
|
||||
# As a transition plan, we have divided the existing tests into the
|
||||
# global and obsolete categories, and we'll then focus on rewriting the
|
||||
# global tests to test the per-window mode.
|
||||
|
||||
# Turn off private browsing tests that perma-timeout on Linux.
|
||||
ifneq (Linux,$(OS_ARCH))
|
||||
MOCHITEST_BROWSER_FILES += \
|
||||
browser_privatebrowsing_beforeunload.js \
|
||||
browser_privatebrowsing_cookieacceptdialog.js \
|
||||
$(NULL)
|
||||
ifdef MOZ_PER_WINDOW_PRIVATE_BROWSING
|
||||
DIRS += perwindow
|
||||
else
|
||||
DIRS += global obsolete
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
@ -0,0 +1,53 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
DEPTH = @DEPTH@
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
relativesrcdir = @relativesrcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MOCHITEST_BROWSER_FILES = \
|
||||
head.js \
|
||||
browser_privatebrowsing_certexceptionsui.js \
|
||||
browser_privatebrowsing_crh.js \
|
||||
browser_privatebrowsing_geoprompt.js \
|
||||
browser_privatebrowsing_geoprompt_page.html \
|
||||
browser_privatebrowsing_localStorage.js \
|
||||
browser_privatebrowsing_localStorage_before_after.js \
|
||||
browser_privatebrowsing_localStorage_before_after_page.html \
|
||||
browser_privatebrowsing_localStorage_before_after_page2.html \
|
||||
browser_privatebrowsing_localStorage_page1.html \
|
||||
browser_privatebrowsing_localStorage_page2.html \
|
||||
browser_privatebrowsing_opendir.js \
|
||||
browser_privatebrowsing_openlocation.js \
|
||||
browser_privatebrowsing_openLocationLastURL.js \
|
||||
browser_privatebrowsing_placestitle.js \
|
||||
browser_privatebrowsing_popupblocker.js \
|
||||
browser_privatebrowsing_protocolhandler.js \
|
||||
browser_privatebrowsing_protocolhandler_page.html \
|
||||
browser_privatebrowsing_sslsite_transition.js \
|
||||
browser_privatebrowsing_theming.js \
|
||||
browser_privatebrowsing_ui.js \
|
||||
browser_privatebrowsing_urlbarfocus.js \
|
||||
browser_privatebrowsing_windowtitle.js \
|
||||
browser_privatebrowsing_windowtitle_page.html \
|
||||
browser_privatebrowsing_zoom.js \
|
||||
browser_privatebrowsing_zoomrestore.js \
|
||||
ctxmenu.html \
|
||||
ctxmenu-image.png \
|
||||
popup.html \
|
||||
title.sjs \
|
||||
$(NULL)
|
||||
|
||||
# Turn off private browsing tests that perma-timeout on Linux.
|
||||
ifneq (Linux,$(OS_ARCH))
|
||||
MOCHITEST_BROWSER_FILES += \
|
||||
browser_privatebrowsing_cookieacceptdialog.js \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
@ -11,7 +11,7 @@ function test() {
|
||||
getService(Ci.nsIPrivateBrowsingService);
|
||||
|
||||
const testPageURL = "http://mochi.test:8888/browser/" +
|
||||
"browser/components/privatebrowsing/test/browser/browser_privatebrowsing_geoprompt_page.html";
|
||||
"browser/components/privatebrowsing/test/browser/global/browser_privatebrowsing_geoprompt_page.html";
|
||||
waitForExplicitFinish();
|
||||
|
||||
gBrowser.selectedTab = gBrowser.addTab();
|
@ -12,7 +12,7 @@ function test() {
|
||||
browser.addEventListener('load', function() {
|
||||
browser.removeEventListener('load', arguments.callee, true);
|
||||
let tab2 = gBrowser.selectedTab = gBrowser.addTab();
|
||||
browser.contentWindow.location = 'http://mochi.test:8888/browser/browser/components/privatebrowsing/test/browser/' +
|
||||
browser.contentWindow.location = 'http://mochi.test:8888/browser/browser/components/privatebrowsing/test/browser/global/' +
|
||||
'browser_privatebrowsing_localStorage_page2.html';
|
||||
browser.addEventListener('load', function() {
|
||||
browser.removeEventListener('load', arguments.callee, true);
|
||||
@ -21,6 +21,6 @@ function test() {
|
||||
finish();
|
||||
}, true);
|
||||
}, true);
|
||||
browser.loadURI('http://mochi.test:8888/browser/browser/components/privatebrowsing/test/browser/' +
|
||||
browser.loadURI('http://mochi.test:8888/browser/browser/components/privatebrowsing/test/browser/global/' +
|
||||
'browser_privatebrowsing_localStorage_page1.html');
|
||||
}
|
@ -11,9 +11,9 @@
|
||||
// existing.
|
||||
|
||||
function test() {
|
||||
let prefix = 'http://mochi.test:8888/browser/browser/components/privatebrowsing/test/browser/';
|
||||
let prefix = 'http://mochi.test:8888/browser/browser/components/privatebrowsing/test/browser/global/';
|
||||
waitForExplicitFinish();
|
||||
|
||||
|
||||
// We wait for a GC to ensure that all previous PB docshells in this test suite are destroyed
|
||||
// so that the PB localStorage instance is clean.
|
||||
Components.utils.schedulePreciseGC(function() {
|
@ -14,7 +14,7 @@ function test() {
|
||||
waitForExplicitFinish();
|
||||
ignoreAllUncaughtExceptions();
|
||||
|
||||
const TEST_URL = "http://mochi.test:8888/browser/browser/components/privatebrowsing/test/browser/title.sjs";
|
||||
const TEST_URL = "http://mochi.test:8888/browser/browser/components/privatebrowsing/test/browser/global/title.sjs";
|
||||
|
||||
function waitForCleanup(aCallback) {
|
||||
// delete all cookies
|
@ -13,7 +13,7 @@ function test() {
|
||||
let oldPopupPolicy = gPrefService.getBoolPref("dom.disable_open_during_load");
|
||||
gPrefService.setBoolPref("dom.disable_open_during_load", true);
|
||||
|
||||
const TEST_URI = "http://mochi.test:8888/browser/browser/components/privatebrowsing/test/browser/popup.html";
|
||||
const TEST_URI = "http://mochi.test:8888/browser/browser/components/privatebrowsing/test/browser/global/popup.html";
|
||||
|
||||
waitForExplicitFinish();
|
||||
|
@ -11,7 +11,7 @@ function test() {
|
||||
getService(Ci.nsIPrivateBrowsingService);
|
||||
|
||||
const testPageURL = "http://example.com/browser/" +
|
||||
"browser/components/privatebrowsing/test/browser/browser_privatebrowsing_protocolhandler_page.html";
|
||||
"browser/components/privatebrowsing/test/browser/global/browser_privatebrowsing_protocolhandler_page.html";
|
||||
waitForExplicitFinish();
|
||||
|
||||
const notificationValue = "Protocol Registration: testprotocol";
|