Merge last PGO-green changeset of mozilla-inbound to mozilla-central

This commit is contained in:
Ed Morley 2012-12-11 15:49:20 +00:00
Родитель db62d5d1c6 497ed3894e
Коммит 6d827a7299
1086 изменённых файлов: 13250 добавлений и 120494 удалений

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

@ -42,7 +42,7 @@ Accessible::SetRoleMapEntry(nsRoleMapEntry* aRoleMapEntry)
inline bool
Accessible::HasNumericValue() const
{
if (mFlags & eHasNumericValue)
if (mStateFlags & eHasNumericValue)
return true;
return mRoleMapEntry && mRoleMapEntry->valueRule != eNoValue;

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

@ -145,8 +145,8 @@ Accessible::QueryInterface(REFNSIID aIID, void** aInstancePtr)
Accessible::Accessible(nsIContent* aContent, DocAccessible* aDoc) :
nsAccessNodeWrap(aContent, aDoc),
mParent(nullptr), mIndexInParent(-1), mFlags(eChildrenUninitialized),
mIndexOfEmbeddedChild(-1), mRoleMapEntry(nullptr)
mParent(nullptr), mIndexInParent(-1), mChildrenFlags(eChildrenUninitialized),
mStateFlags(0), mFlags(0), mIndexOfEmbeddedChild(-1), mRoleMapEntry(nullptr)
{
#ifdef NS_DEBUG_X
{
@ -2430,7 +2430,7 @@ Accessible::Shutdown()
{
// Mark the accessible as defunct, invalidate the child count and pointers to
// other accessibles, also make sure none of its children point to this parent
mFlags |= eIsDefunct;
mStateFlags |= eIsDefunct;
InvalidateChildren();
if (mParent)

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

@ -678,23 +678,24 @@ public:
/**
* Return true if the accessible is defunct.
*/
bool IsDefunct() const { return mFlags & eIsDefunct; }
bool IsDefunct() const { return mStateFlags & eIsDefunct; }
/**
* Return true if the accessible is no longer in the document.
*/
bool IsInDocument() const { return !(mFlags & eIsNotInDocument); }
bool IsInDocument() const { return !(mStateFlags & eIsNotInDocument); }
/**
* Return true if the accessible should be contained by document node map.
*/
bool IsNodeMapEntry() const
{ return HasOwnContent() && !(mFlags & eNotNodeMapEntry); }
{ return HasOwnContent() && !(mStateFlags & eNotNodeMapEntry); }
/**
* Return true if the accessible has associated DOM content.
*/
bool HasOwnContent() const { return mContent && !(mFlags & eSharedNode); }
bool HasOwnContent() const
{ return mContent && !(mStateFlags & eSharedNode); }
/**
* Return true if accessible is of given type.
@ -752,25 +753,24 @@ protected:
/**
* Return true if the children flag is set.
*/
inline bool IsChildrenFlag(ChildrenFlags aFlag) const
{ return static_cast<ChildrenFlags> (mFlags & kChildrenFlagsMask) == aFlag; }
bool IsChildrenFlag(ChildrenFlags aFlag) const
{ return static_cast<ChildrenFlags>(mChildrenFlags) == aFlag; }
/**
* Set children flag.
*/
inline void SetChildrenFlag(ChildrenFlags aFlag)
{ mFlags = (mFlags & ~kChildrenFlagsMask) | aFlag; }
void SetChildrenFlag(ChildrenFlags aFlag) { mChildrenFlags = aFlag; }
/**
* Flags used to describe the state of this accessible.
* @note keep these flags in sync with ChildrenFlags
*/
enum StateFlags {
eIsDefunct = 1 << 2, // accessible is defunct
eIsNotInDocument = 1 << 3, // accessible is not in document
eSharedNode = 1 << 4, // accessible shares DOM node from another accessible
eNotNodeMapEntry = 1 << 5, // accessible shouldn't be in document node map
eHasNumericValue = 1 << 6 // accessible has a numeric value
eIsDefunct = 1 << 0, // accessible is defunct
eIsNotInDocument = 1 << 1, // accessible is not in document
eSharedNode = 1 << 2, // accessible shares DOM node from another accessible
eNotNodeMapEntry = 1 << 3, // accessible shouldn't be in document node map
eHasNumericValue = 1 << 4 // accessible has a numeric value
};
public: // XXX: a small hack to make these visible for nsARIAMap
@ -779,30 +779,30 @@ public: // XXX: a small hack to make these visible for nsARIAMap
* @note keep these flags in sync with ChildrenFlags and StateFlags
*/
enum AccessibleTypes {
eApplicationAccessible = 1 << 7,
eAutoCompleteAccessible = 1 << 8,
eAutoCompletePopupAccessible = 1 << 9,
eComboboxAccessible = 1 << 10,
eDocAccessible = 1 << 11,
eHyperTextAccessible = 1 << 12,
eHTMLFileInputAccessible = 1 << 13,
eHTMLListItemAccessible = 1 << 14,
eHTMLTableRowAccessible = 1 << 15,
eImageAccessible = 1 << 16,
eImageMapAccessible = 1 << 17,
eListAccessible = 1 << 18,
eListControlAccessible = 1 << 19,
eMenuButtonAccessible = 1 << 20,
eMenuPopupAccessible = 1 << 21,
eProgressAccessible = 1 << 22,
eRootAccessible = 1 << 23,
eSelectAccessible = 1 << 24,
eTableAccessible = 1 << 25,
eTableCellAccessible = 1 << 26,
eTableRowAccessible = 1 << 27,
eTextLeafAccessible = 1 << 28,
eXULDeckAccessible = 1 << 29,
eXULTreeAccessible = 1 << 30
eApplicationAccessible = 1 << 0,
eAutoCompleteAccessible = 1 << 1,
eAutoCompletePopupAccessible = 1 << 2,
eComboboxAccessible = 1 << 3,
eDocAccessible = 1 << 4,
eHyperTextAccessible = 1 << 5,
eHTMLFileInputAccessible = 1 << 6,
eHTMLListItemAccessible = 1 << 7,
eHTMLTableRowAccessible = 1 << 8,
eImageAccessible = 1 << 9,
eImageMapAccessible = 1 << 10,
eListAccessible = 1 << 11,
eListControlAccessible = 1 << 12,
eMenuButtonAccessible = 1 << 13,
eMenuPopupAccessible = 1 << 14,
eProgressAccessible = 1 << 15,
eRootAccessible = 1 << 16,
eSelectAccessible = 1 << 17,
eTableAccessible = 1 << 18,
eTableCellAccessible = 1 << 19,
eTableRowAccessible = 1 << 20,
eTextLeafAccessible = 1 << 21,
eXULDeckAccessible = 1 << 22,
eXULTreeAccessible = 1 << 23
};
protected:
@ -909,10 +909,13 @@ protected:
nsTArray<nsRefPtr<Accessible> > mChildren;
int32_t mIndexInParent;
static const uint32_t kChildrenFlagsMask =
eChildrenUninitialized | eMixedChildren | eEmbeddedChildren;
/**
* Keep in sync with ChildrenFlags, StateFlags and AccessibleTypes.
*/
uint32_t mChildrenFlags : 2;
uint32_t mStateFlags : 5;
uint32_t mFlags : 25;
uint32_t mFlags;
friend class DocAccessible;
nsAutoPtr<mozilla::a11y::EmbeddedObjCollector> mEmbeddedObjCollector;

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

@ -79,7 +79,9 @@ DocAccessible::
mVirtualCursor(nullptr),
mPresShell(aPresShell)
{
mFlags |= eDocAccessible | eNotNodeMapEntry;
mFlags |= eDocAccessible;
mStateFlags |= eNotNodeMapEntry;
MOZ_ASSERT(mPresShell, "should have been given a pres shell");
mPresShell->SetDocAccessible(this);
@ -613,7 +615,7 @@ DocAccessible::Shutdown()
// Mark the document as shutdown before AT is notified about the document
// removal from its container (valid for root documents on ATK and due to
// some reason for MSAA, refer to bug 757392 for details).
mFlags |= eIsDefunct;
mStateFlags |= eIsDefunct;
nsCOMPtr<nsIDocument> kungFuDeathGripDoc = mDocumentNode;
mDocumentNode = nullptr;
@ -1941,7 +1943,7 @@ DocAccessible::CacheChildrenInSubtree(Accessible* aRoot)
void
DocAccessible::UncacheChildrenInSubtree(Accessible* aRoot)
{
aRoot->mFlags |= eIsNotInDocument;
aRoot->mStateFlags |= eIsNotInDocument;
if (aRoot->IsElement())
RemoveDependentIDsFor(aRoot);

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

@ -21,7 +21,8 @@ public:
ProgressMeterAccessible(nsIContent* aContent, DocAccessible* aDoc) :
LeafAccessible(aContent, aDoc)
{
mFlags |= eHasNumericValue | eProgressAccessible;
mStateFlags |= eHasNumericValue;
mFlags |= eProgressAccessible;
}
NS_DECL_ISUPPORTS_INHERITED

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

@ -153,7 +153,7 @@ HTMLAreaAccessible::
{
// Make HTML area DOM element not accessible. HTML image map accessible
// manages its tree itself.
mFlags |= eNotNodeMapEntry;
mStateFlags |= eNotNodeMapEntry;
}
////////////////////////////////////////////////////////////////////////////////

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

@ -145,7 +145,7 @@ HTMLListBulletAccessible::
HTMLListBulletAccessible(nsIContent* aContent, DocAccessible* aDoc) :
LeafAccessible(aContent, aDoc)
{
mFlags |= eSharedNode;
mStateFlags |= eSharedNode;
}
////////////////////////////////////////////////////////////////////////////////

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

@ -620,7 +620,7 @@ HTMLComboboxListAccessible::
DocAccessible* aDoc) :
HTMLSelectListAccessible(aContent, aDoc)
{
mFlags |= eSharedNode;
mStateFlags |= eSharedNode;
}
////////////////////////////////////////////////////////////////////////////////

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

@ -121,9 +121,11 @@ HTMLTableCellAccessible::NativeAttributes()
if (ChildCount() == 1) {
Accessible* abbr = FirstChild();
if (abbr->IsAbbreviation()) {
nsTextEquivUtils::
AppendTextEquivFromTextContent(abbr->GetContent()->GetFirstChild(),
&abbrText);
nsIContent* firstChildNode = abbr->GetContent()->GetFirstChild();
if (firstChildNode) {
nsTextEquivUtils::
AppendTextEquivFromTextContent(firstChildNode, &abbrText);
}
}
}
if (abbrText.IsEmpty())

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

@ -21,7 +21,7 @@ XULSliderAccessible::
XULSliderAccessible(nsIContent* aContent, DocAccessible* aDoc) :
AccessibleWrap(aContent, aDoc)
{
mFlags = mFlags | eHasNumericValue;
mStateFlags |= eHasNumericValue;
}
// nsISupports

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

@ -685,7 +685,7 @@ XULTreeItemAccessibleBase::
mTree(aTree), mTreeView(aTreeView), mRow(aRow)
{
mParent = aParent;
mFlags |= eSharedNode;
mStateFlags |= eSharedNode;
}
////////////////////////////////////////////////////////////////////////////////

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

@ -463,7 +463,7 @@ XULTreeGridCellAccessible::
mTreeView(aTreeView), mRow(aRow), mColumn(aColumn)
{
mParent = aRowAcc;
mFlags |= eSharedNode;
mStateFlags |= eSharedNode;
NS_ASSERTION(mTreeView, "mTreeView is null");

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

@ -100,6 +100,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=558036
testAttrs("th2", { "abbr": "SS#" }, true);
testAttrs("th2", { "axis": "social" }, true);
// don't barf on an empty abbr element.
testAbsentAttrs("th3", { "abbr": "" }, true);
// application accessible
if (WIN) {
var gfxInfo = Components.classes["@mozilla.org/gfx/info;1"].
@ -154,6 +157,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=558036
title="Expand support for nsIAccessibleEvent::OBJECT_ATTRIBUTE_CHANGE">
Mozilla Bug 563862
</a>
<a target="_blank"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=819303"
title="crash in nsTextEquivUtils::AppendTextEquivFromTextContent">
Mozilla Bug 819303
</a>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
@ -211,6 +219,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=558036
<tr>
<th id="th1"><abbr title="Social Security Number">SS#</abbr></th>
<th id="th2" abbr="SS#" axis="social">Social Security Number</th>
<th id="th3"><abbr></abbr></th>
</tr>
</table>

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

@ -70,7 +70,7 @@ if ("nsIAudioManager" in Ci) {
const nsIAudioManager = Ci.nsIAudioManager;
audioChannelSettings = [
// settings name, max value, apply to stream types
['audio.volume.content', 15, [nsIAudioManager.STREAM_TYPE_SYSTEM, nsIAudioManager.STREAM_TYPE_MUSIC, nsIAudioManager.STREAM_TYPE_FM]],
['audio.volume.content', 15, [nsIAudioManager.STREAM_TYPE_SYSTEM, nsIAudioManager.STREAM_TYPE_MUSIC]],
['audio.volume.notification', 15, [nsIAudioManager.STREAM_TYPE_RING, nsIAudioManager.STREAM_TYPE_NOTIFICATION]],
['audio.volume.alarm', 15, [nsIAudioManager.STREAM_TYPE_ALARM]],
['audio.volume.telephony', 5, [nsIAudioManager.STREAM_TYPE_VOICE_CALL]],

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

@ -4,6 +4,7 @@ mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-b2g
ac_add_options --enable-application=b2g
ac_add_options --enable-b2g-camera
ac_add_options --enable-updater
ac_add_options --target=arm-linux-androideabi
ac_add_options --with-gonk="$topsrcdir/gonk-toolchain"

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

@ -4,9 +4,10 @@
"mock_target": "mozilla-centos6-i386",
"mock_packages": ["ccache", "make", "bison", "flex", "gcc", "g++", "mpfr", "zlib-devel", "ncurses-devel", "zip", "autoconf213", "glibc-static", "perl-Digest-SHA", "wget", "alsa-lib", "atk", "cairo", "dbus-glib", "fontconfig", "freetype", "glib2", "gtk2", "libXRender", "libXt", "pango", "mozilla-python27-mercurial", "openssh-clients", "nss-devel"],
"mock_files": [["/home/cltbld/.ssh", "/home/mock_mozilla/.ssh"]],
"build_targets": ["boottarball", "systemtarball", "userdatatarball"],
"build_targets": ["boottarball", "systemtarball", "userdatatarball", "package-tests"],
"upload_files": [
"{workdir}/out/target/product/panda/*.tar.bz2",
"{workdir}/out/target/product/panda/tests/*.zip",
"{objdir}/dist/b2g-update/*.mar",
"{objdir}/dist/b2g-*.tar.gz",
"{objdir}/dist/b2g-*.crashreporter-symbols.zip",

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

@ -4,9 +4,10 @@
"mock_target": "mozilla-centos6-i386",
"mock_packages": ["ccache", "make", "bison", "flex", "gcc", "g++", "mpfr", "zlib-devel", "ncurses-devel", "zip", "autoconf213", "glibc-static", "perl-Digest-SHA", "wget", "alsa-lib", "atk", "cairo", "dbus-glib", "fontconfig", "freetype", "glib2", "gtk2", "libXRender", "libXt", "pango", "mozilla-python27-mercurial", "openssh-clients", "nss-devel"],
"mock_files": [["/home/cltbld/.ssh", "/home/mock_mozilla/.ssh"]],
"build_targets": ["boottarball", "systemtarball", "userdatatarball"],
"build_targets": ["boottarball", "systemtarball", "userdatatarball", "package-tests"],
"upload_files": [
"{workdir}/out/target/product/panda/*.tar.bz2",
"{workdir}/out/target/product/panda/tests/*.zip",
"{objdir}/dist/b2g-update/*.mar",
"{objdir}/dist/b2g-*.tar.gz",
"{objdir}/dist/b2g-*.crashreporter-symbols.zip",

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

@ -54,6 +54,9 @@
@BINPATH@/@DLL_PREFIX@xpcom@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@mozalloc@DLL_SUFFIX@
#ifdef MOZ_DMD
@BINPATH@/@DLL_PREFIX@dmd@DLL_SUFFIX@
#endif
#ifdef XP_MACOSX
@BINPATH@/XUL
#else

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

@ -862,8 +862,10 @@ pref("security.alternate_certificate_error_page", "certerror");
// Whether to start the private browsing mode at application startup
pref("browser.privatebrowsing.autostart", false);
#ifndef MOZ_PER_WINDOW_PRIVATE_BROWSING
// Whether we should skip prompting before starting the private browsing mode
pref("browser.privatebrowsing.dont_prompt_on_enter", false);
#endif
// Don't try to alter this pref, it'll be reset the next time you use the
// bookmarking dialog
@ -1163,14 +1165,15 @@ pref("pdfjs.previousHandler.alwaysAskBeforeHandling", false);
// (This is intentionally on the high side; see bug 746055.)
pref("image.mem.max_decoded_image_kb", 256000);
// Example social provider
// Default social providers
pref("social.manifest.facebook", "{\"origin\":\"https://www.facebook.com\",\"name\":\"Facebook Messenger\",\"workerURL\":\"https://www.facebook.com/desktop/fbdesktop2/socialfox/fbworker.js.php\",\"iconURL\":\"data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8%2F9hAAAAX0lEQVQ4jWP4%2F%2F8%2FAyUYTFhHzjgDxP9JxGeQDSBVMxgTbUBCxer%2Fr999%2BQ8DJBuArJksA9A10s8AXIBoA0B%2BR%2FY%2FjD%2BEwoBoA1yT5v3PbdmCE8MAshhID%2FUMoDgzUYIBj0Cgi7ar4coAAAAASUVORK5CYII%3D\",\"sidebarURL\":\"https://www.facebook.com/desktop/fbdesktop2/?socialfox=true\"}");
// Comma-separated list of nsIURI::prePaths that are allowed to activate
// built-in social functionality.
pref("social.activation.whitelist", "https://www.facebook.com");
pref("social.sidebar.open", true);
pref("social.sidebar.unload_timeout_ms", 10000);
pref("social.active", false);
pref("social.toast-notifications.enabled", true);
pref("dom.identity.enabled", false);

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

@ -540,6 +540,7 @@
command="Social:FocusChat"
class="show-only-for-keyboard"/>
<menuseparator class="social-statusarea-separator"/>
<menuseparator class="social-provider-menu" hidden="true"/>
<menuitem class="social-toggle-menuitem" command="Social:Toggle"/>
<menuitem class="social-remove-menuitem" command="Social:Remove"/>
</menupopup>

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

@ -10,17 +10,17 @@ XPCOMUtils.defineLazyModuleGetter(this, "SharedFrame",
"resource:///modules/SharedFrame.jsm");
let SocialUI = {
// Called on delayed startup to initialize UI
// Called on delayed startup to initialize the UI
init: function SocialUI_init() {
Services.obs.addObserver(this, "social:pref-changed", false);
Services.obs.addObserver(this, "social:ambient-notification-changed", false);
Services.obs.addObserver(this, "social:profile-changed", false);
Services.obs.addObserver(this, "social:recommend-info-changed", false);
Services.obs.addObserver(this, "social:frameworker-error", false);
Services.obs.addObserver(this, "social:provider-set", false);
Services.prefs.addObserver("social.sidebar.open", this, false);
Services.prefs.addObserver("social.toast-notifications.enabled", this, false);
Services.prefs.addObserver("social.active", this, false);
gBrowser.addEventListener("ActivateSocialFeature", this._activationEventHandler, true, true);
@ -40,14 +40,106 @@ let SocialUI = {
Services.obs.removeObserver(this, "social:profile-changed");
Services.obs.removeObserver(this, "social:recommend-info-changed");
Services.obs.removeObserver(this, "social:frameworker-error");
Services.obs.removeObserver(this, "social:provider-set");
Services.prefs.removeObserver("social.sidebar.open", this);
Services.prefs.removeObserver("social.toast-notifications.enabled", this);
Services.prefs.removeObserver("social.active", this);
},
// Called once, after window load, once Social.jsm's provider has been set.
_providerReady: function SocialUI_providerReady() {
this._updateActiveUI();
this._updateMenuItems();
SocialChatBar.update();
SocialShareButton.init();
SocialMenu.populate();
SocialToolbar.init();
SocialSidebar.init();
},
// Social.provider has changed, update any state that depends on it.
// Note: this method is not called when Social.provider is first set, during
// the first window load.
_updateProvider: function () {
// XXX audit for handling nullness of social.provider
this._updateActiveUI();
this._updateMenuItems();
SocialChatBar.update();
SocialShareButton.updateProvider();
SocialMenu.populate();
SocialToolbar.updateProvider();
SocialSidebar.update();
},
// The entire feature is being turned on/off.
_updateEnabledState: function () {
this._updateActiveUI();
SocialChatBar.update();
SocialSidebar.update();
SocialShareButton.updateButtonHiddenState();
SocialMenu.populate();
SocialToolbar.updateButtonHiddenState();
SocialToolbar.populateProviderMenus();
},
_matchesCurrentProvider: function (origin) {
return Social.provider && Social.provider.origin == origin;
},
observe: function SocialUI_observe(subject, topic, data) {
// Exceptions here sometimes don't get reported properly, report them
// manually :(
try {
switch (topic) {
case "social:provider-set":
this._updateProvider();
break;
case "social:pref-changed":
this._updateEnabledState();
break;
// Provider-specific notifications
case "social:ambient-notification-changed":
if (this._matchesCurrentProvider(data)) {
SocialToolbar.updateButton();
SocialMenu.populate();
}
break;
case "social:profile-changed":
if (this._matchesCurrentProvider(data)) {
SocialToolbar.updateProfile();
SocialShareButton.updateProfileInfo();
SocialChatBar.update();
}
break;
case "social:recommend-info-changed":
if (this._matchesCurrentProvider(data)) {
SocialShareButton.updateShareState();
}
break;
case "social:frameworker-error":
if (Social.provider && Social.provider.origin == data) {
SocialSidebar.setSidebarErrorMessage("frameworker-error");
}
break;
case "nsPref:changed":
if (data == "social.sidebar.open") {
SocialSidebar.update();
}
break;
}
} catch (e) {
Components.utils.reportError(e + e.stack);
throw e;
}
},
// Miscellaneous helpers
showProfile: function SocialUI_showProfile() {
if (this.haveLoggedInUser())
if (Social.haveLoggedInUser())
openUILinkIn(Social.provider.profile.profileURL, "tab");
else {
// XXX Bug 789585 will implement an API for provider-specified login pages.
@ -55,104 +147,39 @@ let SocialUI = {
}
},
observe: function SocialUI_observe(subject, topic, data) {
switch (topic) {
case "social:pref-changed":
// Exceptions here sometimes don't get reported properly, report them
// manually :(
try {
this.updateToggleCommand();
SocialShareButton.updateButtonHiddenState();
SocialToolbar.updateButtonHiddenState();
SocialSidebar.update();
SocialChatBar.update();
SocialFlyout.unload();
SocialMenu.populate();
} catch (e) {
Components.utils.reportError(e);
throw e;
}
break;
case "social:ambient-notification-changed":
SocialToolbar.updateButton();
SocialMenu.populate();
break;
case "social:profile-changed":
SocialToolbar.updateProfile();
SocialShareButton.updateProfileInfo();
SocialChatBar.update();
break;
case "social:recommend-info-changed":
SocialShareButton.updateShareState();
break;
case "social:frameworker-error":
if (Social.provider) {
Social.errorState = "frameworker-error";
SocialSidebar.setSidebarErrorMessage("frameworker-error");
}
break;
case "nsPref:changed":
this.updateActiveBroadcaster();
this.updateToggleCommand();
SocialSidebar.update();
SocialToolbar.updateButton();
SocialMenu.populate();
break;
}
},
_updateActiveUI: function SocialUI_updateActiveUI() {
let broadcaster = document.getElementById("socialActiveBroadcaster");
broadcaster.hidden = !Social.active;
get toggleCommand() {
return document.getElementById("Social:Toggle");
},
// Called once Social.jsm's provider has been set
_providerReady: function SocialUI_providerReady() {
// If we couldn't find a provider, nothing to do here.
if (!Social.provider)
return;
this.updateToggleCommand();
// The View->Sidebar and Menubar->Tools menu.
for (let id of ["menu_socialSidebar", "menu_socialAmbientMenu"])
document.getElementById(id).setAttribute("label", Social.provider.name);
SocialToolbar.init();
SocialShareButton.init();
SocialSidebar.init();
SocialMenu.populate();
SocialChatBar.update();
this.updateActiveBroadcaster();
},
updateToggleCommand: function SocialUI_updateToggleCommand() {
if (!Social.provider)
return;
let toggleCommand = this.toggleCommand;
let toggleCommand = document.getElementById("Social:Toggle");
// We only need to update the command itself - all our menu items use it.
let enabled = Services.prefs.getBoolPref("social.enabled");
let label = gNavigatorBundle.getFormattedString(enabled ? "social.turnOff.label" : "social.turnOn.label",
let label = gNavigatorBundle.getFormattedString(Social.provider.enabled ?
"social.turnOff.label" :
"social.turnOn.label",
[Social.provider.name]);
let accesskey = gNavigatorBundle.getString(enabled ? "social.turnOff.accesskey" : "social.turnOn.accesskey");
let accesskey = gNavigatorBundle.getString(Social.provider.enabled ?
"social.turnOff.accesskey" :
"social.turnOn.accesskey");
toggleCommand.setAttribute("label", label);
toggleCommand.setAttribute("accesskey", accesskey);
toggleCommand.setAttribute("hidden", Social.active ? "false" : "true");
},
updateActiveBroadcaster: function SocialUI_updateActiveBroadcaster() {
let broadcaster = document.getElementById("socialActiveBroadcaster");
broadcaster.hidden = !Social.active;
_updateMenuItems: function () {
if (!Social.provider)
return;
// The View->Sidebar and Menubar->Tools menu.
for (let id of ["menu_socialSidebar", "menu_socialAmbientMenu"])
document.getElementById(id).setAttribute("label", Social.provider.name);
},
// This handles "ActivateSocialFeature" events fired against content documents
// in this window.
_activationEventHandler: function SocialUI_activationHandler(e) {
// Nothing to do if Social is already enabled, or we don't have a provider
// to enable yet.
if (Social.enabled || !Social.provider)
return;
let targetDoc = e.target;
// Event must be fired against the document
@ -164,9 +191,9 @@ let SocialUI = {
return;
// Check that the associated document's origin is in our whitelist
let prePath = targetDoc.documentURIObject.prePath;
let providerOrigin = targetDoc.nodePrincipal.origin;
let whitelist = Services.prefs.getCharPref("social.activation.whitelist");
if (whitelist.split(",").indexOf(prePath) == -1)
if (whitelist.split(",").indexOf(providerOrigin) == -1)
return;
// If the last event was received < 1s ago, ignore this one
@ -175,34 +202,44 @@ let SocialUI = {
return;
Social.lastEventReceived = now;
// Keep track of the old provider in case of undo
let oldOrigin = Social.provider ? Social.provider.origin : "";
// Enable the social functionality, and indicate that it was activated
Social.active = true;
let provider = Social.activateFromOrigin(providerOrigin);
// Provider to activate may not have been found
if (!provider)
return;
// Show a warning, allow undoing the activation
let description = document.getElementById("social-activation-message");
let brandShortName = document.getElementById("bundle_brand").getString("brandShortName");
let message = gNavigatorBundle.getFormattedString("social.activated.description",
[Social.provider.name, brandShortName]);
[provider.name, brandShortName]);
description.value = message;
SocialUI.notificationPanel.hidden = false;
let notificationPanel = SocialUI.notificationPanel;
// Set the origin being activated and the previously active one, to allow undo
notificationPanel.setAttribute("origin", provider.origin);
notificationPanel.setAttribute("oldorigin", oldOrigin);
// Show the panel
notificationPanel.hidden = false;
setTimeout(function () {
SocialUI.notificationPanel.openPopup(SocialToolbar.button, "bottomcenter topright");
}.bind(this), 0);
},
get notificationPanel() {
return document.getElementById("socialActivatedNotification")
notificationPanel.openPopup(SocialToolbar.button, "bottomcenter topright");
}, 0);
},
undoActivation: function SocialUI_undoActivation() {
Social.active = false;
let origin = this.notificationPanel.getAttribute("origin");
let oldOrigin = this.notificationPanel.getAttribute("oldorigin");
Social.deactivateFromOrigin(origin, oldOrigin);
this.notificationPanel.hidePopup();
},
haveLoggedInUser: function SocialUI_haveLoggedInUser() {
return !!(Social.provider && Social.provider.profile && Social.provider.profile.userName);
get notificationPanel() {
return document.getElementById("socialActivatedNotification");
},
closeSocialPanelForLinkTraversal: function (target, linkNode) {
@ -238,8 +275,9 @@ let SocialUI = {
let confirmationIndex = ps.confirmEx(null, dialogTitle, text, flags,
okButtonText, null, null, null, {});
if (confirmationIndex == 0)
Social.active = false;
if (confirmationIndex == 0) {
Social.deactivateFromOrigin(Social.provider.origin);
}
}
}
@ -250,7 +288,7 @@ let SocialChatBar = {
// Whether the chatbar is available for this window. Note that in full-screen
// mode chats are available, but not shown.
get isAvailable() {
if (!SocialUI.haveLoggedInUser())
if (!Social.haveLoggedInUser())
return false;
let docElem = document.documentElement;
let chromeless = docElem.getAttribute("chromehidden").indexOf("extrachrome") >= 0;
@ -477,10 +515,19 @@ let SocialFlyout = {
let SocialShareButton = {
// Called once, after window load, when the Social.provider object is initialized
init: function SSB_init() {
this.updateProvider();
},
// Called when the Social.provider changes
updateProvider: function () {
this.updateButtonHiddenState();
if (!Social.provider)
return;
this.updateProfileInfo();
},
// Called when the provider's profile info changes (or when the provider
// changes, via updateProvider)
updateProfileInfo: function SSB_updateProfileInfo() {
let profileRow = document.getElementById("unsharePopupHeader");
let profile = Social.provider.profile;
@ -493,9 +540,7 @@ let SocialShareButton = {
} else {
profileRow.hidden = true;
this.updateButtonHiddenState();
return;
}
this.updateShareState();
},
get shareButton() {
@ -518,8 +563,9 @@ let SocialShareButton = {
let shareButton = this.shareButton;
if (shareButton)
shareButton.hidden = !Social.uiVisible || Social.provider.recommendInfo == null ||
!SocialUI.haveLoggedInUser() ||
!Social.haveLoggedInUser() ||
!this.canSharePage(gBrowser.currentURI);
// also update the relevent command's disabled state so the keyboard
// shortcut only works when available.
let cmd = document.getElementById("Social:SharePage");
@ -577,8 +623,6 @@ let SocialShareButton = {
},
updateShareState: function SSB_updateShareState() {
// we might have been called due to a location change, and the new location
// might change the state of "can this url be shared"
this.updateButtonHiddenState();
let shareButton = this.shareButton;
@ -626,31 +670,32 @@ var SocialMenu = {
let separator = document.getElementById("socialAmbientMenuSeparator");
separator.hidden = true;
if (!Social.uiVisible)
return;
let provider = Social.provider;
if (provider && provider.enabled) {
let iconNames = Object.keys(provider.ambientNotificationIcons);
for (let name of iconNames) {
let icon = provider.ambientNotificationIcons[name];
if (!icon.label || !icon.menuURL)
continue;
separator.hidden = false;
let menuitem = document.createElement("menuitem");
menuitem.setAttribute("label", icon.label);
menuitem.classList.add("ambient-menuitem");
menuitem.addEventListener("command", function() {
openUILinkIn(icon.menuURL, "tab");
}, false);
submenu.insertBefore(menuitem, separator);
}
let iconNames = Object.keys(provider.ambientNotificationIcons);
for (let name of iconNames) {
let icon = provider.ambientNotificationIcons[name];
if (!icon.label || !icon.menuURL)
continue;
separator.hidden = false;
let menuitem = document.createElement("menuitem");
menuitem.setAttribute("label", icon.label);
menuitem.classList.add("ambient-menuitem");
menuitem.addEventListener("command", function() {
openUILinkIn(icon.menuURL, "tab");
}, false);
submenu.insertBefore(menuitem, separator);
}
}
};
// XXX Need to audit that this is being initialized correctly
var SocialToolbar = {
// Called once, after window load, when the Social.provider object is initialized
// Called once, after window load, when the Social.provider object is
// initialized.
init: function SocialToolbar_init() {
this.button.setAttribute("image", Social.provider.iconURL);
let brandShortName = document.getElementById("bundle_brand").getString("brandShortName");
let label = gNavigatorBundle.getFormattedString("social.remove.label",
[brandShortName]);
@ -660,18 +705,29 @@ var SocialToolbar = {
removeCommand.setAttribute("label", label);
removeCommand.setAttribute("accesskey", accesskey);
this.updateProvider();
this._dynamicResizer = new DynamicResizeWatcher();
},
// Called when the Social.provider changes
updateProvider: function () {
if (!Social.provider)
return;
this.button.setAttribute("image", Social.provider.iconURL);
this.updateButton();
this.updateProfile();
this._dynamicResizer = new DynamicResizeWatcher();
this.populateProviderMenus();
},
get button() {
return document.getElementById("social-provider-button");
},
// Note: this doesn't actually handle hiding the toolbar button,
// socialActiveBroadcaster is responsible for that.
updateButtonHiddenState: function SocialToolbar_updateButtonHiddenState() {
let tbi = document.getElementById("social-toolbar-item");
let socialEnabled = Social.enabled;
let socialEnabled = Social.uiVisible;
for (let className of ["social-statusarea-separator", "social-statusarea-user"]) {
for (let element of document.getElementsByClassName(className))
element.hidden = !socialEnabled;
@ -679,7 +735,7 @@ var SocialToolbar = {
let toggleNotificationsCommand = document.getElementById("Social:ToggleNotifications");
toggleNotificationsCommand.setAttribute("hidden", !socialEnabled);
if (!SocialUI.haveLoggedInUser() || !socialEnabled) {
if (!Social.haveLoggedInUser() || !socialEnabled) {
let parent = document.getElementById("social-notification-panel");
while (parent.hasChildNodes()) {
let frame = parent.firstChild;
@ -700,9 +756,8 @@ var SocialToolbar = {
let userPortrait = profile.portrait || "chrome://global/skin/icons/information-32.png";
let userDetailsBroadcaster = document.getElementById("socialBroadcaster_userDetails");
let loggedInStatusValue = profile.userName ?
profile.userName :
userDetailsBroadcaster.getAttribute("notLoggedInLabel");;
let loggedInStatusValue = profile.userName ||
userDetailsBroadcaster.getAttribute("notLoggedInLabel");
// "image" and "label" are used by Mac's native menus that do not render the menuitem's children
// elements. "src" and "value" are used by the image/label children on the other platforms.
@ -713,6 +768,7 @@ var SocialToolbar = {
userDetailsBroadcaster.setAttribute("label", loggedInStatusValue);
},
// XXX doesn't this need to be called for profile changes, given its use of provider.profile?
updateButton: function SocialToolbar_updateButton() {
this.updateButtonHiddenState();
let provider = Social.provider;
@ -728,8 +784,8 @@ var SocialToolbar = {
const CACHE_PREF_NAME = "social.cached.ambientNotificationIcons";
// provider.profile == undefined means no response yet from the provider
// to tell us whether the user is logged in or not.
if (!Social.provider || !Social.provider.enabled ||
(!SocialUI.haveLoggedInUser() && provider.profile !== undefined)) {
if (!provider.enabled ||
(!Social.haveLoggedInUser() && provider.profile !== undefined)) {
// Either no enabled provider, or there is a provider and it has
// responded with a profile and the user isn't loggedin. The icons
// etc have already been removed by updateButtonHiddenState, so we want
@ -931,6 +987,41 @@ var SocialToolbar = {
encodeURIComponent(src), null, null, null, null);
let panel = aNotificationFrame.parentNode;
sizeSocialPanelToContent(panel, aNotificationFrame);
},
populateProviderMenus: function SocialToolbar_renderProviderMenus() {
let providerMenuSeps = document.getElementsByClassName("social-provider-menu");
let activeProviders = [p for (p of Social.providers) if (p.active)];
for (let providerMenuSep of providerMenuSeps)
this._populateProviderMenu(providerMenuSep, activeProviders);
},
_populateProviderMenu: function SocialToolbar_renderProviderMenu(providerMenuSep, providers) {
let menu = providerMenuSep.parentNode;
// selectable providers are inserted before the provider-menu seperator,
// remove any menuitems in that area
while (providerMenuSep.previousSibling.nodeName == "menuitem") {
menu.removeChild(providerMenuSep.previousSibling);
}
// only show a selection if there is more than one
if (!Social.enabled || providers.length < 2) {
providerMenuSep.hidden = true;
return;
}
for (let provider of providers) {
let menuitem = document.createElement("menuitem");
menuitem.className = "menuitem-iconic social-provider-menuitem";
menuitem.setAttribute("image", provider.iconURL);
menuitem.setAttribute("label", provider.name);
menuitem.setAttribute("origin", provider.origin);
if (provider == Social.provider) {
menuitem.setAttribute("checked", "true");
} else {
menuitem.setAttribute("oncommand", "Social.setProviderByOrigin(this.getAttribute('origin'));");
}
menu.insertBefore(menuitem, providerMenuSep);
}
providerMenuSep.hidden = false;
}
}
@ -996,6 +1087,12 @@ var SocialSidebar = {
command.setAttribute("checked", !hideSidebar);
let sbrowser = document.getElementById("social-sidebar-browser");
if (Social.provider)
sbrowser.setAttribute("origin", Social.provider.origin);
else
sbrowser.removeAttribute("origin");
if (hideSidebar) {
sbrowser.removeEventListener("load", SocialSidebar._loadListener, true);
this.setSidebarVisibilityState(false);
@ -1011,14 +1108,13 @@ var SocialSidebar = {
);
}
} else {
if (Social.errorState == "frameworker-error") {
if (Social.provider.errorState == "frameworker-error") {
SocialSidebar.setSidebarErrorMessage("frameworker-error");
return;
}
// Make sure the right sidebar URL is loaded
if (sbrowser.getAttribute("origin") != Social.provider.origin) {
sbrowser.setAttribute("origin", Social.provider.origin);
if (sbrowser.getAttribute("src") != Social.provider.sidebarURL) {
sbrowser.setAttribute("src", Social.provider.sidebarURL);
sbrowser.addEventListener("load", SocialSidebar._loadListener, true);
} else {
@ -1094,7 +1190,7 @@ SocialErrorListener.prototype = {
onLocationChange: function SPL_onLocationChange(aWebProgress, aRequest, aLocation, aFlags) {
let failure = aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_ERROR_PAGE;
if (failure && Social.errorState != "frameworker-error") {
if (failure && Social.provider.errorState != "frameworker-error") {
aRequest.cancel(Components.results.NS_BINDING_ABORTED);
window.setTimeout(function(self) {
self.setErrorMessage(aWebProgress);
@ -1114,7 +1210,7 @@ SocialErrorListener.prototype = {
case "sidebar":
// a frameworker error "trumps" a sidebar error.
let reason = Social.errorState ? Social.errorState : "sidebar-error";
let reason = Social.provider.errorState || "sidebar-error";
SocialSidebar.setSidebarErrorMessage(reason);
break;

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

@ -194,7 +194,7 @@
<button id="social-undoactivation-button"
label="&social.activated.undobutton.label;"
accesskey="&social.activated.undobutton.accesskey;"
onclick="SocialUI.undoActivation();"/>
onclick="SocialUI.undoActivation(this);"/>
<button default="true"
autofocus="autofocus"
label="&social.ok.label;"
@ -209,7 +209,7 @@
<button id="social-undoactivation-button"
label="&social.activated.undobutton.label;"
accesskey="&social.activated.undobutton.accesskey;"
onclick="SocialUI.undoActivation();"/>
onclick="SocialUI.undoActivation(this);"/>
#endif
</hbox>
</vbox>
@ -679,6 +679,7 @@
label="&social.toggleNotifications.label;"
accesskey="&social.toggleNotifications.accesskey;"/>
<menuseparator class="social-statusarea-separator"/>
<menuseparator class="social-provider-menu" hidden="true"/>
<menuitem class="social-toggle-menuitem" command="Social:Toggle"/>
<menuitem class="social-remove-menuitem" command="Social:Remove"/>
</menupopup>

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

@ -294,6 +294,7 @@ _BROWSER_FILES = \
browser_social_mozSocial_API.js \
browser_social_isVisible.js \
browser_social_chatwindow.js \
browser_social_multiprovider.js \
social_panel.html \
social_share_image.png \
social_sidebar.html \

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

@ -0,0 +1,104 @@
/* 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/. */
function test() {
waitForExplicitFinish();
runSocialTestWithProvider(gProviders, function (finishcb) {
runSocialTests(tests, undefined, undefined, finishcb);
});
}
let gProviders = [
{
name: "provider 1",
origin: "https://example.com",
sidebarURL: "https://example.com/browser/browser/base/content/test/social_sidebar.html?provider1",
workerURL: "https://example.com/browser/browser/base/content/test/social_worker.js",
iconURL: "chrome://branding/content/icon48.png"
},
{
name: "provider 2",
origin: "https://test1.example.com",
sidebarURL: "https://test1.example.com/browser/browser/base/content/test/social_sidebar.html?provider2",
workerURL: "https://test1.example.com/browser/browser/base/content/test/social_worker.js",
iconURL: "chrome://branding/content/icon48.png"
}
];
var tests = {
testProviderSwitch: function(next) {
function checkProviderMenu(selectedProvider) {
let menu = document.getElementById("social-statusarea-popup");
let menuProviders = menu.querySelectorAll(".social-provider-menuitem");
is(menuProviders.length, gProviders.length, "correct number of providers listed in the menu");
// Find the selectedProvider's menu item
let el = menu.getElementsByAttribute("origin", selectedProvider.origin);
is(el.length, 1, "selected provider menu item exists");
is(el[0].getAttribute("checked"), "true", "selected provider menu item is checked");
}
checkProviderMenu(gProviders[0]);
// Now wait for the initial provider profile to be set
waitForProviderLoad(function() {
checkUIStateMatchesProvider(gProviders[0]);
// Now activate "provider 2"
observeProviderSet(function () {
waitForProviderLoad(function() {
checkUIStateMatchesProvider(gProviders[1]);
next();
});
});
Social.activateFromOrigin("https://test1.example.com");
});
}
}
function checkUIStateMatchesProvider(provider) {
let profileData = getExpectedProfileData(provider);
// Bug 789863 - share button uses 'displayName', toolbar uses 'userName'
// Check the "share button"
let displayNameEl = document.getElementById("socialUserDisplayName");
is(displayNameEl.getAttribute("label"), profileData.displayName, "display name matches provider profile");
// The toolbar
let loginStatus = document.getElementsByClassName("social-statusarea-loggedInStatus");
for (let label of loginStatus) {
is(label.value, profileData.userName, "username name matches provider profile");
}
// Sidebar
is(document.getElementById("social-sidebar-browser").getAttribute("src"), provider.sidebarURL, "side bar URL is set");
}
function getExpectedProfileData(provider) {
// This data is defined in social_worker.js
if (provider.origin == "https://test1.example.com") {
return {
displayName: "Test1 User",
userName: "tester"
};
}
return {
displayName: "Kuma Lisa",
userName: "trickster"
};
}
function observeProviderSet(cb) {
Services.obs.addObserver(function providerSet(subject, topic, data) {
Services.obs.removeObserver(providerSet, "social:provider-set");
info("social:provider-set observer was notified");
// executeSoon to let the browser UI observers run first
executeSoon(cb);
}, "social:provider-set", false);
}
function waitForProviderLoad(cb) {
waitForCondition(function() {
return Social.provider.profile &&
Social.provider.profile.displayName;
}, cb, "waitForProviderLoad: provider profile was not set");
}

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

@ -57,9 +57,14 @@ function doTest(finishcb) {
Social.toggleSidebar();
});
// Now toggle it off
info("Toggling sidebar off");
Social.toggleSidebar();
// Wait until the side bar loads
waitForCondition(function () {
return document.getElementById("social-sidebar-browser").docShellIsActive;
}, function () {
// Now toggle it off
info("Toggling sidebar off");
Social.toggleSidebar();
});
}
// XXX test sidebar in popup

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

@ -113,50 +113,60 @@ function getTestPlugin() {
function runSocialTestWithProvider(manifest, callback) {
let SocialService = Cu.import("resource://gre/modules/SocialService.jsm", {}).SocialService;
let manifests = Array.isArray(manifest) ? manifest : [manifest];
// Check that none of the provider's content ends up in history.
registerCleanupFunction(function () {
for (let what of ['sidebarURL', 'workerURL', 'iconURL']) {
if (manifest[what]) {
ensureSocialUrlNotRemembered(manifest[what]);
manifests.forEach(function (m) {
for (let what of ['sidebarURL', 'workerURL', 'iconURL']) {
if (m[what]) {
ensureSocialUrlNotRemembered(m[what]);
}
}
}
});
});
info("runSocialTestWithProvider: " + manifest.toSource());
info("runSocialTestWithProvider: " + manifests.toSource());
let oldProvider;
SocialService.addProvider(manifest, function(provider) {
info("runSocialTestWithProvider: provider added");
oldProvider = Social.provider;
Social.provider = provider;
let providersAdded = 0;
let firstProvider;
manifests.forEach(function (m) {
SocialService.addProvider(m, function(provider) {
provider.active = true;
// 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);
providersAdded++;
info("runSocialTestWithProvider: provider added");
// 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.
SocialUI._providerReady();
registerCleanupFunction(function () {
// if one test happens to fail, it is likely finishSocialTest will not
// be called, causing most future social tests to also fail as they
// attempt to add a provider which already exists - so work
// around that by also attempting to remove the test provider.
try {
SocialService.removeProvider(provider.origin, finish);
} catch (ex) {
;
// we want to set the first specified provider as the UI's provider
if (provider.origin == manifests[0].origin) {
firstProvider = provider;
}
Social.provider = oldProvider;
Services.prefs.clearUserPref("social.enabled");
Services.prefs.clearUserPref("social.active");
});
function finishSocialTest() {
SocialService.removeProvider(provider.origin, finish);
}
callback(finishSocialTest);
// If we've added all the providers we need, call the callback to start
// the tests (and give it a callback it can call to finish them)
if (providersAdded == manifests.length) {
// Set the UI's provider and enable the feature
Social.provider = firstProvider;
Social.enabled = true;
registerCleanupFunction(function () {
// if one test happens to fail, it is likely finishSocialTest will not
// be called, causing most future social tests to also fail as they
// attempt to add a provider which already exists - so work
// around that by also attempting to remove the test provider.
manifests.forEach(function (m) {
try {
SocialService.removeProvider(m.origin, finish);
} catch (ex) {}
});
Services.prefs.clearUserPref("social.enabled");
});
function finishSocialTest() {
SocialService.removeProvider(provider.origin, finish);
}
callback(finishSocialTest);
}
});
});
}

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

@ -81,13 +81,24 @@ onconnect = function(e) {
break;
case "social.initialize":
// This is the workerAPI port, respond and set up a notification icon.
// For multiprovider tests, we support acting like different providers
// based on the domain we load from.
apiPort = port;
let profile = {
portrait: "https://example.com/portrait.jpg",
userName: "trickster",
displayName: "Kuma Lisa",
profileURL: "http://en.wikipedia.org/wiki/Kuma_Lisa"
};
let profile;
if (location.href.indexOf("https://test1.example.com") == 0) {
profile = {
portrait: "https://test1.example.com/portrait.jpg",
userName: "tester",
displayName: "Test1 User",
};
} else {
profile = {
portrait: "https://example.com/portrait.jpg",
userName: "trickster",
displayName: "Kuma Lisa",
profileURL: "http://en.wikipedia.org/wiki/Kuma_Lisa"
};
}
port.postMessage({topic: "social.user-profile", data: profile});
break;
case "test-ambient-notification":

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

@ -47,9 +47,6 @@ const Cr = Components.results;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
XPCOMUtils.defineLazyServiceGetter(this, "gBrowserGlue",
"@mozilla.org/browser/browserglue;1",
"nsIBrowserGlue");
XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
"resource://gre/modules/NetUtil.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PluralForm",

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

@ -12,10 +12,17 @@ if test "$OS_ARCH" = "WINNT"; then
if ! test "$HAVE_64BIT_OS"; then
MOZ_VERIFY_MAR_SIGNATURE=1
MOZ_MAINTENANCE_SERVICE=1
if test "$MOZ_UPDATE_CHANNEL" = "nightly" -o \
"$MOZ_UPDATE_CHANNEL" = "aurora" -o \
"$MOZ_UPDATE_CHANNEL" = "beta" -o \
"$MOZ_UPDATE_CHANNEL" = "release"; then
if ! test "$MOZ_DEBUG"; then
MOZ_STUB_INSTALLER=1
fi
fi
fi
fi
MOZ_STUB_INSTALLER=1
MOZ_CHROME_FILE_FORMAT=omni
MOZ_SAFE_BROWSING=1
MOZ_SERVICES_AITC=1

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

@ -67,7 +67,9 @@ UNINSTALLER_PACKAGE_HOOK = $(RM) -r $(STAGEDIST)/uninstall; \
cp ../installer/windows/l10ngen/helper.exe $(STAGEDIST)/uninstall; \
$(RM) $(_ABS_DIST)/l10n-stage/setup.exe; \
cp ../installer/windows/l10ngen/setup.exe $(_ABS_DIST)/l10n-stage; \
$(NSINSTALL) -D "$(_ABS_DIST)/$(PKG_INST_PATH)"; \
$(NULL)
STUB_HOOK = $(NSINSTALL) -D "$(_ABS_DIST)/$(PKG_INST_PATH)"; \
$(RM) "$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe"; \
cp ../installer/windows/l10ngen/stub.exe "$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe"; \
chmod 0755 "$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe"; \

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

@ -386,7 +386,7 @@ webapps.install.success = Application Installed
# Telemetry opt-out prompt for Aurora and Nightly
# LOCALIZATION NOTE (telemetryOptOutPrompt): %1$S and %3$S will be replaced by
# brandFullName, and %2$S by the value of the toolkit.telemetry.server_owner preference.
# brandShortName, and %2$S by the value of the toolkit.telemetry.server_owner preference.
telemetryOptOutPrompt = %1$S sends information about performance, hardware, usage and customizations back to %2$S to help improve %3$S.
# LOCALIZATION NOTE (fullscreen.entered): displayed when we enter HTML5 fullscreen mode, %S is the domain name of the focused website (e.g. mozilla.com).

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

@ -18,28 +18,115 @@ XPCOMUtils.defineLazyModuleGetter(this, "SocialService",
this.Social = {
lastEventReceived: 0,
provider: null,
providers: null,
_disabledForSafeMode: false,
get _currentProviderPref() {
try {
return Services.prefs.getComplexValue("social.provider.current",
Ci.nsISupportsString).data;
} catch (ex) {}
return null;
},
set _currentProviderPref(val) {
let string = Cc["@mozilla.org/supports-string;1"].
createInstance(Ci.nsISupportsString);
string.data = val;
Services.prefs.setComplexValue("social.provider.current",
Ci.nsISupportsString, string);
},
_provider: null,
get provider() {
return this._provider;
},
set provider(val) {
// Changes triggered by the public setter should notify of an engine change.
this._setProvider(val, true);
},
// Sets the current provider and enables and activates it. Also disables the
// previously set provider, and optionally notifies observers of the change.
_setProvider: function (provider, notify) {
if (this._provider == provider)
return;
if (provider && !provider.active)
throw new Error("Social.provider cannot be set to an inactive provider.");
// Disable the previous provider, if any, since we want only one provider to
// be enabled at once.
if (this._provider)
this._provider.enabled = false;
this._provider = provider;
if (this._provider) {
if (this.enabled)
this._provider.enabled = true;
this._currentProviderPref = this._provider.origin;
} else {
Services.prefs.clearUserPref("social.provider.current");
}
if (notify) {
let origin = this._provider && this._provider.origin;
Services.obs.notifyObservers(null, "social:provider-set", origin);
}
},
init: function Social_init(callback) {
this._disabledForSafeMode = Services.appinfo.inSafeMode && this.enabled;
if (this.provider) {
if (this.providers) {
schedule(callback);
return;
}
if (!this._addedPrivateBrowsingObserver) {
if (!this._addedObservers) {
Services.obs.addObserver(this, "private-browsing", false);
this._addedPrivateBrowsingObserver = true;
Services.obs.addObserver(this, "social:pref-changed", false);
this._addedObservers = true;
}
// Eventually this might want to retrieve a specific provider, but for now
// just use the first available.
// Retrieve the current set of providers, and set the current provider.
SocialService.getProviderList(function (providers) {
if (providers.length)
this.provider = providers[0];
// We don't want to notify about a provider change when we're setting
// this.provider for the first time, so pass false here.
this._updateProviderCache(providers, false);
callback();
}.bind(this));
// Register an observer for changes to the provider list
SocialService.registerProviderListener(function providerListener(topic, data) {
// An engine change caused by adding/removing a provider should notify
if (topic == "provider-added" || topic == "provider-removed")
this._updateProviderCache(data, true);
}.bind(this));
},
// Called to update our cache of providers and set the current provider
_updateProviderCache: function (providers, notifyProviderChange) {
this.providers = providers;
// Set our current provider
let currentProviderPref = this._currentProviderPref;
let currentProvider;
if (this._currentProviderPref) {
currentProvider = this._getProviderFromOrigin(this._currentProviderPref);
} else {
// Migrate data from previous single-provider builds where we used
// social.active to indicate that the first available provider should be
// used.
try {
let active = Services.prefs.getBoolPref("social.active");
if (active) {
Services.prefs.clearUserPref("social.active");
currentProvider = providers[0];
}
} catch(ex) {}
}
this._setProvider(currentProvider, notifyProviderChange);
},
observe: function(aSubject, aTopic, aData) {
@ -56,6 +143,11 @@ this.Social = {
this.enabled = false;
this.enabled = this._enabledBeforePrivateBrowsing;
}
} else if (aTopic == "social:pref-changed") {
// Make sure our provider's enabled state matches the overall state of the
// social components.
if (this.provider)
this.provider.enabled = this.enabled;
}
},
@ -64,9 +156,6 @@ this.Social = {
},
set enabled(val) {
if (!val) {
delete this.errorState;
}
SocialService.enabled = val;
},
get enabled() {
@ -74,11 +163,7 @@ this.Social = {
},
get active() {
return Services.prefs.getBoolPref("social.active");
},
set active(val) {
this.enabled = !!val;
Services.prefs.setBoolPref("social.active", !!val);
return this.provider && this.providers.some(function (p) p.active);
},
toggle: function Social_toggle() {
@ -96,6 +181,52 @@ this.Social = {
Services.prefs.setBoolPref("social.toast-notifications.enabled", !prefValue);
},
haveLoggedInUser: function () {
return !!(this.provider && this.provider.profile && this.provider.profile.userName);
},
setProviderByOrigin: function (origin) {
this.provider = this._getProviderFromOrigin(origin);
},
_getProviderFromOrigin: function (origin) {
for (let p of this.providers) {
if (p.origin == origin) {
return p;
}
}
return null;
},
// Activation functionality
activateFromOrigin: function (origin) {
let provider = this._getProviderFromOrigin(origin);
if (provider) {
// No need to activate again if we're already active
if (provider == this.provider && provider.active)
return null;
provider.active = true;
this.provider = provider;
Social.enabled = true;
}
return provider;
},
deactivateFromOrigin: function (origin, oldOrigin) {
let provider = this._getProviderFromOrigin(origin);
if (provider && provider == this.provider) {
this.provider.active = false;
// Set the provider to the previously-selected provider (in case of undo),
// or to the first available provider otherwise.
this.provider = this._getProviderFromOrigin(oldOrigin);
if (!this.provider)
this.provider = this.providers.filter(function (p) p.active)[0];
if (!this.provider) // Still no provider found, disable
this.enabled = false;
}
},
// Sharing functionality
_getShareablePageUrl: function Social_getShareablePageUrl(aURI) {
let uri = aURI.clone();

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

@ -407,7 +407,8 @@ user_pref("app.update.enabled", false);
user_pref("app.update.staging.enabled", false);
user_pref("browser.panorama.experienced_first_run", true); // Assume experienced
user_pref("dom.w3c_touch_events.enabled", 1);
user_pref("toolkit.telemetry.prompted", 2);
#expand user_pref("toolkit.telemetry.prompted", __MOZ_TELEMETRY_DISPLAY_REV__);
#expand user_pref("toolkit.telemetry.notifiedOptOut", __MOZ_TELEMETRY_DISPLAY_REV__);
// Existing tests assume there is no font size inflation.
user_pref("font.size.inflation.emPerLine", 0);
user_pref("font.size.inflation.minTwips", 0);

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

@ -199,17 +199,17 @@ endif
endif
#
# Handle trace-malloc in optimized builds.
# Handle trace-malloc and DMD in optimized builds.
# No opt to give sane callstacks.
#
ifdef NS_TRACE_MALLOC
ifneq (,$(NS_TRACE_MALLOC)$(MOZ_DMD))
MOZ_OPTIMIZE_FLAGS=-Zi -Od -UDEBUG -DNDEBUG
ifdef HAVE_64BIT_OS
OS_LDFLAGS = -DEBUG -PDB:NONE -OPT:REF,ICF
else
OS_LDFLAGS = -DEBUG -PDB:NONE -OPT:REF
endif
endif # NS_TRACE_MALLOC
endif # NS_TRACE_MALLOC || MOZ_DMD
endif # MOZ_DEBUG
@ -468,20 +468,20 @@ ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_)
#//------------------------------------------------------------------------
ifdef USE_STATIC_LIBS
RTL_FLAGS=-MT # Statically linked multithreaded RTL
ifneq (,$(MOZ_DEBUG)$(NS_TRACE_MALLOC))
ifneq (,$(MOZ_DEBUG)$(NS_TRACE_MALLOC)$(MOZ_DMD))
ifndef MOZ_NO_DEBUG_RTL
RTL_FLAGS=-MTd # Statically linked multithreaded MSVC4.0 debug RTL
endif
endif # MOZ_DEBUG || NS_TRACE_MALLOC
endif # MOZ_DEBUG || NS_TRACE_MALLOC || MOZ_DMD
else # !USE_STATIC_LIBS
RTL_FLAGS=-MD # Dynamically linked, multithreaded RTL
ifneq (,$(MOZ_DEBUG)$(NS_TRACE_MALLOC))
ifneq (,$(MOZ_DEBUG)$(NS_TRACE_MALLOC)$(MOZ_DMD))
ifndef MOZ_NO_DEBUG_RTL
RTL_FLAGS=-MDd # Dynamically linked, multithreaded MSVC4.0 debug RTL
endif
endif # MOZ_DEBUG || NS_TRACE_MALLOC
endif # MOZ_DEBUG || NS_TRACE_MALLOC || MOZ_DMD
endif # USE_STATIC_LIBS
endif # WINNT && !GNU_CC

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

@ -1429,7 +1429,8 @@ if test "$GNU_CC"; then
AC_MSG_CHECKING([for --build-id option to ld])
_SAVE_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -Wl,--build-id"
AC_TRY_LINK(,,AC_MSG_RESULT([yes]),
AC_TRY_LINK(,,AC_MSG_RESULT([yes])
[NSPR_LDFLAGS="$NSPR_LDFLAGS -Wl,--build-id"],
AC_MSG_RESULT([no])
LDFLAGS=$_SAVE_LDFLAGS)
@ -3763,7 +3764,7 @@ if test -n "$MOZ_LINKER" -a -z "$MOZ_OLD_LINKER" -a "$OS_TARGET" = "Android"; th
dnl Using LDFLAGS in nspr is safe, since we only really build
dnl libraries there.
DSO_LDOPTS="$DSO_LDOPTS -nostartfiles"
NSPR_LDFLAGS=-nostartfiles
NSPR_LDFLAGS="$NSPR_LDFLAGS -nostartfiles"
fi
fi
@ -4373,6 +4374,19 @@ else
fi
fi
# The app update channel is 'default' when not supplied. The value is used in
# the application's confvars.sh so it must be set before confvars.sh is called.
MOZ_ARG_ENABLE_STRING([update-channel],
[ --enable-update-channel=CHANNEL
Select application update channel (default=default)],
MOZ_UPDATE_CHANNEL=`echo $enableval | tr A-Z a-z`)
if test -z "$MOZ_UPDATE_CHANNEL"; then
MOZ_UPDATE_CHANNEL=default
fi
AC_DEFINE_UNQUOTED(MOZ_UPDATE_CHANNEL, $MOZ_UPDATE_CHANNEL)
AC_SUBST(MOZ_UPDATE_CHANNEL)
# Allow the application to influence configure with a confvars.sh script.
AC_MSG_CHECKING([if app-specific confvars.sh exists])
@ -6320,18 +6334,6 @@ if test -n "$MOZ_UPDATER"; then
AC_DEFINE(MOZ_UPDATER)
fi
# app update channel is 'default' when not supplied.
MOZ_ARG_ENABLE_STRING([update-channel],
[ --enable-update-channel=CHANNEL
Select application update channel (default=default)],
MOZ_UPDATE_CHANNEL=`echo $enableval | tr A-Z a-z`)
if test -z "$MOZ_UPDATE_CHANNEL"; then
MOZ_UPDATE_CHANNEL=default
fi
AC_DEFINE_UNQUOTED(MOZ_UPDATE_CHANNEL, $MOZ_UPDATE_CHANNEL)
AC_SUBST(MOZ_UPDATE_CHANNEL)
# tools/update-packaging is not checked out by default.
MOZ_ARG_ENABLE_BOOL(update-packaging,
[ --enable-update-packaging
@ -6992,7 +6994,7 @@ dnl = Enable trace malloc
dnl ========================================================
NS_TRACE_MALLOC=${MOZ_TRACE_MALLOC}
MOZ_ARG_ENABLE_BOOL(trace-malloc,
[ --enable-trace-malloc Enable malloc tracing; also disables jemalloc],
[ --enable-trace-malloc Enable malloc tracing; also disables DMD and jemalloc],
NS_TRACE_MALLOC=1,
NS_TRACE_MALLOC= )
if test "$NS_TRACE_MALLOC"; then
@ -7003,6 +7005,33 @@ if test "$NS_TRACE_MALLOC"; then
fi
AC_SUBST(NS_TRACE_MALLOC)
dnl ========================================================
dnl = Enable DMD
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(dmd,
[ --enable-dmd Enable DMD; also enables jemalloc and replace-malloc and disables DMDV],
MOZ_DMD=1,
MOZ_DMD= )
if test "$NS_TRACE_MALLOC"; then # trace-malloc disables DMD
MOZ_DMD=
fi
if test "$MOZ_DMD"; then
USE_ELF_DYNSTR_GC=
AC_DEFINE(MOZ_DMD)
if test "${CPU_ARCH}" = "arm"; then
CFLAGS="$CFLAGS -funwind-tables"
CXXFLAGS="$CXXFLAGS -funwind-tables"
fi
MOZ_MEMORY=1 # DMD enables jemalloc
MOZ_REPLACE_MALLOC=1 # DMD enables replace-malloc
MOZ_DMDV= # DMD disables DMDV
fi
AC_SUBST(MOZ_DMD)
dnl ========================================================
dnl = Enable jemalloc
dnl ========================================================
@ -7598,9 +7627,9 @@ if test -z "$SKIP_LIBRARY_CHECKS"; then
AC_LANG_RESTORE
fi
# Demangle only for debug or trace-malloc builds
# Demangle only for debug or trace-malloc or DMD builds
MOZ_DEMANGLE_SYMBOLS=
if test "$HAVE_DEMANGLE" && test "$MOZ_DEBUG" -o "$NS_TRACE_MALLOC"; then
if test "$HAVE_DEMANGLE" && test "$MOZ_DEBUG" -o "$NS_TRACE_MALLOC" -o "$MOZ_DMD"; then
MOZ_DEMANGLE_SYMBOLS=1
AC_DEFINE(MOZ_DEMANGLE_SYMBOLS)
fi
@ -8405,7 +8434,7 @@ if test -n "$MOZ_SERVICES_SYNC"; then
fi
dnl ========================================================
if test "$MOZ_DEBUG" -o "$NS_TRACE_MALLOC"; then
if test "$MOZ_DEBUG" -o "$NS_TRACE_MALLOC" -o "$MOZ_DMD"; then
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS=
fi
@ -9149,42 +9178,6 @@ if test -z "$MOZ_NATIVE_JEMALLOC" -a "$MOZ_MEMORY" && test -n "$MOZ_JEMALLOC3" -
ac_configure_args="$_SUBDIR_CONFIG_ARGS"
fi
dnl Build libunwind for Android profiling builds
if test "$OS_TARGET" = "Android" -a "$MOZ_PROFILING"; then
old_ac_configure_arg="$ac_configure_args"
ac_configure_args="--build=${build} --host=${target_alias} --disable-shared --enable-block-signals=no"
if test "$MOZ_DEBUG"; then
ac_configure_args="$ac_configure_args --enable-debug"
fi
if test "$DSO_PIC_CFLAGS"; then
ac_configure_args="$ac_configure_args --with-pic"
fi
ac_configure_args="$ac_configure_args \
CC=\"$CC\" \
CXX=\"$CXX\" \
CPP=\"$CPP\" \
CFLAGS=\"$CFLAGS\" \
CXXFLAGS=\"$CXXFLAGS\" \
CPPFLAGS=\"$CPPFLAGS\" \
LD=\"$LD\" \
LDFLAGS=\"$LDFLAGS\" \
AR=\"$AR\" \
RANLIB=\"$RANLIB\" \
STRIP=\"$STRIP\" \
LIBS=\"$LIBS\""
# Use a separate cache file for libunwind, since it does not use caching.
mkdir -p $_objdir/tools/profiler/libunwind/src
old_cache_file=$cache_file
cache_file=$_objdir/tools/profiler/libunwind/src/config.cache
old_config_files=$CONFIG_FILES
unset CONFIG_FILES
AC_OUTPUT_SUBDIRS(tools/profiler/libunwind/src)
cache_file=$old_cache_file
ac_configure_args="$old_ac_configure_args"
CONFIG_FILES=$old_config_files
fi
# Run freetype configure script
if test "$MOZ_TREE_FREETYPE"; then

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

@ -1181,34 +1181,6 @@ public:
uint32_t aFlags,
uint32_t aWrapCol);
/**
* Creates a new XML document, which is marked to be loaded as data.
*
* @param aNamespaceURI Namespace for the root element to create and insert in
* the document. Only used if aQualifiedName is not
* empty.
* @param aQualifiedName Qualified name for the root element to create and
* insert in the document. If empty no root element will
* be created.
* @param aDoctype Doctype node to insert in the document.
* @param aDocumentURI URI of the document. Must not be null.
* @param aBaseURI Base URI of the document. Must not be null.
* @param aPrincipal Prinicpal of the document. Must not be null.
* @param aScriptObject The object from which the context for event handling
* can be got.
* @param aFlavor Select the kind of document to create.
* @param aResult [out] The document that was created.
*/
static nsresult CreateDocument(const nsAString& aNamespaceURI,
const nsAString& aQualifiedName,
nsIDOMDocumentType* aDoctype,
nsIURI* aDocumentURI,
nsIURI* aBaseURI,
nsIPrincipal* aPrincipal,
nsIScriptGlobalObject* aScriptObject,
DocumentFlavor aFlavor,
nsIDOMDocument** aResult);
/**
* Sets the text contents of a node by replacing all existing children
* with a single text child.

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

@ -119,12 +119,12 @@ DOMImplementation::CreateDocument(const nsAString& aNamespaceURI,
nsCOMPtr<nsIDOMDocument> document;
rv = nsContentUtils::CreateDocument(aNamespaceURI, aQualifiedName, aDoctype,
mDocumentURI, mBaseURI,
mOwner->NodePrincipal(),
scriptHandlingObject,
DocumentFlavorLegacyGuess,
getter_AddRefs(document));
rv = NS_NewDOMDocument(getter_AddRefs(document),
aNamespaceURI, aQualifiedName, aDoctype,
mDocumentURI, mBaseURI,
mOwner->NodePrincipal(),
true, scriptHandlingObject,
DocumentFlavorLegacyGuess);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDocument> doc = do_QueryInterface(document);
@ -186,12 +186,12 @@ DOMImplementation::CreateHTMLDocument(const nsAString& aTitle,
NS_ENSURE_STATE(!mScriptObject || scriptHandlingObject);
nsCOMPtr<nsIDOMDocument> document;
rv = nsContentUtils::CreateDocument(EmptyString(), EmptyString(),
doctype, mDocumentURI, mBaseURI,
mOwner->NodePrincipal(),
scriptHandlingObject,
DocumentFlavorLegacyGuess,
getter_AddRefs(document));
rv = NS_NewDOMDocument(getter_AddRefs(document),
EmptyString(), EmptyString(),
doctype, mDocumentURI, mBaseURI,
mOwner->NodePrincipal(),
true, scriptHandlingObject,
DocumentFlavorLegacyGuess);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDocument> doc = do_QueryInterface(document);

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

@ -3594,27 +3594,10 @@ nsContentUtils::ConvertStringFromCharset(const nsACString& aCharset,
const char* data = flatInput.get();
aOutput.Truncate();
for (;;) {
int32_t srcLen = length;
int32_t dstLen = outLen;
rv = decoder->Convert(data, &srcLen, ustr, &dstLen);
// Convert will convert the input partially even if the status
// indicates a failure.
ustr[dstLen] = 0;
aOutput.Append(ustr, dstLen);
if (rv != NS_ERROR_ILLEGAL_INPUT) {
break;
}
// Emit a decode error manually because some decoders
// do not support kOnError_Recover (bug 638379)
if (srcLen == -1) {
decoder->Reset();
} else {
data += srcLen + 1;
length -= srcLen + 1;
aOutput.Append(static_cast<PRUnichar>(0xFFFD));
}
}
rv = decoder->Convert(data, &length, ustr, &outLen);
MOZ_ASSERT(rv != NS_ERROR_ILLEGAL_INPUT);
ustr[outLen] = 0;
aOutput.Append(ustr, outLen);
nsMemory::Free(ustr);
return rv;
@ -4274,15 +4257,16 @@ nsContentUtils::ConvertToPlainText(const nsAString& aSourceBuffer,
nsCOMPtr<nsIPrincipal> principal =
do_CreateInstance(NS_NULLPRINCIPAL_CONTRACTID);
nsCOMPtr<nsIDOMDocument> domDocument;
nsresult rv = nsContentUtils::CreateDocument(EmptyString(),
EmptyString(),
nullptr,
uri,
uri,
principal,
nullptr,
DocumentFlavorHTML,
getter_AddRefs(domDocument));
nsresult rv = NS_NewDOMDocument(getter_AddRefs(domDocument),
EmptyString(),
EmptyString(),
nullptr,
uri,
uri,
principal,
true,
nullptr,
DocumentFlavorHTML);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDocument> document = do_QueryInterface(domDocument);
@ -4301,22 +4285,6 @@ nsContentUtils::ConvertToPlainText(const nsAString& aSourceBuffer,
return encoder->EncodeToString(aResultBuffer);
}
/* static */
nsresult
nsContentUtils::CreateDocument(const nsAString& aNamespaceURI,
const nsAString& aQualifiedName,
nsIDOMDocumentType* aDoctype,
nsIURI* aDocumentURI, nsIURI* aBaseURI,
nsIPrincipal* aPrincipal,
nsIScriptGlobalObject* aEventObject,
DocumentFlavor aFlavor,
nsIDOMDocument** aResult)
{
return NS_NewDOMDocument(aResult, aNamespaceURI, aQualifiedName,
aDoctype, aDocumentURI, aBaseURI, aPrincipal,
true, aEventObject, aFlavor);
}
/* static */
nsresult
nsContentUtils::SetNodeTextContent(nsIContent* aContent,

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

@ -501,10 +501,10 @@ nsDOMParser::SetUpDocument(DocumentFlavor aFlavor, nsIDOMDocument** aResult)
// work if the document has a null principal, so use
// mOriginalPrincipal when creating the document, then reset the
// principal.
return nsContentUtils::CreateDocument(EmptyString(), EmptyString(), nullptr,
mDocumentURI, mBaseURI,
mOriginalPrincipal,
scriptHandlingObject,
aFlavor,
aResult);
return NS_NewDOMDocument(aResult, EmptyString(), EmptyString(), nullptr,
mDocumentURI, mBaseURI,
mOriginalPrincipal,
true,
scriptHandlingObject,
aFlavor);
}

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

@ -301,7 +301,6 @@ nsEventSource::Init(nsIPrincipal* aPrincipal,
rv = convManager->GetUnicodeDecoder("UTF-8", getter_AddRefs(mUnicodeDecoder));
NS_ENSURE_SUCCESS(rv, rv);
mUnicodeDecoder->SetInputErrorBehavior(nsIUnicodeDecoder::kOnError_Recover);
// the constructor should throw a SYNTAX_ERROR only if it fails resolving the
// url parameter, so we don't care about the InitChannelAndRequestEventSource
@ -503,32 +502,17 @@ nsEventSource::StreamReaderFunc(nsIInputStream *aInputStream,
thisObject->mLastConvertionResult =
thisObject->mUnicodeDecoder->Convert(p, &srcCount, out, &outCount);
MOZ_ASSERT(thisObject->mLastConvertionResult != NS_ERROR_ILLEGAL_INPUT);
if (thisObject->mLastConvertionResult == NS_ERROR_ILLEGAL_INPUT) {
// There's an illegal byte in the input. It's now the responsibility
// of this calling code to output a U+FFFD REPLACEMENT CHARACTER, advance
// over the bad byte and reset the decoder.
rv = thisObject->ParseCharacter(REPLACEMENT_CHAR);
for (int32_t i = 0; i < outCount; ++i) {
rv = thisObject->ParseCharacter(out[i]);
NS_ENSURE_SUCCESS(rv, rv);
p = p + srcCount + 1;
thisObject->mUnicodeDecoder->Reset();
} else {
for (int32_t i = 0; i < outCount; ++i) {
rv = thisObject->ParseCharacter(out[i]);
NS_ENSURE_SUCCESS(rv, rv);
}
p = p + srcCount;
}
p = p + srcCount;
} while (p < end &&
thisObject->mLastConvertionResult != NS_PARTIAL_MORE_INPUT &&
thisObject->mLastConvertionResult != NS_OK);
// check if the last byte was a bad one and
// clear the state since it was handled above.
if (thisObject->mLastConvertionResult == NS_ERROR_ILLEGAL_INPUT) {
thisObject->mLastConvertionResult = NS_OK;
}
*aWriteCount = aCount;
return NS_OK;
}

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

@ -700,6 +700,7 @@ GK_ATOM(ondragstart, "ondragstart")
GK_ATOM(ondrop, "ondrop")
GK_ATOM(onenabled, "onenabled")
GK_ATOM(onerror, "onerror")
GK_ATOM(onfailed, "onfailed")
GK_ATOM(onfocus, "onfocus")
GK_ATOM(onget, "onget")
GK_ATOM(onhashchange, "onhashchange")
@ -766,6 +767,7 @@ GK_ATOM(onMozBeforeResize, "onMozBeforeResize")
GK_ATOM(onresize, "onresize")
GK_ATOM(onscroll, "onscroll")
GK_ATOM(onselect, "onselect")
GK_ATOM(onsending, "onsending")
GK_ATOM(onsent, "onsent")
GK_ATOM(onset, "onset")
GK_ATOM(onshow, "onshow")

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

@ -1073,31 +1073,11 @@ nsScriptLoader::ConvertToUTF16(nsIChannel* aChannel, const uint8_t* aData,
PRUnichar *ustr = aString.BeginWriting();
int32_t consumedLength = 0;
int32_t originalLength = aLength;
int32_t convertedLength = 0;
int32_t bufferLength = unicodeLength;
do {
rv = unicodeDecoder->Convert(reinterpret_cast<const char*>(aData),
(int32_t *) &aLength, ustr,
&unicodeLength);
if (NS_FAILED(rv)) {
// if we failed, we consume one byte, replace it with U+FFFD
// and try the conversion again.
ustr[unicodeLength++] = (PRUnichar)0xFFFD;
ustr += unicodeLength;
unicodeDecoder->Reset();
}
aData += ++aLength;
consumedLength += aLength;
aLength = originalLength - consumedLength;
convertedLength += unicodeLength;
unicodeLength = bufferLength - convertedLength;
} while (NS_FAILED(rv) &&
(originalLength > consumedLength) &&
(bufferLength > convertedLength));
aString.SetLength(convertedLength);
rv = unicodeDecoder->Convert(reinterpret_cast<const char*>(aData),
(int32_t *) &aLength, ustr,
&unicodeLength);
MOZ_ASSERT(NS_SUCCEEDED(rv));
aString.SetLength(unicodeLength);
return rv;
}

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

@ -788,36 +788,15 @@ nsXMLHttpRequest::AppendToResponseText(const char * aSrcBuffer,
// This code here is basically a copy of a similar thing in
// nsScanner::Append(const char* aBuffer, uint32_t aLen).
// If we get illegal characters in the input we replace
// them and don't just fail.
do {
int32_t srclen = (int32_t)aSrcBufferLen;
int32_t destlen = (int32_t)destBufferLen;
rv = mDecoder->Convert(aSrcBuffer,
&srclen,
destBuffer,
&destlen);
if (NS_FAILED(rv)) {
// We consume one byte, replace it with U+FFFD
// and try the conversion again.
int32_t srclen = (int32_t)aSrcBufferLen;
int32_t destlen = (int32_t)destBufferLen;
rv = mDecoder->Convert(aSrcBuffer,
&srclen,
destBuffer,
&destlen);
MOZ_ASSERT(NS_SUCCEEDED(rv));
destBuffer[destlen] = (PRUnichar)0xFFFD; // add replacement character
destlen++; // skip written replacement character
destBuffer += destlen;
destBufferLen -= destlen;
if (srclen < (int32_t)aSrcBufferLen) {
srclen++; // Consume the invalid character
}
aSrcBuffer += srclen;
aSrcBufferLen -= srclen;
mDecoder->Reset();
}
totalChars += destlen;
} while (NS_FAILED(rv) && aSrcBufferLen > 0);
totalChars += destlen;
mResponseText.SetLength(totalChars);
@ -2186,11 +2165,11 @@ nsXMLHttpRequest::OnStartRequest(nsIRequest *request, nsISupports *ctxt)
const nsAString& emptyStr = EmptyString();
nsCOMPtr<nsIScriptGlobalObject> global = do_QueryInterface(GetOwner());
nsCOMPtr<nsIDOMDocument> responseDoc;
rv = nsContentUtils::CreateDocument(emptyStr, emptyStr, nullptr, docURI,
baseURI, mPrincipal, global,
mIsHtml ? DocumentFlavorHTML :
DocumentFlavorLegacyGuess,
getter_AddRefs(responseDoc));
rv = NS_NewDOMDocument(getter_AddRefs(responseDoc),
emptyStr, emptyStr, nullptr, docURI,
baseURI, mPrincipal, true, global,
mIsHtml ? DocumentFlavorHTML :
DocumentFlavorLegacyGuess);
NS_ENSURE_SUCCESS(rv, rv);
mResponseXML = do_QueryInterface(responseDoc);
mResponseXML->SetPrincipal(documentPrincipal);

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

@ -0,0 +1,5 @@
<!doctype="html">
<body>
<script>
document.body.onerror = null;
</script>

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

@ -43,3 +43,4 @@ load 795221-4.html
load 795221-5.xml
load 798802-1.html
load 811226.html
load 819745.html

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

@ -1892,8 +1892,10 @@ nsGenericHTMLElement::SetOn##name_(EventHandlerNonNull* handler, \
\
nsCOMPtr<nsISupports> supports = do_QueryInterface(win); \
nsGlobalWindow* globalWin = nsGlobalWindow::FromSupports(supports); \
nsRefPtr<OnErrorEventHandlerNonNull> errorHandler = \
new OnErrorEventHandlerNonNull(handler); \
nsRefPtr<OnErrorEventHandlerNonNull> errorHandler; \
if (handler) { \
errorHandler = new OnErrorEventHandlerNonNull(handler); \
} \
return globalWin->SetOn##name_(errorHandler, error); \
} \
\

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

@ -1050,6 +1050,7 @@ AudioClock::AudioClock(AudioStream* aStream)
mBasePosition(0),
mBaseOffset(0),
mOldBaseOffset(0),
mOldBasePosition(0),
mPlaybackRateChangeOffset(0),
mPreviousPosition(0),
mWritten(0),
@ -1065,6 +1066,7 @@ void AudioClock::Init()
mOutRate = mAudioStream->GetRate();
mInRate = mAudioStream->GetRate();
mPlaybackRate = 1.0;
mOldOutRate = mOutRate;
}
void AudioClock::UpdateWritePosition(uint32_t aCount)

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

@ -7,6 +7,7 @@
#include <fcntl.h>
#include "base/basictypes.h"
#include <cutils/properties.h>
#include <stagefright/DataSource.h>
#include <stagefright/MediaExtractor.h>
#include <stagefright/MetaData.h>
@ -232,21 +233,51 @@ bool OmxDecoder::Init() {
if (videoTrackIndex != -1 && (videoTrack = extractor->getTrack(videoTrackIndex)) != nullptr) {
int flags = 0; // prefer hw codecs
// XXX is this called off the main thread?
if (mozilla::Preferences::GetBool("media.omx.prefer_software_codecs", false)) {
flags |= kPreferSoftwareCodecs;
}
videoSource = OMXCodec::Create(GetOMX(),
videoTrack->getFormat(),
false, // decoder
videoTrack,
nullptr,
flags,
mNativeWindow);
if (videoSource == nullptr) {
NS_WARNING("Couldn't create OMX video source");
return false;
}
do {
videoSource = OMXCodec::Create(GetOMX(),
videoTrack->getFormat(),
false, // decoder
videoTrack,
nullptr,
flags,
mNativeWindow);
if (videoSource == nullptr) {
NS_WARNING("Couldn't create OMX video source");
return false;
}
if (flags & kSoftwareCodecsOnly) {
break;
}
// Check if this video is sized such that we're comfortable
// possibly using a hardware decoder. If we can't get the size,
// fall back on SW to be safe.
int32_t maxWidth, maxHeight;
char propValue[PROPERTY_VALUE_MAX];
property_get("ro.moz.omx.hw.max_width", propValue, "-1");
maxWidth = atoi(propValue);
property_get("ro.moz.omx.hw.max_height", propValue, "-1");
maxHeight = atoi(propValue);
int32_t width = -1, height = -1;
if (maxWidth > 0 && maxHeight > 0 &&
!(videoSource->getFormat()->findInt32(kKeyWidth, &width) &&
videoSource->getFormat()->findInt32(kKeyHeight, &height) &&
width * height <= maxWidth * maxHeight)) {
printf_stderr("Failed to get video size, or it was too large for HW decoder (<w=%d, h=%d> but <maxW=%d, maxH=%d>)",
width, height, maxWidth, maxHeight);
videoSource.clear();
flags |= kSoftwareCodecsOnly;
continue;
}
break;
} while(true);
if (videoSource->start() != OK) {
NS_WARNING("Couldn't start OMX video source");

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

@ -69,7 +69,9 @@ class OmxDecoder {
typedef mozilla::AbstractMediaDecoder AbstractMediaDecoder;
enum {
kPreferSoftwareCodecs = 1
kPreferSoftwareCodecs = 1,
kSoftwareCodecsOnly = 8,
kHardwareCodecsOnly = 16,
};
AbstractMediaDecoder *mDecoder;

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

@ -152,7 +152,22 @@ static const char* GetOmxLibraryName()
ALOG("Android Release Version is: %s", NS_LossyConvertUTF16toASCII(release_version).get());
}
if (version == 13 || version == 12 || version == 11) {
nsAutoString device;
rv = infoService->GetPropertyAsAString(NS_LITERAL_STRING("device"), device);
if (NS_SUCCEEDED(rv)) {
ALOG("Android Device is: %s", NS_LossyConvertUTF16toASCII(device).get());
}
if (version == 15 &&
(device.Find("LT28", false) == 0 ||
device.Find("LT26", false) == 0 ||
device.Find("LT22", false) == 0 ||
device.Find("IS12", false) == 0 ||
device.Find("MT27", false) == 0)) {
// Sony Ericsson devices running ICS
return "lib/libomxpluginsony.so";
}
else if (version == 13 || version == 12 || version == 11) {
return "lib/libomxpluginhc.so";
}
else if (version == 10 && release_version >= NS_LITERAL_STRING("2.3.6")) {

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

@ -28,12 +28,12 @@
* function will be called in order and a comparison of the output will be
* performed. This allows changes to be made to the datasource to ensure that
* the generated template output has been updated. Within the expected output
* e4x data, the step attribute may be set to a number on an element to
* indicate that an element only applies before or after a particular change.
* If step is set to a positive number, that element will only exist after
* that step in the list of changes made. If step is set to a negative number,
* that element will only exist until that step. Steps are numbered starting
* at 1. For example:
* XML, the step attribute may be set to a number on an element to indicate
* that an element only applies before or after a particular change. If step
* is set to a positive number, that element will only exist after that step in
* the list of changes made. If step is set to a negative number, that element
* will only exist until that step. Steps are numbered starting at 1. For
* example:
* <label value="Cat"/>
* <label step="2" value="Dog"/>
* <label step="-5" value="Mouse"/>
@ -138,7 +138,7 @@ function iterateChanged(root, ds)
function checkResults(root, step)
{
var output = expectedOutput.copy();
var output = expectedOutput.cloneNode(true);
setForCurrentStep(output, step);
var error;
@ -147,7 +147,8 @@ function checkResults(root, step)
// convert the tree's view data into the equivalent DOM structure
// for easier comparison
actualoutput = treeViewToDOM(root);
error = compareOutput(actualoutput, output.treechildren, false);
var treechildrenElements = [e for (e of output.children) if (e.localName === "treechildren")];
error = compareOutput(actualoutput, treechildrenElements[0], false);
}
else {
error = compareOutput(actualoutput, output, true);
@ -178,7 +179,7 @@ function checkResults(root, step)
serializedXML = serializedXML.replace(nsrepl, "");
if (debug)
dump("-------- " + adjtestid + " " + error + ":\n" + serializedXML + "\n");
if (error)
if (!stilltodo && error)
is(serializedXML, "Same", "Error is: " + error);
}
}
@ -189,24 +190,29 @@ function checkResults(root, step)
function setForCurrentStep(content, currentStep)
{
var todelete = [];
for each (var child in content) {
var stepstr = child.@step.toString();
var stepsarr = stepstr.split(",");
for (var s = 0; s < stepsarr.length; s++) {
var step = parseInt(stepsarr[s]);
if ((step > 0 && step > currentStep) ||
(step < 0 && -step <= currentStep)) {
todelete.push(child);
for (var child of content.childNodes) {
if (child.nodeType === Node.ELEMENT_NODE) {
var stepstr = child.getAttribute("step") || "";
var stepsarr = stepstr.split(",");
for (var s = 0; s < stepsarr.length; s++) {
var step = parseInt(stepsarr[s]);
if ((step > 0 && step > currentStep) ||
(step < 0 && -step <= currentStep)) {
todelete.push(child);
}
}
} else if (child.nodeType === Node.TEXT_NODE) {
// Drop empty text nodes.
if (child.nodeValue.trim() === "")
todelete.push(child);
}
}
// delete node using this bizarre syntax, because e4x has a non-sensical api
for (var d = 0; d < todelete.length; d++)
delete content.*[todelete[d].childIndex()];
for each (var child in content) {
delete child.@step;
for (var e of todelete)
content.removeChild(e);
for (var child of content.children) {
child.removeAttribute("step");
setForCurrentStep(child, currentStep);
}
}
@ -220,52 +226,41 @@ function setForCurrentStep(content, currentStep)
*/
function compareOutput(actual, expected, isroot)
{
// The expected output may be enclosed in an <output> element if it contains
// several nodes. However, the <output> element may be omitted if there is
// only one node.
if (expected.localName() != "output" && isroot) {
// If there is no <output> element then only one node should have been
// generated by the template. The number of children should be one
// <template> node and one generated node.
if (actual.childNodes.length != 2)
return "incorrect child node count of root " +
(actual.childNodes.length - 1) + " expected 1";
return compareOutput(actual.lastChild, expected, false);
}
if (isroot && expected.localName != "data")
return "expected must be a <data> element";
var t;
// compare text nodes
if (expected.nodeKind() == "text") {
if (actual.nodeValue != expected.toString())
return "Text " + actual.nodeValue + " doesn't match " + expected.toString();
if (expected.nodeType == Node.TEXT_NODE) {
if (actual.nodeValue !== expected.nodeValue.trim())
return "Text " + actual.nodeValue + " doesn't match " + expected.nodeValue;
return "";
}
if (!isroot) {
var anyid = false;
// make sure that the tags match
if (actual.localName != expected.localName())
return "Tag name " + expected.localName() + " not found";
if (actual.localName != expected.localName)
return "Tag name " + expected.localName + " not found";
// loop through the attributes in the expected node and compare their
// values with the corresponding attribute on the actual node
var expectedAttrs = expected.attributes();
for (var a = 0; a < expectedAttrs.length(); a++) {
var expectedAttrs = expected.attributes;
for (var a = 0; a < expectedAttrs.length; a++) {
var attr = expectedAttrs[a];
expectedAttrs.length(); // not having this causes a script error
var expectval = "" + attr;
var expectval = attr.value;
// skip checking the id when anyid="true", however make sure to
// ensure that the id is actually present.
if (attr.name() == "anyid" && expectval == "true") {
if (attr.name == "anyid" && expectval == "true") {
anyid = true;
if (!actual.hasAttribute("id"))
return "expected id attribute";
}
else if (actual.getAttribute(attr.name()) != expectval) {
return "attribute " + attr.name() + " is '" +
actual.getAttribute(attr.name()) + "' instead of '" + expectval + "'";
else if (actual.getAttribute(attr.name) != expectval) {
return "attribute " + attr.name + " is '" +
actual.getAttribute(attr.name) + "' instead of '" + expectval + "'";
}
}
@ -274,7 +269,7 @@ function compareOutput(actual, expected, isroot)
var length = actual.attributes.length;
for (t = 0; t < length; t++) {
var aattr = actual.attributes[t];
var expectval = "" + expected.@[aattr.name];
var expectval = expected.getAttribute(aattr.name);
// ignore some attributes that don't matter
if (expectval != actual.getAttribute(aattr.name) &&
aattr.name != "staticHint" && aattr.name != "xmlns" &&
@ -286,12 +281,12 @@ function compareOutput(actual, expected, isroot)
// ensure that the node has the right number of children. Subtract one for
// the root node to account for the <template> node.
length = actual.childNodes.length - (isroot ? 1 : 0);
if (length != expected.children().length())
if (length != expected.childNodes.length)
return "incorrect child node count of " + actual.localName + " " + length +
" expected " + expected.children().length();
" expected " + expected.childNodes.length;
// if <output unordered="true"> is used, then the child nodes may be in any order
var unordered = (expected.localName() == "output" && expected.@unordered == "true");
// if <data unordered="true"> is used, then the child nodes may be in any order
var unordered = (expected.localName == "data" && expected.getAttribute("unordered") == "true");
// next, loop over the children and call compareOutput recursively on each one
var adj = 0;
@ -305,15 +300,15 @@ function compareOutput(actual, expected, isroot)
else {
var output = "unexpected";
if (unordered) {
var expectedChildren = expected.children();
for (var e = 0; e < expectedChildren.length(); e++) {
var expectedChildren = expected.childNodes;
for (var e = 0; e < expectedChildren.length; e++) {
output = compareOutput(actualnode, expectedChildren[e], false);
if (!output)
break;
}
}
else {
output = compareOutput(actualnode, expected.children()[t - adj], false);
output = compareOutput(actualnode, expected.childNodes[t - adj], false);
}
// an error was returned, so return early
@ -330,7 +325,6 @@ function compareOutput(actual, expected, isroot)
*/
function copyRDFDataSource(root, sourceds)
{
var sourceds;
var dsourcesArr = [];
var composite = root.database;
var dsources = composite.GetDataSources();

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

@ -14,6 +14,13 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<label step="-2" id="http://www.some-fictitious-zoo.com/humans/sarah" value="Sarah "/>
<label step="2" id="http://www.some-fictitious-zoo.com/humans/sarah" value="Sarah Yarmouth"/>
<label step="-1" id="http://www.some-fictitious-zoo.com/humans/robert" value="Robert Sanderson"/>
<label step="1" id="http://www.some-fictitious-zoo.com/humans/robert" value="Robert "/>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,13 +33,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output>
<label step="-2" id="http://www.some-fictitious-zoo.com/humans/sarah" value="Sarah "/>
<label step="2" id="http://www.some-fictitious-zoo.com/humans/sarah" value="Sarah Yarmouth"/>
<label step="-1" id="http://www.some-fictitious-zoo.com/humans/robert" value="Robert Sanderson"/>
<label step="1" id="http://www.some-fictitious-zoo.com/humans/robert" value="Robert "/>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [
// step 1

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

@ -14,6 +14,18 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<button id="http://www.some-fictitious-zoo.com/arachnids" container="true" empty="false" label="Arachnids "/>
<button step="-2" id="http://www.some-fictitious-zoo.com/birds" container="true" empty="false" label="Birds Sarah "/>
<button step="2" id="http://www.some-fictitious-zoo.com/birds" container="true" empty="false" label="Birds Sarah Yarmouth"/>
<button step="-1" id="http://www.some-fictitious-zoo.com/crustaceans" container="true" empty="true" label="Crustaceans Robert Sanderson"/>
<button step="1" id="http://www.some-fictitious-zoo.com/crustaceans" container="true" empty="true" label="Crustaceans Robert "/>
<button id="http://www.some-fictitious-zoo.com/fish" container="true" empty="false" label="Fish "/>
<button id="http://www.some-fictitious-zoo.com/mammals" container="true" empty="false" label="Mammals "/>
<button step="-1" id="http://www.some-fictitious-zoo.com/reptiles" container="true" empty="false" label="Reptiles Robert Sanderson"/>
<button step="1" id="http://www.some-fictitious-zoo.com/reptiles" container="true" empty="false" label="Reptiles Robert "/>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,18 +38,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output>
<button id="http://www.some-fictitious-zoo.com/arachnids" container="true" empty="false" label="Arachnids "/>
<button step="-2" id="http://www.some-fictitious-zoo.com/birds" container="true" empty="false" label="Birds Sarah "/>
<button step="2" id="http://www.some-fictitious-zoo.com/birds" container="true" empty="false" label="Birds Sarah Yarmouth"/>
<button step="-1" id="http://www.some-fictitious-zoo.com/crustaceans" container="true" empty="true" label="Crustaceans Robert Sanderson"/>
<button step="1" id="http://www.some-fictitious-zoo.com/crustaceans" container="true" empty="true" label="Crustaceans Robert "/>
<button id="http://www.some-fictitious-zoo.com/fish" container="true" empty="false" label="Fish "/>
<button id="http://www.some-fictitious-zoo.com/mammals" container="true" empty="false" label="Mammals "/>
<button step="-1" id="http://www.some-fictitious-zoo.com/reptiles" container="true" empty="false" label="Reptiles Robert Sanderson"/>
<button step="1" id="http://www.some-fictitious-zoo.com/reptiles" container="true" empty="false" label="Reptiles Robert "/>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [
// step 1

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

@ -14,6 +14,13 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<label step="-2" id="http://www.some-fictitious-zoo.com/humans/sarah" value="First Name: Sarah Last Name: "/>
<label step="2" id="http://www.some-fictitious-zoo.com/humans/sarah" value="First Name: Sarah Last Name: Yarmouth"/>
<label step="-1" id="http://www.some-fictitious-zoo.com/humans/robert" value="First Name: Robert Last Name: Sanderson"/>
<label step="1" id="http://www.some-fictitious-zoo.com/humans/robert" value="First Name: Robert Last Name: "/>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,13 +33,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output>
<label step="-2" id="http://www.some-fictitious-zoo.com/humans/sarah" value="First Name: Sarah Last Name: "/>
<label step="2" id="http://www.some-fictitious-zoo.com/humans/sarah" value="First Name: Sarah Last Name: Yarmouth"/>
<label step="-1" id="http://www.some-fictitious-zoo.com/humans/robert" value="First Name: Robert Last Name: Sanderson"/>
<label step="1" id="http://www.some-fictitious-zoo.com/humans/robert" value="First Name: Robert Last Name: "/>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [
// step 1

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

@ -14,6 +14,11 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<label id="http://www.some-fictitious-zoo.com/humans/sarah" value="First Name: Sarah Last Name: "/>
<label id="http://www.some-fictitious-zoo.com/humans/robert" value="First Name: Robert Last Name: "/>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,11 +31,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output>
<label id="http://www.some-fictitious-zoo.com/humans/sarah" value="First Name: Sarah Last Name: "/>
<label id="http://www.some-fictitious-zoo.com/humans/robert" value="First Name: Robert Last Name: "/>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [];
]]>

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

@ -14,6 +14,11 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<label id="http://www.some-fictitious-zoo.com/humans/sarah" value="First Name: Sarah Last Name: "/>
<label id="http://www.some-fictitious-zoo.com/humans/robert" value="First Name: Robert Last Name: "/>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,11 +31,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output>
<label id="http://www.some-fictitious-zoo.com/humans/sarah" value="First Name: Sarah Last Name: "/>
<label id="http://www.some-fictitious-zoo.com/humans/robert" value="First Name: Robert Last Name: "/>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [];
]]>

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

@ -14,6 +14,15 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<button step="3" id="http://www.some-fictitious-zoo.com/birds/wren" label="http://www.some-fictitious-zoo.com/birds http://www.some-fictitious-zoo.com/birds/wren"/>
<button id="http://www.some-fictitious-zoo.com/birds/emu" label="http://www.some-fictitious-zoo.com/birds http://www.some-fictitious-zoo.com/birds/emu"/>
<button step="-4" id="http://www.some-fictitious-zoo.com/birds/barnowl" label="http://www.some-fictitious-zoo.com/birds http://www.some-fictitious-zoo.com/birds/barnowl"/>
<button id="http://www.some-fictitious-zoo.com/birds/raven" label="http://www.some-fictitious-zoo.com/birds http://www.some-fictitious-zoo.com/birds/raven"/>
<button step="2" id="http://www.some-fictitious-zoo.com/birds/archaeopteryx" label="http://www.some-fictitious-zoo.com/birds http://www.some-fictitious-zoo.com/birds/archaeopteryx"/>
<button step="1" id="http://www.some-fictitious-zoo.com/birds/emperorpenguin" label="http://www.some-fictitious-zoo.com/birds http://www.some-fictitious-zoo.com/birds/emperorpenguin"/>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,15 +35,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output>
<button step="3" id="http://www.some-fictitious-zoo.com/birds/wren" label="http://www.some-fictitious-zoo.com/birds http://www.some-fictitious-zoo.com/birds/wren"/>
<button id="http://www.some-fictitious-zoo.com/birds/emu" label="http://www.some-fictitious-zoo.com/birds http://www.some-fictitious-zoo.com/birds/emu"/>
<button step="-4" id="http://www.some-fictitious-zoo.com/birds/barnowl" label="http://www.some-fictitious-zoo.com/birds http://www.some-fictitious-zoo.com/birds/barnowl"/>
<button id="http://www.some-fictitious-zoo.com/birds/raven" label="http://www.some-fictitious-zoo.com/birds http://www.some-fictitious-zoo.com/birds/raven"/>
<button step="2" id="http://www.some-fictitious-zoo.com/birds/archaeopteryx" label="http://www.some-fictitious-zoo.com/birds http://www.some-fictitious-zoo.com/birds/archaeopteryx"/>
<button step="1" id="http://www.some-fictitious-zoo.com/birds/emperorpenguin" label="http://www.some-fictitious-zoo.com/birds http://www.some-fictitious-zoo.com/birds/emperorpenguin"/>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [
// step 1

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

@ -14,6 +14,12 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<button id="http://www.some-fictitious-zoo.com/birds/emu" label="http://www.some-fictitious-zoo.com/birds "/>
<button id="http://www.some-fictitious-zoo.com/birds/barnowl" label="http://www.some-fictitious-zoo.com/birds "/>
<button id="http://www.some-fictitious-zoo.com/birds/raven" label="http://www.some-fictitious-zoo.com/birds "/>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,12 +32,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output>
<button id="http://www.some-fictitious-zoo.com/birds/emu" label="http://www.some-fictitious-zoo.com/birds "/>
<button id="http://www.some-fictitious-zoo.com/birds/barnowl" label="http://www.some-fictitious-zoo.com/birds "/>
<button id="http://www.some-fictitious-zoo.com/birds/raven" label="http://www.some-fictitious-zoo.com/birds "/>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [];
]]>

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

@ -14,6 +14,14 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output" unordered="true">
<checkbox step="-1" id="http://www.some-fictitious-zoo.com/arachnids/tarantula" label="Tarantula"/>
<checkbox step="2" id="http://www.some-fictitious-zoo.com/mammals/lion" label="Lion"/>
<checkbox id="http://www.some-fictitious-zoo.com/reptiles/anaconda" label="Anaconda"/>
<checkbox id="http://www.some-fictitious-zoo.com/reptiles/chameleon" label="Chameleon"/>
<checkbox id="http://www.some-fictitious-zoo.com/mammals/africanelephant" label="African Elephant"/>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,14 +34,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output unordered="true">
<checkbox step="-1" id="http://www.some-fictitious-zoo.com/arachnids/tarantula" label="Tarantula"/>
<checkbox step="2" id="http://www.some-fictitious-zoo.com/mammals/lion" label="Lion"/>
<checkbox id="http://www.some-fictitious-zoo.com/reptiles/anaconda" label="Anaconda"/>
<checkbox id="http://www.some-fictitious-zoo.com/reptiles/chameleon" label="Chameleon"/>
<checkbox id="http://www.some-fictitious-zoo.com/mammals/africanelephant" label="African Elephant"/>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [
// step 1

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

@ -14,6 +14,12 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<button id="http://www.some-fictitious-zoo.com/birds/emu" label="http://www.some-fictitious-zoo.com/birds"/>
<button id="http://www.some-fictitious-zoo.com/birds/barnowl" label="http://www.some-fictitious-zoo.com/birds"/>
<button id="http://www.some-fictitious-zoo.com/birds/raven" label="http://www.some-fictitious-zoo.com/birds"/>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,12 +32,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output>
<button id="http://www.some-fictitious-zoo.com/birds/emu" label="http://www.some-fictitious-zoo.com/birds"/>
<button id="http://www.some-fictitious-zoo.com/birds/barnowl" label="http://www.some-fictitious-zoo.com/birds"/>
<button id="http://www.some-fictitious-zoo.com/birds/raven" label="http://www.some-fictitious-zoo.com/birds"/>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [];
]]>

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

@ -14,6 +14,15 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<label step="3" id="http://www.some-fictitious-zoo.com/birds/wren" value="Wren"/>
<label id="http://www.some-fictitious-zoo.com/birds/emu" value="Emu"/>
<label step="-4" id="http://www.some-fictitious-zoo.com/birds/barnowl" value="Barn Owl"/>
<label id="http://www.some-fictitious-zoo.com/birds/raven" value="Raven"/>
<label step="2" id="http://www.some-fictitious-zoo.com/birds/archaeopteryx" value="Archaeopteryx"/>
<label step="1" id="http://www.some-fictitious-zoo.com/birds/emperorpenguin" value="Emperor Penguin"/>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,15 +35,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output>
<label step="3" id="http://www.some-fictitious-zoo.com/birds/wren" value="Wren"/>
<label id="http://www.some-fictitious-zoo.com/birds/emu" value="Emu"/>
<label step="-4" id="http://www.some-fictitious-zoo.com/birds/barnowl" value="Barn Owl"/>
<label id="http://www.some-fictitious-zoo.com/birds/raven" value="Raven"/>
<label step="2" id="http://www.some-fictitious-zoo.com/birds/archaeopteryx" value="Archaeopteryx"/>
<label step="1" id="http://www.some-fictitious-zoo.com/birds/emperorpenguin" value="Emperor Penguin"/>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [
// step 1

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

@ -14,6 +14,8 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output"/>
<script src="templates_shared.js"/>
<script>
@ -26,8 +28,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output/>;
var expectedOutput = document.getElementById("output");
var changes = [];
]]>

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

@ -14,6 +14,15 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<label step="3" id="http://www.some-fictitious-zoo.com/birds/wren" value="Wren"/>
<label id="http://www.some-fictitious-zoo.com/birds/emu" value="Emu"/>
<label step="-4" id="http://www.some-fictitious-zoo.com/birds/barnowl" value="Barn Owl"/>
<label id="http://www.some-fictitious-zoo.com/birds/raven" value="Raven"/>
<label step="2" id="http://www.some-fictitious-zoo.com/birds/archaeopteryx" value="Archaeopteryx"/>
<label step="1" id="http://www.some-fictitious-zoo.com/birds/emperorpenguin" value="Emperor Penguin"/>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,15 +35,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output>
<label step="3" id="http://www.some-fictitious-zoo.com/birds/wren" value="Wren"/>
<label id="http://www.some-fictitious-zoo.com/birds/emu" value="Emu"/>
<label step="-4" id="http://www.some-fictitious-zoo.com/birds/barnowl" value="Barn Owl"/>
<label id="http://www.some-fictitious-zoo.com/birds/raven" value="Raven"/>
<label step="2" id="http://www.some-fictitious-zoo.com/birds/archaeopteryx" value="Archaeopteryx"/>
<label step="1" id="http://www.some-fictitious-zoo.com/birds/emperorpenguin" value="Emperor Penguin"/>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [
// step 1

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

@ -14,6 +14,10 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<label id="http://www.some-fictitious-zoo.com/humans/robert" value="Robert Sanderson"/>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,10 +30,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output>
<label id="http://www.some-fictitious-zoo.com/humans/robert" value="Robert Sanderson"/>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [];
]]>

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

@ -14,6 +14,10 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<label id="http://www.some-fictitious-zoo.com/arachnids/tarantula" value=""/>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,8 +30,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<label id="http://www.some-fictitious-zoo.com/arachnids/tarantula" value=""/>;
var expectedOutput = document.getElementById("output");
var changes = [];
]]>

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

@ -14,6 +14,22 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<vbox id="http://www.some-fictitious-zoo.com/humans/sarah">
<label value="The favorite animals of Sarah"/>
<label id="http://www.some-fictitious-zoo.com/birds/emu" class="indent" value="Emu which belongs to the class Birds"/>
<label id="http://www.some-fictitious-zoo.com/mammals/polarbear" class="indent" value="Polar Bear which belongs to the class Mammals"/>
<label id="http://www.some-fictitious-zoo.com/arachnids/tarantula" class="indent" value="Tarantula which belongs to the class Arachnids"/>
</vbox>
<vbox id="http://www.some-fictitious-zoo.com/humans/robert">
<label value="The favorite animals of Robert"/>
<label id="http://www.some-fictitious-zoo.com/arachnids/tarantula" class="indent" value="Tarantula which belongs to the class Arachnids"/>
<label id="http://www.some-fictitious-zoo.com/reptiles/anaconda" class="indent" value="Anaconda which belongs to the class Reptiles"/>
<label id="http://www.some-fictitious-zoo.com/reptiles/chameleon" class="indent" value="Chameleon which belongs to the class Reptiles"/>
<label id="http://www.some-fictitious-zoo.com/mammals/africanelephant" class="indent" value="African Elephant which belongs to the class Mammals"/>
</vbox>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,22 +42,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output>
<vbox id="http://www.some-fictitious-zoo.com/humans/sarah">
<label value="The favorite animals of Sarah"/>
<label id="http://www.some-fictitious-zoo.com/birds/emu" class="indent" value="Emu which belongs to the class Birds"/>
<label id="http://www.some-fictitious-zoo.com/mammals/polarbear" class="indent" value="Polar Bear which belongs to the class Mammals"/>
<label id="http://www.some-fictitious-zoo.com/arachnids/tarantula" class="indent" value="Tarantula which belongs to the class Arachnids"/>
</vbox>
<vbox id="http://www.some-fictitious-zoo.com/humans/robert">
<label value="The favorite animals of Robert"/>
<label id="http://www.some-fictitious-zoo.com/arachnids/tarantula" class="indent" value="Tarantula which belongs to the class Arachnids"/>
<label id="http://www.some-fictitious-zoo.com/reptiles/anaconda" class="indent" value="Anaconda which belongs to the class Reptiles"/>
<label id="http://www.some-fictitious-zoo.com/reptiles/chameleon" class="indent" value="Chameleon which belongs to the class Reptiles"/>
<label id="http://www.some-fictitious-zoo.com/mammals/africanelephant" class="indent" value="African Elephant which belongs to the class Mammals"/>
</vbox>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [];
]]>

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

@ -14,6 +14,14 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<groupbox>
<label id="http://www.some-fictitious-zoo.com/birds/emu" value="Emu"/>
<label id="http://www.some-fictitious-zoo.com/birds/barnowl" value="Barn Owl"/>
<label id="http://www.some-fictitious-zoo.com/birds/raven" value="Raven"/>
</groupbox>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,12 +34,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<groupbox>
<label id="http://www.some-fictitious-zoo.com/birds/emu" value="Emu"/>
<label id="http://www.some-fictitious-zoo.com/birds/barnowl" value="Barn Owl"/>
<label id="http://www.some-fictitious-zoo.com/birds/raven" value="Raven"/>
</groupbox>;
var expectedOutput = document.getElementById("output");
var changes = [];
]]>

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

@ -14,6 +14,10 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<label id="http://www.some-fictitious-zoo.com/arachnids/tarantula" value="Tarantula? - TarantulaTarantula^ Test"/>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,8 +30,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<label id="http://www.some-fictitious-zoo.com/arachnids/tarantula" value="Tarantula? - TarantulaTarantula^ Test"/>;
var expectedOutput = document.getElementById("output");
var changes = [];
]]>

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

@ -14,6 +14,30 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<columns>
<column/>
<column/>
</columns>
<rows>
<label step="3" id="http://www.some-fictitious-zoo.com/birds/wren" value="The coolest animal is: Wren"/>
<row id="http://www.some-fictitious-zoo.com/birds/emu">
<label value="Emu"/>
<label value="Birds"/>
</row>
<label step="-4" id="http://www.some-fictitious-zoo.com/birds/barnowl" value="The coolest animal is: Barn Owl"/>
<row id="http://www.some-fictitious-zoo.com/birds/raven">
<label value="Raven"/>
<label value="Birds"/>
</row>
<row step="2" id="http://www.some-fictitious-zoo.com/birds/archaeopteryx">
<label value="Archaeopteryx"/>
<label value="Birds"/>
</row>
<label step="1" id="http://www.some-fictitious-zoo.com/birds/emperorpenguin" value="The coolest animal is: Emperor Penguin"/>
</rows>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,30 +50,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output>
<columns>
<column/>
<column/>
</columns>
<rows>
<label step="3" id="http://www.some-fictitious-zoo.com/birds/wren" value="The coolest animal is: Wren"/>
<row id="http://www.some-fictitious-zoo.com/birds/emu">
<label value="Emu"/>
<label value="Birds"/>
</row>
<label step="-4" id="http://www.some-fictitious-zoo.com/birds/barnowl" value="The coolest animal is: Barn Owl"/>
<row id="http://www.some-fictitious-zoo.com/birds/raven">
<label value="Raven"/>
<label value="Birds"/>
</row>
<row step="2" id="http://www.some-fictitious-zoo.com/birds/archaeopteryx">
<label value="Archaeopteryx"/>
<label value="Birds"/>
</row>
<label step="1" id="http://www.some-fictitious-zoo.com/birds/emperorpenguin" value="The coolest animal is: Emperor Penguin"/>
</rows>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [
// step 1

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

@ -14,6 +14,42 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output" xmlns:html="http://www.w3.org/1999/xhtml">
<html:div id="http://www.some-fictitious-zoo.com/mammals/lion" title="Lion">
<html:em step="-2">4</html:em>
<html:em step="2">9</html:em>
</html:div>
<html:div id="http://www.some-fictitious-zoo.com/mammals/hippopotamus" title="HIPPOPOTAMUS">
<html:em>2</html:em>
</html:div>
<html:p id="http://www.some-fictitious-zoo.com/mammals/africanelephant">
African Elephant
<html:span title="14"/>
</html:p>
<html:p step="4" id="http://www.some-fictitious-zoo.com/mammals/chimpanzee">
Chimpanzee
<html:span step="-5"/>
<html:span step="5" title="3"/>
</html:p>
<html:div id="http://www.some-fictitious-zoo.com/mammals/llama" title="LLAMA">
<html:em>5</html:em>
</html:div>
<html:div id="http://www.some-fictitious-zoo.com/mammals/polarbear" title="Polar Bear">
<html:em step="-1">20</html:em>
<html:em step="1">5</html:em>
</html:div>
<html:div id="http://www.some-fictitious-zoo.com/mammals/aardvark" title="aardvark">
<html:em>2</html:em>
</html:div>
<html:p step="-3" id="http://www.some-fictitious-zoo.com/mammals/ninebandedarmadillo">
Nine-banded Armadillo
<html:span title="1"/>
</html:p>
<html:div id="http://www.some-fictitious-zoo.com/mammals/gorilla" title="Gorilla">
<html:em>7</html:em>
</html:div>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,42 +62,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output xmlns:html="http://www.w3.org/1999/xhtml">
<html:div id="http://www.some-fictitious-zoo.com/mammals/lion" title="Lion">
<html:em step="-2">4</html:em>
<html:em step="2">9</html:em>
</html:div>
<html:div id="http://www.some-fictitious-zoo.com/mammals/hippopotamus" title="HIPPOPOTAMUS">
<html:em>2</html:em>
</html:div>
<html:p id="http://www.some-fictitious-zoo.com/mammals/africanelephant">
African Elephant
<html:span title="14"/>
</html:p>
<html:p step="4" id="http://www.some-fictitious-zoo.com/mammals/chimpanzee">
Chimpanzee
<html:span step="-5"/>
<html:span step="5" title="3"/>
</html:p>
<html:div id="http://www.some-fictitious-zoo.com/mammals/llama" title="LLAMA">
<html:em>5</html:em>
</html:div>
<html:div id="http://www.some-fictitious-zoo.com/mammals/polarbear" title="Polar Bear">
<html:em step="-1">20</html:em>
<html:em step="1">5</html:em>
</html:div>
<html:div id="http://www.some-fictitious-zoo.com/mammals/aardvark" title="aardvark">
<html:em>2</html:em>
</html:div>
<html:p step="-3" id="http://www.some-fictitious-zoo.com/mammals/ninebandedarmadillo">
Nine-banded Armadillo
<html:span title="1"/>
</html:p>
<html:div id="http://www.some-fictitious-zoo.com/mammals/gorilla" title="Gorilla">
<html:em>7</html:em>
</html:div>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [
// step 1

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

@ -14,6 +14,24 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output" xmlns:html="http://www.w3.org/1999/xhtml">
<html:strong id="http://www.some-fictitious-zoo.com/arachnids" container="true" empty="false">Arachnids</html:strong>
<html:strong step="-3" id="http://www.some-fictitious-zoo.com/birds" container="true" empty="false">
Birds
<html:span id="http://www.some-fictitious-zoo.com/birds/barnowl">Barn Owl</html:span>
</html:strong>
<html:strong step="1" id="http://www.some-fictitious-zoo.com/insects">Insects</html:strong>
<html:strong id="http://www.some-fictitious-zoo.com/mammals" container="true" empty="false">
Mammals
<html:span id="http://www.some-fictitious-zoo.com/mammals/lion">Lion</html:span>
<html:span id="http://www.some-fictitious-zoo.com/mammals/hippopotamus">HIPPOPOTAMUS</html:span>
<html:span step="2" id="http://www.some-fictitious-zoo.com/mammals/koala">Koala</html:span>
<html:span id="http://www.some-fictitious-zoo.com/mammals/polarbear">Polar Bear</html:span>
<html:span id="http://www.some-fictitious-zoo.com/mammals/ninebandedarmadillo">Nine-banded Armadillo</html:span>
<html:span id="http://www.some-fictitious-zoo.com/mammals/gorilla">Gorilla</html:span>
</html:strong>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,24 +44,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output xmlns:html="http://www.w3.org/1999/xhtml">
<html:strong id="http://www.some-fictitious-zoo.com/arachnids" container="true" empty="false">Arachnids</html:strong>
<html:strong step="-3" id="http://www.some-fictitious-zoo.com/birds" container="true" empty="false">
Birds
<html:span id="http://www.some-fictitious-zoo.com/birds/barnowl">Barn Owl</html:span>
</html:strong>
<html:strong step="1" id="http://www.some-fictitious-zoo.com/insects">Insects</html:strong>
<html:strong id="http://www.some-fictitious-zoo.com/mammals" container="true" empty="false">
Mammals
<html:span id="http://www.some-fictitious-zoo.com/mammals/lion">Lion</html:span>
<html:span id="http://www.some-fictitious-zoo.com/mammals/hippopotamus">HIPPOPOTAMUS</html:span>
<html:span step="2" id="http://www.some-fictitious-zoo.com/mammals/koala">Koala</html:span>
<html:span id="http://www.some-fictitious-zoo.com/mammals/polarbear">Polar Bear</html:span>
<html:span id="http://www.some-fictitious-zoo.com/mammals/ninebandedarmadillo">Nine-banded Armadillo</html:span>
<html:span id="http://www.some-fictitious-zoo.com/mammals/gorilla">Gorilla</html:span>
</html:strong>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [
// step 1

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

@ -14,6 +14,30 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output" xmlns:html="http://www.w3.org/1999/xhtml">
<html:span step="-2" id="http://www.some-fictitious-zoo.com/mammals/lion">Lion</html:span>
<html:span id="http://www.some-fictitious-zoo.com/mammals/hippopotamus">HIPPOPOTAMUS</html:span>
<vbox>
<html:p step="2" id="http://www.some-fictitious-zoo.com/mammals/lion">
<html:span title="Lion"/>
</html:p>
<html:p id="http://www.some-fictitious-zoo.com/mammals/africanelephant">
<html:span title="African Elephant"/>
</html:p>
<html:p step="-1" id="http://www.some-fictitious-zoo.com/mammals/polarbear">
<html:span title="Polar Bear"/>
</html:p>
<html:p id="http://www.some-fictitious-zoo.com/mammals/gorilla">
<html:span title="Gorilla"/>
</html:p>
</vbox>
<html:span step="5" id="http://www.some-fictitious-zoo.com/mammals/chimpanzee">Chimpanzee</html:span>
<html:span id="http://www.some-fictitious-zoo.com/mammals/llama">LLAMA</html:span>
<html:span step="1" id="http://www.some-fictitious-zoo.com/mammals/polarbear">Polar Bear</html:span>
<html:span id="http://www.some-fictitious-zoo.com/mammals/aardvark">aardvark</html:span>
<html:span step="-3" id="http://www.some-fictitious-zoo.com/mammals/ninebandedarmadillo">Nine-banded Armadillo</html:span>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,30 +50,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = true;
var notWorkingYetDynamic = true;
var expectedOutput =
<output xmlns:html="http://www.w3.org/1999/xhtml">
<html:span step="-2" id="http://www.some-fictitious-zoo.com/mammals/lion">Lion</html:span>
<html:span id="http://www.some-fictitious-zoo.com/mammals/hippopotamus">HIPPOPOTAMUS</html:span>
<vbox>
<html:p step="2" id="http://www.some-fictitious-zoo.com/mammals/lion">
<html:span title="Lion"/>
</html:p>
<html:p id="http://www.some-fictitious-zoo.com/mammals/africanelephant">
<html:span title="African Elephant"/>
</html:p>
<html:p step="-1" id="http://www.some-fictitious-zoo.com/mammals/polarbear">
<html:span title="Polar Bear"/>
</html:p>
<html:p id="http://www.some-fictitious-zoo.com/mammals/gorilla">
<html:span title="Gorilla"/>
</html:p>
</vbox>
<html:span step="5" id="http://www.some-fictitious-zoo.com/mammals/chimpanzee">Chimpanzee</html:span>
<html:span id="http://www.some-fictitious-zoo.com/mammals/llama">LLAMA</html:span>
<html:span step="1" id="http://www.some-fictitious-zoo.com/mammals/polarbear">Polar Bear</html:span>
<html:span id="http://www.some-fictitious-zoo.com/mammals/aardvark">aardvark</html:span>
<html:span step="-3" id="http://www.some-fictitious-zoo.com/mammals/ninebandedarmadillo">Nine-banded Armadillo</html:span>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [
// step 1

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

@ -14,6 +14,15 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output" xmlns:html="http://www.w3.org/1999/xhtml">
<html:p step="3" id="http://www.some-fictitious-zoo.com/birds/wren" title="Wren"/>
<html:p id="http://www.some-fictitious-zoo.com/birds/emu" title="Emu"/>
<html:p step="-4" id="http://www.some-fictitious-zoo.com/birds/barnowl" title="Barn Owl"/>
<html:p id="http://www.some-fictitious-zoo.com/birds/raven" title="Raven"/>
<html:p step="2" id="http://www.some-fictitious-zoo.com/birds/archaeopteryx" title="Archaeopteryx"/>
<html:p step="1" id="http://www.some-fictitious-zoo.com/birds/emperorpenguin" title="Emperor Penguin"/>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,15 +35,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output xmlns:html="http://www.w3.org/1999/xhtml">
<html:p step="3" id="http://www.some-fictitious-zoo.com/birds/wren" title="Wren"/>
<html:p id="http://www.some-fictitious-zoo.com/birds/emu" title="Emu"/>
<html:p step="-4" id="http://www.some-fictitious-zoo.com/birds/barnowl" title="Barn Owl"/>
<html:p id="http://www.some-fictitious-zoo.com/birds/raven" title="Raven"/>
<html:p step="2" id="http://www.some-fictitious-zoo.com/birds/archaeopteryx" title="Archaeopteryx"/>
<html:p step="1" id="http://www.some-fictitious-zoo.com/birds/emperorpenguin" title="Emperor Penguin"/>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [
// step 1

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

@ -14,6 +14,15 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output" xmlns:html="http://www.w3.org/1999/xhtml">
<html:p step="3" id="http://www.some-fictitious-zoo.com/birds/wren">Wren</html:p>
<html:p id="http://www.some-fictitious-zoo.com/birds/emu">Emu</html:p>
<html:p step="-4" id="http://www.some-fictitious-zoo.com/birds/barnowl">Barn Owl</html:p>
<html:p id="http://www.some-fictitious-zoo.com/birds/raven">Raven</html:p>
<html:p step="2" id="http://www.some-fictitious-zoo.com/birds/archaeopteryx">Archaeopteryx</html:p>
<html:p step="1" id="http://www.some-fictitious-zoo.com/birds/emperorpenguin">Emperor Penguin</html:p>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,15 +35,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output xmlns:html="http://www.w3.org/1999/xhtml">
<html:p step="3" id="http://www.some-fictitious-zoo.com/birds/wren">Wren</html:p>
<html:p id="http://www.some-fictitious-zoo.com/birds/emu">Emu</html:p>
<html:p step="-4" id="http://www.some-fictitious-zoo.com/birds/barnowl">Barn Owl</html:p>
<html:p id="http://www.some-fictitious-zoo.com/birds/raven">Raven</html:p>
<html:p step="2" id="http://www.some-fictitious-zoo.com/birds/archaeopteryx">Archaeopteryx</html:p>
<html:p step="1" id="http://www.some-fictitious-zoo.com/birds/emperorpenguin">Emperor Penguin</html:p>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [
// step 1

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

@ -14,6 +14,8 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output"/>
<script src="templates_shared.js"/>
<script>
@ -26,7 +28,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput = <output/>;
var expectedOutput = document.getElementById("output");
Components.classes["@mozilla.org/consoleservice;1"].
getService(Components.interfaces.nsIConsoleService).reset();

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

@ -14,6 +14,37 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<listcols>
<listcol flex="1"/>
<listcol flex="1"/>
</listcols>
<listitem step="3" id="http://www.some-fictitious-zoo.com/birds/wren">
<listcell label="Wren"/>
<listcell label=""/>
</listitem>
<listitem id="http://www.some-fictitious-zoo.com/birds/emu">
<listcell label="Emu"/>
<listcell label="Dromaius novaehollandiae"/>
</listitem>
<listitem step="-4" id="http://www.some-fictitious-zoo.com/birds/barnowl">
<listcell label="Barn Owl"/>
<listcell label="Tyto alba"/>
</listitem>
<listitem id="http://www.some-fictitious-zoo.com/birds/raven">
<listcell label="Raven"/>
<listcell label="Corvus corax"/>
</listitem>
<listitem step="2" id="http://www.some-fictitious-zoo.com/birds/archaeopteryx">
<listcell label="Archaeopteryx"/>
<listcell label=""/>
</listitem>
<listitem step="1" id="http://www.some-fictitious-zoo.com/birds/emperorpenguin">
<listcell label="Emperor Penguin"/>
<listcell label=""/>
</listitem>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,37 +57,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output>
<listcols>
<listcol flex="1"/>
<listcol flex="1"/>
</listcols>
<listitem step="3" id="http://www.some-fictitious-zoo.com/birds/wren">
<listcell label="Wren"/>
<listcell label=""/>
</listitem>
<listitem id="http://www.some-fictitious-zoo.com/birds/emu">
<listcell label="Emu"/>
<listcell label="Dromaius novaehollandiae"/>
</listitem>
<listitem step="-4" id="http://www.some-fictitious-zoo.com/birds/barnowl">
<listcell label="Barn Owl"/>
<listcell label="Tyto alba"/>
</listitem>
<listitem id="http://www.some-fictitious-zoo.com/birds/raven">
<listcell label="Raven"/>
<listcell label="Corvus corax"/>
</listitem>
<listitem step="2" id="http://www.some-fictitious-zoo.com/birds/archaeopteryx">
<listcell label="Archaeopteryx"/>
<listcell label=""/>
</listitem>
<listitem step="1" id="http://www.some-fictitious-zoo.com/birds/emperorpenguin">
<listcell label="Emperor Penguin"/>
<listcell label=""/>
</listitem>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [
// step 1

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

@ -14,6 +14,8 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output"/>
<script src="templates_shared.js"/>
<script>
@ -26,8 +28,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output/>;
var expectedOutput = document.getElementById("output");
var changes = [];
]]>

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

@ -14,6 +14,12 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<button id="http://www.some-fictitious-zoo.com/birds/emu" label="http://www.some-fictitious-zoo.com/birds/emu Emu"/>
<button id="http://www.some-fictitious-zoo.com/birds/barnowl" label="http://www.some-fictitious-zoo.com/birds/barnowl Barn Owl"/>
<button id="http://www.some-fictitious-zoo.com/birds/raven" label="http://www.some-fictitious-zoo.com/birds/raven Raven"/>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,12 +32,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output>
<button id="http://www.some-fictitious-zoo.com/birds/emu" label="http://www.some-fictitious-zoo.com/birds/emu Emu"/>
<button id="http://www.some-fictitious-zoo.com/birds/barnowl" label="http://www.some-fictitious-zoo.com/birds/barnowl Barn Owl"/>
<button id="http://www.some-fictitious-zoo.com/birds/raven" label="http://www.some-fictitious-zoo.com/birds/raven Raven"/>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [];
]]>

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

@ -14,6 +14,10 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<label id="http://www.some-fictitious-zoo.com/arachnids/tarantula" value="http://www.some-fictitious-zoo.com/arachnids/tarantula"/>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,8 +30,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<label id="http://www.some-fictitious-zoo.com/arachnids/tarantula" value="http://www.some-fictitious-zoo.com/arachnids/tarantula"/>;
var expectedOutput = document.getElementById("output");
var changes = [];
]]>

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

@ -14,6 +14,17 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<menupopup>
<menuitem step="3" id="http://www.some-fictitious-zoo.com/birds/wren" label="Wren"/>
<menuitem id="http://www.some-fictitious-zoo.com/birds/emu" label="Emu"/>
<menuitem step="-4" id="http://www.some-fictitious-zoo.com/birds/barnowl" label="Barn Owl"/>
<menuitem id="http://www.some-fictitious-zoo.com/birds/raven" label="Raven"/>
<menuitem step="2" id="http://www.some-fictitious-zoo.com/birds/archaeopteryx" label="Archaeopteryx"/>
<menuitem step="1" id="http://www.some-fictitious-zoo.com/birds/emperorpenguin" label="Emperor Penguin"/>
</menupopup>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,15 +37,7 @@ var isTreeBuilder = false;
var needsOpen = true;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<menupopup>
<menuitem step="3" id="http://www.some-fictitious-zoo.com/birds/wren" label="Wren"/>
<menuitem id="http://www.some-fictitious-zoo.com/birds/emu" label="Emu"/>
<menuitem step="-4" id="http://www.some-fictitious-zoo.com/birds/barnowl" label="Barn Owl"/>
<menuitem id="http://www.some-fictitious-zoo.com/birds/raven" label="Raven"/>
<menuitem step="2" id="http://www.some-fictitious-zoo.com/birds/archaeopteryx" label="Archaeopteryx"/>
<menuitem step="1" id="http://www.some-fictitious-zoo.com/birds/emperorpenguin" label="Emperor Penguin"/>
</menupopup>;
var expectedOutput = document.getElementById("output");
var changes = [
// step 1

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

@ -14,6 +14,27 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<menupopup>
<menuitem id="http://www.some-fictitious-zoo.com/arachnids" label="Arachnids" container="true" empty="false"/>
<menu step="-2" id="http://www.some-fictitious-zoo.com/birds" label="Birds" container="true" empty="false"/>
<menu step="2" id="http://www.some-fictitious-zoo.com/birds" label="Birds" container="true" empty="false" open="true">
<menupopup>
<menuitem step="4" id="http://www.some-fictitious-zoo.com/birds/wren" label="Wren"/>
<menuitem id="http://www.some-fictitious-zoo.com/birds/emu" label="Emu"/>
<menuitem step="-5" id="http://www.some-fictitious-zoo.com/birds/barnowl" label="Barn Owl"/>
<menuitem id="http://www.some-fictitious-zoo.com/birds/raven" label="Raven"/>
<menuitem step="3" id="http://www.some-fictitious-zoo.com/birds/archaeopteryx" label="Archaeopteryx"/>
<menuitem id="http://www.some-fictitious-zoo.com/birds/emperorpenguin" label="Emperor Penguin"/>
</menupopup>
</menu>
<menuitem id="http://www.some-fictitious-zoo.com/crustaceans" label="Crustaceans" container="true" empty="true"/>
<menuitem id="http://www.some-fictitious-zoo.com/fish" label="Fish" container="true" empty="false"/>
<menuitem id="http://www.some-fictitious-zoo.com/mammals" label="Mammals" container="true" empty="false"/>
<menuitem id="http://www.some-fictitious-zoo.com/reptiles" label="Reptiles" container="true" empty="false"/>
</menupopup>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,25 +47,7 @@ var isTreeBuilder = false;
var needsOpen = true;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<menupopup>
<menuitem id="http://www.some-fictitious-zoo.com/arachnids" label="Arachnids" container="true" empty="false"/>
<menu step="-2" id="http://www.some-fictitious-zoo.com/birds" label="Birds" container="true" empty="false"/>
<menu step="2" id="http://www.some-fictitious-zoo.com/birds" label="Birds" container="true" empty="false" open="true">
<menupopup>
<menuitem step="4" id="http://www.some-fictitious-zoo.com/birds/wren" label="Wren"/>
<menuitem id="http://www.some-fictitious-zoo.com/birds/emu" label="Emu"/>
<menuitem step="-5" id="http://www.some-fictitious-zoo.com/birds/barnowl" label="Barn Owl"/>
<menuitem id="http://www.some-fictitious-zoo.com/birds/raven" label="Raven"/>
<menuitem step="3" id="http://www.some-fictitious-zoo.com/birds/archaeopteryx" label="Archaeopteryx"/>
<menuitem id="http://www.some-fictitious-zoo.com/birds/emperorpenguin" label="Emperor Penguin"/>
</menupopup>
</menu>
<menuitem id="http://www.some-fictitious-zoo.com/crustaceans" label="Crustaceans" container="true" empty="true"/>
<menuitem id="http://www.some-fictitious-zoo.com/fish" label="Fish" container="true" empty="false"/>
<menuitem id="http://www.some-fictitious-zoo.com/mammals" label="Mammals" container="true" empty="false"/>
<menuitem id="http://www.some-fictitious-zoo.com/reptiles" label="Reptiles" container="true" empty="false"/>
</menupopup>;
var expectedOutput = document.getElementById("output");
var changes = [
// step 1

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

@ -14,6 +14,17 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<menupopup>
<menuitem step="3" id="http://www.some-fictitious-zoo.com/birds/wren" label="Wren"/>
<menuitem id="http://www.some-fictitious-zoo.com/birds/emu" label="Emu"/>
<menuitem step="-4" id="http://www.some-fictitious-zoo.com/birds/barnowl" label="Barn Owl"/>
<menuitem id="http://www.some-fictitious-zoo.com/birds/raven" label="Raven"/>
<menuitem step="2" id="http://www.some-fictitious-zoo.com/birds/archaeopteryx" label="Archaeopteryx"/>
<menuitem step="1" id="http://www.some-fictitious-zoo.com/birds/emperorpenguin" label="Emperor Penguin"/>
</menupopup>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,15 +37,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<menupopup>
<menuitem step="3" id="http://www.some-fictitious-zoo.com/birds/wren" label="Wren"/>
<menuitem id="http://www.some-fictitious-zoo.com/birds/emu" label="Emu"/>
<menuitem step="-4" id="http://www.some-fictitious-zoo.com/birds/barnowl" label="Barn Owl"/>
<menuitem id="http://www.some-fictitious-zoo.com/birds/raven" label="Raven"/>
<menuitem step="2" id="http://www.some-fictitious-zoo.com/birds/archaeopteryx" label="Archaeopteryx"/>
<menuitem step="1" id="http://www.some-fictitious-zoo.com/birds/emperorpenguin" label="Emperor Penguin"/>
</menupopup>;
var expectedOutput = document.getElementById("output");
var changes = [
// step 1

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

@ -14,6 +14,13 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<checkbox id="http://www.some-fictitious-zoo.com/humans/sarah" label="Sarah"/>
<button id="http://www.some-fictitious-zoo.com/mammals" container="true" empty="false" label="Mammals"/>
<button id="http://www.some-fictitious-zoo.com/crustaceans" container="true" empty="true" label="Crustaceans"/>
<checkbox id="http://www.some-fictitious-zoo.com/birds/emu" label="Emu"/>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,13 +33,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output>
<checkbox id="http://www.some-fictitious-zoo.com/humans/sarah" label="Sarah"/>
<button id="http://www.some-fictitious-zoo.com/mammals" container="true" empty="false" label="Mammals"/>
<button id="http://www.some-fictitious-zoo.com/crustaceans" container="true" empty="true" label="Crustaceans"/>
<checkbox id="http://www.some-fictitious-zoo.com/birds/emu" label="Emu"/>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [
// step 1

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

@ -14,6 +14,13 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<checkbox id="http://www.some-fictitious-zoo.com/humans/sarah" label="Sarah"/>
<checkbox id="http://www.some-fictitious-zoo.com/mammals" container="true" empty="false" label="Mammals"/>
<label id="http://www.some-fictitious-zoo.com/crustaceans" container="true" empty="true" value="Crustaceans"/>
<checkbox id="http://www.some-fictitious-zoo.com/birds/emu" label="Emu"/>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,13 +33,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output>
<checkbox id="http://www.some-fictitious-zoo.com/humans/sarah" label="Sarah"/>
<checkbox id="http://www.some-fictitious-zoo.com/mammals" container="true" empty="false" label="Mammals"/>
<label id="http://www.some-fictitious-zoo.com/crustaceans" container="true" empty="true" value="Crustaceans"/>
<checkbox id="http://www.some-fictitious-zoo.com/birds/emu" label="Emu"/>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [];
]]>

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

@ -14,6 +14,13 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<label id="http://www.some-fictitious-zoo.com/humans/sarah" value="Sarah"/>
<checkbox id="http://www.some-fictitious-zoo.com/mammals" container="true" empty="false" label="Mammals"/>
<label id="http://www.some-fictitious-zoo.com/crustaceans" container="true" empty="true" value="Crustaceans"/>
<label id="http://www.some-fictitious-zoo.com/birds/emu" value="Emu"/>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,13 +33,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output>
<label id="http://www.some-fictitious-zoo.com/humans/sarah" value="Sarah"/>
<checkbox id="http://www.some-fictitious-zoo.com/mammals" container="true" empty="false" label="Mammals"/>
<label id="http://www.some-fictitious-zoo.com/crustaceans" container="true" empty="true" value="Crustaceans"/>
<label id="http://www.some-fictitious-zoo.com/birds/emu" value="Emu"/>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [];
]]>

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

@ -14,6 +14,8 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output"/>
<script src="templates_shared.js"/>
<script>
@ -26,8 +28,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output/>;
var expectedOutput = document.getElementById("output");
var changes = [];
]]>

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

@ -14,6 +14,10 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<label value="Tarantula"/>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,10 +30,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output>
<label value="Tarantula"/>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [
// step 1

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

@ -14,6 +14,29 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<box step="-3" id="http://www.some-fictitious-zoo.com/birds" container="true" empty="false">
<label value="Birds"/>
<button id="http://www.some-fictitious-zoo.com/birds/barnowl" label="Barn Owl"/>
<button id="http://www.some-fictitious-zoo.com/birds/raven" label="Raven"/>
</box>
<box step="1" id="http://www.some-fictitious-zoo.com/insects">
<label value="Insects"/>
</box>
<box id="http://www.some-fictitious-zoo.com/crustaceans" container="true" empty="true">
<label value="Crustaceans"/>
</box>
<box id="http://www.some-fictitious-zoo.com/mammals" container="true" empty="false">
<label value="Mammals"/>
<button id="http://www.some-fictitious-zoo.com/mammals/africanelephant" label="African Elephant"/>
<button step="2" id="http://www.some-fictitious-zoo.com/mammals/koala" label="Koala"/>
<button id="http://www.some-fictitious-zoo.com/mammals/polarbear" label="Polar Bear"/>
<button id="http://www.some-fictitious-zoo.com/mammals/aardvark" label="aardvark"/>
<button id="http://www.some-fictitious-zoo.com/mammals/ninebandedarmadillo" label="Nine-banded Armadillo"/>
<button id="http://www.some-fictitious-zoo.com/mammals/gorilla" label="Gorilla"/>
</box>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,29 +49,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output>
<box step="-3" id="http://www.some-fictitious-zoo.com/birds" container="true" empty="false">
<label value="Birds"/>
<button id="http://www.some-fictitious-zoo.com/birds/barnowl" label="Barn Owl"/>
<button id="http://www.some-fictitious-zoo.com/birds/raven" label="Raven"/>
</box>
<box step="1" id="http://www.some-fictitious-zoo.com/insects">
<label value="Insects"/>
</box>
<box id="http://www.some-fictitious-zoo.com/crustaceans" container="true" empty="true">
<label value="Crustaceans"/>
</box>
<box id="http://www.some-fictitious-zoo.com/mammals" container="true" empty="false">
<label value="Mammals"/>
<button id="http://www.some-fictitious-zoo.com/mammals/africanelephant" label="African Elephant"/>
<button step="2" id="http://www.some-fictitious-zoo.com/mammals/koala" label="Koala"/>
<button id="http://www.some-fictitious-zoo.com/mammals/polarbear" label="Polar Bear"/>
<button id="http://www.some-fictitious-zoo.com/mammals/aardvark" label="aardvark"/>
<button id="http://www.some-fictitious-zoo.com/mammals/ninebandedarmadillo" label="Nine-banded Armadillo"/>
<button id="http://www.some-fictitious-zoo.com/mammals/gorilla" label="Gorilla"/>
</box>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [
// step 1

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

@ -14,6 +14,29 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<groupbox step="-3" id="http://www.some-fictitious-zoo.com/birds" container="true" empty="false">
<caption value="Birds"/>
<checkbox id="http://www.some-fictitious-zoo.com/birds/barnowl" label="Barn Owl"/>
<checkbox id="http://www.some-fictitious-zoo.com/birds/raven" label="Raven"/>
</groupbox>
<groupbox step="1" id="http://www.some-fictitious-zoo.com/insects">
<caption value="Insects"/>
</groupbox>
<groupbox id="http://www.some-fictitious-zoo.com/crustaceans" container="true" empty="true">
<caption value="Crustaceans"/>
</groupbox>
<groupbox id="http://www.some-fictitious-zoo.com/mammals" container="true" empty="false">
<caption value="Mammals"/>
<checkbox id="http://www.some-fictitious-zoo.com/mammals/africanelephant" label="African Elephant"/>
<checkbox step="2" id="http://www.some-fictitious-zoo.com/mammals/koala" label="Koala"/>
<checkbox id="http://www.some-fictitious-zoo.com/mammals/polarbear" label="Polar Bear"/>
<checkbox id="http://www.some-fictitious-zoo.com/mammals/aardvark" label="aardvark"/>
<checkbox id="http://www.some-fictitious-zoo.com/mammals/ninebandedarmadillo" label="Nine-banded Armadillo"/>
<checkbox id="http://www.some-fictitious-zoo.com/mammals/gorilla" label="Gorilla"/>
</groupbox>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,29 +49,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output>
<groupbox step="-3" id="http://www.some-fictitious-zoo.com/birds" container="true" empty="false">
<caption value="Birds"/>
<checkbox id="http://www.some-fictitious-zoo.com/birds/barnowl" label="Barn Owl"/>
<checkbox id="http://www.some-fictitious-zoo.com/birds/raven" label="Raven"/>
</groupbox>
<groupbox step="1" id="http://www.some-fictitious-zoo.com/insects">
<caption value="Insects"/>
</groupbox>
<groupbox id="http://www.some-fictitious-zoo.com/crustaceans" container="true" empty="true">
<caption value="Crustaceans"/>
</groupbox>
<groupbox id="http://www.some-fictitious-zoo.com/mammals" container="true" empty="false">
<caption value="Mammals"/>
<checkbox id="http://www.some-fictitious-zoo.com/mammals/africanelephant" label="African Elephant"/>
<checkbox step="2" id="http://www.some-fictitious-zoo.com/mammals/koala" label="Koala"/>
<checkbox id="http://www.some-fictitious-zoo.com/mammals/polarbear" label="Polar Bear"/>
<checkbox id="http://www.some-fictitious-zoo.com/mammals/aardvark" label="aardvark"/>
<checkbox id="http://www.some-fictitious-zoo.com/mammals/ninebandedarmadillo" label="Nine-banded Armadillo"/>
<checkbox id="http://www.some-fictitious-zoo.com/mammals/gorilla" label="Gorilla"/>
</groupbox>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [
// step 1

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

@ -14,6 +14,33 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<hbox step="-3" id="http://www.some-fictitious-zoo.com/birds" container="true" empty="false">
<label value="Birds"/>
<button id="http://www.some-fictitious-zoo.com/birds/emu" label="Emu"/>
<button id="http://www.some-fictitious-zoo.com/birds/barnowl" label="Barn Owl"/>
<button id="http://www.some-fictitious-zoo.com/birds/raven" label="Raven"/>
</hbox>
<hbox step="1" id="http://www.some-fictitious-zoo.com/insects">
<label value="Insects"/>
</hbox>
<hbox id="http://www.some-fictitious-zoo.com/crustaceans" container="true" empty="true">
<label value="Crustaceans"/>
</hbox>
<hbox id="http://www.some-fictitious-zoo.com/mammals" container="true" empty="false">
<label value="Mammals"/>
<button id="http://www.some-fictitious-zoo.com/mammals/lion" label="Lion"/>
<button id="http://www.some-fictitious-zoo.com/mammals/hippopotamus" label="HIPPOPOTAMUS"/>
<button id="http://www.some-fictitious-zoo.com/mammals/africanelephant" label="African Elephant"/>
<button step="2" id="http://www.some-fictitious-zoo.com/mammals/koala" label="Koala"/>
<button id="http://www.some-fictitious-zoo.com/mammals/llama" label="LLAMA"/>
<button id="http://www.some-fictitious-zoo.com/mammals/polarbear" label="Polar Bear"/>
<button id="http://www.some-fictitious-zoo.com/mammals/aardvark" label="aardvark"/>
<button id="http://www.some-fictitious-zoo.com/mammals/ninebandedarmadillo" label="Nine-banded Armadillo"/>
<button id="http://www.some-fictitious-zoo.com/mammals/gorilla" label="Gorilla"/>
</hbox>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,33 +53,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output>
<hbox step="-3" id="http://www.some-fictitious-zoo.com/birds" container="true" empty="false">
<label value="Birds"/>
<button id="http://www.some-fictitious-zoo.com/birds/emu" label="Emu"/>
<button id="http://www.some-fictitious-zoo.com/birds/barnowl" label="Barn Owl"/>
<button id="http://www.some-fictitious-zoo.com/birds/raven" label="Raven"/>
</hbox>
<hbox step="1" id="http://www.some-fictitious-zoo.com/insects">
<label value="Insects"/>
</hbox>
<hbox id="http://www.some-fictitious-zoo.com/crustaceans" container="true" empty="true">
<label value="Crustaceans"/>
</hbox>
<hbox id="http://www.some-fictitious-zoo.com/mammals" container="true" empty="false">
<label value="Mammals"/>
<button id="http://www.some-fictitious-zoo.com/mammals/lion" label="Lion"/>
<button id="http://www.some-fictitious-zoo.com/mammals/hippopotamus" label="HIPPOPOTAMUS"/>
<button id="http://www.some-fictitious-zoo.com/mammals/africanelephant" label="African Elephant"/>
<button step="2" id="http://www.some-fictitious-zoo.com/mammals/koala" label="Koala"/>
<button id="http://www.some-fictitious-zoo.com/mammals/llama" label="LLAMA"/>
<button id="http://www.some-fictitious-zoo.com/mammals/polarbear" label="Polar Bear"/>
<button id="http://www.some-fictitious-zoo.com/mammals/aardvark" label="aardvark"/>
<button id="http://www.some-fictitious-zoo.com/mammals/ninebandedarmadillo" label="Nine-banded Armadillo"/>
<button id="http://www.some-fictitious-zoo.com/mammals/gorilla" label="Gorilla"/>
</hbox>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [
// step 1

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

@ -14,6 +14,13 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output" unordered="true">
<label id="http://www.some-fictitious-zoo.com/arachnids/tarantula" value="Robert likes Tarantulas"/>
<label id="http://www.some-fictitious-zoo.com/reptiles/anaconda" value="Robert likes Anacondas"/>
<label id="http://www.some-fictitious-zoo.com/reptiles/chameleon" value="Robert likes Chameleons"/>
<label id="http://www.some-fictitious-zoo.com/mammals/africanelephant" value="Robert likes African Elephants"/>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,13 +33,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output unordered="true">
<label id="http://www.some-fictitious-zoo.com/arachnids/tarantula" value="Robert likes Tarantulas"/>
<label id="http://www.some-fictitious-zoo.com/reptiles/anaconda" value="Robert likes Anacondas"/>
<label id="http://www.some-fictitious-zoo.com/reptiles/chameleon" value="Robert likes Chameleons"/>
<label id="http://www.some-fictitious-zoo.com/mammals/africanelephant" value="Robert likes African Elephants"/>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [];
]]>

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

@ -14,6 +14,12 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<label id="http://www.some-fictitious-zoo.com/arachnids/tarantula" value="Robert likes Tarantulas"/>
<label step="-4" id="http://www.some-fictitious-zoo.com/mammals/africanelephant" value="Robert likes African Elephants"/>
<label step="5" id="http://www.some-fictitious-zoo.com/mammals/africanelephant" value="Robert likes African Elephants"/>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,12 +32,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output>
<label id="http://www.some-fictitious-zoo.com/arachnids/tarantula" value="Robert likes Tarantulas"/>
<label step="-4" id="http://www.some-fictitious-zoo.com/mammals/africanelephant" value="Robert likes African Elephants"/>
<label step="5" id="http://www.some-fictitious-zoo.com/mammals/africanelephant" value="Robert likes African Elephants"/>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [
// step 1

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

@ -14,6 +14,11 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output" unordered="true">
<label id="http://www.some-fictitious-zoo.com/birds/emu" value="Sarah likes Emus"/>
<label id="http://www.some-fictitious-zoo.com/mammals/polarbear" value="Sarah likes Polar Bears"/>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,11 +31,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output unordered="true">
<label id="http://www.some-fictitious-zoo.com/birds/emu" value="Sarah likes Emus"/>
<label id="http://www.some-fictitious-zoo.com/mammals/polarbear" value="Sarah likes Polar Bears"/>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [];
]]>

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

@ -14,6 +14,15 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output" unordered="true">
<label id="http://www.some-fictitious-zoo.com/arachnids/tarantula" value="Tarantula"/>
<label id="http://www.some-fictitious-zoo.com/reptiles/anaconda" value="Anaconda"/>
<label id="http://www.some-fictitious-zoo.com/reptiles/chameleon" value="Chameleon"/>
<label id="http://www.some-fictitious-zoo.com/mammals/africanelephant" value="African Elephant"/>
<label id="http://www.some-fictitious-zoo.com/birds/emu" value="Emu"/>
<label id="http://www.some-fictitious-zoo.com/mammals/polarbear" value="Polar Bear"/>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,15 +35,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output unordered="true">
<label id="http://www.some-fictitious-zoo.com/arachnids/tarantula" value="Tarantula"/>
<label id="http://www.some-fictitious-zoo.com/reptiles/anaconda" value="Anaconda"/>
<label id="http://www.some-fictitious-zoo.com/reptiles/chameleon" value="Chameleon"/>
<label id="http://www.some-fictitious-zoo.com/mammals/africanelephant" value="African Elephant"/>
<label id="http://www.some-fictitious-zoo.com/birds/emu" value="Emu"/>
<label id="http://www.some-fictitious-zoo.com/mammals/polarbear" value="Polar Bear"/>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [];
]]>

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

@ -14,6 +14,13 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output" unordered="true">
<label id="http://www.some-fictitious-zoo.com/arachnids/tarantula" value="Tarantula"/>
<label id="http://www.some-fictitious-zoo.com/reptiles/chameleon" value="Chameleon"/>
<label id="http://www.some-fictitious-zoo.com/mammals/llama" value="LLAMA"/>
<label step="-1" id="http://www.some-fictitious-zoo.com/birds/emu" value="Emu"/>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,13 +33,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output unordered="true">
<label id="http://www.some-fictitious-zoo.com/arachnids/tarantula" value="Tarantula"/>
<label id="http://www.some-fictitious-zoo.com/reptiles/chameleon" value="Chameleon"/>
<label id="http://www.some-fictitious-zoo.com/mammals/llama" value="LLAMA"/>
<label step="-1" id="http://www.some-fictitious-zoo.com/birds/emu" value="Emu"/>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [
// step 1

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

@ -14,6 +14,15 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<label id="http://www.some-fictitious-zoo.com/arachnids" container="true" empty="false" value="Arachnids"/>
<label id="http://www.some-fictitious-zoo.com/birds" container="true" empty="false" value="Birds"/>
<label id="http://www.some-fictitious-zoo.com/crustaceans" container="true" empty="true" value="Crustaceans"/>
<label id="http://www.some-fictitious-zoo.com/fish" container="true" empty="false" value="Fish"/>
<label id="http://www.some-fictitious-zoo.com/mammals" container="true" empty="false" value="Mammals"/>
<label id="http://www.some-fictitious-zoo.com/reptiles" container="true" empty="false" value="Reptiles"/>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,15 +35,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output>
<label id="http://www.some-fictitious-zoo.com/arachnids" container="true" empty="false" value="Arachnids"/>
<label id="http://www.some-fictitious-zoo.com/birds" container="true" empty="false" value="Birds"/>
<label id="http://www.some-fictitious-zoo.com/crustaceans" container="true" empty="true" value="Crustaceans"/>
<label id="http://www.some-fictitious-zoo.com/fish" container="true" empty="false" value="Fish"/>
<label id="http://www.some-fictitious-zoo.com/mammals" container="true" empty="false" value="Mammals"/>
<label id="http://www.some-fictitious-zoo.com/reptiles" container="true" empty="false" value="Reptiles"/>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [];
]]>

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

@ -14,6 +14,11 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<label id="http://www.some-fictitious-zoo.com/reptiles" container="true" empty="false" value="Reptiles"/>
<label id="http://www.some-fictitious-zoo.com/crustaceans" container="true" empty="true" value="Crustaceans"/>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,11 +31,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output>
<label id="http://www.some-fictitious-zoo.com/reptiles" container="true" empty="false" value="Reptiles"/>
<label id="http://www.some-fictitious-zoo.com/crustaceans" container="true" empty="true" value="Crustaceans"/>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [];
]]>

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

@ -14,6 +14,10 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<label id="http://www.some-fictitious-zoo.com/mammals" container="true" empty="false" value="Mammals"/>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,8 +30,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<label id="http://www.some-fictitious-zoo.com/mammals" container="true" empty="false" value="Mammals"/>;
var expectedOutput = document.getElementById("output");
var changes = [];
]]>

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

@ -14,6 +14,15 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<button step="3" id="http://www.some-fictitious-zoo.com/birds/wren" label="Wren"/>
<button id="http://www.some-fictitious-zoo.com/birds/emu" label="Emu"/>
<button step="-4" id="http://www.some-fictitious-zoo.com/birds/barnowl" label="Barn Owl"/>
<button id="http://www.some-fictitious-zoo.com/birds/raven" label="Raven"/>
<button step="2" id="http://www.some-fictitious-zoo.com/birds/archaeopteryx" label="Archaeopteryx"/>
<button step="1" id="http://www.some-fictitious-zoo.com/birds/emperorpenguin" label="Emperor Penguin"/>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,15 +35,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output>
<button step="3" id="http://www.some-fictitious-zoo.com/birds/wren" label="Wren"/>
<button id="http://www.some-fictitious-zoo.com/birds/emu" label="Emu"/>
<button step="-4" id="http://www.some-fictitious-zoo.com/birds/barnowl" label="Barn Owl"/>
<button id="http://www.some-fictitious-zoo.com/birds/raven" label="Raven"/>
<button step="2" id="http://www.some-fictitious-zoo.com/birds/archaeopteryx" label="Archaeopteryx"/>
<button step="1" id="http://www.some-fictitious-zoo.com/birds/emperorpenguin" label="Emperor Penguin"/>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [
// step 1

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

@ -14,6 +14,15 @@
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
<data id="output">
<button step="3" id="http://www.some-fictitious-zoo.com/birds/wren" label="Wren"/>
<button id="http://www.some-fictitious-zoo.com/birds/emu" label="Emu"/>
<checkbox step="-4" id="http://www.some-fictitious-zoo.com/birds/barnowl" label="Barn Owl"/>
<button id="http://www.some-fictitious-zoo.com/birds/raven" label="Raven"/>
<button step="2" id="http://www.some-fictitious-zoo.com/birds/archaeopteryx" label="Archaeopteryx"/>
<button step="1" id="http://www.some-fictitious-zoo.com/birds/emperorpenguin" label="Emperor Penguin"/>
</data>
<script src="templates_shared.js"/>
<script>
@ -26,15 +35,7 @@ var isTreeBuilder = false;
var needsOpen = false;
var notWorkingYet = false;
var notWorkingYetDynamic = false;
var expectedOutput =
<output>
<button step="3" id="http://www.some-fictitious-zoo.com/birds/wren" label="Wren"/>
<button id="http://www.some-fictitious-zoo.com/birds/emu" label="Emu"/>
<checkbox step="-4" id="http://www.some-fictitious-zoo.com/birds/barnowl" label="Barn Owl"/>
<button id="http://www.some-fictitious-zoo.com/birds/raven" label="Raven"/>
<button step="2" id="http://www.some-fictitious-zoo.com/birds/archaeopteryx" label="Archaeopteryx"/>
<button step="1" id="http://www.some-fictitious-zoo.com/birds/emperorpenguin" label="Emperor Penguin"/>
</output>;
var expectedOutput = document.getElementById("output");
var changes = [
// step 1

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