зеркало из https://github.com/mozilla/pjs.git
Merge mozilla-central to tracemonkey.
This commit is contained in:
Коммит
63cf3003f6
|
@ -162,16 +162,16 @@ endif
|
||||||
ifeq ($(OS_ARCH),Darwin)
|
ifeq ($(OS_ARCH),Darwin)
|
||||||
# need to pass arch flags for universal builds
|
# need to pass arch flags for universal builds
|
||||||
ifdef UNIVERSAL_BINARY
|
ifdef UNIVERSAL_BINARY
|
||||||
MAKE_SYM_STORE_ARGS := -a "ppc i386" --vcs-info
|
MAKE_SYM_STORE_ARGS := -c -a "ppc i386" --vcs-info
|
||||||
MAKE_SYM_STORE_PATH := $(DIST)/universal
|
MAKE_SYM_STORE_PATH := $(DIST)/universal
|
||||||
else
|
else
|
||||||
MAKE_SYM_STORE_ARGS := -a $(OS_TEST) --vcs-info
|
MAKE_SYM_STORE_ARGS := -c -a $(OS_TEST) --vcs-info
|
||||||
MAKE_SYM_STORE_PATH := $(DIST)/bin
|
MAKE_SYM_STORE_PATH := $(DIST)/bin
|
||||||
endif
|
endif
|
||||||
DUMP_SYMS_BIN ?= $(DIST)/host/bin/dump_syms
|
DUMP_SYMS_BIN ?= $(DIST)/host/bin/dump_syms
|
||||||
endif
|
endif
|
||||||
ifeq (,$(filter-out Linux SunOS,$(OS_ARCH)))
|
ifeq (,$(filter-out Linux SunOS,$(OS_ARCH)))
|
||||||
MAKE_SYM_STORE_ARGS := --vcs-info
|
MAKE_SYM_STORE_ARGS := -c --vcs-info
|
||||||
DUMP_SYMS_BIN ?= $(DIST)/host/bin/dump_syms
|
DUMP_SYMS_BIN ?= $(DIST)/host/bin/dump_syms
|
||||||
MAKE_SYM_STORE_PATH := $(DIST)/bin
|
MAKE_SYM_STORE_PATH := $(DIST)/bin
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -62,6 +62,7 @@ _TEST_FILES =\
|
||||||
nsIAccessibleEditableText.js \
|
nsIAccessibleEditableText.js \
|
||||||
relations.js \
|
relations.js \
|
||||||
role.js \
|
role.js \
|
||||||
|
test_accessnode_invalidation.html \
|
||||||
test_actions_aria.html \
|
test_actions_aria.html \
|
||||||
test_actions_inputs.html \
|
test_actions_inputs.html \
|
||||||
test_actions.xul \
|
test_actions.xul \
|
||||||
|
@ -89,9 +90,9 @@ _TEST_FILES =\
|
||||||
test_nsIAccessible_focus.html \
|
test_nsIAccessible_focus.html \
|
||||||
test_nsIAccessibleDocument.html \
|
test_nsIAccessibleDocument.html \
|
||||||
test_nsIAccessibleEditableText.html \
|
test_nsIAccessibleEditableText.html \
|
||||||
test_nsIAccessibleHyperLink.html \
|
$(warning test_nsIAccessibleHyperLink.html temporarily disabled) \
|
||||||
test_nsIAccessibleHyperLink.xul \
|
test_nsIAccessibleHyperLink.xul \
|
||||||
test_nsIAccessibleHyperText.html \
|
$(warning test_nsIAccessibleHyperText.html temporarily disabled) \
|
||||||
test_nsIAccessibleImage.html \
|
test_nsIAccessibleImage.html \
|
||||||
$(warning test_nsIAccessibleTable_listboxes.xul temporarily disabled) \
|
$(warning test_nsIAccessibleTable_listboxes.xul temporarily disabled) \
|
||||||
test_nsIAccessNode_utils.html \
|
test_nsIAccessNode_utils.html \
|
||||||
|
@ -115,7 +116,6 @@ _TEST_FILES =\
|
||||||
test_textboxes.xul \
|
test_textboxes.xul \
|
||||||
testTextboxes.js \
|
testTextboxes.js \
|
||||||
treeview.js \
|
treeview.js \
|
||||||
test_bug434464.html \
|
|
||||||
z_states_frame.html \
|
z_states_frame.html \
|
||||||
z_states_framearticle.html \
|
z_states_framearticle.html \
|
||||||
z_states_framecheckbox.html \
|
z_states_framecheckbox.html \
|
||||||
|
|
|
@ -7,37 +7,34 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=434464
|
||||||
<title>Test NSIAccessNode cache invalidation</title>
|
<title>Test NSIAccessNode cache invalidation</title>
|
||||||
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
|
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
|
||||||
|
|
||||||
<script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
|
<script type="application/javascript"
|
||||||
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
src="chrome://mochikit/content/MochiKit/packed.js"></script>
|
||||||
|
<script type="application/javascript"
|
||||||
|
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||||
|
|
||||||
|
<script type="application/javascript"
|
||||||
|
src="chrome://mochikit/content/a11y/accessible/common.js"></script>
|
||||||
|
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
function doTest()
|
function doTest()
|
||||||
{
|
{
|
||||||
var accRetrieval = Components.classes["@mozilla.org/accessibleRetrieval;1"].
|
var parentElm = getNode("parent");
|
||||||
getService(Components.interfaces.nsIAccessibleRetrieval);
|
|
||||||
|
|
||||||
var parentElm = document.getElementById("parent");
|
|
||||||
if (!parentElm) {
|
if (!parentElm) {
|
||||||
ok(false, "no parent element for paragraph!");
|
|
||||||
SimpleTest.finish();
|
SimpleTest.finish();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var elm = document.getElementById("para");
|
var elm = getNode("para");
|
||||||
if (!elm) {
|
if (!elm) {
|
||||||
ok(false, "no element for paragraph!");
|
|
||||||
SimpleTest.finish();
|
SimpleTest.finish();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// It's currently hidden. Ask for its parent's nsIAccessNode.
|
// It's currently hidden. Ask for its parent's nsIAccessNode.
|
||||||
var parentElmAccNode = null;
|
var parentElmAccNode = getAccessible(parentElm, [nsIAccessNode]);
|
||||||
try {
|
|
||||||
parentElmAccNode = accRetrieval.getAccessibleFor(parentElm).
|
|
||||||
QueryInterface(Components.interfaces.nsIAccessNode);
|
|
||||||
} catch(e) {}
|
|
||||||
|
|
||||||
if (!parentElmAccNode) {
|
if (!parentElmAccNode) {
|
||||||
ok(false, "No accessNode for parent of hidden paragraph!");
|
|
||||||
SimpleTest.finish();
|
SimpleTest.finish();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the paragraph's accessNode.
|
// Get the paragraph's accessNode.
|
||||||
|
@ -49,6 +46,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=434464
|
||||||
if (!elmAccNode) {
|
if (!elmAccNode) {
|
||||||
ok(false, "No accessNode for hidden paragraph!");
|
ok(false, "No accessNode for hidden paragraph!");
|
||||||
SimpleTest.finish();
|
SimpleTest.finish();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now make the paragraph visible. This invalidates the just-retrieved
|
// Now make the paragraph visible. This invalidates the just-retrieved
|
||||||
|
@ -60,11 +58,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=434464
|
||||||
window.setTimeout(
|
window.setTimeout(
|
||||||
function()
|
function()
|
||||||
{
|
{
|
||||||
var elmAcc = null;
|
var elmAcc = getAccessible(elm);
|
||||||
try {
|
|
||||||
elmAcc = accRetrieval.getAccessibleFor(elm);
|
|
||||||
} catch(e) {}
|
|
||||||
|
|
||||||
ok(elmAcc, "No accessible for paragraph after it became visible!");
|
ok(elmAcc, "No accessible for paragraph after it became visible!");
|
||||||
|
|
||||||
SimpleTest.finish();
|
SimpleTest.finish();
|
|
@ -50,8 +50,6 @@
|
||||||
%tabBrowserDTD;
|
%tabBrowserDTD;
|
||||||
<!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">
|
<!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">
|
||||||
%globalDTD;
|
%globalDTD;
|
||||||
<!ENTITY % placesDTD SYSTEM "chrome://browser/locale/places/places.dtd">
|
|
||||||
%placesDTD;
|
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<bindings id="tabBrowserBindings"
|
<bindings id="tabBrowserBindings"
|
||||||
|
@ -98,7 +96,8 @@
|
||||||
oncommand="var tabbrowser = this.parentNode.parentNode.parentNode.parentNode;
|
oncommand="var tabbrowser = this.parentNode.parentNode.parentNode.parentNode;
|
||||||
tabbrowser.removeAllTabsBut(tabbrowser.mContextTab);"/>
|
tabbrowser.removeAllTabsBut(tabbrowser.mContextTab);"/>
|
||||||
<xul:menuseparator/>
|
<xul:menuseparator/>
|
||||||
<xul:menuitem id="context_openTabInWindow" label="&cmd.open_window.label;"
|
<xul:menuitem id="context_openTabInWindow" label="&openTabInNewWindow.label;"
|
||||||
|
accesskey="&openTabInNewWindow.accesskey;"
|
||||||
tbattr="tabbrowser-multiple"
|
tbattr="tabbrowser-multiple"
|
||||||
oncommand="var tabbrowser = this.parentNode.parentNode.parentNode.parentNode;
|
oncommand="var tabbrowser = this.parentNode.parentNode.parentNode.parentNode;
|
||||||
tabbrowser.replaceTabWithWindow(tabbrowser.mContextTab);"/>
|
tabbrowser.replaceTabWithWindow(tabbrowser.mContextTab);"/>
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
#ifndef macieprofilemigrator___h___
|
#ifndef macieprofilemigrator___h___
|
||||||
#define maciebprofilemigrator___h___
|
#define macieprofilemigrator___h___
|
||||||
|
|
||||||
#include "nsIBrowserProfileMigrator.h"
|
#include "nsIBrowserProfileMigrator.h"
|
||||||
#include "nsIObserverService.h"
|
#include "nsIObserverService.h"
|
||||||
|
|
|
@ -821,10 +821,7 @@
|
||||||
PlacesUIUtils.ensureLivemarkStatusMenuItem(menuitem.firstChild);
|
PlacesUIUtils.ensureLivemarkStatusMenuItem(menuitem.firstChild);
|
||||||
}
|
}
|
||||||
else if (PlacesUtils.nodeIsURI(aNode)) {
|
else if (PlacesUtils.nodeIsURI(aNode)) {
|
||||||
if (aNode.uri.lastIndexOf("javascript:", 0) == 0)
|
menuitem.setAttribute("scheme", PlacesUIUtils.guessUrlSchemeForUI(aNode.uri));
|
||||||
menuitem.setAttribute("bookmarklet", "true");
|
|
||||||
else
|
|
||||||
menuitem.removeAttribute("bookmarklet");
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -220,10 +220,7 @@
|
||||||
domNode: popup });
|
domNode: popup });
|
||||||
}
|
}
|
||||||
else if (PlacesUtils.nodeIsURI(aChild)) {
|
else if (PlacesUtils.nodeIsURI(aChild)) {
|
||||||
if (aChild.uri.lastIndexOf("javascript:", 0) == 0)
|
button.setAttribute("scheme", PlacesUIUtils.guessUrlSchemeForUI(aChild.uri));
|
||||||
button.setAttribute("bookmarklet", "true");
|
|
||||||
else
|
|
||||||
button.removeAttribute("bookmarklet");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -645,10 +642,7 @@
|
||||||
PlacesUIUtils.ensureLivemarkStatusMenuItem(element.firstChild);
|
PlacesUIUtils.ensureLivemarkStatusMenuItem(element.firstChild);
|
||||||
}
|
}
|
||||||
else if (PlacesUtils.nodeIsURI(aNode)) {
|
else if (PlacesUtils.nodeIsURI(aNode)) {
|
||||||
if (aNode.uri.lastIndexOf("javascript:", 0) == 0)
|
element.setAttribute("scheme", PlacesUIUtils.guessUrlSchemeForUI(aNode.uri));
|
||||||
element.setAttribute("bookmarklet", "true");
|
|
||||||
else
|
|
||||||
element.removeAttribute("bookmarklet");
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -925,12 +925,11 @@ PlacesTreeView.prototype = {
|
||||||
}
|
}
|
||||||
else if (nodeType == Ci.nsINavHistoryResultNode.RESULT_TYPE_SEPARATOR)
|
else if (nodeType == Ci.nsINavHistoryResultNode.RESULT_TYPE_SEPARATOR)
|
||||||
properties.push(this._getAtomFor("separator"));
|
properties.push(this._getAtomFor("separator"));
|
||||||
else if (itemId != -1) { // bookmark nodes
|
else if (PlacesUtils.nodeIsURI(node)) {
|
||||||
if (PlacesUtils.nodeIsLivemarkContainer(node.parent))
|
properties.push(this._getAtomFor(PlacesUIUtils.guessUrlSchemeForUI(node.uri)));
|
||||||
properties.push(this._getAtomFor("livemarkItem"));
|
if (itemId != -1) {
|
||||||
else if (PlacesUtils.nodeIsURI(node)) {
|
if (PlacesUtils.nodeIsLivemarkContainer(node.parent))
|
||||||
if (node.uri.lastIndexOf("javascript:", 0) == 0)
|
properties.push(this._getAtomFor("livemarkItem"));
|
||||||
properties.push(this._getAtomFor("bookmarklet"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -981,6 +981,20 @@ var PlacesUIUtils = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper for guessing scheme from an url string.
|
||||||
|
* Used to avoid nsIURI overhead in frequently called UI functions.
|
||||||
|
*
|
||||||
|
* @param aUrlString the url to guess the scheme from.
|
||||||
|
*
|
||||||
|
* @return guessed scheme for this url string.
|
||||||
|
*
|
||||||
|
* @note this is not supposed be perfect, so use it only for UI purposes.
|
||||||
|
*/
|
||||||
|
guessUrlSchemeForUI: function PUU_guessUrlSchemeForUI(aUrlString) {
|
||||||
|
return aUrlString.substr(0, aUrlString.indexOf(":"));
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper for the toolbar and menu views
|
* Helper for the toolbar and menu views
|
||||||
*/
|
*/
|
||||||
|
@ -999,9 +1013,7 @@ var PlacesUIUtils = {
|
||||||
if (PlacesUtils.uriTypes.indexOf(type) != -1) {
|
if (PlacesUtils.uriTypes.indexOf(type) != -1) {
|
||||||
element = document.createElement("menuitem");
|
element = document.createElement("menuitem");
|
||||||
element.className = "menuitem-iconic bookmark-item";
|
element.className = "menuitem-iconic bookmark-item";
|
||||||
|
element.setAttribute("scheme", this.guessUrlSchemeForUI(aNode.uri));
|
||||||
if (aNode.uri.lastIndexOf("javascript:", 0) == 0)
|
|
||||||
element.setAttribute("bookmarklet", "true");
|
|
||||||
}
|
}
|
||||||
else if (PlacesUtils.containerTypes.indexOf(type) != -1) {
|
else if (PlacesUtils.containerTypes.indexOf(type) != -1) {
|
||||||
element = document.createElement("menu");
|
element = document.createElement("menu");
|
||||||
|
|
|
@ -369,7 +369,12 @@ PrivateBrowsingService.prototype = {
|
||||||
getService(Ci.nsICacheService)) {
|
getService(Ci.nsICacheService)) {
|
||||||
// NOTE: there is no way to clear just that domain, so we clear out
|
// NOTE: there is no way to clear just that domain, so we clear out
|
||||||
// everything)
|
// everything)
|
||||||
cs.evictEntries(Ci.nsICache.STORE_ANYWHERE);
|
try {
|
||||||
|
cs.evictEntries(Ci.nsICache.STORE_ANYWHERE);
|
||||||
|
} catch (ex) {
|
||||||
|
Cu.reportError("Exception thrown while clearing the cache: " +
|
||||||
|
ex.toString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cookies
|
// Cookies
|
||||||
|
|
|
@ -1671,20 +1671,21 @@ SessionStoreService.prototype = {
|
||||||
|
|
||||||
if (aOverwriteTabs) {
|
if (aOverwriteTabs) {
|
||||||
this.restoreWindowFeatures(aWindow, winData);
|
this.restoreWindowFeatures(aWindow, winData);
|
||||||
|
delete this._windows[aWindow.__SSi].extData;
|
||||||
}
|
}
|
||||||
if (winData.cookies) {
|
if (winData.cookies) {
|
||||||
this.restoreCookies(winData.cookies);
|
this.restoreCookies(winData.cookies);
|
||||||
}
|
}
|
||||||
if (winData.extData) {
|
if (winData.extData) {
|
||||||
if (aOverwriteTabs || !this._windows[aWindow.__SSi].extData) {
|
if (!this._windows[aWindow.__SSi].extData) {
|
||||||
this._windows[aWindow.__SSi].extData = {};
|
this._windows[aWindow.__SSi].extData = {};
|
||||||
}
|
}
|
||||||
for (var key in winData.extData) {
|
for (var key in winData.extData) {
|
||||||
this._windows[aWindow.__SSi].extData[key] = winData.extData[key];
|
this._windows[aWindow.__SSi].extData[key] = winData.extData[key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (winData._closedTabs && (root._firstTabs || aOverwriteTabs)) {
|
if (aOverwriteTabs || root._firstTabs) {
|
||||||
this._windows[aWindow.__SSi]._closedTabs = winData._closedTabs;
|
this._windows[aWindow.__SSi]._closedTabs = winData._closedTabs || [];
|
||||||
}
|
}
|
||||||
|
|
||||||
this.restoreHistoryPrecursor(aWindow, tabs, winData.tabs,
|
this.restoreHistoryPrecursor(aWindow, tabs, winData.tabs,
|
||||||
|
|
|
@ -44,6 +44,8 @@ relativesrcdir = browser/components/sessionstore/test/browser
|
||||||
include $(DEPTH)/config/autoconf.mk
|
include $(DEPTH)/config/autoconf.mk
|
||||||
include $(topsrcdir)/config/rules.mk
|
include $(topsrcdir)/config/rules.mk
|
||||||
|
|
||||||
|
# browser_477657.js is disabled, because it's unreliable (bug 482975).
|
||||||
|
|
||||||
_BROWSER_TEST_FILES = \
|
_BROWSER_TEST_FILES = \
|
||||||
browser_248970_a.js \
|
browser_248970_a.js \
|
||||||
browser_248970_b.js \
|
browser_248970_b.js \
|
||||||
|
|
|
@ -0,0 +1,95 @@
|
||||||
|
/* ***** 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 sessionstore test code.
|
||||||
|
*
|
||||||
|
* The Initial Developer of the Original Code is
|
||||||
|
* Simon Bünzli <zeniko@gmail.com>.
|
||||||
|
* Portions created by the Initial Developer are Copyright (C) 2009
|
||||||
|
* 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 ***** */
|
||||||
|
|
||||||
|
function test() {
|
||||||
|
/** Test for Bug 477657 **/
|
||||||
|
|
||||||
|
let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
|
||||||
|
waitForExplicitFinish();
|
||||||
|
|
||||||
|
let newWin = openDialog(location, "_blank", "chrome,all,dialog=no");
|
||||||
|
newWin.addEventListener("load", function(aEvent) {
|
||||||
|
let newState = { windows: [{
|
||||||
|
tabs: [{ entries: [] }],
|
||||||
|
_closedTabs: [{
|
||||||
|
state: { entries: [{ url: "about:" }]},
|
||||||
|
title: "About:"
|
||||||
|
}],
|
||||||
|
sizemode: "maximized"
|
||||||
|
}] };
|
||||||
|
|
||||||
|
let uniqueKey = "bug 477657";
|
||||||
|
let uniqueValue = "unik" + Date.now();
|
||||||
|
|
||||||
|
ss.setWindowValue(newWin, uniqueKey, uniqueValue);
|
||||||
|
is(ss.getWindowValue(newWin, uniqueKey), uniqueValue,
|
||||||
|
"window value was set before the window was overwritten");
|
||||||
|
ss.setWindowState(newWin, JSON.stringify(newState), true);
|
||||||
|
|
||||||
|
// use setTimeout(..., 0) to mirror sss_restoreWindowFeatures
|
||||||
|
setTimeout(function() {
|
||||||
|
is(ss.getWindowValue(newWin, uniqueKey), "",
|
||||||
|
"window value was implicitly cleared");
|
||||||
|
|
||||||
|
is(newWin.windowState, newWin.STATE_MAXIMIZED,
|
||||||
|
"the window was maximized");
|
||||||
|
|
||||||
|
is(JSON.parse(ss.getClosedTabData(newWin)).length, 1,
|
||||||
|
"the closed tab was added before the window was overwritten");
|
||||||
|
delete newState.windows[0]._closedTabs;
|
||||||
|
delete newState.windows[0].sizemode;
|
||||||
|
ss.setWindowState(newWin, JSON.stringify(newState), true);
|
||||||
|
|
||||||
|
setTimeout(function() {
|
||||||
|
is(JSON.parse(ss.getClosedTabData(newWin)).length, 0,
|
||||||
|
"closed tabs were implicitly cleared");
|
||||||
|
|
||||||
|
is(newWin.windowState, newWin.STATE_MAXIMIZED,
|
||||||
|
"the window remains maximized");
|
||||||
|
newState.windows[0].sizemode = "normal";
|
||||||
|
ss.setWindowState(newWin, JSON.stringify(newState), true);
|
||||||
|
|
||||||
|
setTimeout(function() {
|
||||||
|
isnot(newWin.windowState, newWin.STATE_MAXIMIZED,
|
||||||
|
"the window was explicitly unmaximized");
|
||||||
|
|
||||||
|
newWin.close();
|
||||||
|
finish();
|
||||||
|
}, 0);
|
||||||
|
}, 0);
|
||||||
|
}, 0);
|
||||||
|
}, false);
|
||||||
|
}
|
|
@ -144,8 +144,10 @@ $(CONFIG_DIR)/setup.exe::
|
||||||
for i in $(PP_LOCALIZED_FILES); do \
|
for i in $(PP_LOCALIZED_FILES); do \
|
||||||
$(PERL) $(topsrcdir)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) $(srcdir)/$$i > $(CONFIG_DIR)/$$i; \
|
$(PERL) $(topsrcdir)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) $(srcdir)/$$i > $(CONFIG_DIR)/$$i; \
|
||||||
done
|
done
|
||||||
|
ifeq ($(CONFIG_DIR),instgen)
|
||||||
$(PERL) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/make-installremoves.pl \
|
$(PERL) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/make-installremoves.pl \
|
||||||
../removed-files > $(CONFIG_DIR)/removed-files.log
|
../removed-files > $(CONFIG_DIR)/removed-files.log
|
||||||
|
endif
|
||||||
$(PERL) $(topsrcdir)/config/preprocessor.pl -Fsubstitution $(DEFINES) $(ACDEFINES) \
|
$(PERL) $(topsrcdir)/config/preprocessor.pl -Fsubstitution $(DEFINES) $(ACDEFINES) \
|
||||||
$(srcdir)/nsis/defines.nsi.in | iconv -f UTF-8 -t UTF-16LE | \
|
$(srcdir)/nsis/defines.nsi.in | iconv -f UTF-8 -t UTF-16LE | \
|
||||||
cat $(MOZILLA_DIR)/toolkit/mozapps/installer/windows/nsis/utf16-le-bom.bin - > \
|
cat $(MOZILLA_DIR)/toolkit/mozapps/installer/windows/nsis/utf16-le-bom.bin - > \
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
<!ENTITY reloadAllTabs.accesskey "A">
|
<!ENTITY reloadAllTabs.accesskey "A">
|
||||||
<!ENTITY reloadTab.label "Reload Tab">
|
<!ENTITY reloadTab.label "Reload Tab">
|
||||||
<!ENTITY reloadTab.accesskey "r">
|
<!ENTITY reloadTab.accesskey "r">
|
||||||
|
<!ENTITY openTabInNewWindow.label "Open in a New Window">
|
||||||
|
<!ENTITY openTabInNewWindow.accesskey "W">
|
||||||
<!ENTITY listAllTabs.label "List all tabs">
|
<!ENTITY listAllTabs.label "List all tabs">
|
||||||
<!ENTITY bookmarkAllTabs.label "Bookmark All Tabs…">
|
<!ENTITY bookmarkAllTabs.label "Bookmark All Tabs…">
|
||||||
<!ENTITY bookmarkAllTabs.accesskey "T">
|
<!ENTITY bookmarkAllTabs.accesskey "T">
|
||||||
|
|
|
@ -38,7 +38,7 @@ dnl ***** END LICENSE BLOCK *****
|
||||||
|
|
||||||
AC_DEFUN(MOZ_PROG_CHECKMSYS,
|
AC_DEFUN(MOZ_PROG_CHECKMSYS,
|
||||||
[AC_REQUIRE([AC_INIT_BINSH])dnl
|
[AC_REQUIRE([AC_INIT_BINSH])dnl
|
||||||
if test `uname -o` = Msys; then
|
if test `uname -s | grep -c MINGW 2>/dev/null` != "0"; then
|
||||||
msyshost=1
|
msyshost=1
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|
|
@ -154,11 +154,11 @@ clean clobber realclean clobber_all::
|
||||||
cd $(MKDEPEND_DIR); $(MAKE) $@
|
cd $(MKDEPEND_DIR); $(MAKE) $@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
PYUNITS := unit-Expression.py unit-Preprocessor.py
|
PYUNITS := unit-Expression.py unit-Preprocessor.py unit-nsinstall.py
|
||||||
|
|
||||||
check:: check-preprocessor check-jar-mn
|
check:: check-python-modules check-jar-mn
|
||||||
|
|
||||||
check-preprocessor::
|
check-python-modules::
|
||||||
@$(EXIT_ON_ERROR) \
|
@$(EXIT_ON_ERROR) \
|
||||||
for test in $(PYUNITS); do \
|
for test in $(PYUNITS); do \
|
||||||
$(PYTHON) $(srcdir)/tests/$$test ; \
|
$(PYTHON) $(srcdir)/tests/$$test ; \
|
||||||
|
|
|
@ -49,91 +49,106 @@ import os.path
|
||||||
import sys
|
import sys
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
usage = "usage: %prog [options] arg1 [arg2 ...] target-directory"
|
def nsinstall(argv):
|
||||||
p = OptionParser(usage=usage)
|
usage = "usage: %prog [options] arg1 [arg2 ...] target-directory"
|
||||||
|
p = OptionParser(usage=usage)
|
||||||
|
|
||||||
p.add_option('-D', action="store_true",
|
p.add_option('-D', action="store_true",
|
||||||
help="Create a single directory only")
|
help="Create a single directory only")
|
||||||
p.add_option('-t', action="store_true",
|
p.add_option('-t', action="store_true",
|
||||||
help="Preserve time stamp")
|
help="Preserve time stamp")
|
||||||
p.add_option('-m', action="store",
|
p.add_option('-m', action="store",
|
||||||
help="Set mode", metavar="mode")
|
help="Set mode", metavar="mode")
|
||||||
p.add_option('-d', action="store_true",
|
p.add_option('-d', action="store_true",
|
||||||
help="Create directories in target")
|
help="Create directories in target")
|
||||||
p.add_option('-R', action="store_true",
|
p.add_option('-R', action="store_true",
|
||||||
help="Use relative symbolic links (ignored)")
|
help="Use relative symbolic links (ignored)")
|
||||||
p.add_option('-l', action="store_true",
|
p.add_option('-l', action="store_true",
|
||||||
help="Create link (ignored)")
|
help="Create link (ignored)")
|
||||||
p.add_option('-L', action="store", metavar="linkprefix",
|
p.add_option('-L', action="store", metavar="linkprefix",
|
||||||
help="Link prefix (ignored)")
|
help="Link prefix (ignored)")
|
||||||
|
|
||||||
# The remaining arguments are not used in our tree, thus they're not
|
# The remaining arguments are not used in our tree, thus they're not
|
||||||
# implented.
|
# implented.
|
||||||
def BadArg(option, opt, value, parser):
|
def BadArg(option, opt, value, parser):
|
||||||
parser.error('option not supported: %s' % opt)
|
parser.error('option not supported: %s' % opt)
|
||||||
|
|
||||||
|
p.add_option('-C', action="callback", metavar="CWD",
|
||||||
|
callback=BadArg,
|
||||||
|
help="NOT SUPPORTED")
|
||||||
|
p.add_option('-o', action="callback", callback=BadArg,
|
||||||
|
help="Set owner (NOT SUPPORTED)", metavar="owner")
|
||||||
|
p.add_option('-g', action="callback", callback=BadArg,
|
||||||
|
help="Set group (NOT SUPPORTED)", metavar="group")
|
||||||
|
|
||||||
p.add_option('-C', action="callback", metavar="CWD",
|
(options, args) = p.parse_args(argv)
|
||||||
callback=BadArg,
|
|
||||||
help="NOT SUPPORTED")
|
|
||||||
p.add_option('-o', action="callback", callback=BadArg,
|
|
||||||
help="Set owner (NOT SUPPORTED)", metavar="owner")
|
|
||||||
p.add_option('-g', action="callback", callback=BadArg,
|
|
||||||
help="Set group (NOT SUPPORTED)", metavar="group")
|
|
||||||
|
|
||||||
(options, args) = p.parse_args()
|
if options.m:
|
||||||
|
# mode is specified
|
||||||
|
try:
|
||||||
|
options.m = int(options.m, 8)
|
||||||
|
except:
|
||||||
|
sys.stderr.write('nsinstall: ' + options.m + ' is not a valid mode\n')
|
||||||
|
return 1
|
||||||
|
|
||||||
if options.m:
|
# just create one directory?
|
||||||
# mode is specified
|
if options.D:
|
||||||
try:
|
if len(args) != 1:
|
||||||
options.m = int(options.m, 8)
|
return 1
|
||||||
except:
|
if os.path.exists(args[0]):
|
||||||
sys.stderr.write('nsinstall: ' + options.m + ' is not a valid mode\n')
|
if not os.path.isdir(args[0]):
|
||||||
sys.exit(1)
|
sys.stderr.write('nsinstall: ' + args[0] + ' is not a directory\n')
|
||||||
|
sys.exit(1)
|
||||||
# just create one directory?
|
if options.m:
|
||||||
if options.D:
|
os.chmod(args[0], options.m)
|
||||||
if len(args) != 1:
|
sys.exit()
|
||||||
sys.exit(1)
|
|
||||||
if os.path.exists(args[0]):
|
|
||||||
if not os.path.isdir(args[0]):
|
|
||||||
sys.stderr.write('nsinstall: ' + args[0] + ' is not a directory\n')
|
|
||||||
sys.exit(1)
|
|
||||||
if options.m:
|
if options.m:
|
||||||
os.chmod(args[0], options.m)
|
os.makedirs(args[0], options.m)
|
||||||
sys.exit()
|
|
||||||
if options.m:
|
|
||||||
os.makedirs(args[0], options.m)
|
|
||||||
else:
|
|
||||||
os.makedirs(args[0])
|
|
||||||
sys.exit()
|
|
||||||
|
|
||||||
# nsinstall arg1 [...] directory
|
|
||||||
if len(args) < 2:
|
|
||||||
p.error('not enough arguments')
|
|
||||||
|
|
||||||
# set up handler
|
|
||||||
if options.d:
|
|
||||||
# we're supposed to create directories
|
|
||||||
def handleTarget(srcpath, targetpath):
|
|
||||||
# target directory was already created, just use mkdir
|
|
||||||
os.mkdir(dest)
|
|
||||||
else:
|
|
||||||
# we're supposed to copy files
|
|
||||||
def handleTarget(srcpath, targetpath):
|
|
||||||
if options.t:
|
|
||||||
shutil.copy2(srcpath, targetpath)
|
|
||||||
else:
|
else:
|
||||||
shutil.copy(srcpath, targetpath)
|
os.makedirs(args[0])
|
||||||
|
return 0
|
||||||
|
|
||||||
# the last argument is the target directory
|
# nsinstall arg1 [...] directory
|
||||||
target = args.pop()
|
if len(args) < 2:
|
||||||
# ensure target directory
|
p.error('not enough arguments')
|
||||||
if not os.path.isdir(target):
|
|
||||||
os.makedirs(target)
|
|
||||||
|
|
||||||
for f in args:
|
def copy_all_entries(entries, target):
|
||||||
dest = os.path.join(target,
|
for e in entries:
|
||||||
os.path.basename(os.path.normpath(f)))
|
dest = os.path.join(target,
|
||||||
handleTarget(f, dest)
|
os.path.basename(os.path.normpath(e)))
|
||||||
if options.m:
|
handleTarget(e, dest)
|
||||||
os.chmod(dest, options.m)
|
if options.m:
|
||||||
|
os.chmod(dest, options.m)
|
||||||
|
|
||||||
|
# set up handler
|
||||||
|
if options.d:
|
||||||
|
# we're supposed to create directories
|
||||||
|
def handleTarget(srcpath, targetpath):
|
||||||
|
# target directory was already created, just use mkdir
|
||||||
|
os.mkdir(targetpath)
|
||||||
|
else:
|
||||||
|
# we're supposed to copy files
|
||||||
|
def handleTarget(srcpath, targetpath):
|
||||||
|
if os.path.isdir(srcpath):
|
||||||
|
os.mkdir(targetpath)
|
||||||
|
entries = [os.path.join(srcpath, e) for e in os.listdir(srcpath)]
|
||||||
|
copy_all_entries(entries, targetpath)
|
||||||
|
# options.t is not relevant for directories
|
||||||
|
if options.m:
|
||||||
|
os.chmod(targetpath, options.m)
|
||||||
|
elif options.t:
|
||||||
|
shutil.copy2(srcpath, targetpath)
|
||||||
|
else:
|
||||||
|
shutil.copy(srcpath, targetpath)
|
||||||
|
|
||||||
|
# the last argument is the target directory
|
||||||
|
target = args.pop()
|
||||||
|
# ensure target directory
|
||||||
|
if not os.path.isdir(target):
|
||||||
|
os.makedirs(target)
|
||||||
|
|
||||||
|
copy_all_entries(args, target)
|
||||||
|
return 0
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
sys.exit(nsinstall(sys.argv[1:]))
|
||||||
|
|
|
@ -131,73 +131,47 @@ endif
|
||||||
testxpcobjdir = $(DEPTH)/_tests/xpcshell
|
testxpcobjdir = $(DEPTH)/_tests/xpcshell
|
||||||
|
|
||||||
# Test file installation
|
# Test file installation
|
||||||
libs::
|
|
||||||
@$(EXIT_ON_ERROR) \
|
|
||||||
for testdir in $(XPCSHELL_TESTS); do \
|
|
||||||
$(INSTALL) \
|
|
||||||
$(srcdir)/$$testdir/*.js \
|
|
||||||
$(testxpcobjdir)/$(MODULE)/$$testdir; \
|
|
||||||
done
|
|
||||||
|
|
||||||
# Path formats on Windows are hard. We require a topsrcdir formatted so that
|
define _INSTALL_TESTS
|
||||||
# it may be passed to nsILocalFile.initWithPath (in other words, an absolute
|
$(INSTALL) $(wildcard $(srcdir)/$(dir)/*.js) $(testxpcobjdir)/$(MODULE)/$(dir)
|
||||||
# path of the form X:\path\to\topsrcdir), which we store in NATIVE_TOPSRCDIR.
|
|
||||||
# We require a forward-slashed path to topsrcdir so that it may be combined
|
endef # do not remove the blank line!
|
||||||
# with a relative forward-slashed path for loading scripts, both dynamically
|
|
||||||
# and statically for head/test/tail JS files. Of course, on non-Windows none
|
SOLO_FILE ?= $(error Specify a test filename in SOLO_FILE when using check-interactive or check-one)
|
||||||
# of this matters, and things will work correctly because everything's
|
|
||||||
# forward-slashed, everywhere, always.
|
libs::
|
||||||
ifdef CYGWIN_WRAPPER
|
$(foreach dir,$(XPCSHELL_TESTS),$(_INSTALL_TESTS))
|
||||||
NATIVE_TOPSRCDIR := `cygpath -wa $(topsrcdir)`
|
|
||||||
FWDSLASH_TOPSRCDIR := `cygpath -ma $(topsrcdir)`
|
|
||||||
else
|
|
||||||
FWDSLASH_TOPSRCDIR := $(topsrcdir)
|
|
||||||
ifeq ($(HOST_OS_ARCH),WINNT)
|
|
||||||
NATIVE_TOPSRCDIR := $(subst /,\\,$(WIN_TOP_SRC))
|
|
||||||
else
|
|
||||||
ifeq ($(HOST_OS_ARCH),os2-emx)
|
|
||||||
NATIVE_TOPSRCDIR := $(subst /,\\,$(topsrcdir))
|
|
||||||
else
|
|
||||||
NATIVE_TOPSRCDIR := $(topsrcdir)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif # CYGWIN_WRAPPER
|
|
||||||
|
|
||||||
testxpcsrcdir = $(topsrcdir)/testing/xpcshell
|
testxpcsrcdir = $(topsrcdir)/testing/xpcshell
|
||||||
|
|
||||||
# Test execution
|
# Execute all tests in the $(XPCSHELL_TESTS) directories.
|
||||||
check::
|
check::
|
||||||
@$(EXIT_ON_ERROR) \
|
$(PYTHON) \
|
||||||
for testdir in $(XPCSHELL_TESTS); do \
|
$(testxpcsrcdir)/runxpcshelltests.py \
|
||||||
$(RUN_TEST_PROGRAM) \
|
$(DIST)/bin/xpcshell \
|
||||||
$(testxpcsrcdir)/test_all.sh \
|
$(topsrcdir) \
|
||||||
$(DIST)/bin/xpcshell \
|
$(foreach dir,$(XPCSHELL_TESTS),$(testxpcobjdir)/$(MODULE)/$(dir))
|
||||||
$(FWDSLASH_TOPSRCDIR) \
|
|
||||||
$(NATIVE_TOPSRCDIR) \
|
|
||||||
$(testxpcobjdir)/$(MODULE)/$$testdir; \
|
|
||||||
done
|
|
||||||
|
|
||||||
# Test execution
|
# Execute a single test, specified in $(SOLO_FILE), but don't automatically
|
||||||
|
# start the test. Instead, present the xpcshell prompt so the user can
|
||||||
|
# attach a debugger and then start the test.
|
||||||
check-interactive::
|
check-interactive::
|
||||||
@$(EXIT_ON_ERROR) \
|
$(PYTHON) \
|
||||||
$(RUN_TEST_PROGRAM) \
|
$(testxpcsrcdir)/runxpcshelltests.py \
|
||||||
$(testxpcsrcdir)/test_one.sh \
|
--test=$(SOLO_FILE) \
|
||||||
$(DIST)/bin/xpcshell \
|
--interactive \
|
||||||
$(FWDSLASH_TOPSRCDIR) \
|
$(DIST)/bin/xpcshell \
|
||||||
$(NATIVE_TOPSRCDIR) \
|
$(topsrcdir) \
|
||||||
$(testxpcobjdir)/$(MODULE)/$$testdir \
|
$(foreach dir,$(XPCSHELL_TESTS),$(testxpcobjdir)/$(MODULE)/$(dir))
|
||||||
$(SOLO_FILE) 1;
|
|
||||||
|
|
||||||
# Test execution
|
# Execute a single test, specified in $(SOLO_FILE)
|
||||||
check-one::
|
check-one::
|
||||||
@$(EXIT_ON_ERROR) \
|
$(PYTHON) \
|
||||||
$(RUN_TEST_PROGRAM) \
|
$(testxpcsrcdir)/runxpcshelltests.py \
|
||||||
$(testxpcsrcdir)/test_one.sh \
|
--test=$(SOLO_FILE) \
|
||||||
$(DIST)/bin/xpcshell \
|
$(DIST)/bin/xpcshell \
|
||||||
$(FWDSLASH_TOPSRCDIR) \
|
$(topsrcdir) \
|
||||||
$(NATIVE_TOPSRCDIR) \
|
$(foreach dir,$(XPCSHELL_TESTS),$(testxpcobjdir)/$(MODULE)/$(dir))
|
||||||
$(testxpcobjdir)/$(MODULE)/$$testdir \
|
|
||||||
$(SOLO_FILE) 0;
|
|
||||||
|
|
||||||
endif # XPCSHELL_TESTS
|
endif # XPCSHELL_TESTS
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,106 @@
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
import os, sys, os.path, time
|
||||||
|
from tempfile import mkdtemp
|
||||||
|
from shutil import rmtree
|
||||||
|
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
|
||||||
|
|
||||||
|
from nsinstall import nsinstall
|
||||||
|
|
||||||
|
class TestNsinstall(unittest.TestCase):
|
||||||
|
"""
|
||||||
|
Unit tests for nsinstall.py
|
||||||
|
"""
|
||||||
|
def setUp(self):
|
||||||
|
self.tmpdir = mkdtemp()
|
||||||
|
|
||||||
|
def tearDown(self):
|
||||||
|
rmtree(self.tmpdir)
|
||||||
|
|
||||||
|
# utility methods for tests
|
||||||
|
def touch(self, file, dir=None):
|
||||||
|
if dir is None:
|
||||||
|
dir = self.tmpdir
|
||||||
|
f = os.path.join(dir, file)
|
||||||
|
open(f, 'w').close()
|
||||||
|
return f
|
||||||
|
|
||||||
|
def mkdirs(self, dir):
|
||||||
|
d = os.path.join(self.tmpdir, dir)
|
||||||
|
os.makedirs(d)
|
||||||
|
return d
|
||||||
|
|
||||||
|
def test_nsinstall_D(self):
|
||||||
|
"Test nsinstall -D <dir>"
|
||||||
|
testdir = os.path.join(self.tmpdir, "test")
|
||||||
|
self.assertEqual(nsinstall(["-D", testdir]), 0)
|
||||||
|
self.assert_(os.path.isdir(testdir))
|
||||||
|
|
||||||
|
def test_nsinstall_basic(self):
|
||||||
|
"Test nsinstall <file> <dir>"
|
||||||
|
testfile = self.touch("testfile")
|
||||||
|
testdir = self.mkdirs("testdir")
|
||||||
|
self.assertEqual(nsinstall([testfile, testdir]), 0)
|
||||||
|
self.assert_(os.path.isfile(os.path.join(testdir, "testfile")))
|
||||||
|
|
||||||
|
def test_nsinstall_basic_recursive(self):
|
||||||
|
"Test nsinstall <dir> <dest dir>"
|
||||||
|
sourcedir = self.mkdirs("sourcedir")
|
||||||
|
self.touch("testfile", sourcedir)
|
||||||
|
destdir = self.mkdirs("destdir")
|
||||||
|
self.assertEqual(nsinstall([sourcedir, destdir]), 0)
|
||||||
|
testdir = os.path.join(destdir, "sourcedir")
|
||||||
|
self.assert_(os.path.isdir(testdir))
|
||||||
|
self.assert_(os.path.isfile(os.path.join(testdir, "testfile")))
|
||||||
|
|
||||||
|
def test_nsinstall_multiple(self):
|
||||||
|
"Test nsinstall <three files> <dest dir>"
|
||||||
|
testfiles = [self.touch("testfile1"),
|
||||||
|
self.touch("testfile2"),
|
||||||
|
self.touch("testfile3")]
|
||||||
|
testdir = self.mkdirs("testdir")
|
||||||
|
self.assertEqual(nsinstall(testfiles + [testdir]), 0)
|
||||||
|
for f in testfiles:
|
||||||
|
self.assert_(os.path.isfile(os.path.join(testdir,
|
||||||
|
os.path.basename(f))))
|
||||||
|
|
||||||
|
def test_nsinstall_t(self):
|
||||||
|
"Test that nsinstall -t works (preserve timestamp)"
|
||||||
|
testfile = self.touch("testfile")
|
||||||
|
testdir = self.mkdirs("testdir")
|
||||||
|
# set mtime to now - 30 seconds
|
||||||
|
t = int(time.time()) - 30
|
||||||
|
os.utime(testfile, (t, t))
|
||||||
|
self.assertEqual(nsinstall(["-t", testfile, testdir]), 0)
|
||||||
|
destfile = os.path.join(testdir, "testfile")
|
||||||
|
self.assert_(os.path.isfile(destfile))
|
||||||
|
self.assertEqual(os.stat(testfile).st_mtime,
|
||||||
|
os.stat(destfile).st_mtime)
|
||||||
|
|
||||||
|
if sys.platform != "win32":
|
||||||
|
# can't run this test on windows, don't have real file modes there
|
||||||
|
def test_nsinstall_m(self):
|
||||||
|
"Test that nsinstall -m works (set mode)"
|
||||||
|
testfile = self.touch("testfile")
|
||||||
|
mode = 0600
|
||||||
|
os.chmod(testfile, mode)
|
||||||
|
testdir = self.mkdirs("testdir")
|
||||||
|
self.assertEqual(nsinstall(["-m", "%04o" % mode, testfile, testdir]), 0)
|
||||||
|
destfile = os.path.join(testdir, "testfile")
|
||||||
|
self.assert_(os.path.isfile(destfile))
|
||||||
|
self.assertEqual(os.stat(testfile).st_mode,
|
||||||
|
os.stat(destfile).st_mode)
|
||||||
|
|
||||||
|
def test_nsinstall_d(self):
|
||||||
|
"Test that nsinstall -d works (create directories in target)"
|
||||||
|
# -d makes no sense to me, but ok!
|
||||||
|
testfile = self.touch("testfile")
|
||||||
|
testdir = self.mkdirs("testdir")
|
||||||
|
destdir = os.path.join(testdir, "subdir")
|
||||||
|
self.assertEqual(nsinstall(["-d", testfile, destdir]), 0)
|
||||||
|
self.assert_(os.path.isdir(os.path.join(destdir, "testfile")))
|
||||||
|
|
||||||
|
#TODO: implement -R, -l, -L and test them!
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
|
@ -193,7 +193,7 @@ INCLUDES += \
|
||||||
-I$(srcdir)/../../xbl/src \
|
-I$(srcdir)/../../xbl/src \
|
||||||
-I$(srcdir)/../../../layout/generic \
|
-I$(srcdir)/../../../layout/generic \
|
||||||
-I$(srcdir)/../../../layout/style \
|
-I$(srcdir)/../../../layout/style \
|
||||||
-I$(srcdir)/../../../dom/src/base \
|
-I$(srcdir)/../../../dom/base \
|
||||||
-I$(srcdir)/../../xml/document/src \
|
-I$(srcdir)/../../xml/document/src \
|
||||||
-I$(topsrcdir)/xpcom/io \
|
-I$(topsrcdir)/xpcom/io \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
|
@ -3154,14 +3154,9 @@ nsCanvasRenderingContext2D::ThebesSurfaceFromElement(nsIDOMElement *imgElt,
|
||||||
if (!forceCopy && canvas->CountContexts() == 1) {
|
if (!forceCopy && canvas->CountContexts() == 1) {
|
||||||
nsICanvasRenderingContextInternal *srcCanvas = canvas->GetContextAtIndex(0);
|
nsICanvasRenderingContextInternal *srcCanvas = canvas->GetContextAtIndex(0);
|
||||||
rv = srcCanvas->GetThebesSurface(getter_AddRefs(sourceSurface));
|
rv = srcCanvas->GetThebesSurface(getter_AddRefs(sourceSurface));
|
||||||
#ifndef WINCE
|
|
||||||
// force a copy if we couldn't get the surface, or if it's
|
// force a copy if we couldn't get the surface, or if it's
|
||||||
// the same as what we have
|
// the same as what we have
|
||||||
if (sourceSurface == mSurface || NS_FAILED(rv))
|
if (sourceSurface == mSurface || NS_FAILED(rv))
|
||||||
#else
|
|
||||||
// force a copy if we couldn't get the surface
|
|
||||||
if (NS_FAILED(rv))
|
|
||||||
#endif
|
|
||||||
sourceSurface = nsnull;
|
sourceSurface = nsnull;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,7 @@ LOCAL_INCLUDES = \
|
||||||
-I$(srcdir)/../../html/base/src \
|
-I$(srcdir)/../../html/base/src \
|
||||||
-I$(srcdir)/../../xul/content/src \
|
-I$(srcdir)/../../xul/content/src \
|
||||||
-I$(srcdir)/../../xml/content/src \
|
-I$(srcdir)/../../xml/content/src \
|
||||||
-I$(srcdir)/../../../dom/src/base \
|
-I$(srcdir)/../../../dom/base \
|
||||||
-I$(srcdir)/../../../layout/generic \
|
-I$(srcdir)/../../../layout/generic \
|
||||||
-I$(srcdir)/../../../layout/xul/base/src \
|
-I$(srcdir)/../../../layout/xul/base/src \
|
||||||
-I$(srcdir)/../../../layout/xul/base/src/tree/src \
|
-I$(srcdir)/../../../layout/xul/base/src/tree/src \
|
||||||
|
|
|
@ -211,8 +211,10 @@ nsIMEStateManager::IsActive(nsPresContext* aPresContext)
|
||||||
// This root window is not active.
|
// This root window is not active.
|
||||||
return PR_FALSE;
|
return PR_FALSE;
|
||||||
}
|
}
|
||||||
NS_ENSURE_TRUE(aPresContext->GetPresShell(), PR_FALSE);
|
|
||||||
nsIViewManager* vm = aPresContext->GetViewManager();
|
nsIPresShell* shell = aPresContext->GetPresShell();
|
||||||
|
NS_ENSURE_TRUE(shell, NS_ERROR_NOT_AVAILABLE);
|
||||||
|
nsIViewManager* vm = shell->GetViewManager();
|
||||||
NS_ENSURE_TRUE(vm, PR_FALSE);
|
NS_ENSURE_TRUE(vm, PR_FALSE);
|
||||||
nsCOMPtr<nsIViewObserver> observer;
|
nsCOMPtr<nsIViewObserver> observer;
|
||||||
vm->GetViewObserver(*getter_AddRefs(observer));
|
vm->GetViewObserver(*getter_AddRefs(observer));
|
||||||
|
@ -274,7 +276,10 @@ nsIMEStateManager::SetIMEState(nsPresContext* aPresContext,
|
||||||
nsIWidget*
|
nsIWidget*
|
||||||
nsIMEStateManager::GetWidget(nsPresContext* aPresContext)
|
nsIMEStateManager::GetWidget(nsPresContext* aPresContext)
|
||||||
{
|
{
|
||||||
nsIViewManager* vm = aPresContext->GetViewManager();
|
nsIPresShell* shell = aPresContext->GetPresShell();
|
||||||
|
NS_ENSURE_TRUE(shell, nsnull);
|
||||||
|
|
||||||
|
nsIViewManager* vm = shell->GetViewManager();
|
||||||
if (!vm)
|
if (!vm)
|
||||||
return nsnull;
|
return nsnull;
|
||||||
nsCOMPtr<nsIWidget> widget = nsnull;
|
nsCOMPtr<nsIWidget> widget = nsnull;
|
||||||
|
@ -540,7 +545,10 @@ nsIMEStateManager::OnTextStateFocus(nsPresContext* aPresContext,
|
||||||
nsINode *editableNode = GetRootEditableNode(aPresContext, aContent);
|
nsINode *editableNode = GetRootEditableNode(aPresContext, aContent);
|
||||||
if (!editableNode) return NS_OK;
|
if (!editableNode) return NS_OK;
|
||||||
|
|
||||||
nsIViewManager* vm = aPresContext->GetViewManager();
|
nsIPresShell* shell = aPresContext->GetPresShell();
|
||||||
|
NS_ENSURE_TRUE(shell, NS_ERROR_NOT_AVAILABLE);
|
||||||
|
|
||||||
|
nsIViewManager* vm = shell->GetViewManager();
|
||||||
NS_ENSURE_TRUE(vm, NS_ERROR_NOT_AVAILABLE);
|
NS_ENSURE_TRUE(vm, NS_ERROR_NOT_AVAILABLE);
|
||||||
|
|
||||||
nsCOMPtr<nsIWidget> widget;
|
nsCOMPtr<nsIWidget> widget;
|
||||||
|
|
|
@ -107,7 +107,7 @@ INCLUDES += \
|
||||||
-I$(srcdir)/../../../events/src \
|
-I$(srcdir)/../../../events/src \
|
||||||
-I$(srcdir)/../../content/src \
|
-I$(srcdir)/../../content/src \
|
||||||
-I$(srcdir)/../../../../layout/style \
|
-I$(srcdir)/../../../../layout/style \
|
||||||
-I$(srcdir)/../../../../dom/src/base \
|
-I$(srcdir)/../../../../dom/base \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
DEFINES += -D_IMPL_NS_LAYOUT
|
DEFINES += -D_IMPL_NS_LAYOUT
|
||||||
|
|
|
@ -479,12 +479,8 @@ nsImageDocument::ScrollImageTo(PRInt32 aX, PRInt32 aY, PRBool restoreImage)
|
||||||
nsIPresShell *shell = GetPrimaryShell();
|
nsIPresShell *shell = GetPrimaryShell();
|
||||||
if (!shell)
|
if (!shell)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
nsPresContext* context = shell->GetPresContext();
|
nsIViewManager* vm = shell->GetViewManager();
|
||||||
if (!context)
|
|
||||||
return NS_OK;
|
|
||||||
|
|
||||||
nsIViewManager* vm = context->GetViewManager();
|
|
||||||
if (!vm)
|
if (!vm)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,7 @@ LOCAL_INCLUDES = \
|
||||||
-I$(srcdir)/../../xul/document/src \
|
-I$(srcdir)/../../xul/document/src \
|
||||||
-I$(srcdir)/../../events/src \
|
-I$(srcdir)/../../events/src \
|
||||||
-I$(srcdir)/../../../layout/style \
|
-I$(srcdir)/../../../layout/style \
|
||||||
-I$(srcdir)/../../../dom/src/base \
|
-I$(srcdir)/../../../dom/base \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
DEFINES += -D_IMPL_NS_LAYOUT
|
DEFINES += -D_IMPL_NS_LAYOUT
|
||||||
|
|
|
@ -90,7 +90,7 @@ LOCAL_INCLUDES = \
|
||||||
-I$(srcdir)/../../../base/src \
|
-I$(srcdir)/../../../base/src \
|
||||||
-I$(srcdir)/../../../xul/content/src \
|
-I$(srcdir)/../../../xul/content/src \
|
||||||
-I$(srcdir)/../../../events/src \
|
-I$(srcdir)/../../../events/src \
|
||||||
-I$(srcdir)/../../../../dom/src/base \
|
-I$(srcdir)/../../../../dom/base \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
DEFINES += -D_IMPL_NS_LAYOUT
|
DEFINES += -D_IMPL_NS_LAYOUT
|
||||||
|
|
|
@ -151,6 +151,7 @@ EXPORTS
|
||||||
sqlite3_snprintf
|
sqlite3_snprintf
|
||||||
sqlite3_sql
|
sqlite3_sql
|
||||||
sqlite3_step
|
sqlite3_step
|
||||||
|
sqlite3_stmt_status
|
||||||
sqlite3_thread_cleanup
|
sqlite3_thread_cleanup
|
||||||
sqlite3_total_changes
|
sqlite3_total_changes
|
||||||
sqlite3_trace
|
sqlite3_trace
|
||||||
|
|
|
@ -3950,11 +3950,11 @@ nsDocShell::DoGetPositionAndSize(PRInt32 * x, PRInt32 * y, PRInt32 * cx,
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsDocShell::Repaint(PRBool aForce)
|
nsDocShell::Repaint(PRBool aForce)
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsPresContext> context;
|
nsCOMPtr<nsIPresShell> presShell;
|
||||||
GetPresContext(getter_AddRefs(context));
|
GetPresShell(getter_AddRefs(presShell));
|
||||||
NS_ENSURE_TRUE(context, NS_ERROR_FAILURE);
|
NS_ENSURE_TRUE(presShell, NS_ERROR_FAILURE);
|
||||||
|
|
||||||
nsIViewManager* viewManager = context->GetViewManager();
|
nsIViewManager* viewManager = presShell->GetViewManager();
|
||||||
NS_ENSURE_TRUE(viewManager, NS_ERROR_FAILURE);
|
NS_ENSURE_TRUE(viewManager, NS_ERROR_FAILURE);
|
||||||
|
|
||||||
// what about aForce ?
|
// what about aForce ?
|
||||||
|
|
|
@ -75,7 +75,8 @@ DIRS += interfaces/smil
|
||||||
endif
|
endif
|
||||||
|
|
||||||
DIRS += \
|
DIRS += \
|
||||||
public \
|
public/coreEvents \
|
||||||
|
base \
|
||||||
src \
|
src \
|
||||||
locales \
|
locales \
|
||||||
tests \
|
tests \
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
#
|
#
|
||||||
# ***** END LICENSE BLOCK *****
|
# ***** END LICENSE BLOCK *****
|
||||||
|
|
||||||
DEPTH = ../../..
|
DEPTH = ../..
|
||||||
topsrcdir = @top_srcdir@
|
topsrcdir = @top_srcdir@
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
|
@ -45,54 +45,39 @@ include $(DEPTH)/config/autoconf.mk
|
||||||
MODULE = dom
|
MODULE = dom
|
||||||
LIBRARY_NAME = jsdombase_s
|
LIBRARY_NAME = jsdombase_s
|
||||||
LIBXUL_LIBRARY = 1
|
LIBXUL_LIBRARY = 1
|
||||||
|
FORCE_STATIC_LIB = 1
|
||||||
|
|
||||||
REQUIRES = xpcom \
|
XPIDLSRCS = \
|
||||||
string \
|
nsIEntropyCollector.idl \
|
||||||
webbrwsr \
|
nsIScriptChannel.idl \
|
||||||
commandhandler \
|
$(NULL)
|
||||||
js \
|
|
||||||
widget \
|
|
||||||
gfx \
|
|
||||||
thebes \
|
|
||||||
layout \
|
|
||||||
content \
|
|
||||||
caps \
|
|
||||||
docshell \
|
|
||||||
xpconnect \
|
|
||||||
pref \
|
|
||||||
oji \
|
|
||||||
necko \
|
|
||||||
nkcache \
|
|
||||||
mimetype \
|
|
||||||
java \
|
|
||||||
locale \
|
|
||||||
prefetch \
|
|
||||||
xuldoc \
|
|
||||||
webshell \
|
|
||||||
view \
|
|
||||||
uconv \
|
|
||||||
shistory \
|
|
||||||
plugin \
|
|
||||||
windowwatcher \
|
|
||||||
chardet \
|
|
||||||
find \
|
|
||||||
appshell \
|
|
||||||
intl \
|
|
||||||
unicharutil \
|
|
||||||
rdf \
|
|
||||||
xultmpl \
|
|
||||||
jar \
|
|
||||||
storage \
|
|
||||||
htmlparser \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
ifdef NS_TRACE_MALLOC
|
EXPORTS = \
|
||||||
REQUIRES += tracemalloc
|
nsDOMCID.h \
|
||||||
endif
|
nsDOMClassInfoID.h \
|
||||||
|
nsDOMError.h \
|
||||||
ifdef MOZ_JSDEBUGGER
|
nsDOMJSUtils.h \
|
||||||
REQUIRES += jsdebug
|
nsDOMScriptObjectHolder.h \
|
||||||
endif
|
nsDOMString.h \
|
||||||
|
nsIBaseDOMException.h \
|
||||||
|
nsIDOMClassInfo.h \
|
||||||
|
nsIDOMScriptObjectFactory.h \
|
||||||
|
nsIFocusController.h \
|
||||||
|
nsIJSEventListener.h \
|
||||||
|
nsIJSNativeInitializer.h \
|
||||||
|
nsIScriptContext.h \
|
||||||
|
nsIScriptExternalNameSet.h \
|
||||||
|
nsIScriptGlobalObject.h \
|
||||||
|
nsIScriptGlobalObjectOwner.h \
|
||||||
|
nsIScriptNameSpaceManager.h \
|
||||||
|
nsIScriptObjectOwner.h \
|
||||||
|
nsIScriptObjectPrincipal.h \
|
||||||
|
nsIScriptRuntime.h \
|
||||||
|
nsIScriptTimeoutHandler.h \
|
||||||
|
nsPIDOMWindow.h \
|
||||||
|
nsPIWindowRoot.h \
|
||||||
|
nsWrapperCache.h \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
CPPSRCS = \
|
CPPSRCS = \
|
||||||
nsBarProps.cpp \
|
nsBarProps.cpp \
|
||||||
|
@ -116,26 +101,7 @@ CPPSRCS = \
|
||||||
nsDOMScriptObjectFactory.cpp \
|
nsDOMScriptObjectFactory.cpp \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
# we don't want the shared lib, but we want to force the creation of a
|
include $(topsrcdir)/dom/dom-config.mk
|
||||||
# static lib.
|
|
||||||
FORCE_STATIC_LIB = 1
|
|
||||||
|
|
||||||
LOCAL_INCLUDES = \
|
|
||||||
-I$(srcdir)/../events \
|
|
||||||
-I$(srcdir)/../storage \
|
|
||||||
-I$(srcdir)/../offline \
|
|
||||||
-I$(srcdir)/../geolocation \
|
|
||||||
-I$(srcdir)/../threads \
|
|
||||||
-I$(topsrcdir)/content/xbl/src \
|
|
||||||
-I$(topsrcdir)/content/xul/document/src \
|
|
||||||
-I$(topsrcdir)/content/events/src \
|
|
||||||
-I$(topsrcdir)/content/base/src \
|
|
||||||
-I$(topsrcdir)/content/html/document/src \
|
|
||||||
-I$(topsrcdir)/layout/style \
|
|
||||||
-I$(topsrcdir)/layout/xul/base/src/tree/src \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
DEFINES += -D_IMPL_NS_LAYOUT
|
|
||||||
|
|
||||||
ifdef MOZ_JSDEBUGGER
|
ifdef MOZ_JSDEBUGGER
|
||||||
DEFINES += -DMOZ_JSDEBUGGER
|
DEFINES += -DMOZ_JSDEBUGGER
|
|
@ -490,7 +490,12 @@ nsDOMWindowUtils::ProcessUpdates()
|
||||||
nsPresContext* presContext = GetPresContext();
|
nsPresContext* presContext = GetPresContext();
|
||||||
if (!presContext)
|
if (!presContext)
|
||||||
return NS_ERROR_UNEXPECTED;
|
return NS_ERROR_UNEXPECTED;
|
||||||
nsIViewManager *viewManager = presContext->GetViewManager();
|
|
||||||
|
nsIPresShell* shell = presContext->GetPresShell();
|
||||||
|
if (!shell)
|
||||||
|
return NS_ERROR_UNEXPECTED;
|
||||||
|
|
||||||
|
nsIViewManager *viewManager = shell->GetViewManager();
|
||||||
if (!viewManager)
|
if (!viewManager)
|
||||||
return NS_ERROR_UNEXPECTED;
|
return NS_ERROR_UNEXPECTED;
|
||||||
|
|
|
@ -8164,10 +8164,10 @@ nsGlobalWindow::GetScrollInfo(nsIScrollableView **aScrollableView)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsCOMPtr<nsPresContext> presContext;
|
nsCOMPtr<nsIPresShell> presShell;
|
||||||
mDocShell->GetPresContext(getter_AddRefs(presContext));
|
mDocShell->GetPresShell(getter_AddRefs(presShell));
|
||||||
if (presContext) {
|
if (presShell) {
|
||||||
nsIViewManager* vm = presContext->GetViewManager();
|
nsIViewManager* vm = presShell->GetViewManager();
|
||||||
if (vm)
|
if (vm)
|
||||||
return vm->GetRootScrollableView(aScrollableView);
|
return vm->GetRootScrollableView(aScrollableView);
|
||||||
}
|
}
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче