import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo

This commit is contained in:
Roy Tam 2018-01-19 03:59:58 +08:00
commit dcd9973243
150858 changed files with 23884658 additions and 0 deletions

View file

@ -0,0 +1,39 @@
# 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/.
XPCSHELLTESTROOT = $(topobjdir)/_tests/xpcshell/$(relativesrcdir)
pp_const_file = $(srcdir)/data/xpcshellConstantsPP.js
PP_TARGETS += aus-test-const
aus-test-const := $(pp_const_file)
aus-test-const_PATH := $(XPCSHELLTESTROOT)/data
aus-test-const_FLAGS := -Fsubstitution $(DEFINES) $(ACDEFINES)
aus-test-const_TARGET := misc
INI_TEST_FILES = \
TestAUSReadStrings1.ini \
TestAUSReadStrings2.ini \
TestAUSReadStrings3.ini \
$(NULL)
MOZ_WINCONSOLE = 1
include $(topsrcdir)/config/rules.mk
# TestAUSReadStrings runs during check in the following directory with a Unicode
# char in order to test bug 473417 on Windows.
ifeq ($(OS_ARCH),WINNT)
bug473417dir = test_bug473417-ó
else
bug473417dir = test_bug473417
endif
check::
$(RM) -rf $(DEPTH)/_tests/updater/ && $(NSINSTALL) -D $(DEPTH)/_tests/updater/$(bug473417dir)/
for i in $(INI_TEST_FILES); do \
$(INSTALL) $(srcdir)/$$i $(DEPTH)/_tests/updater/$(bug473417dir)/; \
done
$(INSTALL) $(FINAL_TARGET)/TestAUSReadStrings$(BIN_SUFFIX) $(DEPTH)/_tests/updater/$(bug473417dir)/
@$(RUN_TEST_PROGRAM) $(DEPTH)/_tests/updater/$(bug473417dir)/TestAUSReadStrings$(BIN_SUFFIX)

View file

@ -0,0 +1,423 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
#ifdef XP_WIN
# include <windows.h>
# include <wintrust.h>
# include <tlhelp32.h>
# include <softpub.h>
# include <direct.h>
# include <io.h>
typedef WCHAR NS_tchar;
# define NS_main wmain
# ifndef F_OK
# define F_OK 00
# endif
# ifndef W_OK
# define W_OK 02
# endif
# ifndef R_OK
# define R_OK 04
# endif
# if defined(_MSC_VER) && _MSC_VER < 1900
# define stat _stat
# endif
# define NS_T(str) L ## str
# define NS_tsnprintf(dest, count, fmt, ...) \
{ \
int _count = count - 1; \
_snwprintf(dest, _count, fmt, ##__VA_ARGS__); \
dest[_count] = L'\0'; \
}
# define NS_taccess _waccess
# define NS_tchdir _wchdir
# define NS_tfopen _wfopen
# define NS_tstrcmp wcscmp
# define NS_ttoi _wtoi
# define NS_tstat _wstat
# define NS_tgetcwd _wgetcwd
# define LOG_S "%S"
#include "../common/updatehelper.h"
#include "../common/certificatecheck.h"
#else
# include <unistd.h>
# define NS_main main
typedef char NS_tchar;
# define NS_T(str) str
# define NS_tsnprintf snprintf
# define NS_taccess access
# define NS_tchdir chdir
# define NS_tfopen fopen
# define NS_tstrcmp strcmp
# define NS_ttoi atoi
# define NS_tstat stat
# define NS_tgetcwd getcwd
# define NS_tfputs fputs
# define LOG_S "%s"
#endif
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#ifndef MAXPATHLEN
# ifdef PATH_MAX
# define MAXPATHLEN PATH_MAX
# elif defined(MAX_PATH)
# define MAXPATHLEN MAX_PATH
# elif defined(_MAX_PATH)
# define MAXPATHLEN _MAX_PATH
# elif defined(CCHMAXPATH)
# define MAXPATHLEN CCHMAXPATH
# else
# define MAXPATHLEN 1024
# endif
#endif
static void
WriteMsg(const NS_tchar *path, const char *status)
{
FILE* outFP = NS_tfopen(path, NS_T("wb"));
if (!outFP) {
return;
}
fprintf(outFP, "%s\n", status);
fclose(outFP);
outFP = nullptr;
}
static bool
CheckMsg(const NS_tchar *path, const char *expected)
{
if (NS_taccess(path, F_OK)) {
return false;
}
FILE *inFP = NS_tfopen(path, NS_T("rb"));
if (!inFP) {
return false;
}
struct stat ms;
if (fstat(fileno(inFP), &ms)) {
fclose(inFP);
inFP = nullptr;
return false;
}
char *mbuf = (char *) malloc(ms.st_size + 1);
if (!mbuf) {
fclose(inFP);
inFP = nullptr;
return false;
}
size_t r = ms.st_size;
char *rb = mbuf;
size_t c = fread(rb, sizeof(char), 50, inFP);
r -= c;
rb += c;
if (c == 0 && r) {
free(mbuf);
fclose(inFP);
inFP = nullptr;
return false;
}
mbuf[ms.st_size] = '\0';
rb = mbuf;
bool isMatch = strcmp(rb, expected) == 0;
free(mbuf);
fclose(inFP);
inFP = nullptr;
return isMatch;
}
int NS_main(int argc, NS_tchar **argv)
{
if (argc == 2) {
if (!NS_tstrcmp(argv[1], NS_T("post-update-async")) ||
!NS_tstrcmp(argv[1], NS_T("post-update-sync"))) {
NS_tchar exePath[MAXPATHLEN];
#ifdef XP_WIN
if (!::GetModuleFileNameW(0, exePath, MAXPATHLEN)) {
return 1;
}
#else
strcpy(exePath, argv[0]);
#endif
NS_tchar runFilePath[MAXPATHLEN];
NS_tsnprintf(runFilePath, sizeof(runFilePath)/sizeof(runFilePath[0]),
NS_T("%s.running"), exePath);
#ifdef XP_WIN
if (!NS_taccess(runFilePath, F_OK)) {
// This makes it possible to check if the post update process was
// launched twice which happens when the service performs an update.
NS_tchar runFilePathBak[MAXPATHLEN];
NS_tsnprintf(runFilePathBak, sizeof(runFilePathBak)/sizeof(runFilePathBak[0]),
NS_T("%s.bak"), runFilePath);
MoveFileExW(runFilePath, runFilePathBak, MOVEFILE_REPLACE_EXISTING);
}
#endif
WriteMsg(runFilePath, "running");
if (!NS_tstrcmp(argv[1], NS_T("post-update-sync"))) {
#ifdef XP_WIN
Sleep(2000);
#else
sleep(2);
#endif
}
NS_tchar logFilePath[MAXPATHLEN];
NS_tsnprintf(logFilePath, sizeof(logFilePath)/sizeof(logFilePath[0]),
NS_T("%s.log"), exePath);
WriteMsg(logFilePath, "post-update");
return 0;
}
}
if (argc < 3) {
fprintf(stderr, \
"\n" \
"Application Update Service Test Helper\n" \
"\n" \
"Usage: WORKINGDIR INFILE OUTFILE -s SECONDS [FILETOLOCK]\n" \
" or: WORKINGDIR LOGFILE [ARG2 ARG3...]\n" \
" or: signature-check filepath\n" \
" or: setup-symlink dir1 dir2 file symlink\n" \
" or: remove-symlink dir1 dir2 file symlink\n" \
" or: check-symlink symlink\n" \
" or: post-update\n" \
"\n" \
" WORKINGDIR \tThe relative path to the working directory to use.\n" \
" INFILE \tThe relative path from the working directory for the file to\n" \
" \tread actions to perform such as finish.\n" \
" OUTFILE \tThe relative path from the working directory for the file to\n" \
" \twrite status information.\n" \
" SECONDS \tThe number of seconds to sleep.\n" \
" FILETOLOCK \tThe relative path from the working directory to an existing\n" \
" \tfile to open exlusively.\n" \
" \tOnly available on Windows platforms and silently ignored on\n" \
" \tother platforms.\n" \
" LOGFILE \tThe relative path from the working directory to log the\n" \
" \tcommand line arguments.\n" \
" ARG2 ARG3...\tArguments to write to the LOGFILE after the preceding command\n" \
" \tline arguments.\n" \
"\n" \
"Note: All paths must be relative.\n" \
"\n");
return 1;
}
if (!NS_tstrcmp(argv[1], NS_T("check-signature"))) {
#if defined(XP_WIN) && defined(MOZ_MAINTENANCE_SERVICE)
if (ERROR_SUCCESS == VerifyCertificateTrustForFile(argv[2])) {
return 0;
} else {
return 1;
}
#else
// Not implemented on non-Windows platforms
return 1;
#endif
}
if (!NS_tstrcmp(argv[1], NS_T("setup-symlink"))) {
#ifdef XP_UNIX
NS_tchar path[MAXPATHLEN];
NS_tsnprintf(path, sizeof(path)/sizeof(path[0]),
NS_T("%s/%s"), NS_T("/tmp"), argv[2]);
mkdir(path, 0755);
NS_tsnprintf(path, sizeof(path)/sizeof(path[0]),
NS_T("%s/%s/%s"), NS_T("/tmp"), argv[2], argv[3]);
mkdir(path, 0755);
NS_tsnprintf(path, sizeof(path)/sizeof(path[0]),
NS_T("%s/%s/%s/%s"), NS_T("/tmp"), argv[2], argv[3], argv[4]);
FILE * file = NS_tfopen(path, NS_T("w"));
if (file) {
NS_tfputs(NS_T("test"), file);
fclose(file);
}
if (symlink(path, argv[5]) != 0) {
return 1;
}
NS_tsnprintf(path, sizeof(path)/sizeof(path[0]),
NS_T("%s/%s"), NS_T("/tmp"), argv[2]);
if (argc > 6 && !NS_tstrcmp(argv[6], NS_T("change-perm"))) {
chmod(path, 0644);
}
return 0;
#else
// Not implemented on non-Unix platforms
return 1;
#endif
}
if (!NS_tstrcmp(argv[1], NS_T("remove-symlink"))) {
#ifdef XP_UNIX
NS_tchar path[MAXPATHLEN];
NS_tsnprintf(path, sizeof(path)/sizeof(path[0]),
NS_T("%s/%s"), NS_T("/tmp"), argv[2]);
chmod(path, 0755);
NS_tsnprintf(path, sizeof(path)/sizeof(path[0]),
NS_T("%s/%s/%s/%s"), NS_T("/tmp"), argv[2], argv[3], argv[4]);
unlink(path);
NS_tsnprintf(path, sizeof(path)/sizeof(path[0]),
NS_T("%s/%s/%s"), NS_T("/tmp"), argv[2], argv[3]);
rmdir(path);
NS_tsnprintf(path, sizeof(path)/sizeof(path[0]),
NS_T("%s/%s"), NS_T("/tmp"), argv[2]);
rmdir(path);
return 0;
#else
// Not implemented on non-Unix platforms
return 1;
#endif
}
if (!NS_tstrcmp(argv[1], NS_T("check-symlink"))) {
#ifdef XP_UNIX
struct stat ss;
lstat(argv[2], &ss);
return S_ISLNK(ss.st_mode) ? 0 : 1;
#else
// Not implemented on non-Unix platforms
return 1;
#endif
}
if (!NS_tstrcmp(argv[1], NS_T("wait-for-service-stop"))) {
#ifdef XP_WIN
const int maxWaitSeconds = NS_ttoi(argv[3]);
LPCWSTR serviceName = argv[2];
DWORD serviceState = WaitForServiceStop(serviceName, maxWaitSeconds);
if (SERVICE_STOPPED == serviceState) {
return 0;
} else {
return serviceState;
}
#else
// Not implemented on non-Windows platforms
return 1;
#endif
}
if (!NS_tstrcmp(argv[1], NS_T("wait-for-application-exit"))) {
#ifdef XP_WIN
const int maxWaitSeconds = NS_ttoi(argv[3]);
LPCWSTR application = argv[2];
DWORD ret = WaitForProcessExit(application, maxWaitSeconds);
if (ERROR_SUCCESS == ret) {
return 0;
} else if (WAIT_TIMEOUT == ret) {
return 1;
} else {
return 2;
}
#else
// Not implemented on non-Windows platforms
return 1;
#endif
}
if (!NS_tstrcmp(argv[1], NS_T("is-process-running"))) {
#ifdef XP_WIN
LPCWSTR application = argv[2];
return (ERROR_NOT_FOUND == IsProcessRunning(application)) ? 0 : 1;
#else
// Not implemented on non-Windows platforms
return 1;
#endif
}
if (!NS_tstrcmp(argv[1], NS_T("launch-service"))) {
#ifdef XP_WIN
DWORD ret = LaunchServiceSoftwareUpdateCommand(argc - 2, (LPCWSTR *)argv + 2);
if (ret != ERROR_SUCCESS) {
// 192 is used to avoid reusing a possible return value from the call to
// WaitForServiceStop
return 0x000000C0;
}
// Wait a maximum of 120 seconds.
DWORD lastState = WaitForServiceStop(SVC_NAME, 120);
if (SERVICE_STOPPED == lastState) {
return 0;
}
return lastState;
#else
// Not implemented on non-Windows platforms
return 1;
#endif
}
if (NS_tchdir(argv[1]) != 0) {
return 1;
}
// File in use test helper section
if (!NS_tstrcmp(argv[4], NS_T("-s"))) {
NS_tchar *cwd = NS_tgetcwd(nullptr, 0);
NS_tchar inFilePath[MAXPATHLEN];
NS_tsnprintf(inFilePath, sizeof(inFilePath)/sizeof(inFilePath[0]),
NS_T("%s/%s"), cwd, argv[2]);
NS_tchar outFilePath[MAXPATHLEN];
NS_tsnprintf(outFilePath, sizeof(outFilePath)/sizeof(outFilePath[0]),
NS_T("%s/%s"), cwd, argv[3]);
int seconds = NS_ttoi(argv[5]);
#ifdef XP_WIN
HANDLE hFile = INVALID_HANDLE_VALUE;
if (argc == 7) {
hFile = CreateFileW(argv[6],
DELETE | GENERIC_WRITE, 0,
nullptr, OPEN_EXISTING, 0, nullptr);
if (hFile == INVALID_HANDLE_VALUE) {
WriteMsg(outFilePath, "error_locking");
return 1;
}
}
WriteMsg(outFilePath, "sleeping");
int i = 0;
while (!CheckMsg(inFilePath, "finish\n") && i++ <= seconds) {
Sleep(1000);
}
if (argc == 7) {
CloseHandle(hFile);
}
#else
WriteMsg(outFilePath, "sleeping");
int i = 0;
while (!CheckMsg(inFilePath, "finish\n") && i++ <= seconds) {
sleep(1);
}
#endif
WriteMsg(outFilePath, "finished");
return 0;
}
{
// Command line argument test helper section
NS_tchar logFilePath[MAXPATHLEN];
NS_tsnprintf(logFilePath, sizeof(logFilePath)/sizeof(logFilePath[0]),
NS_T("%s"), argv[2]);
FILE* logFP = NS_tfopen(logFilePath, NS_T("wb"));
for (int i = 1; i < argc; ++i) {
fprintf(logFP, LOG_S "\n", argv[i]);
}
fclose(logFP);
logFP = nullptr;
}
return 0;
}

View file

@ -0,0 +1,172 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* 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/. */
/**
* This binary tests the updater's ReadStrings ini parser and should run in a
* directory with a Unicode character to test bug 473417.
*/
#ifdef XP_WIN
#include <windows.h>
#define NS_main wmain
#define NS_tstrrchr wcsrchr
#define NS_T(str) L ## str
#define PATH_SEPARATOR_CHAR L'\\'
// On Windows, argv[0] can also have forward slashes instead
#define ALT_PATH_SEPARATOR_CHAR L'/'
#else
#include <unistd.h>
#define NS_main main
#define NS_tstrrchr strrchr
#define NS_T(str) str
#define PATH_SEPARATOR_CHAR '/'
#endif
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include "updater/resource.h"
#include "updater/progressui.h"
#include "common/readstrings.h"
#include "common/errors.h"
#include "mozilla/ArrayUtils.h"
#ifndef MAXPATHLEN
# ifdef PATH_MAX
# define MAXPATHLEN PATH_MAX
# elif defined(MAX_PATH)
# define MAXPATHLEN MAX_PATH
# elif defined(_MAX_PATH)
# define MAXPATHLEN _MAX_PATH
# elif defined(CCHMAXPATH)
# define MAXPATHLEN CCHMAXPATH
# else
# define MAXPATHLEN 1024
# endif
#endif
#define TEST_NAME "Updater ReadStrings"
using namespace mozilla;
static int gFailCount = 0;
/**
* Prints the given failure message and arguments using printf, prepending
* "TEST-UNEXPECTED-FAIL " for the benefit of the test harness and
* appending "\n" to eliminate having to type it at each call site.
*/
void fail(const char* msg, ...)
{
va_list ap;
printf("TEST-UNEXPECTED-FAIL | ");
va_start(ap, msg);
vprintf(msg, ap);
va_end(ap);
putchar('\n');
++gFailCount;
}
int NS_main(int argc, NS_tchar **argv)
{
printf("Running TestAUSReadStrings tests\n");
int rv = 0;
int retval;
NS_tchar inifile[MAXPATHLEN];
StringTable testStrings;
NS_tchar *slash = NS_tstrrchr(argv[0], PATH_SEPARATOR_CHAR);
#ifdef ALT_PATH_SEPARATOR_CHAR
NS_tchar *altslash = NS_tstrrchr(argv[0], ALT_PATH_SEPARATOR_CHAR);
slash = (slash > altslash) ? slash : altslash;
#endif // ALT_PATH_SEPARATOR_CHAR
if (!slash) {
fail("%s | unable to find platform specific path separator (check 1)", TEST_NAME);
return 20;
}
*(++slash) = '\0';
// Test success when the ini file exists with both Title and Info in the
// Strings section and the values for Title and Info.
NS_tsnprintf(inifile, ArrayLength(inifile), NS_T("%sTestAUSReadStrings1.ini"), argv[0]);
retval = ReadStrings(inifile, &testStrings);
if (retval == OK) {
if (strcmp(testStrings.title, "Title Test - \xD0\x98\xD1\x81\xD0\xBF\xD1\x8B" \
"\xD1\x82\xD0\xB0\xD0\xBD\xD0\xB8\xD0\xB5 " \
"\xCE\x94\xCE\xBF\xCE\xBA\xCE\xB9\xCE\xBC\xCE\xAE " \
"\xE3\x83\x86\xE3\x82\xB9\xE3\x83\x88 " \
"\xE6\xB8\xAC\xE8\xA9\xA6 " \
"\xE6\xB5\x8B\xE8\xAF\x95") != 0) {
rv = 21;
fail("%s | Title ini value incorrect (check 3)", TEST_NAME);
}
if (strcmp(testStrings.info, "Info Test - \xD0\x98\xD1\x81\xD0\xBF\xD1\x8B" \
"\xD1\x82\xD0\xB0\xD0\xBD\xD0\xB8\xD0\xB5 " \
"\xCE\x94\xCE\xBF\xCE\xBA\xCE\xB9\xCE\xBC\xCE\xAE " \
"\xE3\x83\x86\xE3\x82\xB9\xE3\x83\x88 " \
"\xE6\xB8\xAC\xE8\xA9\xA6 " \
"\xE6\xB5\x8B\xE8\xAF\x95\xE2\x80\xA6") != 0) {
rv = 22;
fail("%s | Info ini value incorrect (check 4)", TEST_NAME);
}
} else {
fail("%s | ReadStrings returned %i (check 2)", TEST_NAME, retval);
rv = 23;
}
// Test failure when the ini file exists without Title and with Info in the
// Strings section.
NS_tsnprintf(inifile, ArrayLength(inifile), NS_T("%sTestAUSReadStrings2.ini"), argv[0]);
retval = ReadStrings(inifile, &testStrings);
if (retval != PARSE_ERROR) {
rv = 24;
fail("%s | ReadStrings returned %i (check 5)", TEST_NAME, retval);
}
// Test failure when the ini file exists with Title and without Info in the
// Strings section.
NS_tsnprintf(inifile, ArrayLength(inifile), NS_T("%sTestAUSReadStrings3.ini"), argv[0]);
retval = ReadStrings(inifile, &testStrings);
if (retval != PARSE_ERROR) {
rv = 25;
fail("%s | ReadStrings returned %i (check 6)", TEST_NAME, retval);
}
// Test failure when the ini file doesn't exist
NS_tsnprintf(inifile, ArrayLength(inifile), NS_T("%sTestAUSReadStringsBogus.ini"), argv[0]);
retval = ReadStrings(inifile, &testStrings);
if (retval != READ_ERROR) {
rv = 26;
fail("%s | ini file doesn't exist (check 7)", TEST_NAME);
}
// Test reading a non-default section name
NS_tsnprintf(inifile, ArrayLength(inifile), NS_T("%sTestAUSReadStrings3.ini"), argv[0]);
retval = ReadStrings(inifile, "Title\0", 1, &testStrings.title, "BogusSection2");
if (retval == OK) {
if (strcmp(testStrings.title, "Bogus Title") != 0) {
rv = 27;
fail("%s | Title ini value incorrect (check 9)", TEST_NAME);
}
} else {
fail("%s | ReadStrings returned %i (check 8)", TEST_NAME, retval);
rv = 28;
}
if (rv == 0) {
printf("TEST-PASS | %s | all checks passed\n", TEST_NAME);
} else {
fail("%s | %i out of 9 checks failed", TEST_NAME, gFailCount);
}
return rv;
}

View file

@ -0,0 +1,47 @@
; This file is in the UTF-8 encoding
[BogusSection1]
; Comment
Title=Bogus Title
; Comment
Info=Bogus Info
; Comment
[Strings]
Bogus1=Bogus1
; Comment
Title=Title Test - Испытание Δοκιμή テスト 測試 测试
; Comment
Bogus2=Bogus2
; Comment
Info=Info Test - Испытание Δοκιμή テスト 測試 测试…
; Comment
Bogus3=Bogus3
; Comment
[BogusSection2]
; Comment
Title=Bogus Title
; Comment
Info=Bogus Info
; Comment

View file

@ -0,0 +1,39 @@
; This file is in the UTF-8 encoding
[BogusSection1]
; Comment
Title=Bogus Title
; Comment
Info=Bogus Info
; Comment
[Strings]
Bogus1=Bogus1
; Comment
Info=Info
; Comment
Bogus2=Bogus2
; Comment
[BogusSection2]
; Comment
Title=Bogus Title
; Comment
Info=Bogus Info
; Comment

View file

@ -0,0 +1,39 @@
; This file is in the UTF-8 encoding
[BogusSection1]
; Comment
Title=Bogus Title
; Comment
Info=Bogus Info
; Comment
[Strings]
Bogus1=Bogus1
; Comment
Title=Title
; Comment
Bogus2=Bogus2
; Comment
[BogusSection2]
; Comment
Title=Bogus Title
; Comment
Info=Bogus Info
; Comment

View file

@ -0,0 +1,7 @@
"use strict";
module.exports = {
"extends": [
"../../../../../testing/mochitest/chrome.eslintrc.js"
]
};

View file

@ -0,0 +1,64 @@
; 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/.
[DEFAULT]
tags = appupdate
support-files =
utils.js
update.sjs
; mochitest-chrome tests must start with "test_" and are executed in sorted
; order and not in the order specified in the manifest.
[test_0010_background_basic.xul]
[test_0011_check_basic.xul]
[test_0012_check_basic_staging.xul]
skip-if = asan
reason = Bug 1168003
[test_0013_check_no_updates.xul]
[test_0014_check_error_xml_malformed.xul]
[test_0061_check_verifyFailPartial_noComplete.xul]
[test_0062_check_verifyFailComplete_noPartial.xul]
[test_0063_check_verifyFailPartialComplete.xul]
[test_0064_check_verifyFailPartial_successComplete.xul]
[test_0071_notify_verifyFailPartial_noComplete.xul]
[test_0072_notify_verifyFailComplete_noPartial.xul]
[test_0073_notify_verifyFailPartialComplete.xul]
[test_0074_notify_verifyFailPartial_successComplete.xul]
[test_0081_error_patchApplyFailure_partial_only.xul]
[test_0082_error_patchApplyFailure_complete_only.xul]
[test_0083_error_patchApplyFailure_partial_complete.xul]
[test_0084_error_patchApplyFailure_verify_failed.xul]
[test_0085_error_patchApplyFailure_partial_complete_staging.xul]
skip-if = asan
reason = Bug 1168003
[test_0092_finishedBackground.xul]
[test_0093_restartNotification.xul]
[test_0094_restartNotification_remote.xul]
[test_0095_restartNotification_remoteInvalidNumber.xul]
[test_0096_restartNotification_stagedBackground.xul]
skip-if = asan
reason = Bug 1168003
[test_0097_restartNotification_stagedServiceBackground.xul]
skip-if = os != 'win'
reason = only Windows has the maintenance service.
[test_0101_background_restartNotification.xul]
[test_0102_background_restartNotification_staging.xul]
skip-if = asan
reason = Bug 1168003
[test_0103_background_restartNotification_stagingService.xul]
skip-if = os != 'win'
reason = only Windows has the maintenance service.
[test_0111_neverButton_basic.xul]
[test_0113_showNeverForVersionRemovedWithPref.xul]
[test_0151_notify_backgroundCheckError.xul]
[test_0152_notify_backgroundCheckOfflineRetry.xul]
[test_0161_check_unsupported.xul]
[test_0162_notify_unsupported.xul]
[test_0171_check_noPerms_manual.xul]
skip-if = os != 'win'
reason = test must be able to prevent file deletion.
[test_0172_notify_noPerms_manual.xul]
skip-if = os != 'win'
reason = test must be able to prevent file deletion.
[test_9999_cleanup.xul]

View file

@ -0,0 +1,50 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Update Wizard pages: basic, download, and finished"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
const TESTS = [ {
pageid: PAGEID_FOUND_BASIC,
buttonClick: "next"
}, {
pageid: PAGEID_DOWNLOADING
}, {
pageid: PAGEID_FINISHED,
buttonClick: "extra1"
} ];
function runTest() {
debugDump("entering");
let url = URL_HTTP_UPDATE_XML + "?showDetails=1&showPrompt=1" +
getVersionParams();
setUpdateURL(url);
gAUS.checkForBackgroundUpdates();
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,51 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Update Wizard pages: update check, basic, download, and finished"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
const TESTS = [ {
pageid: PAGEID_CHECKING
}, {
pageid: PAGEID_FOUND_BASIC,
buttonClick: "next"
}, {
pageid: PAGEID_DOWNLOADING
}, {
pageid: PAGEID_FINISHED,
buttonClick: "extra1"
} ];
function runTest() {
debugDump("entering");
let url = URL_HTTP_UPDATE_XML + "?showDetails=1" + getVersionParams();
setUpdateURL(url);
gUP.checkForUpdates();
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,55 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Update Wizard pages: update check, basic, download with staging, and finished"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
const TESTS = [ {
pageid: PAGEID_CHECKING
}, {
pageid: PAGEID_FOUND_BASIC,
buttonClick: "next"
}, {
pageid: PAGEID_DOWNLOADING
}, {
pageid: PAGEID_FINISHED,
buttonClick: "extra1"
} ];
gUseTestUpdater = true;
function runTest() {
debugDump("entering");
Services.prefs.setBoolPref(PREF_APP_UPDATE_STAGING_ENABLED, true);
let url = URL_HTTP_UPDATE_XML + "?showDetails=1" + getVersionParams();
setUpdateURL(url);
gUP.checkForUpdates();
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,46 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Update Wizard pages: update check and no updates found"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
const TESTS = [ {
pageid: PAGEID_CHECKING
}, {
pageid: PAGEID_NO_UPDATES_FOUND,
buttonClick: "finish"
} ];
function runTest() {
debugDump("entering");
let url = URL_HTTP_UPDATE_XML + "?noUpdates=1";
setUpdateURL(url);
gUP.checkForUpdates();
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,46 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Update Wizard pages: update check and error (xml malformed)"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
const TESTS = [ {
pageid: PAGEID_CHECKING
}, {
pageid: PAGEID_ERRORS,
buttonClick: "finish"
} ];
function runTest() {
debugDump("entering");
let url = URL_HTTP_UPDATE_XML + "?xmlMalformed=1";
setUpdateURL(url);
gUP.checkForUpdates();
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,52 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Update Wizard pages: update check, basic, download, and errors (partial patch with an invalid size)"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
const TESTS = [ {
pageid: PAGEID_CHECKING
}, {
pageid: PAGEID_FOUND_BASIC,
buttonClick: "next"
}, {
pageid: PAGEID_DOWNLOADING
}, {
pageid: PAGEID_ERRORS,
buttonClick: "finish"
} ];
function runTest() {
debugDump("entering");
let url = URL_HTTP_UPDATE_XML + "?showDetails=1&partialPatchOnly=1" +
"&invalidPartialSize=1" + getVersionParams();
setUpdateURL(url);
gUP.checkForUpdates();
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,52 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Update Wizard pages: update check, basic, download, and errors (complete patch with an invalid size)"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
const TESTS = [ {
pageid: PAGEID_CHECKING
}, {
pageid: PAGEID_FOUND_BASIC,
buttonClick: "next"
}, {
pageid: PAGEID_DOWNLOADING
}, {
pageid: PAGEID_ERRORS,
buttonClick: "finish"
} ];
function runTest() {
debugDump("entering");
let url = URL_HTTP_UPDATE_XML + "?showDetails=1&completePatchOnly=1" +
"&invalidCompleteSize=1" + getVersionParams();
setUpdateURL(url);
gUP.checkForUpdates();
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,52 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Update Wizard pages: update check, basic, download, and errors (partial and complete patches with invalid sizes)"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
const TESTS = [ {
pageid: PAGEID_CHECKING
}, {
pageid: PAGEID_FOUND_BASIC,
buttonClick: "next"
}, {
pageid: PAGEID_DOWNLOADING
}, {
pageid: PAGEID_ERRORS,
buttonClick: "finish"
} ];
function runTest() {
debugDump("entering");
let url = URL_HTTP_UPDATE_XML + "?showDetails=1&invalidPartialSize=1" +
"&invalidCompleteSize=1" + getVersionParams();
setUpdateURL(url);
gUP.checkForUpdates();
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,52 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Update Wizard pages: update check, basic, download, and finished (partial patch with an invalid size and successful complete patch)"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
const TESTS = [ {
pageid: PAGEID_CHECKING
}, {
pageid: PAGEID_FOUND_BASIC,
buttonClick: "next"
}, {
pageid: PAGEID_DOWNLOADING
}, {
pageid: PAGEID_FINISHED,
buttonClick: "extra1"
} ];
function runTest() {
debugDump("entering");
let url = URL_HTTP_UPDATE_XML + "?showDetails=1&invalidPartialSize=1" +
getVersionParams();
setUpdateURL(url);
gUP.checkForUpdates();
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,53 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Update Wizard pages: errors (partial patch with an invalid size)"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
const TESTS = [ {
pageid: PAGEID_ERRORS,
buttonClick: "finish"
} ];
function runTest() {
debugDump("entering");
let patches = getLocalPatchString("partial", null, null, null, "1234", null,
STATE_DOWNLOADING);
let updates = getLocalUpdateString(patches, null, null, null,
Services.appinfo.version,
Services.appinfo.platformVersion);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
writeStatusFile(STATE_DOWNLOADING);
reloadUpdateManagerData();
testPostUpdateProcessing();
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,52 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Update Wizard pages: errors (complete patch with an invalid size)"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
const TESTS = [ {
pageid: PAGEID_ERRORS,
buttonClick: "finish"
} ];
function runTest() {
debugDump("entering");
let patches = getLocalPatchString("complete", null, null, null, "1234", null,
STATE_DOWNLOADING);
let updates = getLocalUpdateString(patches, null, null, null,
Services.appinfo.version);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
writeStatusFile(STATE_DOWNLOADING);
reloadUpdateManagerData();
testPostUpdateProcessing();
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,55 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Update Wizard pages: errors (partial and complete patches with invalid sizes)"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
const TESTS = [ {
pageid: PAGEID_ERRORS,
buttonClick: "finish"
} ];
function runTest() {
debugDump("entering");
let patches = getLocalPatchString("partial", null, null, null, "1234", null,
STATE_DOWNLOADING) +
getLocalPatchString("complete", null, null, null, "1234",
"false");
let updates = getLocalUpdateString(patches, null, null, null,
Services.appinfo.version, null,
null, null, null, null, "false");
writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
writeStatusFile(STATE_DOWNLOADING);
reloadUpdateManagerData();
testPostUpdateProcessing();
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,55 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Update Wizard pages: finishedBackground (partial patch with an invalid size and successful complete patch)"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
const TESTS = [ {
pageid: PAGEID_FINISHED_BKGRD,
buttonClick: "extra1"
} ];
function runTest() {
debugDump("entering");
let patches = getLocalPatchString("partial", null, null, null, "1234", null,
STATE_DOWNLOADING) +
getLocalPatchString("complete", null, null, null, null,
"false");
let updates = getLocalUpdateString(patches, null, null, null,
Services.appinfo.version, null,
null, null, null, null, "false");
writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
writeStatusFile(STATE_DOWNLOADING);
reloadUpdateManagerData();
testPostUpdateProcessing();
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,53 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Update Wizard pages: errors (partial only patch apply failure)"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
const TESTS = [ {
pageid: PAGEID_ERRORS,
buttonClick: "finish"
} ];
function runTest() {
debugDump("entering");
let patches = getLocalPatchString("partial", null, null, null, null, null,
STATE_PENDING);
let updates = getLocalUpdateString(patches, null, null, null,
Services.appinfo.version, null,
null, null, null, null, "false");
writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
writeStatusFile(STATE_FAILED_CRC_ERROR);
reloadUpdateManagerData();
testPostUpdateProcessing();
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,52 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Update Wizard pages: errors (complete only patch apply failure)"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
const TESTS = [ {
pageid: PAGEID_ERRORS,
buttonClick: "finish"
} ];
function runTest() {
debugDump("entering");
let patches = getLocalPatchString("complete", null, null, null, null, null,
STATE_PENDING);
let updates = getLocalUpdateString(patches, null, null, null,
Services.appinfo.version);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
writeStatusFile(STATE_FAILED_CRC_ERROR);
reloadUpdateManagerData();
testPostUpdateProcessing();
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,67 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Update Wizard pages: error patching, download, and finished (partial failed and download complete)"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
const TESTS = [ {
pageid: PAGEID_ERROR_PATCHING,
buttonClick: "next"
}, {
pageid: PAGEID_DOWNLOADING,
extraStartFunction: createContinueFile
}, {
pageid: PAGEID_FINISHED,
buttonClick: "extra1",
extraStartFunction: removeContinueFile
} ];
function runTest() {
debugDump("entering");
removeContinueFile();
// Specify the url to update.sjs with a slowDownloadMar param so the ui can
// load before the download completes.
let slowDownloadURL = URL_HTTP_UPDATE_XML + "?slowDownloadMar=1";
let patches = getLocalPatchString("partial", null, null, null, null, null,
STATE_PENDING) +
getLocalPatchString("complete", slowDownloadURL, null, null,
null, "false");
let updates = getLocalUpdateString(patches, null, null, null,
Services.appinfo.version, null,
null, null, null, null, "false");
writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
writeStatusFile(STATE_FAILED_CRC_ERROR);
reloadUpdateManagerData();
testPostUpdateProcessing();
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,68 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Update Wizard pages: error patching, download, and errors (partial failed and download complete verification failure)"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
const TESTS = [ {
pageid: PAGEID_ERROR_PATCHING,
buttonClick: "next"
}, {
pageid: PAGEID_DOWNLOADING,
extraStartFunction: createContinueFile
}, {
pageid: PAGEID_ERRORS,
buttonClick: "finish",
extraStartFunction: removeContinueFile
} ];
function runTest() {
debugDump("entering");
removeContinueFile();
// Specify the url to update.sjs with a slowDownloadMar param so the ui can
// load before the download completes.
let slowDownloadURL = URL_HTTP_UPDATE_XML + "?slowDownloadMar=1";
let patches = getLocalPatchString("partial", null, null, null, null, null,
STATE_PENDING) +
getLocalPatchString("complete", slowDownloadURL, "MD5",
null, "1234",
"false");
let updates = getLocalUpdateString(patches, null, null, null,
Services.appinfo.version, null,
null, null, null, null, "false");
writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
writeStatusFile(STATE_FAILED_CRC_ERROR);
reloadUpdateManagerData();
testPostUpdateProcessing();
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,94 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Update Wizard pages: error patching, download with staging, and finished (partial failed and download complete), with fast MAR download"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
// This test forces the download to complete before the "next" button on the
// errorpatching wizard page is clicked. This is done by creating the continue
// file when the wizard loads to start the download, then clicking the "next"
// button in the download's onStopRequest event listener.
const testDownloadListener = {
onStartRequest(aRequest, aContext) { },
onProgress(aRequest, aContext, aProgress, aMaxProgress) { },
onStatus(aRequest, aContext, aStatus, aStatusText) { },
onStopRequest(aRequest, aContext, aStatus) {
debugDump("clicking errorpatching page next button");
gDocElem.getButton("next").click();
gAUS.removeDownloadListener(this);
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIRequestObserver,
Ci.nsIProgressEventSink])
};
let TESTS = [ {
pageid: PAGEID_ERROR_PATCHING,
extraCheckFunction: createContinueFile
}, {
pageid: PAGEID_DOWNLOADING
}, {
pageid: PAGEID_FINISHED,
buttonClick: "extra1",
extraStartFunction: removeContinueFile
} ];
gUseTestUpdater = true;
function runTest() {
debugDump("entering");
removeContinueFile();
// Specify the url to update.sjs with a slowDownloadMar param so the ui can
// load before the download completes.
let slowDownloadURL = URL_HTTP_UPDATE_XML + "?slowDownloadMar=1";
let patches = getLocalPatchString("partial", null, null, null, null, null,
STATE_PENDING) +
getLocalPatchString("complete", slowDownloadURL, null, null,
null, "false");
let updates = getLocalUpdateString(patches, null, null, null,
Services.appinfo.version, null,
null, null, null, null, "false");
writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
writeStatusFile(STATE_FAILED_READ_ERROR);
Services.prefs.setBoolPref(PREF_APP_UPDATE_STAGING_ENABLED, true);
reloadUpdateManagerData();
testPostUpdateProcessing();
gAUS.addDownloadListener(testDownloadListener);
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,55 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Update Wizard pages: finished background"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
const TESTS = [ {
pageid: PAGEID_FINISHED_BKGRD,
buttonClick: "extra1"
} ];
function runTest() {
debugDump("entering");
let patches = getLocalPatchString("complete", null, null, null, null, null,
STATE_PENDING);
let updates = getLocalUpdateString(patches, null, null, null,
Services.appinfo.version,
Services.appinfo.platformVersion);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
writeStatusFile(STATE_SUCCEEDED);
reloadUpdateManagerData();
is(gUpdateManager.activeUpdate.state, "pending",
"The active update should have a state of pending");
gUP.showUpdateDownloaded(gUpdateManager.activeUpdate);
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,60 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Update Wizard pages: restart notification pref promptWaitTime"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
const TESTS = [ {
pageid: PAGEID_FINISHED_BKGRD,
buttonClick: "extra1"
} ];
function runTest() {
debugDump("entering");
let patches = getLocalPatchString("complete", null, null, null, null, null,
STATE_PENDING);
let updates = getLocalUpdateString(patches, null, null, null,
Services.appinfo.version);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
writeStatusFile(STATE_SUCCEEDED);
Services.prefs.setIntPref(PREF_APP_UPDATE_PROMPTWAITTIME, 1);
reloadUpdateManagerData();
is(gUpdateManager.activeUpdate.state, STATE_PENDING,
"The active update should have a state of " + STATE_PENDING);
ok(gUpdateManager.activeUpdate.promptWaitTime == 1, "Checking that the " +
"update's promptWaitTime attribute value was set from the " +
PREF_APP_UPDATE_PROMPTWAITTIME + " preference");
gUP.showUpdateDownloaded(gUpdateManager.activeUpdate, true);
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,60 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Update Wizard pages: restart notification xml promptWaitTime"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
const TESTS = [ {
pageid: PAGEID_FINISHED_BKGRD,
buttonClick: "extra1"
} ];
function runTest() {
debugDump("entering");
let patches = getLocalPatchString("complete", null, null, null, null, null,
STATE_PENDING);
let updates = getLocalUpdateString(patches, null, null, null,
Services.appinfo.version, null,
null, null, null, null, false,
null, false, false, false, 1);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
writeStatusFile(STATE_SUCCEEDED);
reloadUpdateManagerData();
is(gUpdateManager.activeUpdate.state, STATE_PENDING,
"The active update should have a state of " + STATE_PENDING);
ok(gUpdateManager.activeUpdate.promptWaitTime == 1, "Checking that the " +
"update's promptWaitTime attribute value was set by the XML");
gUP.showUpdateDownloaded(gUpdateManager.activeUpdate, true);
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,66 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Update Wizard pages: restart notification xml promptWaitTime with invalid number"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
const TESTS = [ {
pageid: PAGEID_FINISHED_BKGRD,
buttonClick: "extra1"
} ];
function runTest() {
debugDump("entering");
let patches = getLocalPatchString("complete", null, null, null, null, null,
STATE_PENDING);
let updates = getLocalUpdateString(patches, null, null, null,
Services.appinfo.version,
null, null,
null, null, null,
null, false, null,
false, false,
false, "invalidNumber");
writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
writeStatusFile(STATE_SUCCEEDED);
Services.prefs.setIntPref(PREF_APP_UPDATE_PROMPTWAITTIME, 1);
reloadUpdateManagerData();
is(gUpdateManager.activeUpdate.state, STATE_PENDING,
"The active update should have a state of " + STATE_PENDING);
ok(gUpdateManager.activeUpdate.promptWaitTime == 1, "Checking that the " +
"update's promptWaitTime attribute value was set from the " +
PREF_APP_UPDATE_PROMPTWAITTIME + " preference");
gUP.showUpdateDownloaded(gUpdateManager.activeUpdate, true);
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,65 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Update Wizard pages: restart notification staged w/o service"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
const TESTS = [ {
pageid: PAGEID_FINISHED_BKGRD,
buttonClick: "extra1"
} ];
gUseTestUpdater = true;
function runTest() {
debugDump("entering");
let patches = getLocalPatchString("complete", null, null, null, null, null,
STATE_APPLIED);
let updates = getLocalUpdateString(patches, null, null, null,
Services.appinfo.version,
Services.appinfo.platformVersion);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
writeStatusFile(STATE_APPLIED);
Services.prefs.setIntPref(PREF_APP_UPDATE_PROMPTWAITTIME, 1);
Services.prefs.setBoolPref(PREF_APP_UPDATE_STAGING_ENABLED, true);
Services.prefs.setBoolPref(PREF_APP_UPDATE_SERVICE_ENABLED, false);
reloadUpdateManagerData();
is(gUpdateManager.activeUpdate.state, STATE_APPLIED,
"The active update should have a state of " + STATE_APPLIED);
ok(gUpdateManager.activeUpdate.promptWaitTime == 1, "Checking that the " +
"update's promptWaitTime attribute value was set from the " +
PREF_APP_UPDATE_PROMPTWAITTIME + " preference");
gUpdateManager.refreshUpdateStatus();
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,65 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Update Wizard pages: restart notification staged with service"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
const TESTS = [ {
pageid: PAGEID_FINISHED_BKGRD,
buttonClick: "extra1"
} ];
gUseTestUpdater = true;
function runTest() {
debugDump("entering");
let patches = getLocalPatchString("complete", null, null, null, null, null,
STATE_APPLIED_SVC);
let updates = getLocalUpdateString(patches, null, null, null,
Services.appinfo.version,
Services.appinfo.platformVersion);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
writeStatusFile(STATE_APPLIED_SVC);
Services.prefs.setIntPref(PREF_APP_UPDATE_PROMPTWAITTIME, 1);
Services.prefs.setBoolPref(PREF_APP_UPDATE_STAGING_ENABLED, true);
Services.prefs.setBoolPref(PREF_APP_UPDATE_SERVICE_ENABLED, true);
reloadUpdateManagerData();
is(gUpdateManager.activeUpdate.state, STATE_APPLIED_SVC,
"The active update should have a state of " + STATE_APPLIED_SVC);
ok(gUpdateManager.activeUpdate.promptWaitTime == 1, "Checking that the " +
"update's promptWaitTime attribute value was set from the " +
PREF_APP_UPDATE_PROMPTWAITTIME + " preference");
gUpdateManager.refreshUpdateStatus();
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,46 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Update Wizard pages: background finish with a background download"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
const TESTS = [ {
pageid: PAGEID_FINISHED_BKGRD,
buttonClick: "extra1"
} ];
function runTest() {
debugDump("entering");
Services.prefs.setIntPref(PREF_APP_UPDATE_PROMPTWAITTIME, 1);
let url = URL_HTTP_UPDATE_XML + "?showDetails=1" + getVersionParams();
setUpdateURL(url);
gAUS.notify(null);
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,49 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Update Wizard pages: background finish with a background download and update staging"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
const TESTS = [ {
pageid: PAGEID_FINISHED_BKGRD,
buttonClick: "extra1"
} ];
gUseTestUpdater = true;
function runTest() {
debugDump("entering");
Services.prefs.setBoolPref(PREF_APP_UPDATE_STAGING_ENABLED, true);
Services.prefs.setIntPref(PREF_APP_UPDATE_PROMPTWAITTIME, 1);
let url = URL_HTTP_UPDATE_XML + "?showDetails=1" + getVersionParams();
setUpdateURL(url);
gAUS.notify(null);
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,50 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Update Wizard pages: background finish with a background download and update staging and servicefs"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
const TESTS = [ {
pageid: PAGEID_FINISHED_BKGRD,
buttonClick: "extra1"
} ];
gUseTestUpdater = true;
function runTest() {
debugDump("entering");
Services.prefs.setBoolPref(PREF_APP_UPDATE_STAGING_ENABLED, true);
Services.prefs.setBoolPref(PREF_APP_UPDATE_SERVICE_ENABLED, true);
Services.prefs.setIntPref(PREF_APP_UPDATE_PROMPTWAITTIME, 1);
let url = URL_HTTP_UPDATE_XML + "?showDetails=1" + getVersionParams();
setUpdateURL(url);
gAUS.notify(null);
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,61 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Update Wizard pages: update check and basic (never button test)"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
gPrefToCheck = PREFBRANCH_APP_UPDATE_NEVER + Services.appinfo.version;
const TESTS = [ {
pageid: PAGEID_CHECKING
}, {
pageid: PAGEID_FOUND_BASIC,
extraDelayedCheckFunction: checkPrefHasUserValue,
prefHasUserValue: false,
neverButton: true,
buttonClick: "extra2"
} ];
function runTest() {
debugDump("entering");
let url = URL_HTTP_UPDATE_XML + "?showNever=1&showDetails=1" +
getVersionParams();
setUpdateURL(url);
// add the never preference for this version to verify that checking for
// updates clears the preference.
Services.prefs.setBoolPref(gPrefToCheck, true)
gUP.checkForUpdates();
}
function finishTest() {
checkPrefHasUserValue(true);
finishTestDefault();
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,58 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Update Wizard pages: update available with never pref and without showNeverForVersion"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
gPrefToCheck = PREFBRANCH_APP_UPDATE_NEVER + Services.appinfo.version;
const TESTS = [ {
pageid: PAGEID_FOUND_BASIC,
extraDelayedCheckFunction: checkPrefHasUserValue,
prefHasUserValue: true,
buttonClick: "extra1"
} ];
function runTest() {
debugDump("entering");
let url = URL_HTTP_UPDATE_XML + "?showDetails=1&showPrompt=1" +
getVersionParams();
setUpdateURL(url);
// add the never preference for this version to verify that checking for
// updates clears the preference.
Services.prefs.setBoolPref(gPrefToCheck, true)
gAUS.notify(null);
}
function finishTest() {
Services.prefs.clearUserPref(gPrefToCheck)
finishTestDefault();
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,50 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Test notification when multiple background check errors occur (bug 595455)"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
const TESTS = [ {
pageid: PAGEID_ERROR_EXTRA,
extraDelayedCheckFunction: checkErrorExtraPage,
shouldBeHidden: false,
displayedTextElem: "bgErrorLabel",
buttonClick: "finish"
} ];
function runTest() {
debugDump("entering");
let url = URL_HTTP_UPDATE_XML + "?xmlMalformed=1";
setUpdateURL(url);
errorsPrefObserver.init(PREF_APP_UPDATE_BACKGROUNDERRORS,
PREF_APP_UPDATE_BACKGROUNDMAXERRORS);
gAUS.notify(null);
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,96 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Test that an update check that fails due to being offline is performed after going online"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
const TESTS = [ {
pageid: PAGEID_FOUND_BASIC,
buttonClick: "extra1"
} ];
const NETWORK_ERROR_OFFLINE = 111;
var gProxyPrefValue;
function runTest() {
debugDump("entering");
let url = URL_HTTP_UPDATE_XML + "?showDetails=1" + getVersionParams();
setUpdateURL(url);
Services.prefs.setBoolPref(PREF_APP_UPDATE_ENABLED, true);
Services.prefs.setBoolPref(PREF_APP_UPDATE_AUTO, false);
Services.io.offline = true;
gProxyPrefValue = Services.prefs.getIntPref("network.proxy.type");
Services.prefs.setIntPref("network.proxy.type", 0);
gUpdateChecker.checkForUpdates(updateCheckListener, true);
}
function resetOffline() {
Services.prefs.setIntPref("network.proxy.type", gProxyPrefValue);
Services.io.offline = false;
}
/* Update check listener */
const updateCheckListener = {
onProgress: function UCL_onProgress(aRequest, aPosition, aTotalSize) {
},
onCheckComplete: function UCL_onCheckComplete(aRequest, aUpdates, aUpdateCount) {
let status = aRequest.status;
if (status == 0) {
status = aRequest.channel.QueryInterface(Ci.nsIRequest).status;
}
debugDump("url = " + aRequest.channel.originalURI.spec + ", " +
"request.status = " + status + ", " +
"updateCount = " + aUpdateCount);
ok(false, "Unexpected updateCheckListener::onCheckComplete called");
},
onError: function UCL_onError(aRequest, aUpdate) {
let status = aRequest.status;
if (status == 0) {
status = aRequest.channel.QueryInterface(Ci.nsIRequest).status;
}
is(status, Cr.NS_ERROR_OFFLINE,
"checking the request status value");
is(aUpdate.errorCode, NETWORK_ERROR_OFFLINE,
"checking the update error code");
debugDump("url = " + aRequest.channel.originalURI.spec + ", " +
"request.status = " + status + ", " +
"update.statusText = " +
(aUpdate.statusText ? aUpdate.statusText : "null"));
gAUS.onError(aRequest, aUpdate);
// Use a timeout to allow the XHR to complete
SimpleTest.executeSoon(resetOffline);
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIUpdateCheckListener])
};
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,50 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Test checking for updates when system is no longer supported (bug 843497)"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
const TESTS = [ {
pageid: PAGEID_CHECKING
}, {
pageid: PAGEID_UNSUPPORTED,
buttonClick: "finish"
} ];
function runTest() {
debugDump("entering");
// When checking manually the unsupported page should still be shown even if
// it was shown previously.
Services.prefs.setBoolPref(PREF_APP_UPDATE_NOTIFIEDUNSUPPORTED, true);
let url = URL_HTTP_UPDATE_XML + "?unsupported=1";
setUpdateURL(url);
gUP.checkForUpdates();
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,44 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Test notification of updates when system is no longer supported (bug 843497)"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
const TESTS = [ {
pageid: PAGEID_UNSUPPORTED,
buttonClick: "finish"
} ];
function runTest() {
debugDump("entering");
let url = URL_HTTP_UPDATE_XML + "?unsupported=1";
setUpdateURL(url);
gAUS.notify(null);
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,64 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Update Wizard pages: manual"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
const TESTS = [ {
pageid: PAGEID_CHECKING
}, {
pageid: PAGEID_MANUAL_UPDATE,
buttonClick: "finish",
extraCheckFunction: getWriteTestFile
} ];
function runTest() {
debugDump("entering");
let file = getWriteTestFile();
file.create(file.NORMAL_FILE_TYPE, 0o444);
file.fileAttributesWin |= file.WFA_READONLY;
file.fileAttributesWin &= ~file.WFA_READWRITE;
let url = URL_HTTP_UPDATE_XML + "?showDetails=1" + getVersionParams();
setUpdateURL(url);
gUP.checkForUpdates();
}
function getWriteTestFile() {
let file = getAppBaseDir();
file.append(FILE_UPDATE_TEST);
file.QueryInterface(Ci.nsILocalFileWin);
if (file.exists()) {
file.fileAttributesWin |= file.WFA_READWRITE;
file.fileAttributesWin &= ~file.WFA_READONLY;
file.remove(true);
}
return file;
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,63 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Update Wizard pages: manual"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTestDefault();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
const TESTS = [ {
pageid: PAGEID_MANUAL_UPDATE,
buttonClick: "finish",
extraCheckFunction: getWriteTestFile
} ];
function runTest() {
debugDump("entering");
let file = getWriteTestFile();
file.create(file.NORMAL_FILE_TYPE, 0o444);
file.fileAttributesWin |= file.WFA_READONLY;
file.fileAttributesWin &= ~file.WFA_READWRITE;
let url = URL_HTTP_UPDATE_XML + "?showDetails=1&showPrompt=1" +
getVersionParams();
setUpdateURL(url);
gAUS.checkForBackgroundUpdates();
}
function getWriteTestFile() {
let file = getAppBaseDir();
file.append(FILE_UPDATE_TEST);
file.QueryInterface(Ci.nsILocalFileWin);
if (file.exists()) {
file.fileAttributesWin |= file.WFA_READWRITE;
file.fileAttributesWin &= ~file.WFA_READONLY;
file.remove(true);
}
return file;
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,112 @@
<?xml version="1.0"?>
<!--
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
/**
* Removes files and preferences for previous application update tests in case
* any of them had a fatal error. The test name ensures that it will run after
* all other tests as long as the test naming uses the same format as the
* existing tests.
*/
-->
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<window title="Application Update test cleanup"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="runTest();">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="application/javascript"
src="utils.js"/>
<script type="application/javascript">
<![CDATA[
/**
* If the application update tests left behind any of the files it uses it could
* be a very bad thing. The purpose of this test is to prevent that from
* happening.
*/
function runTest() {
debugDump("entering");
SimpleTest.waitForExplicitFinish();
if (DEBUG_AUS_TEST) {
Services.prefs.setBoolPref(PREF_APP_UPDATE_LOG, true);
}
closeUpdateWindow();
// Always leave the app.update.enabled and app.update.staging.enabled
// preferences set to false when cleaning up.
Services.prefs.setBoolPref(PREF_APP_UPDATE_ENABLED, false);
Services.prefs.setBoolPref(PREF_APP_UPDATE_STAGING_ENABLED, false);
resetFiles();
removeUpdateDirsAndFiles();
reloadUpdateManagerData();
let file = getUpdatesXMLFile(true);
ok(!file.exists(), file.path + " should not exist");
file = getUpdatesXMLFile(false);
ok(!file.exists(), file.path + " should not exist");
let dir = getUpdatesDir();
file = dir.clone();
file.append(FILE_UPDATE_STATUS);
ok(!file.exists(), file.path + " should not exist");
file = dir.clone();
file.append(FILE_UPDATE_MAR);
ok(!file.exists(), file.path + " should not exist");
cleanupRestoreUpdaterBackup();
}
/**
* After all tests finish this will repeatedly attempt to restore the real
* updater if it exists and then call finishTest after the restore is
* successful.
*/
function cleanupRestoreUpdaterBackup() {
debugDump("entering");
try {
// Windows debug builds keep the updater file in use for a short period of
// time after the updater process exits.
restoreUpdaterBackup();
} catch (e) {
logTestInfo("Attempt to restore the backed up updater failed... " +
"will try again, Exception: " + e);
SimpleTest.executeSoon(cleanupRestoreUpdaterBackup);
return;
}
SimpleTest.executeSoon(finishTest);
}
function finishTest() {
debugDump("entering");
if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_LOG)) {
Services.prefs.clearUserPref(PREF_APP_UPDATE_LOG);
}
SimpleTest.finish();
}
]]>
</script>
<body xmlns="http://www.w3.org/1999/xhtml">
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test"></pre>
</body>
</window>

View file

@ -0,0 +1,194 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
/**
* Server side http server script for application update tests.
*/
const { classes: Cc, interfaces: Ci } = Components;
const REL_PATH_DATA = "chrome/toolkit/mozapps/update/tests/data/";
function getTestDataFile(aFilename) {
let file = Cc["@mozilla.org/file/directory_service;1"].
getService(Ci.nsIProperties).get("CurWorkD", Ci.nsILocalFile);
let pathParts = REL_PATH_DATA.split("/");
for (let i = 0; i < pathParts.length; ++i) {
file.append(pathParts[i]);
}
if (aFilename) {
file.append(aFilename);
}
return file;
}
function loadHelperScript() {
let scriptFile = getTestDataFile("sharedUpdateXML.js");
let io = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService2);
let scriptSpec = io.newFileURI(scriptFile).spec;
let scriptloader = Cc["@mozilla.org/moz/jssubscript-loader;1"].
getService(Ci.mozIJSSubScriptLoader);
scriptloader.loadSubScript(scriptSpec, this);
}
loadHelperScript();
const URL_HOST = "http://example.com";
const URL_PATH_UPDATE_XML = "/chrome/toolkit/mozapps/update/tests/chrome/update.sjs";
const URL_HTTP_UPDATE_SJS = URL_HOST + URL_PATH_UPDATE_XML;
const SERVICE_URL = URL_HOST + "/" + REL_PATH_DATA + FILE_SIMPLE_MAR;
const SLOW_MAR_DOWNLOAD_INTERVAL = 100;
var gTimer;
function handleRequest(aRequest, aResponse) {
let params = { };
if (aRequest.queryString) {
params = parseQueryString(aRequest.queryString);
}
let statusCode = params.statusCode ? parseInt(params.statusCode) : 200;
let statusReason = params.statusReason ? params.statusReason : "OK";
aResponse.setStatusLine(aRequest.httpVersion, statusCode, statusReason);
aResponse.setHeader("Cache-Control", "no-cache", false);
// When a mar download is started by the update service it can finish
// downloading before the ui has loaded. By specifying a serviceURL for the
// update patch that points to this file and has a slowDownloadMar param the
// mar will be downloaded asynchronously which will allow the ui to load
// before the download completes.
if (params.slowDownloadMar) {
aResponse.processAsync();
aResponse.setHeader("Content-Type", "binary/octet-stream");
aResponse.setHeader("Content-Length", SIZE_SIMPLE_MAR);
var continueFile = getTestDataFile("continue");
var contents = readFileBytes(getTestDataFile(FILE_SIMPLE_MAR));
gTimer = Cc["@mozilla.org/timer;1"].
createInstance(Ci.nsITimer);
gTimer.initWithCallback(function(aTimer) {
if (continueFile.exists()) {
gTimer.cancel();
aResponse.write(contents);
aResponse.finish();
}
}, SLOW_MAR_DOWNLOAD_INTERVAL, Ci.nsITimer.TYPE_REPEATING_SLACK);
return;
}
if (params.uiURL) {
let remoteType = "";
if (!params.remoteNoTypeAttr && params.uiURL == "BILLBOARD") {
remoteType = " " + params.uiURL.toLowerCase() + "=\"1\"";
}
aResponse.write("<html><head><meta http-equiv=\"content-type\" content=" +
"\"text/html; charset=utf-8\"></head><body" +
remoteType + ">" + params.uiURL +
"<br><br>this is a test mar that will not affect your " +
"build.</body></html>");
return;
}
if (params.xmlMalformed) {
aResponse.write("xml error");
return;
}
if (params.noUpdates) {
aResponse.write(getRemoteUpdatesXMLString(""));
return;
}
if (params.unsupported) {
aResponse.write(getRemoteUpdatesXMLString(" <update type=\"major\" " +
"unsupported=\"true\" " +
"detailsURL=\"" + URL_HOST +
"\"></update>\n"));
return;
}
let size;
let patches = "";
if (!params.partialPatchOnly) {
size = SIZE_SIMPLE_MAR + (params.invalidCompleteSize ? "1" : "");
patches += getRemotePatchString("complete", SERVICE_URL, "SHA512",
SHA512_HASH_SIMPLE_MAR, size);
}
if (!params.completePatchOnly) {
size = SIZE_SIMPLE_MAR + (params.invalidPartialSize ? "1" : "");
patches += getRemotePatchString("partial", SERVICE_URL, "SHA512",
SHA512_HASH_SIMPLE_MAR, size);
}
let type = params.type ? params.type : "major";
let name = params.name ? params.name : "App Update Test";
let appVersion = params.appVersion ? params.appVersion : "999999.9";
let displayVersion = params.displayVersion ? params.displayVersion
: "version " + appVersion;
let buildID = params.buildID ? params.buildID : "01234567890123";
// XXXrstrong - not specifying a detailsURL will cause a leak due to bug 470244
// let detailsURL = params.showDetails ? URL_HTTP_UPDATE_SJS + "?uiURL=DETAILS" : null;
let detailsURL = URL_HTTP_UPDATE_SJS + "?uiURL=DETAILS";
let showPrompt = params.showPrompt ? "true" : null;
let showNever = params.showNever ? "true" : null;
let promptWaitTime = params.promptWaitTime ? params.promptWaitTime : null;
let updates = getRemoteUpdateString(patches, type, "App Update Test",
displayVersion, appVersion, buildID,
detailsURL, showPrompt, showNever,
promptWaitTime);
aResponse.write(getRemoteUpdatesXMLString(updates));
}
/**
* Helper function to create a JS object representing the url parameters from
* the request's queryString.
*
* @param aQueryString
* The request's query string.
* @return A JS object representing the url parameters from the request's
* queryString.
*/
function parseQueryString(aQueryString) {
let paramArray = aQueryString.split("&");
let regex = /^([^=]+)=(.*)$/;
let params = {};
for (let i = 0, sz = paramArray.length; i < sz; i++) {
let match = regex.exec(paramArray[i]);
if (!match) {
throw "Bad parameter in queryString! '" + paramArray[i] + "'";
}
params[decodeURIComponent(match[1])] = decodeURIComponent(match[2]);
}
return params;
}
/**
* Reads the binary contents of a file and returns it as a string.
*
* @param aFile
* The file to read from.
* @return The contents of the file as a string.
*/
function readFileBytes(aFile) {
let fis = Cc["@mozilla.org/network/file-input-stream;1"].
createInstance(Ci.nsIFileInputStream);
fis.init(aFile, -1, -1, false);
let bis = Cc["@mozilla.org/binaryinputstream;1"].
createInstance(Ci.nsIBinaryInputStream);
bis.setInputStream(fis);
let data = [];
let count = fis.available();
while (count > 0) {
let bytes = bis.readByteArray(Math.min(65535, count));
data.push(String.fromCharCode.apply(null, bytes));
count -= bytes.length;
if (bytes.length == 0) {
throw "Nothing read from input stream!";
}
}
data.join('');
fis.close();
return data.toString();
}

File diff suppressed because it is too large Load diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

View file

@ -0,0 +1,332 @@
UPDATE TYPE complete
PREPARE REMOVEFILE Contents/Resources/searchplugins/searchpluginstext0
PREPARE REMOVEFILE Contents/Resources/searchplugins/searchpluginspng0.png
PREPARE REMOVEFILE Contents/Resources/removed-files
PREPARE REMOVEFILE Contents/Resources/precomplete
PREPARE REMOVEFILE Contents/Resources/2/20/20text0
PREPARE REMOVEFILE Contents/Resources/2/20/20png0.png
PREPARE REMOVEFILE Contents/Resources/0/0exe0.exe
PREPARE REMOVEFILE Contents/Resources/0/00/00text0
PREPARE REMOVEFILE Contents/MacOS/exe0.exe
PREPARE REMOVEDIR Contents/Resources/searchplugins/
PREPARE REMOVEDIR Contents/Resources/defaults/pref/
PREPARE REMOVEDIR Contents/Resources/defaults/
PREPARE REMOVEDIR Contents/Resources/2/20/
PREPARE REMOVEDIR Contents/Resources/2/
PREPARE REMOVEDIR Contents/Resources/0/00/
PREPARE REMOVEDIR Contents/Resources/0/
PREPARE REMOVEDIR Contents/Resources/
PREPARE REMOVEDIR Contents/MacOS/
PREPARE REMOVEDIR Contents/
PREPARE ADD Contents/Resources/searchplugins/searchpluginstext0
PREPARE ADD Contents/Resources/searchplugins/searchpluginspng1.png
PREPARE ADD Contents/Resources/searchplugins/searchpluginspng0.png
PREPARE ADD Contents/Resources/removed-files
PREPARE ADD Contents/Resources/precomplete
PREPARE ADD Contents/Resources/distribution/extensions/extensions1/extensions1text0
PREPARE ADD Contents/Resources/distribution/extensions/extensions1/extensions1png1.png
PREPARE ADD Contents/Resources/distribution/extensions/extensions1/extensions1png0.png
PREPARE ADD Contents/Resources/distribution/extensions/extensions0/extensions0text0
PREPARE ADD Contents/Resources/distribution/extensions/extensions0/extensions0png1.png
PREPARE ADD Contents/Resources/distribution/extensions/extensions0/extensions0png0.png
PREPARE ADD Contents/Resources/1/10/10text0
PREPARE ADD Contents/Resources/0/0exe0.exe
PREPARE ADD Contents/Resources/0/00/00text1
PREPARE ADD Contents/Resources/0/00/00text0
PREPARE ADD Contents/Resources/0/00/00png0.png
PREPARE ADD Contents/MacOS/exe0.exe
PREPARE REMOVEDIR Contents/Resources/9/99/
PREPARE REMOVEDIR Contents/Resources/9/99/
PREPARE REMOVEDIR Contents/Resources/9/98/
PREPARE REMOVEFILE Contents/Resources/9/97/970/97xtext0
PREPARE REMOVEFILE Contents/Resources/9/97/970/97xtext1
PREPARE REMOVEDIR Contents/Resources/9/97/970/
PREPARE REMOVEFILE Contents/Resources/9/97/971/97xtext0
PREPARE REMOVEFILE Contents/Resources/9/97/971/97xtext1
PREPARE REMOVEDIR Contents/Resources/9/97/971/
PREPARE REMOVEDIR Contents/Resources/9/97/
PREPARE REMOVEFILE Contents/Resources/9/96/96text0
PREPARE REMOVEFILE Contents/Resources/9/96/96text1
PREPARE REMOVEDIR Contents/Resources/9/96/
PREPARE REMOVEDIR Contents/Resources/9/95/
PREPARE REMOVEDIR Contents/Resources/9/95/
PREPARE REMOVEDIR Contents/Resources/9/94/
PREPARE REMOVEDIR Contents/Resources/9/94/
PREPARE REMOVEDIR Contents/Resources/9/93/
PREPARE REMOVEDIR Contents/Resources/9/92/
PREPARE REMOVEDIR Contents/Resources/9/91/
PREPARE REMOVEDIR Contents/Resources/9/90/
PREPARE REMOVEDIR Contents/Resources/9/90/
PREPARE REMOVEDIR Contents/Resources/8/89/
PREPARE REMOVEDIR Contents/Resources/8/89/
PREPARE REMOVEDIR Contents/Resources/8/88/
PREPARE REMOVEFILE Contents/Resources/8/87/870/87xtext0
PREPARE REMOVEFILE Contents/Resources/8/87/870/87xtext1
PREPARE REMOVEDIR Contents/Resources/8/87/870/
PREPARE REMOVEFILE Contents/Resources/8/87/871/87xtext0
PREPARE REMOVEFILE Contents/Resources/8/87/871/87xtext1
PREPARE REMOVEDIR Contents/Resources/8/87/871/
PREPARE REMOVEDIR Contents/Resources/8/87/
PREPARE REMOVEFILE Contents/Resources/8/86/86text0
PREPARE REMOVEFILE Contents/Resources/8/86/86text1
PREPARE REMOVEDIR Contents/Resources/8/86/
PREPARE REMOVEDIR Contents/Resources/8/85/
PREPARE REMOVEDIR Contents/Resources/8/85/
PREPARE REMOVEDIR Contents/Resources/8/84/
PREPARE REMOVEDIR Contents/Resources/8/84/
PREPARE REMOVEDIR Contents/Resources/8/83/
PREPARE REMOVEDIR Contents/Resources/8/82/
PREPARE REMOVEDIR Contents/Resources/8/81/
PREPARE REMOVEDIR Contents/Resources/8/80/
PREPARE REMOVEDIR Contents/Resources/8/80/
PREPARE REMOVEFILE Contents/Resources/7/70/7xtest.exe
PREPARE REMOVEFILE Contents/Resources/7/70/7xtext0
PREPARE REMOVEFILE Contents/Resources/7/70/7xtext1
PREPARE REMOVEDIR Contents/Resources/7/70/
PREPARE REMOVEFILE Contents/Resources/7/71/7xtest.exe
PREPARE REMOVEFILE Contents/Resources/7/71/7xtext0
PREPARE REMOVEFILE Contents/Resources/7/71/7xtext1
PREPARE REMOVEDIR Contents/Resources/7/71/
PREPARE REMOVEFILE Contents/Resources/7/7text0
PREPARE REMOVEFILE Contents/Resources/7/7text1
PREPARE REMOVEDIR Contents/Resources/7/
PREPARE REMOVEDIR Contents/Resources/6/
PREPARE REMOVEFILE Contents/Resources/5/5text1
PREPARE REMOVEFILE Contents/Resources/5/5text0
PREPARE REMOVEFILE Contents/Resources/5/5test.exe
PREPARE REMOVEFILE Contents/Resources/5/5text0
PREPARE REMOVEFILE Contents/Resources/5/5text1
PREPARE REMOVEDIR Contents/Resources/5/
PREPARE REMOVEFILE Contents/Resources/4/4text1
PREPARE REMOVEFILE Contents/Resources/4/4text0
PREPARE REMOVEDIR Contents/Resources/4/
PREPARE REMOVEFILE Contents/Resources/3/3text1
PREPARE REMOVEFILE Contents/Resources/3/3text0
EXECUTE REMOVEFILE Contents/Resources/searchplugins/searchpluginstext0
EXECUTE REMOVEFILE Contents/Resources/searchplugins/searchpluginspng0.png
EXECUTE REMOVEFILE Contents/Resources/removed-files
EXECUTE REMOVEFILE Contents/Resources/precomplete
EXECUTE REMOVEFILE Contents/Resources/2/20/20text0
EXECUTE REMOVEFILE Contents/Resources/2/20/20png0.png
EXECUTE REMOVEFILE Contents/Resources/0/0exe0.exe
EXECUTE REMOVEFILE Contents/Resources/0/00/00text0
EXECUTE REMOVEFILE Contents/MacOS/exe0.exe
EXECUTE REMOVEDIR Contents/Resources/searchplugins/
EXECUTE REMOVEDIR Contents/Resources/defaults/pref/
EXECUTE REMOVEDIR Contents/Resources/defaults/
EXECUTE REMOVEDIR Contents/Resources/2/20/
EXECUTE REMOVEDIR Contents/Resources/2/
EXECUTE REMOVEDIR Contents/Resources/0/00/
EXECUTE REMOVEDIR Contents/Resources/0/
EXECUTE REMOVEDIR Contents/Resources/
EXECUTE REMOVEDIR Contents/MacOS/
EXECUTE REMOVEDIR Contents/
EXECUTE ADD Contents/Resources/searchplugins/searchpluginstext0
EXECUTE ADD Contents/Resources/searchplugins/searchpluginspng1.png
EXECUTE ADD Contents/Resources/searchplugins/searchpluginspng0.png
EXECUTE ADD Contents/Resources/removed-files
EXECUTE ADD Contents/Resources/precomplete
EXECUTE ADD Contents/Resources/distribution/extensions/extensions1/extensions1text0
EXECUTE ADD Contents/Resources/distribution/extensions/extensions1/extensions1png1.png
EXECUTE ADD Contents/Resources/distribution/extensions/extensions1/extensions1png0.png
EXECUTE ADD Contents/Resources/distribution/extensions/extensions0/extensions0text0
EXECUTE ADD Contents/Resources/distribution/extensions/extensions0/extensions0png1.png
EXECUTE ADD Contents/Resources/distribution/extensions/extensions0/extensions0png0.png
EXECUTE ADD Contents/Resources/1/10/10text0
EXECUTE ADD Contents/Resources/0/0exe0.exe
EXECUTE ADD Contents/Resources/0/00/00text1
EXECUTE ADD Contents/Resources/0/00/00text0
EXECUTE ADD Contents/Resources/0/00/00png0.png
EXECUTE ADD Contents/MacOS/exe0.exe
EXECUTE REMOVEDIR Contents/Resources/9/99/
EXECUTE REMOVEDIR Contents/Resources/9/99/
EXECUTE REMOVEDIR Contents/Resources/9/98/
EXECUTE REMOVEFILE Contents/Resources/9/97/970/97xtext0
EXECUTE REMOVEFILE Contents/Resources/9/97/970/97xtext1
EXECUTE REMOVEDIR Contents/Resources/9/97/970/
EXECUTE REMOVEFILE Contents/Resources/9/97/971/97xtext0
EXECUTE REMOVEFILE Contents/Resources/9/97/971/97xtext1
EXECUTE REMOVEDIR Contents/Resources/9/97/971/
EXECUTE REMOVEDIR Contents/Resources/9/97/
EXECUTE REMOVEFILE Contents/Resources/9/96/96text0
EXECUTE REMOVEFILE Contents/Resources/9/96/96text1
EXECUTE REMOVEDIR Contents/Resources/9/96/
EXECUTE REMOVEDIR Contents/Resources/9/95/
EXECUTE REMOVEDIR Contents/Resources/9/95/
EXECUTE REMOVEDIR Contents/Resources/9/94/
EXECUTE REMOVEDIR Contents/Resources/9/94/
EXECUTE REMOVEDIR Contents/Resources/9/93/
EXECUTE REMOVEDIR Contents/Resources/9/92/
EXECUTE REMOVEDIR Contents/Resources/9/91/
EXECUTE REMOVEDIR Contents/Resources/9/90/
EXECUTE REMOVEDIR Contents/Resources/9/90/
EXECUTE REMOVEDIR Contents/Resources/8/89/
EXECUTE REMOVEDIR Contents/Resources/8/89/
EXECUTE REMOVEDIR Contents/Resources/8/88/
EXECUTE REMOVEFILE Contents/Resources/8/87/870/87xtext0
EXECUTE REMOVEFILE Contents/Resources/8/87/870/87xtext1
EXECUTE REMOVEDIR Contents/Resources/8/87/870/
EXECUTE REMOVEFILE Contents/Resources/8/87/871/87xtext0
EXECUTE REMOVEFILE Contents/Resources/8/87/871/87xtext1
EXECUTE REMOVEDIR Contents/Resources/8/87/871/
EXECUTE REMOVEDIR Contents/Resources/8/87/
EXECUTE REMOVEFILE Contents/Resources/8/86/86text0
EXECUTE REMOVEFILE Contents/Resources/8/86/86text1
EXECUTE REMOVEDIR Contents/Resources/8/86/
EXECUTE REMOVEDIR Contents/Resources/8/85/
EXECUTE REMOVEDIR Contents/Resources/8/85/
EXECUTE REMOVEDIR Contents/Resources/8/84/
EXECUTE REMOVEDIR Contents/Resources/8/84/
EXECUTE REMOVEDIR Contents/Resources/8/83/
EXECUTE REMOVEDIR Contents/Resources/8/82/
EXECUTE REMOVEDIR Contents/Resources/8/81/
EXECUTE REMOVEDIR Contents/Resources/8/80/
EXECUTE REMOVEDIR Contents/Resources/8/80/
EXECUTE REMOVEFILE Contents/Resources/7/70/7xtest.exe
EXECUTE REMOVEFILE Contents/Resources/7/70/7xtext0
EXECUTE REMOVEFILE Contents/Resources/7/70/7xtext1
EXECUTE REMOVEDIR Contents/Resources/7/70/
EXECUTE REMOVEFILE Contents/Resources/7/71/7xtest.exe
EXECUTE REMOVEFILE Contents/Resources/7/71/7xtext0
EXECUTE REMOVEFILE Contents/Resources/7/71/7xtext1
EXECUTE REMOVEDIR Contents/Resources/7/71/
EXECUTE REMOVEFILE Contents/Resources/7/7text0
EXECUTE REMOVEFILE Contents/Resources/7/7text1
EXECUTE REMOVEDIR Contents/Resources/7/
EXECUTE REMOVEDIR Contents/Resources/6/
EXECUTE REMOVEFILE Contents/Resources/5/5text1
EXECUTE REMOVEFILE Contents/Resources/5/5text0
EXECUTE REMOVEFILE Contents/Resources/5/5test.exe
EXECUTE REMOVEFILE Contents/Resources/5/5text0
file cannot be removed because it does not exist; skipping
EXECUTE REMOVEFILE Contents/Resources/5/5text1
file cannot be removed because it does not exist; skipping
EXECUTE REMOVEDIR Contents/Resources/5/
EXECUTE REMOVEFILE Contents/Resources/4/4text1
EXECUTE REMOVEFILE Contents/Resources/4/4text0
EXECUTE REMOVEDIR Contents/Resources/4/
EXECUTE REMOVEFILE Contents/Resources/3/3text1
EXECUTE REMOVEFILE Contents/Resources/3/3text0
FINISH REMOVEFILE Contents/Resources/searchplugins/searchpluginstext0
FINISH REMOVEFILE Contents/Resources/searchplugins/searchpluginspng0.png
FINISH REMOVEFILE Contents/Resources/removed-files
FINISH REMOVEFILE Contents/Resources/precomplete
FINISH REMOVEFILE Contents/Resources/2/20/20text0
FINISH REMOVEFILE Contents/Resources/2/20/20png0.png
FINISH REMOVEFILE Contents/Resources/0/0exe0.exe
FINISH REMOVEFILE Contents/Resources/0/00/00text0
FINISH REMOVEFILE Contents/MacOS/exe0.exe
FINISH REMOVEDIR Contents/Resources/searchplugins/
removing directory: Contents/Resources/searchplugins/, rv: 0
FINISH REMOVEDIR Contents/Resources/defaults/pref/
removing directory: Contents/Resources/defaults/pref/, rv: 0
FINISH REMOVEDIR Contents/Resources/defaults/
removing directory: Contents/Resources/defaults/, rv: 0
FINISH REMOVEDIR Contents/Resources/2/20/
FINISH REMOVEDIR Contents/Resources/2/
FINISH REMOVEDIR Contents/Resources/0/00/
removing directory: Contents/Resources/0/00/, rv: 0
FINISH REMOVEDIR Contents/Resources/0/
removing directory: Contents/Resources/0/, rv: 0
FINISH REMOVEDIR Contents/Resources/
removing directory: Contents/Resources/, rv: 0
FINISH REMOVEDIR Contents/MacOS/
removing directory: Contents/MacOS/, rv: 0
FINISH REMOVEDIR Contents/
removing directory: Contents/, rv: 0
FINISH ADD Contents/Resources/searchplugins/searchpluginstext0
FINISH ADD Contents/Resources/searchplugins/searchpluginspng1.png
FINISH ADD Contents/Resources/searchplugins/searchpluginspng0.png
FINISH ADD Contents/Resources/removed-files
FINISH ADD Contents/Resources/precomplete
FINISH ADD Contents/Resources/distribution/extensions/extensions1/extensions1text0
FINISH ADD Contents/Resources/distribution/extensions/extensions1/extensions1png1.png
FINISH ADD Contents/Resources/distribution/extensions/extensions1/extensions1png0.png
FINISH ADD Contents/Resources/distribution/extensions/extensions0/extensions0text0
FINISH ADD Contents/Resources/distribution/extensions/extensions0/extensions0png1.png
FINISH ADD Contents/Resources/distribution/extensions/extensions0/extensions0png0.png
FINISH ADD Contents/Resources/1/10/10text0
FINISH ADD Contents/Resources/0/0exe0.exe
FINISH ADD Contents/Resources/0/00/00text1
FINISH ADD Contents/Resources/0/00/00text0
FINISH ADD Contents/Resources/0/00/00png0.png
FINISH ADD Contents/MacOS/exe0.exe
FINISH REMOVEDIR Contents/Resources/9/99/
FINISH REMOVEDIR Contents/Resources/9/99/
directory no longer exists; skipping
FINISH REMOVEDIR Contents/Resources/9/98/
FINISH REMOVEFILE Contents/Resources/9/97/970/97xtext0
FINISH REMOVEFILE Contents/Resources/9/97/970/97xtext1
FINISH REMOVEDIR Contents/Resources/9/97/970/
FINISH REMOVEFILE Contents/Resources/9/97/971/97xtext0
FINISH REMOVEFILE Contents/Resources/9/97/971/97xtext1
FINISH REMOVEDIR Contents/Resources/9/97/971/
FINISH REMOVEDIR Contents/Resources/9/97/
FINISH REMOVEFILE Contents/Resources/9/96/96text0
FINISH REMOVEFILE Contents/Resources/9/96/96text1
FINISH REMOVEDIR Contents/Resources/9/96/
FINISH REMOVEDIR Contents/Resources/9/95/
FINISH REMOVEDIR Contents/Resources/9/95/
directory no longer exists; skipping
FINISH REMOVEDIR Contents/Resources/9/94/
FINISH REMOVEDIR Contents/Resources/9/94/
directory no longer exists; skipping
FINISH REMOVEDIR Contents/Resources/9/93/
FINISH REMOVEDIR Contents/Resources/9/92/
removing directory: Contents/Resources/9/92/, rv: 0
FINISH REMOVEDIR Contents/Resources/9/91/
removing directory: Contents/Resources/9/91/, rv: 0
FINISH REMOVEDIR Contents/Resources/9/90/
FINISH REMOVEDIR Contents/Resources/9/90/
directory no longer exists; skipping
FINISH REMOVEDIR Contents/Resources/8/89/
FINISH REMOVEDIR Contents/Resources/8/89/
directory no longer exists; skipping
FINISH REMOVEDIR Contents/Resources/8/88/
FINISH REMOVEFILE Contents/Resources/8/87/870/87xtext0
FINISH REMOVEFILE Contents/Resources/8/87/870/87xtext1
FINISH REMOVEDIR Contents/Resources/8/87/870/
FINISH REMOVEFILE Contents/Resources/8/87/871/87xtext0
FINISH REMOVEFILE Contents/Resources/8/87/871/87xtext1
FINISH REMOVEDIR Contents/Resources/8/87/871/
FINISH REMOVEDIR Contents/Resources/8/87/
FINISH REMOVEFILE Contents/Resources/8/86/86text0
FINISH REMOVEFILE Contents/Resources/8/86/86text1
FINISH REMOVEDIR Contents/Resources/8/86/
FINISH REMOVEDIR Contents/Resources/8/85/
FINISH REMOVEDIR Contents/Resources/8/85/
directory no longer exists; skipping
FINISH REMOVEDIR Contents/Resources/8/84/
FINISH REMOVEDIR Contents/Resources/8/84/
directory no longer exists; skipping
FINISH REMOVEDIR Contents/Resources/8/83/
FINISH REMOVEDIR Contents/Resources/8/82/
removing directory: Contents/Resources/8/82/, rv: 0
FINISH REMOVEDIR Contents/Resources/8/81/
removing directory: Contents/Resources/8/81/, rv: 0
FINISH REMOVEDIR Contents/Resources/8/80/
FINISH REMOVEDIR Contents/Resources/8/80/
directory no longer exists; skipping
FINISH REMOVEFILE Contents/Resources/7/70/7xtest.exe
FINISH REMOVEFILE Contents/Resources/7/70/7xtext0
FINISH REMOVEFILE Contents/Resources/7/70/7xtext1
FINISH REMOVEDIR Contents/Resources/7/70/
FINISH REMOVEFILE Contents/Resources/7/71/7xtest.exe
FINISH REMOVEFILE Contents/Resources/7/71/7xtext0
FINISH REMOVEFILE Contents/Resources/7/71/7xtext1
FINISH REMOVEDIR Contents/Resources/7/71/
FINISH REMOVEFILE Contents/Resources/7/7text0
FINISH REMOVEFILE Contents/Resources/7/7text1
FINISH REMOVEDIR Contents/Resources/7/
FINISH REMOVEDIR Contents/Resources/6/
FINISH REMOVEFILE Contents/Resources/5/5text1
FINISH REMOVEFILE Contents/Resources/5/5text0
FINISH REMOVEFILE Contents/Resources/5/5test.exe
FINISH REMOVEDIR Contents/Resources/5/
FINISH REMOVEFILE Contents/Resources/4/4text1
FINISH REMOVEFILE Contents/Resources/4/4text0
FINISH REMOVEDIR Contents/Resources/4/
FINISH REMOVEFILE Contents/Resources/3/3text1
FINISH REMOVEFILE Contents/Resources/3/3text0
succeeded
calling QuitProgressUI

View file

@ -0,0 +1,320 @@
UPDATE TYPE complete
PREPARE REMOVEFILE searchplugins/searchpluginstext0
PREPARE REMOVEFILE searchplugins/searchpluginspng0.png
PREPARE REMOVEFILE removed-files
PREPARE REMOVEFILE precomplete
PREPARE REMOVEFILE exe0.exe
PREPARE REMOVEFILE 2/20/20text0
PREPARE REMOVEFILE 2/20/20png0.png
PREPARE REMOVEFILE 0/0exe0.exe
PREPARE REMOVEFILE 0/00/00text0
PREPARE REMOVEDIR searchplugins/
PREPARE REMOVEDIR defaults/pref/
PREPARE REMOVEDIR defaults/
PREPARE REMOVEDIR 2/20/
PREPARE REMOVEDIR 2/
PREPARE REMOVEDIR 0/00/
PREPARE REMOVEDIR 0/
PREPARE ADD searchplugins/searchpluginstext0
PREPARE ADD searchplugins/searchpluginspng1.png
PREPARE ADD searchplugins/searchpluginspng0.png
PREPARE ADD removed-files
PREPARE ADD precomplete
PREPARE ADD exe0.exe
PREPARE ADD distribution/extensions/extensions1/extensions1text0
PREPARE ADD distribution/extensions/extensions1/extensions1png1.png
PREPARE ADD distribution/extensions/extensions1/extensions1png0.png
PREPARE ADD distribution/extensions/extensions0/extensions0text0
PREPARE ADD distribution/extensions/extensions0/extensions0png1.png
PREPARE ADD distribution/extensions/extensions0/extensions0png0.png
PREPARE ADD 1/10/10text0
PREPARE ADD 0/0exe0.exe
PREPARE ADD 0/00/00text1
PREPARE ADD 0/00/00text0
PREPARE ADD 0/00/00png0.png
PREPARE REMOVEDIR 9/99/
PREPARE REMOVEDIR 9/99/
PREPARE REMOVEDIR 9/98/
PREPARE REMOVEFILE 9/97/970/97xtext0
PREPARE REMOVEFILE 9/97/970/97xtext1
PREPARE REMOVEDIR 9/97/970/
PREPARE REMOVEFILE 9/97/971/97xtext0
PREPARE REMOVEFILE 9/97/971/97xtext1
PREPARE REMOVEDIR 9/97/971/
PREPARE REMOVEDIR 9/97/
PREPARE REMOVEFILE 9/96/96text0
PREPARE REMOVEFILE 9/96/96text1
PREPARE REMOVEDIR 9/96/
PREPARE REMOVEDIR 9/95/
PREPARE REMOVEDIR 9/95/
PREPARE REMOVEDIR 9/94/
PREPARE REMOVEDIR 9/94/
PREPARE REMOVEDIR 9/93/
PREPARE REMOVEDIR 9/92/
PREPARE REMOVEDIR 9/91/
PREPARE REMOVEDIR 9/90/
PREPARE REMOVEDIR 9/90/
PREPARE REMOVEDIR 8/89/
PREPARE REMOVEDIR 8/89/
PREPARE REMOVEDIR 8/88/
PREPARE REMOVEFILE 8/87/870/87xtext0
PREPARE REMOVEFILE 8/87/870/87xtext1
PREPARE REMOVEDIR 8/87/870/
PREPARE REMOVEFILE 8/87/871/87xtext0
PREPARE REMOVEFILE 8/87/871/87xtext1
PREPARE REMOVEDIR 8/87/871/
PREPARE REMOVEDIR 8/87/
PREPARE REMOVEFILE 8/86/86text0
PREPARE REMOVEFILE 8/86/86text1
PREPARE REMOVEDIR 8/86/
PREPARE REMOVEDIR 8/85/
PREPARE REMOVEDIR 8/85/
PREPARE REMOVEDIR 8/84/
PREPARE REMOVEDIR 8/84/
PREPARE REMOVEDIR 8/83/
PREPARE REMOVEDIR 8/82/
PREPARE REMOVEDIR 8/81/
PREPARE REMOVEDIR 8/80/
PREPARE REMOVEDIR 8/80/
PREPARE REMOVEFILE 7/70/7xtest.exe
PREPARE REMOVEFILE 7/70/7xtext0
PREPARE REMOVEFILE 7/70/7xtext1
PREPARE REMOVEDIR 7/70/
PREPARE REMOVEFILE 7/71/7xtest.exe
PREPARE REMOVEFILE 7/71/7xtext0
PREPARE REMOVEFILE 7/71/7xtext1
PREPARE REMOVEDIR 7/71/
PREPARE REMOVEFILE 7/7text0
PREPARE REMOVEFILE 7/7text1
PREPARE REMOVEDIR 7/
PREPARE REMOVEDIR 6/
PREPARE REMOVEFILE 5/5text1
PREPARE REMOVEFILE 5/5text0
PREPARE REMOVEFILE 5/5test.exe
PREPARE REMOVEFILE 5/5text0
PREPARE REMOVEFILE 5/5text1
PREPARE REMOVEDIR 5/
PREPARE REMOVEFILE 4/4text1
PREPARE REMOVEFILE 4/4text0
PREPARE REMOVEDIR 4/
PREPARE REMOVEFILE 3/3text1
PREPARE REMOVEFILE 3/3text0
EXECUTE REMOVEFILE searchplugins/searchpluginstext0
EXECUTE REMOVEFILE searchplugins/searchpluginspng0.png
EXECUTE REMOVEFILE removed-files
EXECUTE REMOVEFILE precomplete
EXECUTE REMOVEFILE exe0.exe
EXECUTE REMOVEFILE 2/20/20text0
EXECUTE REMOVEFILE 2/20/20png0.png
EXECUTE REMOVEFILE 0/0exe0.exe
EXECUTE REMOVEFILE 0/00/00text0
EXECUTE REMOVEDIR searchplugins/
EXECUTE REMOVEDIR defaults/pref/
EXECUTE REMOVEDIR defaults/
EXECUTE REMOVEDIR 2/20/
EXECUTE REMOVEDIR 2/
EXECUTE REMOVEDIR 0/00/
EXECUTE REMOVEDIR 0/
EXECUTE ADD searchplugins/searchpluginstext0
EXECUTE ADD searchplugins/searchpluginspng1.png
EXECUTE ADD searchplugins/searchpluginspng0.png
EXECUTE ADD removed-files
EXECUTE ADD precomplete
EXECUTE ADD exe0.exe
EXECUTE ADD distribution/extensions/extensions1/extensions1text0
EXECUTE ADD distribution/extensions/extensions1/extensions1png1.png
EXECUTE ADD distribution/extensions/extensions1/extensions1png0.png
EXECUTE ADD distribution/extensions/extensions0/extensions0text0
EXECUTE ADD distribution/extensions/extensions0/extensions0png1.png
EXECUTE ADD distribution/extensions/extensions0/extensions0png0.png
EXECUTE ADD 1/10/10text0
EXECUTE ADD 0/0exe0.exe
EXECUTE ADD 0/00/00text1
EXECUTE ADD 0/00/00text0
EXECUTE ADD 0/00/00png0.png
EXECUTE REMOVEDIR 9/99/
EXECUTE REMOVEDIR 9/99/
EXECUTE REMOVEDIR 9/98/
EXECUTE REMOVEFILE 9/97/970/97xtext0
EXECUTE REMOVEFILE 9/97/970/97xtext1
EXECUTE REMOVEDIR 9/97/970/
EXECUTE REMOVEFILE 9/97/971/97xtext0
EXECUTE REMOVEFILE 9/97/971/97xtext1
EXECUTE REMOVEDIR 9/97/971/
EXECUTE REMOVEDIR 9/97/
EXECUTE REMOVEFILE 9/96/96text0
EXECUTE REMOVEFILE 9/96/96text1
EXECUTE REMOVEDIR 9/96/
EXECUTE REMOVEDIR 9/95/
EXECUTE REMOVEDIR 9/95/
EXECUTE REMOVEDIR 9/94/
EXECUTE REMOVEDIR 9/94/
EXECUTE REMOVEDIR 9/93/
EXECUTE REMOVEDIR 9/92/
EXECUTE REMOVEDIR 9/91/
EXECUTE REMOVEDIR 9/90/
EXECUTE REMOVEDIR 9/90/
EXECUTE REMOVEDIR 8/89/
EXECUTE REMOVEDIR 8/89/
EXECUTE REMOVEDIR 8/88/
EXECUTE REMOVEFILE 8/87/870/87xtext0
EXECUTE REMOVEFILE 8/87/870/87xtext1
EXECUTE REMOVEDIR 8/87/870/
EXECUTE REMOVEFILE 8/87/871/87xtext0
EXECUTE REMOVEFILE 8/87/871/87xtext1
EXECUTE REMOVEDIR 8/87/871/
EXECUTE REMOVEDIR 8/87/
EXECUTE REMOVEFILE 8/86/86text0
EXECUTE REMOVEFILE 8/86/86text1
EXECUTE REMOVEDIR 8/86/
EXECUTE REMOVEDIR 8/85/
EXECUTE REMOVEDIR 8/85/
EXECUTE REMOVEDIR 8/84/
EXECUTE REMOVEDIR 8/84/
EXECUTE REMOVEDIR 8/83/
EXECUTE REMOVEDIR 8/82/
EXECUTE REMOVEDIR 8/81/
EXECUTE REMOVEDIR 8/80/
EXECUTE REMOVEDIR 8/80/
EXECUTE REMOVEFILE 7/70/7xtest.exe
EXECUTE REMOVEFILE 7/70/7xtext0
EXECUTE REMOVEFILE 7/70/7xtext1
EXECUTE REMOVEDIR 7/70/
EXECUTE REMOVEFILE 7/71/7xtest.exe
EXECUTE REMOVEFILE 7/71/7xtext0
EXECUTE REMOVEFILE 7/71/7xtext1
EXECUTE REMOVEDIR 7/71/
EXECUTE REMOVEFILE 7/7text0
EXECUTE REMOVEFILE 7/7text1
EXECUTE REMOVEDIR 7/
EXECUTE REMOVEDIR 6/
EXECUTE REMOVEFILE 5/5text1
EXECUTE REMOVEFILE 5/5text0
EXECUTE REMOVEFILE 5/5test.exe
EXECUTE REMOVEFILE 5/5text0
file cannot be removed because it does not exist; skipping
EXECUTE REMOVEFILE 5/5text1
file cannot be removed because it does not exist; skipping
EXECUTE REMOVEDIR 5/
EXECUTE REMOVEFILE 4/4text1
EXECUTE REMOVEFILE 4/4text0
EXECUTE REMOVEDIR 4/
EXECUTE REMOVEFILE 3/3text1
EXECUTE REMOVEFILE 3/3text0
FINISH REMOVEFILE searchplugins/searchpluginstext0
FINISH REMOVEFILE searchplugins/searchpluginspng0.png
FINISH REMOVEFILE removed-files
FINISH REMOVEFILE precomplete
FINISH REMOVEFILE exe0.exe
FINISH REMOVEFILE 2/20/20text0
FINISH REMOVEFILE 2/20/20png0.png
FINISH REMOVEFILE 0/0exe0.exe
FINISH REMOVEFILE 0/00/00text0
FINISH REMOVEDIR searchplugins/
removing directory: searchplugins/, rv: 0
FINISH REMOVEDIR defaults/pref/
removing directory: defaults/pref/, rv: 0
FINISH REMOVEDIR defaults/
removing directory: defaults/, rv: 0
FINISH REMOVEDIR 2/20/
FINISH REMOVEDIR 2/
FINISH REMOVEDIR 0/00/
removing directory: 0/00/, rv: 0
FINISH REMOVEDIR 0/
removing directory: 0/, rv: 0
FINISH ADD searchplugins/searchpluginstext0
FINISH ADD searchplugins/searchpluginspng1.png
FINISH ADD searchplugins/searchpluginspng0.png
FINISH ADD removed-files
FINISH ADD precomplete
FINISH ADD exe0.exe
FINISH ADD distribution/extensions/extensions1/extensions1text0
FINISH ADD distribution/extensions/extensions1/extensions1png1.png
FINISH ADD distribution/extensions/extensions1/extensions1png0.png
FINISH ADD distribution/extensions/extensions0/extensions0text0
FINISH ADD distribution/extensions/extensions0/extensions0png1.png
FINISH ADD distribution/extensions/extensions0/extensions0png0.png
FINISH ADD 1/10/10text0
FINISH ADD 0/0exe0.exe
FINISH ADD 0/00/00text1
FINISH ADD 0/00/00text0
FINISH ADD 0/00/00png0.png
FINISH REMOVEDIR 9/99/
FINISH REMOVEDIR 9/99/
directory no longer exists; skipping
FINISH REMOVEDIR 9/98/
FINISH REMOVEFILE 9/97/970/97xtext0
FINISH REMOVEFILE 9/97/970/97xtext1
FINISH REMOVEDIR 9/97/970/
FINISH REMOVEFILE 9/97/971/97xtext0
FINISH REMOVEFILE 9/97/971/97xtext1
FINISH REMOVEDIR 9/97/971/
FINISH REMOVEDIR 9/97/
FINISH REMOVEFILE 9/96/96text0
FINISH REMOVEFILE 9/96/96text1
FINISH REMOVEDIR 9/96/
FINISH REMOVEDIR 9/95/
FINISH REMOVEDIR 9/95/
directory no longer exists; skipping
FINISH REMOVEDIR 9/94/
FINISH REMOVEDIR 9/94/
directory no longer exists; skipping
FINISH REMOVEDIR 9/93/
FINISH REMOVEDIR 9/92/
removing directory: 9/92/, rv: 0
FINISH REMOVEDIR 9/91/
removing directory: 9/91/, rv: 0
FINISH REMOVEDIR 9/90/
FINISH REMOVEDIR 9/90/
directory no longer exists; skipping
FINISH REMOVEDIR 8/89/
FINISH REMOVEDIR 8/89/
directory no longer exists; skipping
FINISH REMOVEDIR 8/88/
FINISH REMOVEFILE 8/87/870/87xtext0
FINISH REMOVEFILE 8/87/870/87xtext1
FINISH REMOVEDIR 8/87/870/
FINISH REMOVEFILE 8/87/871/87xtext0
FINISH REMOVEFILE 8/87/871/87xtext1
FINISH REMOVEDIR 8/87/871/
FINISH REMOVEDIR 8/87/
FINISH REMOVEFILE 8/86/86text0
FINISH REMOVEFILE 8/86/86text1
FINISH REMOVEDIR 8/86/
FINISH REMOVEDIR 8/85/
FINISH REMOVEDIR 8/85/
directory no longer exists; skipping
FINISH REMOVEDIR 8/84/
FINISH REMOVEDIR 8/84/
directory no longer exists; skipping
FINISH REMOVEDIR 8/83/
FINISH REMOVEDIR 8/82/
removing directory: 8/82/, rv: 0
FINISH REMOVEDIR 8/81/
removing directory: 8/81/, rv: 0
FINISH REMOVEDIR 8/80/
FINISH REMOVEDIR 8/80/
directory no longer exists; skipping
FINISH REMOVEFILE 7/70/7xtest.exe
FINISH REMOVEFILE 7/70/7xtext0
FINISH REMOVEFILE 7/70/7xtext1
FINISH REMOVEDIR 7/70/
FINISH REMOVEFILE 7/71/7xtest.exe
FINISH REMOVEFILE 7/71/7xtext0
FINISH REMOVEFILE 7/71/7xtext1
FINISH REMOVEDIR 7/71/
FINISH REMOVEFILE 7/7text0
FINISH REMOVEFILE 7/7text1
FINISH REMOVEDIR 7/
FINISH REMOVEDIR 6/
FINISH REMOVEFILE 5/5text1
FINISH REMOVEFILE 5/5text0
FINISH REMOVEFILE 5/5test.exe
FINISH REMOVEDIR 5/
FINISH REMOVEFILE 4/4text1
FINISH REMOVEFILE 4/4text0
FINISH REMOVEDIR 4/
FINISH REMOVEFILE 3/3text1
FINISH REMOVEFILE 3/3text0
succeeded
calling QuitProgressUI

Binary file not shown.

View file

@ -0,0 +1,18 @@
remove "searchplugins/searchpluginstext0"
remove "searchplugins/searchpluginspng1.png"
remove "searchplugins/searchpluginspng0.png"
remove "removed-files"
remove "precomplete"
remove "exe0.exe"
remove "1/10/10text0"
remove "0/0exe0.exe"
remove "0/00/00text1"
remove "0/00/00text0"
remove "0/00/00png0.png"
rmdir "searchplugins/"
rmdir "defaults/pref/"
rmdir "defaults/"
rmdir "1/10/"
rmdir "1/"
rmdir "0/00/"
rmdir "0/"

View file

@ -0,0 +1,21 @@
remove "Contents/Resources/searchplugins/searchpluginstext0"
remove "Contents/Resources/searchplugins/searchpluginspng1.png"
remove "Contents/Resources/searchplugins/searchpluginspng0.png"
remove "Contents/Resources/removed-files"
remove "Contents/Resources/precomplete"
remove "Contents/Resources/1/10/10text0"
remove "Contents/Resources/0/0exe0.exe"
remove "Contents/Resources/0/00/00text1"
remove "Contents/Resources/0/00/00text0"
remove "Contents/Resources/0/00/00png0.png"
remove "Contents/MacOS/exe0.exe"
rmdir "Contents/Resources/searchplugins/"
rmdir "Contents/Resources/defaults/pref/"
rmdir "Contents/Resources/defaults/"
rmdir "Contents/Resources/1/10/"
rmdir "Contents/Resources/1/"
rmdir "Contents/Resources/0/00/"
rmdir "Contents/Resources/0/"
rmdir "Contents/Resources/"
rmdir "Contents/MacOS/"
rmdir "Contents/"

View file

@ -0,0 +1,41 @@
text0
text1
3/3text0
3/3text1
4/exe0.exe
4/4text0
4/4text1
4/
5/5text0
5/5text1
5/*
6/
7/*
8/80/
8/81/
8/82/
8/83/
8/84/
8/85/*
8/86/*
8/87/*
8/88/*
8/89/*
8/80/
8/84/*
8/85/*
8/89/
9/90/
9/91/
9/92/
9/93/
9/94/
9/95/*
9/96/*
9/97/*
9/98/*
9/99/*
9/90/
9/94/*
9/95/*
9/99/

View file

@ -0,0 +1,41 @@
Contents/Resources/text0
Contents/Resources/text1
Contents/Resources/3/3text0
Contents/Resources/3/3text1
Contents/Resources/4/exe0.exe
Contents/Resources/4/4text0
Contents/Resources/4/4text1
Contents/Resources/4/
Contents/Resources/5/5text0
Contents/Resources/5/5text1
Contents/Resources/5/*
Contents/Resources/6/
Contents/Resources/7/*
Contents/Resources/8/80/
Contents/Resources/8/81/
Contents/Resources/8/82/
Contents/Resources/8/83/
Contents/Resources/8/84/
Contents/Resources/8/85/*
Contents/Resources/8/86/*
Contents/Resources/8/87/*
Contents/Resources/8/88/*
Contents/Resources/8/89/*
Contents/Resources/8/80/
Contents/Resources/8/84/*
Contents/Resources/8/85/*
Contents/Resources/8/89/
Contents/Resources/9/90/
Contents/Resources/9/91/
Contents/Resources/9/92/
Contents/Resources/9/93/
Contents/Resources/9/94/
Contents/Resources/9/95/*
Contents/Resources/9/96/*
Contents/Resources/9/97/*
Contents/Resources/9/98/*
Contents/Resources/9/99/*
Contents/Resources/9/90/
Contents/Resources/9/94/*
Contents/Resources/9/95/*
Contents/Resources/9/99/

View file

@ -0,0 +1,59 @@
type "complete"
add "precomplete"
add "searchplugins/searchpluginstext0"
add "searchplugins/searchpluginspng1.png"
add "searchplugins/searchpluginspng0.png"
add "removed-files"
add-if "extensions/extensions1" "extensions/extensions1/extensions1text0"
add-if "extensions/extensions1" "extensions/extensions1/extensions1png1.png"
add-if "extensions/extensions1" "extensions/extensions1/extensions1png0.png"
add-if "extensions/extensions0" "extensions/extensions0/extensions0text0"
add-if "extensions/extensions0" "extensions/extensions0/extensions0png1.png"
add-if "extensions/extensions0" "extensions/extensions0/extensions0png0.png"
add "exe0.exe"
add "1/10/10text0"
add "0/0exe0.exe"
add "0/00/00text1"
add "0/00/00text0"
add "0/00/00png0.png"
remove "text1"
remove "text0"
rmrfdir "9/99/"
rmdir "9/99/"
rmrfdir "9/98/"
rmrfdir "9/97/"
rmrfdir "9/96/"
rmrfdir "9/95/"
rmrfdir "9/95/"
rmrfdir "9/94/"
rmdir "9/94/"
rmdir "9/93/"
rmdir "9/92/"
rmdir "9/91/"
rmdir "9/90/"
rmdir "9/90/"
rmrfdir "8/89/"
rmdir "8/89/"
rmrfdir "8/88/"
rmrfdir "8/87/"
rmrfdir "8/86/"
rmrfdir "8/85/"
rmrfdir "8/85/"
rmrfdir "8/84/"
rmdir "8/84/"
rmdir "8/83/"
rmdir "8/82/"
rmdir "8/81/"
rmdir "8/80/"
rmdir "8/80/"
rmrfdir "7/"
rmdir "6/"
remove "5/5text1"
remove "5/5text0"
rmrfdir "5/"
remove "4/exe0.exe"
remove "4/4text1"
remove "4/4text0"
rmdir "4/"
remove "3/3text1"
remove "3/3text0"

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 776 B

View file

@ -0,0 +1,192 @@
UPDATE TYPE partial
PREPARE ADD Contents/Resources/searchplugins/searchpluginstext0
PREPARE PATCH Contents/Resources/searchplugins/searchpluginspng1.png
PREPARE PATCH Contents/Resources/searchplugins/searchpluginspng0.png
PREPARE ADD Contents/Resources/precomplete
PREPARE ADD Contents/Resources/distribution/extensions/extensions1/extensions1text0
PREPARE PATCH Contents/Resources/distribution/extensions/extensions1/extensions1png1.png
PREPARE PATCH Contents/Resources/distribution/extensions/extensions1/extensions1png0.png
PREPARE ADD Contents/Resources/distribution/extensions/extensions0/extensions0text0
PREPARE PATCH Contents/Resources/distribution/extensions/extensions0/extensions0png1.png
PREPARE PATCH Contents/Resources/distribution/extensions/extensions0/extensions0png0.png
PREPARE PATCH Contents/Resources/0/0exe0.exe
PREPARE ADD Contents/Resources/0/00/00text0
PREPARE PATCH Contents/Resources/0/00/00png0.png
PREPARE PATCH Contents/MacOS/exe0.exe
PREPARE ADD Contents/Resources/2/20/20text0
PREPARE ADD Contents/Resources/2/20/20png0.png
PREPARE ADD Contents/Resources/0/00/00text2
PREPARE REMOVEFILE Contents/Resources/1/10/10text0
PREPARE REMOVEFILE Contents/Resources/0/00/00text1
PREPARE REMOVEDIR Contents/Resources/9/99/
PREPARE REMOVEDIR Contents/Resources/9/99/
PREPARE REMOVEDIR Contents/Resources/9/98/
PREPARE REMOVEFILE Contents/Resources/9/97/970/97xtext0
PREPARE REMOVEFILE Contents/Resources/9/97/970/97xtext1
PREPARE REMOVEDIR Contents/Resources/9/97/970/
PREPARE REMOVEFILE Contents/Resources/9/97/971/97xtext0
PREPARE REMOVEFILE Contents/Resources/9/97/971/97xtext1
PREPARE REMOVEDIR Contents/Resources/9/97/971/
PREPARE REMOVEDIR Contents/Resources/9/97/
PREPARE REMOVEFILE Contents/Resources/9/96/96text0
PREPARE REMOVEFILE Contents/Resources/9/96/96text1
PREPARE REMOVEDIR Contents/Resources/9/96/
PREPARE REMOVEDIR Contents/Resources/9/95/
PREPARE REMOVEDIR Contents/Resources/9/95/
PREPARE REMOVEDIR Contents/Resources/9/94/
PREPARE REMOVEDIR Contents/Resources/9/94/
PREPARE REMOVEDIR Contents/Resources/9/93/
PREPARE REMOVEDIR Contents/Resources/9/92/
PREPARE REMOVEDIR Contents/Resources/9/91/
PREPARE REMOVEDIR Contents/Resources/9/90/
PREPARE REMOVEDIR Contents/Resources/9/90/
PREPARE REMOVEDIR Contents/Resources/8/89/
PREPARE REMOVEDIR Contents/Resources/8/89/
PREPARE REMOVEDIR Contents/Resources/8/88/
PREPARE REMOVEFILE Contents/Resources/8/87/870/87xtext0
PREPARE REMOVEFILE Contents/Resources/8/87/870/87xtext1
PREPARE REMOVEDIR Contents/Resources/8/87/870/
PREPARE REMOVEFILE Contents/Resources/8/87/871/87xtext0
PREPARE REMOVEFILE Contents/Resources/8/87/871/87xtext1
PREPARE REMOVEDIR Contents/Resources/8/87/871/
PREPARE REMOVEDIR Contents/Resources/8/87/
PREPARE REMOVEFILE Contents/Resources/8/86/86text0
PREPARE REMOVEFILE Contents/Resources/8/86/86text1
PREPARE REMOVEDIR Contents/Resources/8/86/
PREPARE REMOVEDIR Contents/Resources/8/85/
PREPARE REMOVEDIR Contents/Resources/8/85/
PREPARE REMOVEDIR Contents/Resources/8/84/
PREPARE REMOVEDIR Contents/Resources/8/84/
PREPARE REMOVEDIR Contents/Resources/8/83/
PREPARE REMOVEDIR Contents/Resources/8/82/
PREPARE REMOVEDIR Contents/Resources/8/81/
PREPARE REMOVEDIR Contents/Resources/8/80/
PREPARE REMOVEDIR Contents/Resources/8/80/
PREPARE REMOVEFILE Contents/Resources/7/70/7xtest.exe
PREPARE REMOVEFILE Contents/Resources/7/70/7xtext0
PREPARE REMOVEFILE Contents/Resources/7/70/7xtext1
PREPARE REMOVEDIR Contents/Resources/7/70/
PREPARE REMOVEFILE Contents/Resources/7/71/7xtest.exe
PREPARE REMOVEFILE Contents/Resources/7/71/7xtext0
PREPARE REMOVEFILE Contents/Resources/7/71/7xtext1
PREPARE REMOVEDIR Contents/Resources/7/71/
PREPARE REMOVEFILE Contents/Resources/7/7text0
PREPARE REMOVEFILE Contents/Resources/7/7text1
PREPARE REMOVEDIR Contents/Resources/7/
PREPARE REMOVEDIR Contents/Resources/6/
PREPARE REMOVEFILE Contents/Resources/5/5text1
PREPARE REMOVEFILE Contents/Resources/5/5text0
PREPARE REMOVEFILE Contents/Resources/5/5test.exe
PREPARE REMOVEFILE Contents/Resources/5/5text0
PREPARE REMOVEFILE Contents/Resources/5/5text1
PREPARE REMOVEDIR Contents/Resources/5/
PREPARE REMOVEFILE Contents/Resources/4/4text1
PREPARE REMOVEFILE Contents/Resources/4/4text0
PREPARE REMOVEDIR Contents/Resources/4/
PREPARE REMOVEFILE Contents/Resources/3/3text1
PREPARE REMOVEFILE Contents/Resources/3/3text0
PREPARE REMOVEDIR Contents/Resources/1/10/
PREPARE REMOVEDIR Contents/Resources/1/
EXECUTE ADD Contents/Resources/searchplugins/searchpluginstext0
EXECUTE PATCH Contents/Resources/searchplugins/searchpluginspng1.png
EXECUTE PATCH Contents/Resources/searchplugins/searchpluginspng0.png
EXECUTE ADD Contents/Resources/precomplete
EXECUTE ADD Contents/Resources/distribution/extensions/extensions1/extensions1text0
EXECUTE PATCH Contents/Resources/distribution/extensions/extensions1/extensions1png1.png
EXECUTE PATCH Contents/Resources/distribution/extensions/extensions1/extensions1png0.png
EXECUTE ADD Contents/Resources/distribution/extensions/extensions0/extensions0text0
EXECUTE PATCH Contents/Resources/distribution/extensions/extensions0/extensions0png1.png
EXECUTE PATCH Contents/Resources/distribution/extensions/extensions0/extensions0png0.png
EXECUTE PATCH Contents/Resources/0/0exe0.exe
LoadSourceFile: destination file size 776 does not match expected size 79872
LoadSourceFile failed
### execution failed
FINISH ADD Contents/Resources/searchplugins/searchpluginstext0
FINISH PATCH Contents/Resources/searchplugins/searchpluginspng1.png
FINISH PATCH Contents/Resources/searchplugins/searchpluginspng0.png
FINISH ADD Contents/Resources/precomplete
FINISH ADD Contents/Resources/distribution/extensions/extensions1/extensions1text0
backup_restore: backup file doesn't exist: Contents/Resources/distribution/extensions/extensions1/extensions1text0.moz-backup
FINISH PATCH Contents/Resources/distribution/extensions/extensions1/extensions1png1.png
FINISH PATCH Contents/Resources/distribution/extensions/extensions1/extensions1png0.png
FINISH ADD Contents/Resources/distribution/extensions/extensions0/extensions0text0
FINISH PATCH Contents/Resources/distribution/extensions/extensions0/extensions0png1.png
FINISH PATCH Contents/Resources/distribution/extensions/extensions0/extensions0png0.png
FINISH PATCH Contents/Resources/0/0exe0.exe
backup_restore: backup file doesn't exist: Contents/Resources/0/0exe0.exe.moz-backup
FINISH ADD Contents/Resources/0/00/00text0
backup_restore: backup file doesn't exist: Contents/Resources/0/00/00text0.moz-backup
FINISH PATCH Contents/Resources/0/00/00png0.png
backup_restore: backup file doesn't exist: Contents/Resources/0/00/00png0.png.moz-backup
FINISH PATCH Contents/MacOS/exe0.exe
backup_restore: backup file doesn't exist: Contents/MacOS/exe0.exe.moz-backup
FINISH ADD Contents/Resources/2/20/20text0
backup_restore: backup file doesn't exist: Contents/Resources/2/20/20text0.moz-backup
FINISH ADD Contents/Resources/2/20/20png0.png
backup_restore: backup file doesn't exist: Contents/Resources/2/20/20png0.png.moz-backup
FINISH ADD Contents/Resources/0/00/00text2
backup_restore: backup file doesn't exist: Contents/Resources/0/00/00text2.moz-backup
FINISH REMOVEFILE Contents/Resources/1/10/10text0
backup_restore: backup file doesn't exist: Contents/Resources/1/10/10text0.moz-backup
FINISH REMOVEFILE Contents/Resources/0/00/00text1
backup_restore: backup file doesn't exist: Contents/Resources/0/00/00text1.moz-backup
FINISH REMOVEFILE Contents/Resources/9/97/970/97xtext0
backup_restore: backup file doesn't exist: Contents/Resources/9/97/970/97xtext0.moz-backup
FINISH REMOVEFILE Contents/Resources/9/97/970/97xtext1
backup_restore: backup file doesn't exist: Contents/Resources/9/97/970/97xtext1.moz-backup
FINISH REMOVEFILE Contents/Resources/9/97/971/97xtext0
backup_restore: backup file doesn't exist: Contents/Resources/9/97/971/97xtext0.moz-backup
FINISH REMOVEFILE Contents/Resources/9/97/971/97xtext1
backup_restore: backup file doesn't exist: Contents/Resources/9/97/971/97xtext1.moz-backup
FINISH REMOVEFILE Contents/Resources/9/96/96text0
backup_restore: backup file doesn't exist: Contents/Resources/9/96/96text0.moz-backup
FINISH REMOVEFILE Contents/Resources/9/96/96text1
backup_restore: backup file doesn't exist: Contents/Resources/9/96/96text1.moz-backup
FINISH REMOVEFILE Contents/Resources/8/87/870/87xtext0
backup_restore: backup file doesn't exist: Contents/Resources/8/87/870/87xtext0.moz-backup
FINISH REMOVEFILE Contents/Resources/8/87/870/87xtext1
backup_restore: backup file doesn't exist: Contents/Resources/8/87/870/87xtext1.moz-backup
FINISH REMOVEFILE Contents/Resources/8/87/871/87xtext0
backup_restore: backup file doesn't exist: Contents/Resources/8/87/871/87xtext0.moz-backup
FINISH REMOVEFILE Contents/Resources/8/87/871/87xtext1
backup_restore: backup file doesn't exist: Contents/Resources/8/87/871/87xtext1.moz-backup
FINISH REMOVEFILE Contents/Resources/8/86/86text0
backup_restore: backup file doesn't exist: Contents/Resources/8/86/86text0.moz-backup
FINISH REMOVEFILE Contents/Resources/8/86/86text1
backup_restore: backup file doesn't exist: Contents/Resources/8/86/86text1.moz-backup
FINISH REMOVEFILE Contents/Resources/7/70/7xtest.exe
backup_restore: backup file doesn't exist: Contents/Resources/7/70/7xtest.exe.moz-backup
FINISH REMOVEFILE Contents/Resources/7/70/7xtext0
backup_restore: backup file doesn't exist: Contents/Resources/7/70/7xtext0.moz-backup
FINISH REMOVEFILE Contents/Resources/7/70/7xtext1
backup_restore: backup file doesn't exist: Contents/Resources/7/70/7xtext1.moz-backup
FINISH REMOVEFILE Contents/Resources/7/71/7xtest.exe
backup_restore: backup file doesn't exist: Contents/Resources/7/71/7xtest.exe.moz-backup
FINISH REMOVEFILE Contents/Resources/7/71/7xtext0
backup_restore: backup file doesn't exist: Contents/Resources/7/71/7xtext0.moz-backup
FINISH REMOVEFILE Contents/Resources/7/71/7xtext1
backup_restore: backup file doesn't exist: Contents/Resources/7/71/7xtext1.moz-backup
FINISH REMOVEFILE Contents/Resources/7/7text0
backup_restore: backup file doesn't exist: Contents/Resources/7/7text0.moz-backup
FINISH REMOVEFILE Contents/Resources/7/7text1
backup_restore: backup file doesn't exist: Contents/Resources/7/7text1.moz-backup
FINISH REMOVEFILE Contents/Resources/5/5text1
backup_restore: backup file doesn't exist: Contents/Resources/5/5text1.moz-backup
FINISH REMOVEFILE Contents/Resources/5/5text0
backup_restore: backup file doesn't exist: Contents/Resources/5/5text0.moz-backup
FINISH REMOVEFILE Contents/Resources/5/5test.exe
backup_restore: backup file doesn't exist: Contents/Resources/5/5test.exe.moz-backup
FINISH REMOVEFILE Contents/Resources/5/5text0
backup_restore: backup file doesn't exist: Contents/Resources/5/5text0.moz-backup
FINISH REMOVEFILE Contents/Resources/5/5text1
backup_restore: backup file doesn't exist: Contents/Resources/5/5text1.moz-backup
FINISH REMOVEFILE Contents/Resources/4/4text1
backup_restore: backup file doesn't exist: Contents/Resources/4/4text1.moz-backup
FINISH REMOVEFILE Contents/Resources/4/4text0
backup_restore: backup file doesn't exist: Contents/Resources/4/4text0.moz-backup
FINISH REMOVEFILE Contents/Resources/3/3text1
backup_restore: backup file doesn't exist: Contents/Resources/3/3text1.moz-backup
FINISH REMOVEFILE Contents/Resources/3/3text0
backup_restore: backup file doesn't exist: Contents/Resources/3/3text0.moz-backup
failed: 2
calling QuitProgressUI

View file

@ -0,0 +1,192 @@
UPDATE TYPE partial
PREPARE ADD searchplugins/searchpluginstext0
PREPARE PATCH searchplugins/searchpluginspng1.png
PREPARE PATCH searchplugins/searchpluginspng0.png
PREPARE ADD precomplete
PREPARE PATCH exe0.exe
PREPARE ADD distribution/extensions/extensions1/extensions1text0
PREPARE PATCH distribution/extensions/extensions1/extensions1png1.png
PREPARE PATCH distribution/extensions/extensions1/extensions1png0.png
PREPARE ADD distribution/extensions/extensions0/extensions0text0
PREPARE PATCH distribution/extensions/extensions0/extensions0png1.png
PREPARE PATCH distribution/extensions/extensions0/extensions0png0.png
PREPARE PATCH 0/0exe0.exe
PREPARE ADD 0/00/00text0
PREPARE PATCH 0/00/00png0.png
PREPARE ADD 2/20/20text0
PREPARE ADD 2/20/20png0.png
PREPARE ADD 0/00/00text2
PREPARE REMOVEFILE 1/10/10text0
PREPARE REMOVEFILE 0/00/00text1
PREPARE REMOVEDIR 9/99/
PREPARE REMOVEDIR 9/99/
PREPARE REMOVEDIR 9/98/
PREPARE REMOVEFILE 9/97/970/97xtext0
PREPARE REMOVEFILE 9/97/970/97xtext1
PREPARE REMOVEDIR 9/97/970/
PREPARE REMOVEFILE 9/97/971/97xtext0
PREPARE REMOVEFILE 9/97/971/97xtext1
PREPARE REMOVEDIR 9/97/971/
PREPARE REMOVEDIR 9/97/
PREPARE REMOVEFILE 9/96/96text0
PREPARE REMOVEFILE 9/96/96text1
PREPARE REMOVEDIR 9/96/
PREPARE REMOVEDIR 9/95/
PREPARE REMOVEDIR 9/95/
PREPARE REMOVEDIR 9/94/
PREPARE REMOVEDIR 9/94/
PREPARE REMOVEDIR 9/93/
PREPARE REMOVEDIR 9/92/
PREPARE REMOVEDIR 9/91/
PREPARE REMOVEDIR 9/90/
PREPARE REMOVEDIR 9/90/
PREPARE REMOVEDIR 8/89/
PREPARE REMOVEDIR 8/89/
PREPARE REMOVEDIR 8/88/
PREPARE REMOVEFILE 8/87/870/87xtext0
PREPARE REMOVEFILE 8/87/870/87xtext1
PREPARE REMOVEDIR 8/87/870/
PREPARE REMOVEFILE 8/87/871/87xtext0
PREPARE REMOVEFILE 8/87/871/87xtext1
PREPARE REMOVEDIR 8/87/871/
PREPARE REMOVEDIR 8/87/
PREPARE REMOVEFILE 8/86/86text0
PREPARE REMOVEFILE 8/86/86text1
PREPARE REMOVEDIR 8/86/
PREPARE REMOVEDIR 8/85/
PREPARE REMOVEDIR 8/85/
PREPARE REMOVEDIR 8/84/
PREPARE REMOVEDIR 8/84/
PREPARE REMOVEDIR 8/83/
PREPARE REMOVEDIR 8/82/
PREPARE REMOVEDIR 8/81/
PREPARE REMOVEDIR 8/80/
PREPARE REMOVEDIR 8/80/
PREPARE REMOVEFILE 7/70/7xtest.exe
PREPARE REMOVEFILE 7/70/7xtext0
PREPARE REMOVEFILE 7/70/7xtext1
PREPARE REMOVEDIR 7/70/
PREPARE REMOVEFILE 7/71/7xtest.exe
PREPARE REMOVEFILE 7/71/7xtext0
PREPARE REMOVEFILE 7/71/7xtext1
PREPARE REMOVEDIR 7/71/
PREPARE REMOVEFILE 7/7text0
PREPARE REMOVEFILE 7/7text1
PREPARE REMOVEDIR 7/
PREPARE REMOVEDIR 6/
PREPARE REMOVEFILE 5/5text1
PREPARE REMOVEFILE 5/5text0
PREPARE REMOVEFILE 5/5test.exe
PREPARE REMOVEFILE 5/5text0
PREPARE REMOVEFILE 5/5text1
PREPARE REMOVEDIR 5/
PREPARE REMOVEFILE 4/4text1
PREPARE REMOVEFILE 4/4text0
PREPARE REMOVEDIR 4/
PREPARE REMOVEFILE 3/3text1
PREPARE REMOVEFILE 3/3text0
PREPARE REMOVEDIR 1/10/
PREPARE REMOVEDIR 1/
EXECUTE ADD searchplugins/searchpluginstext0
EXECUTE PATCH searchplugins/searchpluginspng1.png
EXECUTE PATCH searchplugins/searchpluginspng0.png
EXECUTE ADD precomplete
EXECUTE PATCH exe0.exe
EXECUTE ADD distribution/extensions/extensions1/extensions1text0
EXECUTE PATCH distribution/extensions/extensions1/extensions1png1.png
EXECUTE PATCH distribution/extensions/extensions1/extensions1png0.png
EXECUTE ADD distribution/extensions/extensions0/extensions0text0
EXECUTE PATCH distribution/extensions/extensions0/extensions0png1.png
EXECUTE PATCH distribution/extensions/extensions0/extensions0png0.png
EXECUTE PATCH 0/0exe0.exe
LoadSourceFile: destination file size 776 does not match expected size 79872
LoadSourceFile failed
### execution failed
FINISH ADD searchplugins/searchpluginstext0
FINISH PATCH searchplugins/searchpluginspng1.png
FINISH PATCH searchplugins/searchpluginspng0.png
FINISH ADD precomplete
FINISH PATCH exe0.exe
FINISH ADD distribution/extensions/extensions1/extensions1text0
backup_restore: backup file doesn't exist: distribution/extensions/extensions1/extensions1text0.moz-backup
FINISH PATCH distribution/extensions/extensions1/extensions1png1.png
FINISH PATCH distribution/extensions/extensions1/extensions1png0.png
FINISH ADD distribution/extensions/extensions0/extensions0text0
FINISH PATCH distribution/extensions/extensions0/extensions0png1.png
FINISH PATCH distribution/extensions/extensions0/extensions0png0.png
FINISH PATCH 0/0exe0.exe
backup_restore: backup file doesn't exist: 0/0exe0.exe.moz-backup
FINISH ADD 0/00/00text0
backup_restore: backup file doesn't exist: 0/00/00text0.moz-backup
FINISH PATCH 0/00/00png0.png
backup_restore: backup file doesn't exist: 0/00/00png0.png.moz-backup
FINISH ADD 2/20/20text0
backup_restore: backup file doesn't exist: 2/20/20text0.moz-backup
FINISH ADD 2/20/20png0.png
backup_restore: backup file doesn't exist: 2/20/20png0.png.moz-backup
FINISH ADD 0/00/00text2
backup_restore: backup file doesn't exist: 0/00/00text2.moz-backup
FINISH REMOVEFILE 1/10/10text0
backup_restore: backup file doesn't exist: 1/10/10text0.moz-backup
FINISH REMOVEFILE 0/00/00text1
backup_restore: backup file doesn't exist: 0/00/00text1.moz-backup
FINISH REMOVEFILE 9/97/970/97xtext0
backup_restore: backup file doesn't exist: 9/97/970/97xtext0.moz-backup
FINISH REMOVEFILE 9/97/970/97xtext1
backup_restore: backup file doesn't exist: 9/97/970/97xtext1.moz-backup
FINISH REMOVEFILE 9/97/971/97xtext0
backup_restore: backup file doesn't exist: 9/97/971/97xtext0.moz-backup
FINISH REMOVEFILE 9/97/971/97xtext1
backup_restore: backup file doesn't exist: 9/97/971/97xtext1.moz-backup
FINISH REMOVEFILE 9/96/96text0
backup_restore: backup file doesn't exist: 9/96/96text0.moz-backup
FINISH REMOVEFILE 9/96/96text1
backup_restore: backup file doesn't exist: 9/96/96text1.moz-backup
FINISH REMOVEFILE 8/87/870/87xtext0
backup_restore: backup file doesn't exist: 8/87/870/87xtext0.moz-backup
FINISH REMOVEFILE 8/87/870/87xtext1
backup_restore: backup file doesn't exist: 8/87/870/87xtext1.moz-backup
FINISH REMOVEFILE 8/87/871/87xtext0
backup_restore: backup file doesn't exist: 8/87/871/87xtext0.moz-backup
FINISH REMOVEFILE 8/87/871/87xtext1
backup_restore: backup file doesn't exist: 8/87/871/87xtext1.moz-backup
FINISH REMOVEFILE 8/86/86text0
backup_restore: backup file doesn't exist: 8/86/86text0.moz-backup
FINISH REMOVEFILE 8/86/86text1
backup_restore: backup file doesn't exist: 8/86/86text1.moz-backup
FINISH REMOVEFILE 7/70/7xtest.exe
backup_restore: backup file doesn't exist: 7/70/7xtest.exe.moz-backup
FINISH REMOVEFILE 7/70/7xtext0
backup_restore: backup file doesn't exist: 7/70/7xtext0.moz-backup
FINISH REMOVEFILE 7/70/7xtext1
backup_restore: backup file doesn't exist: 7/70/7xtext1.moz-backup
FINISH REMOVEFILE 7/71/7xtest.exe
backup_restore: backup file doesn't exist: 7/71/7xtest.exe.moz-backup
FINISH REMOVEFILE 7/71/7xtext0
backup_restore: backup file doesn't exist: 7/71/7xtext0.moz-backup
FINISH REMOVEFILE 7/71/7xtext1
backup_restore: backup file doesn't exist: 7/71/7xtext1.moz-backup
FINISH REMOVEFILE 7/7text0
backup_restore: backup file doesn't exist: 7/7text0.moz-backup
FINISH REMOVEFILE 7/7text1
backup_restore: backup file doesn't exist: 7/7text1.moz-backup
FINISH REMOVEFILE 5/5text1
backup_restore: backup file doesn't exist: 5/5text1.moz-backup
FINISH REMOVEFILE 5/5text0
backup_restore: backup file doesn't exist: 5/5text0.moz-backup
FINISH REMOVEFILE 5/5test.exe
backup_restore: backup file doesn't exist: 5/5test.exe.moz-backup
FINISH REMOVEFILE 5/5text0
backup_restore: backup file doesn't exist: 5/5text0.moz-backup
FINISH REMOVEFILE 5/5text1
backup_restore: backup file doesn't exist: 5/5text1.moz-backup
FINISH REMOVEFILE 4/4text1
backup_restore: backup file doesn't exist: 4/4text1.moz-backup
FINISH REMOVEFILE 4/4text0
backup_restore: backup file doesn't exist: 4/4text0.moz-backup
FINISH REMOVEFILE 3/3text1
backup_restore: backup file doesn't exist: 3/3text1.moz-backup
FINISH REMOVEFILE 3/3text0
backup_restore: backup file doesn't exist: 3/3text0.moz-backup
failed: 2
calling QuitProgressUI

View file

@ -0,0 +1,279 @@
UPDATE TYPE partial
PREPARE ADD Contents/Resources/searchplugins/searchpluginstext0
PREPARE PATCH Contents/Resources/searchplugins/searchpluginspng1.png
PREPARE PATCH Contents/Resources/searchplugins/searchpluginspng0.png
PREPARE ADD Contents/Resources/precomplete
PREPARE ADD Contents/Resources/distribution/extensions/extensions1/extensions1text0
PREPARE PATCH Contents/Resources/distribution/extensions/extensions1/extensions1png1.png
PREPARE PATCH Contents/Resources/distribution/extensions/extensions1/extensions1png0.png
PREPARE ADD Contents/Resources/distribution/extensions/extensions0/extensions0text0
PREPARE PATCH Contents/Resources/distribution/extensions/extensions0/extensions0png1.png
PREPARE PATCH Contents/Resources/distribution/extensions/extensions0/extensions0png0.png
PREPARE PATCH Contents/Resources/0/0exe0.exe
PREPARE ADD Contents/Resources/0/00/00text0
PREPARE PATCH Contents/Resources/0/00/00png0.png
PREPARE PATCH Contents/MacOS/exe0.exe
PREPARE ADD Contents/Resources/2/20/20text0
PREPARE ADD Contents/Resources/2/20/20png0.png
PREPARE ADD Contents/Resources/0/00/00text2
PREPARE REMOVEFILE Contents/Resources/1/10/10text0
PREPARE REMOVEFILE Contents/Resources/0/00/00text1
PREPARE REMOVEDIR Contents/Resources/9/99/
PREPARE REMOVEDIR Contents/Resources/9/99/
PREPARE REMOVEDIR Contents/Resources/9/98/
PREPARE REMOVEFILE Contents/Resources/9/97/970/97xtext0
PREPARE REMOVEFILE Contents/Resources/9/97/970/97xtext1
PREPARE REMOVEDIR Contents/Resources/9/97/970/
PREPARE REMOVEFILE Contents/Resources/9/97/971/97xtext0
PREPARE REMOVEFILE Contents/Resources/9/97/971/97xtext1
PREPARE REMOVEDIR Contents/Resources/9/97/971/
PREPARE REMOVEDIR Contents/Resources/9/97/
PREPARE REMOVEFILE Contents/Resources/9/96/96text0
PREPARE REMOVEFILE Contents/Resources/9/96/96text1
PREPARE REMOVEDIR Contents/Resources/9/96/
PREPARE REMOVEDIR Contents/Resources/9/95/
PREPARE REMOVEDIR Contents/Resources/9/95/
PREPARE REMOVEDIR Contents/Resources/9/94/
PREPARE REMOVEDIR Contents/Resources/9/94/
PREPARE REMOVEDIR Contents/Resources/9/93/
PREPARE REMOVEDIR Contents/Resources/9/92/
PREPARE REMOVEDIR Contents/Resources/9/91/
PREPARE REMOVEDIR Contents/Resources/9/90/
PREPARE REMOVEDIR Contents/Resources/9/90/
PREPARE REMOVEDIR Contents/Resources/8/89/
PREPARE REMOVEDIR Contents/Resources/8/89/
PREPARE REMOVEDIR Contents/Resources/8/88/
PREPARE REMOVEFILE Contents/Resources/8/87/870/87xtext0
PREPARE REMOVEFILE Contents/Resources/8/87/870/87xtext1
PREPARE REMOVEDIR Contents/Resources/8/87/870/
PREPARE REMOVEFILE Contents/Resources/8/87/871/87xtext0
PREPARE REMOVEFILE Contents/Resources/8/87/871/87xtext1
PREPARE REMOVEDIR Contents/Resources/8/87/871/
PREPARE REMOVEDIR Contents/Resources/8/87/
PREPARE REMOVEFILE Contents/Resources/8/86/86text0
PREPARE REMOVEFILE Contents/Resources/8/86/86text1
PREPARE REMOVEDIR Contents/Resources/8/86/
PREPARE REMOVEDIR Contents/Resources/8/85/
PREPARE REMOVEDIR Contents/Resources/8/85/
PREPARE REMOVEDIR Contents/Resources/8/84/
PREPARE REMOVEDIR Contents/Resources/8/84/
PREPARE REMOVEDIR Contents/Resources/8/83/
PREPARE REMOVEDIR Contents/Resources/8/82/
PREPARE REMOVEDIR Contents/Resources/8/81/
PREPARE REMOVEDIR Contents/Resources/8/80/
PREPARE REMOVEDIR Contents/Resources/8/80/
PREPARE REMOVEFILE Contents/Resources/7/70/7xtest.exe
PREPARE REMOVEFILE Contents/Resources/7/70/7xtext0
PREPARE REMOVEFILE Contents/Resources/7/70/7xtext1
PREPARE REMOVEDIR Contents/Resources/7/70/
PREPARE REMOVEFILE Contents/Resources/7/71/7xtest.exe
PREPARE REMOVEFILE Contents/Resources/7/71/7xtext0
PREPARE REMOVEFILE Contents/Resources/7/71/7xtext1
PREPARE REMOVEDIR Contents/Resources/7/71/
PREPARE REMOVEFILE Contents/Resources/7/7text0
PREPARE REMOVEFILE Contents/Resources/7/7text1
PREPARE REMOVEDIR Contents/Resources/7/
PREPARE REMOVEDIR Contents/Resources/6/
PREPARE REMOVEFILE Contents/Resources/5/5text1
PREPARE REMOVEFILE Contents/Resources/5/5text0
PREPARE REMOVEFILE Contents/Resources/5/5test.exe
PREPARE REMOVEFILE Contents/Resources/5/5text0
PREPARE REMOVEFILE Contents/Resources/5/5text1
PREPARE REMOVEDIR Contents/Resources/5/
PREPARE REMOVEFILE Contents/Resources/4/4text1
PREPARE REMOVEFILE Contents/Resources/4/4text0
PREPARE REMOVEDIR Contents/Resources/4/
PREPARE REMOVEFILE Contents/Resources/3/3text1
PREPARE REMOVEFILE Contents/Resources/3/3text0
PREPARE REMOVEDIR Contents/Resources/1/10/
PREPARE REMOVEDIR Contents/Resources/1/
EXECUTE ADD Contents/Resources/searchplugins/searchpluginstext0
EXECUTE PATCH Contents/Resources/searchplugins/searchpluginspng1.png
EXECUTE PATCH Contents/Resources/searchplugins/searchpluginspng0.png
EXECUTE ADD Contents/Resources/precomplete
EXECUTE ADD Contents/Resources/distribution/extensions/extensions1/extensions1text0
EXECUTE PATCH Contents/Resources/distribution/extensions/extensions1/extensions1png1.png
EXECUTE PATCH Contents/Resources/distribution/extensions/extensions1/extensions1png0.png
EXECUTE ADD Contents/Resources/distribution/extensions/extensions0/extensions0text0
EXECUTE PATCH Contents/Resources/distribution/extensions/extensions0/extensions0png1.png
EXECUTE PATCH Contents/Resources/distribution/extensions/extensions0/extensions0png0.png
EXECUTE PATCH Contents/Resources/0/0exe0.exe
EXECUTE ADD Contents/Resources/0/00/00text0
EXECUTE PATCH Contents/Resources/0/00/00png0.png
EXECUTE PATCH Contents/MacOS/exe0.exe
EXECUTE ADD Contents/Resources/2/20/20text0
EXECUTE ADD Contents/Resources/2/20/20png0.png
EXECUTE ADD Contents/Resources/0/00/00text2
EXECUTE REMOVEFILE Contents/Resources/1/10/10text0
EXECUTE REMOVEFILE Contents/Resources/0/00/00text1
EXECUTE REMOVEDIR Contents/Resources/9/99/
EXECUTE REMOVEDIR Contents/Resources/9/99/
EXECUTE REMOVEDIR Contents/Resources/9/98/
EXECUTE REMOVEFILE Contents/Resources/9/97/970/97xtext0
EXECUTE REMOVEFILE Contents/Resources/9/97/970/97xtext1
EXECUTE REMOVEDIR Contents/Resources/9/97/970/
EXECUTE REMOVEFILE Contents/Resources/9/97/971/97xtext0
EXECUTE REMOVEFILE Contents/Resources/9/97/971/97xtext1
EXECUTE REMOVEDIR Contents/Resources/9/97/971/
EXECUTE REMOVEDIR Contents/Resources/9/97/
EXECUTE REMOVEFILE Contents/Resources/9/96/96text0
EXECUTE REMOVEFILE Contents/Resources/9/96/96text1
EXECUTE REMOVEDIR Contents/Resources/9/96/
EXECUTE REMOVEDIR Contents/Resources/9/95/
EXECUTE REMOVEDIR Contents/Resources/9/95/
EXECUTE REMOVEDIR Contents/Resources/9/94/
EXECUTE REMOVEDIR Contents/Resources/9/94/
EXECUTE REMOVEDIR Contents/Resources/9/93/
EXECUTE REMOVEDIR Contents/Resources/9/92/
EXECUTE REMOVEDIR Contents/Resources/9/91/
EXECUTE REMOVEDIR Contents/Resources/9/90/
EXECUTE REMOVEDIR Contents/Resources/9/90/
EXECUTE REMOVEDIR Contents/Resources/8/89/
EXECUTE REMOVEDIR Contents/Resources/8/89/
EXECUTE REMOVEDIR Contents/Resources/8/88/
EXECUTE REMOVEFILE Contents/Resources/8/87/870/87xtext0
EXECUTE REMOVEFILE Contents/Resources/8/87/870/87xtext1
EXECUTE REMOVEDIR Contents/Resources/8/87/870/
EXECUTE REMOVEFILE Contents/Resources/8/87/871/87xtext0
EXECUTE REMOVEFILE Contents/Resources/8/87/871/87xtext1
EXECUTE REMOVEDIR Contents/Resources/8/87/871/
EXECUTE REMOVEDIR Contents/Resources/8/87/
EXECUTE REMOVEFILE Contents/Resources/8/86/86text0
EXECUTE REMOVEFILE Contents/Resources/8/86/86text1
EXECUTE REMOVEDIR Contents/Resources/8/86/
EXECUTE REMOVEDIR Contents/Resources/8/85/
EXECUTE REMOVEDIR Contents/Resources/8/85/
EXECUTE REMOVEDIR Contents/Resources/8/84/
EXECUTE REMOVEDIR Contents/Resources/8/84/
EXECUTE REMOVEDIR Contents/Resources/8/83/
EXECUTE REMOVEDIR Contents/Resources/8/82/
EXECUTE REMOVEDIR Contents/Resources/8/81/
EXECUTE REMOVEDIR Contents/Resources/8/80/
EXECUTE REMOVEDIR Contents/Resources/8/80/
EXECUTE REMOVEFILE Contents/Resources/7/70/7xtest.exe
EXECUTE REMOVEFILE Contents/Resources/7/70/7xtext0
EXECUTE REMOVEFILE Contents/Resources/7/70/7xtext1
EXECUTE REMOVEDIR Contents/Resources/7/70/
EXECUTE REMOVEFILE Contents/Resources/7/71/7xtest.exe
EXECUTE REMOVEFILE Contents/Resources/7/71/7xtext0
EXECUTE REMOVEFILE Contents/Resources/7/71/7xtext1
EXECUTE REMOVEDIR Contents/Resources/7/71/
EXECUTE REMOVEFILE Contents/Resources/7/7text0
EXECUTE REMOVEFILE Contents/Resources/7/7text1
EXECUTE REMOVEDIR Contents/Resources/7/
EXECUTE REMOVEDIR Contents/Resources/6/
EXECUTE REMOVEFILE Contents/Resources/5/5text1
EXECUTE REMOVEFILE Contents/Resources/5/5text0
EXECUTE REMOVEFILE Contents/Resources/5/5test.exe
EXECUTE REMOVEFILE Contents/Resources/5/5text0
file cannot be removed because it does not exist; skipping
EXECUTE REMOVEFILE Contents/Resources/5/5text1
file cannot be removed because it does not exist; skipping
EXECUTE REMOVEDIR Contents/Resources/5/
EXECUTE REMOVEFILE Contents/Resources/4/4text1
EXECUTE REMOVEFILE Contents/Resources/4/4text0
EXECUTE REMOVEDIR Contents/Resources/4/
EXECUTE REMOVEFILE Contents/Resources/3/3text1
EXECUTE REMOVEFILE Contents/Resources/3/3text0
EXECUTE REMOVEDIR Contents/Resources/1/10/
EXECUTE REMOVEDIR Contents/Resources/1/
FINISH ADD Contents/Resources/searchplugins/searchpluginstext0
FINISH PATCH Contents/Resources/searchplugins/searchpluginspng1.png
FINISH PATCH Contents/Resources/searchplugins/searchpluginspng0.png
FINISH ADD Contents/Resources/precomplete
FINISH ADD Contents/Resources/distribution/extensions/extensions1/extensions1text0
FINISH PATCH Contents/Resources/distribution/extensions/extensions1/extensions1png1.png
FINISH PATCH Contents/Resources/distribution/extensions/extensions1/extensions1png0.png
FINISH ADD Contents/Resources/distribution/extensions/extensions0/extensions0text0
FINISH PATCH Contents/Resources/distribution/extensions/extensions0/extensions0png1.png
FINISH PATCH Contents/Resources/distribution/extensions/extensions0/extensions0png0.png
FINISH PATCH Contents/Resources/0/0exe0.exe
FINISH ADD Contents/Resources/0/00/00text0
FINISH PATCH Contents/Resources/0/00/00png0.png
FINISH PATCH Contents/MacOS/exe0.exe
FINISH ADD Contents/Resources/2/20/20text0
FINISH ADD Contents/Resources/2/20/20png0.png
FINISH ADD Contents/Resources/0/00/00text2
FINISH REMOVEFILE Contents/Resources/1/10/10text0
FINISH REMOVEFILE Contents/Resources/0/00/00text1
FINISH REMOVEDIR Contents/Resources/9/99/
FINISH REMOVEDIR Contents/Resources/9/99/
directory no longer exists; skipping
FINISH REMOVEDIR Contents/Resources/9/98/
FINISH REMOVEFILE Contents/Resources/9/97/970/97xtext0
FINISH REMOVEFILE Contents/Resources/9/97/970/97xtext1
FINISH REMOVEDIR Contents/Resources/9/97/970/
FINISH REMOVEFILE Contents/Resources/9/97/971/97xtext0
FINISH REMOVEFILE Contents/Resources/9/97/971/97xtext1
FINISH REMOVEDIR Contents/Resources/9/97/971/
FINISH REMOVEDIR Contents/Resources/9/97/
FINISH REMOVEFILE Contents/Resources/9/96/96text0
FINISH REMOVEFILE Contents/Resources/9/96/96text1
FINISH REMOVEDIR Contents/Resources/9/96/
FINISH REMOVEDIR Contents/Resources/9/95/
FINISH REMOVEDIR Contents/Resources/9/95/
directory no longer exists; skipping
FINISH REMOVEDIR Contents/Resources/9/94/
FINISH REMOVEDIR Contents/Resources/9/94/
directory no longer exists; skipping
FINISH REMOVEDIR Contents/Resources/9/93/
FINISH REMOVEDIR Contents/Resources/9/92/
removing directory: Contents/Resources/9/92/, rv: 0
FINISH REMOVEDIR Contents/Resources/9/91/
removing directory: Contents/Resources/9/91/, rv: 0
FINISH REMOVEDIR Contents/Resources/9/90/
FINISH REMOVEDIR Contents/Resources/9/90/
directory no longer exists; skipping
FINISH REMOVEDIR Contents/Resources/8/89/
FINISH REMOVEDIR Contents/Resources/8/89/
directory no longer exists; skipping
FINISH REMOVEDIR Contents/Resources/8/88/
FINISH REMOVEFILE Contents/Resources/8/87/870/87xtext0
FINISH REMOVEFILE Contents/Resources/8/87/870/87xtext1
FINISH REMOVEDIR Contents/Resources/8/87/870/
FINISH REMOVEFILE Contents/Resources/8/87/871/87xtext0
FINISH REMOVEFILE Contents/Resources/8/87/871/87xtext1
FINISH REMOVEDIR Contents/Resources/8/87/871/
FINISH REMOVEDIR Contents/Resources/8/87/
FINISH REMOVEFILE Contents/Resources/8/86/86text0
FINISH REMOVEFILE Contents/Resources/8/86/86text1
FINISH REMOVEDIR Contents/Resources/8/86/
FINISH REMOVEDIR Contents/Resources/8/85/
FINISH REMOVEDIR Contents/Resources/8/85/
directory no longer exists; skipping
FINISH REMOVEDIR Contents/Resources/8/84/
FINISH REMOVEDIR Contents/Resources/8/84/
directory no longer exists; skipping
FINISH REMOVEDIR Contents/Resources/8/83/
FINISH REMOVEDIR Contents/Resources/8/82/
removing directory: Contents/Resources/8/82/, rv: 0
FINISH REMOVEDIR Contents/Resources/8/81/
removing directory: Contents/Resources/8/81/, rv: 0
FINISH REMOVEDIR Contents/Resources/8/80/
FINISH REMOVEDIR Contents/Resources/8/80/
directory no longer exists; skipping
FINISH REMOVEFILE Contents/Resources/7/70/7xtest.exe
FINISH REMOVEFILE Contents/Resources/7/70/7xtext0
FINISH REMOVEFILE Contents/Resources/7/70/7xtext1
FINISH REMOVEDIR Contents/Resources/7/70/
FINISH REMOVEFILE Contents/Resources/7/71/7xtest.exe
FINISH REMOVEFILE Contents/Resources/7/71/7xtext0
FINISH REMOVEFILE Contents/Resources/7/71/7xtext1
FINISH REMOVEDIR Contents/Resources/7/71/
FINISH REMOVEFILE Contents/Resources/7/7text0
FINISH REMOVEFILE Contents/Resources/7/7text1
FINISH REMOVEDIR Contents/Resources/7/
FINISH REMOVEDIR Contents/Resources/6/
FINISH REMOVEFILE Contents/Resources/5/5text1
FINISH REMOVEFILE Contents/Resources/5/5text0
FINISH REMOVEFILE Contents/Resources/5/5test.exe
FINISH REMOVEDIR Contents/Resources/5/
FINISH REMOVEFILE Contents/Resources/4/4text1
FINISH REMOVEFILE Contents/Resources/4/4text0
FINISH REMOVEDIR Contents/Resources/4/
FINISH REMOVEFILE Contents/Resources/3/3text1
FINISH REMOVEFILE Contents/Resources/3/3text0
FINISH REMOVEDIR Contents/Resources/1/10/
FINISH REMOVEDIR Contents/Resources/1/
succeeded
calling QuitProgressUI

View file

@ -0,0 +1,279 @@
UPDATE TYPE partial
PREPARE ADD searchplugins/searchpluginstext0
PREPARE PATCH searchplugins/searchpluginspng1.png
PREPARE PATCH searchplugins/searchpluginspng0.png
PREPARE ADD precomplete
PREPARE PATCH exe0.exe
PREPARE ADD distribution/extensions/extensions1/extensions1text0
PREPARE PATCH distribution/extensions/extensions1/extensions1png1.png
PREPARE PATCH distribution/extensions/extensions1/extensions1png0.png
PREPARE ADD distribution/extensions/extensions0/extensions0text0
PREPARE PATCH distribution/extensions/extensions0/extensions0png1.png
PREPARE PATCH distribution/extensions/extensions0/extensions0png0.png
PREPARE PATCH 0/0exe0.exe
PREPARE ADD 0/00/00text0
PREPARE PATCH 0/00/00png0.png
PREPARE ADD 2/20/20text0
PREPARE ADD 2/20/20png0.png
PREPARE ADD 0/00/00text2
PREPARE REMOVEFILE 1/10/10text0
PREPARE REMOVEFILE 0/00/00text1
PREPARE REMOVEDIR 9/99/
PREPARE REMOVEDIR 9/99/
PREPARE REMOVEDIR 9/98/
PREPARE REMOVEFILE 9/97/970/97xtext0
PREPARE REMOVEFILE 9/97/970/97xtext1
PREPARE REMOVEDIR 9/97/970/
PREPARE REMOVEFILE 9/97/971/97xtext0
PREPARE REMOVEFILE 9/97/971/97xtext1
PREPARE REMOVEDIR 9/97/971/
PREPARE REMOVEDIR 9/97/
PREPARE REMOVEFILE 9/96/96text0
PREPARE REMOVEFILE 9/96/96text1
PREPARE REMOVEDIR 9/96/
PREPARE REMOVEDIR 9/95/
PREPARE REMOVEDIR 9/95/
PREPARE REMOVEDIR 9/94/
PREPARE REMOVEDIR 9/94/
PREPARE REMOVEDIR 9/93/
PREPARE REMOVEDIR 9/92/
PREPARE REMOVEDIR 9/91/
PREPARE REMOVEDIR 9/90/
PREPARE REMOVEDIR 9/90/
PREPARE REMOVEDIR 8/89/
PREPARE REMOVEDIR 8/89/
PREPARE REMOVEDIR 8/88/
PREPARE REMOVEFILE 8/87/870/87xtext0
PREPARE REMOVEFILE 8/87/870/87xtext1
PREPARE REMOVEDIR 8/87/870/
PREPARE REMOVEFILE 8/87/871/87xtext0
PREPARE REMOVEFILE 8/87/871/87xtext1
PREPARE REMOVEDIR 8/87/871/
PREPARE REMOVEDIR 8/87/
PREPARE REMOVEFILE 8/86/86text0
PREPARE REMOVEFILE 8/86/86text1
PREPARE REMOVEDIR 8/86/
PREPARE REMOVEDIR 8/85/
PREPARE REMOVEDIR 8/85/
PREPARE REMOVEDIR 8/84/
PREPARE REMOVEDIR 8/84/
PREPARE REMOVEDIR 8/83/
PREPARE REMOVEDIR 8/82/
PREPARE REMOVEDIR 8/81/
PREPARE REMOVEDIR 8/80/
PREPARE REMOVEDIR 8/80/
PREPARE REMOVEFILE 7/70/7xtest.exe
PREPARE REMOVEFILE 7/70/7xtext0
PREPARE REMOVEFILE 7/70/7xtext1
PREPARE REMOVEDIR 7/70/
PREPARE REMOVEFILE 7/71/7xtest.exe
PREPARE REMOVEFILE 7/71/7xtext0
PREPARE REMOVEFILE 7/71/7xtext1
PREPARE REMOVEDIR 7/71/
PREPARE REMOVEFILE 7/7text0
PREPARE REMOVEFILE 7/7text1
PREPARE REMOVEDIR 7/
PREPARE REMOVEDIR 6/
PREPARE REMOVEFILE 5/5text1
PREPARE REMOVEFILE 5/5text0
PREPARE REMOVEFILE 5/5test.exe
PREPARE REMOVEFILE 5/5text0
PREPARE REMOVEFILE 5/5text1
PREPARE REMOVEDIR 5/
PREPARE REMOVEFILE 4/4text1
PREPARE REMOVEFILE 4/4text0
PREPARE REMOVEDIR 4/
PREPARE REMOVEFILE 3/3text1
PREPARE REMOVEFILE 3/3text0
PREPARE REMOVEDIR 1/10/
PREPARE REMOVEDIR 1/
EXECUTE ADD searchplugins/searchpluginstext0
EXECUTE PATCH searchplugins/searchpluginspng1.png
EXECUTE PATCH searchplugins/searchpluginspng0.png
EXECUTE ADD precomplete
EXECUTE PATCH exe0.exe
EXECUTE ADD distribution/extensions/extensions1/extensions1text0
EXECUTE PATCH distribution/extensions/extensions1/extensions1png1.png
EXECUTE PATCH distribution/extensions/extensions1/extensions1png0.png
EXECUTE ADD distribution/extensions/extensions0/extensions0text0
EXECUTE PATCH distribution/extensions/extensions0/extensions0png1.png
EXECUTE PATCH distribution/extensions/extensions0/extensions0png0.png
EXECUTE PATCH 0/0exe0.exe
EXECUTE ADD 0/00/00text0
EXECUTE PATCH 0/00/00png0.png
EXECUTE ADD 2/20/20text0
EXECUTE ADD 2/20/20png0.png
EXECUTE ADD 0/00/00text2
EXECUTE REMOVEFILE 1/10/10text0
EXECUTE REMOVEFILE 0/00/00text1
EXECUTE REMOVEDIR 9/99/
EXECUTE REMOVEDIR 9/99/
EXECUTE REMOVEDIR 9/98/
EXECUTE REMOVEFILE 9/97/970/97xtext0
EXECUTE REMOVEFILE 9/97/970/97xtext1
EXECUTE REMOVEDIR 9/97/970/
EXECUTE REMOVEFILE 9/97/971/97xtext0
EXECUTE REMOVEFILE 9/97/971/97xtext1
EXECUTE REMOVEDIR 9/97/971/
EXECUTE REMOVEDIR 9/97/
EXECUTE REMOVEFILE 9/96/96text0
EXECUTE REMOVEFILE 9/96/96text1
EXECUTE REMOVEDIR 9/96/
EXECUTE REMOVEDIR 9/95/
EXECUTE REMOVEDIR 9/95/
EXECUTE REMOVEDIR 9/94/
EXECUTE REMOVEDIR 9/94/
EXECUTE REMOVEDIR 9/93/
EXECUTE REMOVEDIR 9/92/
EXECUTE REMOVEDIR 9/91/
EXECUTE REMOVEDIR 9/90/
EXECUTE REMOVEDIR 9/90/
EXECUTE REMOVEDIR 8/89/
EXECUTE REMOVEDIR 8/89/
EXECUTE REMOVEDIR 8/88/
EXECUTE REMOVEFILE 8/87/870/87xtext0
EXECUTE REMOVEFILE 8/87/870/87xtext1
EXECUTE REMOVEDIR 8/87/870/
EXECUTE REMOVEFILE 8/87/871/87xtext0
EXECUTE REMOVEFILE 8/87/871/87xtext1
EXECUTE REMOVEDIR 8/87/871/
EXECUTE REMOVEDIR 8/87/
EXECUTE REMOVEFILE 8/86/86text0
EXECUTE REMOVEFILE 8/86/86text1
EXECUTE REMOVEDIR 8/86/
EXECUTE REMOVEDIR 8/85/
EXECUTE REMOVEDIR 8/85/
EXECUTE REMOVEDIR 8/84/
EXECUTE REMOVEDIR 8/84/
EXECUTE REMOVEDIR 8/83/
EXECUTE REMOVEDIR 8/82/
EXECUTE REMOVEDIR 8/81/
EXECUTE REMOVEDIR 8/80/
EXECUTE REMOVEDIR 8/80/
EXECUTE REMOVEFILE 7/70/7xtest.exe
EXECUTE REMOVEFILE 7/70/7xtext0
EXECUTE REMOVEFILE 7/70/7xtext1
EXECUTE REMOVEDIR 7/70/
EXECUTE REMOVEFILE 7/71/7xtest.exe
EXECUTE REMOVEFILE 7/71/7xtext0
EXECUTE REMOVEFILE 7/71/7xtext1
EXECUTE REMOVEDIR 7/71/
EXECUTE REMOVEFILE 7/7text0
EXECUTE REMOVEFILE 7/7text1
EXECUTE REMOVEDIR 7/
EXECUTE REMOVEDIR 6/
EXECUTE REMOVEFILE 5/5text1
EXECUTE REMOVEFILE 5/5text0
EXECUTE REMOVEFILE 5/5test.exe
EXECUTE REMOVEFILE 5/5text0
file cannot be removed because it does not exist; skipping
EXECUTE REMOVEFILE 5/5text1
file cannot be removed because it does not exist; skipping
EXECUTE REMOVEDIR 5/
EXECUTE REMOVEFILE 4/4text1
EXECUTE REMOVEFILE 4/4text0
EXECUTE REMOVEDIR 4/
EXECUTE REMOVEFILE 3/3text1
EXECUTE REMOVEFILE 3/3text0
EXECUTE REMOVEDIR 1/10/
EXECUTE REMOVEDIR 1/
FINISH ADD searchplugins/searchpluginstext0
FINISH PATCH searchplugins/searchpluginspng1.png
FINISH PATCH searchplugins/searchpluginspng0.png
FINISH ADD precomplete
FINISH PATCH exe0.exe
FINISH ADD distribution/extensions/extensions1/extensions1text0
FINISH PATCH distribution/extensions/extensions1/extensions1png1.png
FINISH PATCH distribution/extensions/extensions1/extensions1png0.png
FINISH ADD distribution/extensions/extensions0/extensions0text0
FINISH PATCH distribution/extensions/extensions0/extensions0png1.png
FINISH PATCH distribution/extensions/extensions0/extensions0png0.png
FINISH PATCH 0/0exe0.exe
FINISH ADD 0/00/00text0
FINISH PATCH 0/00/00png0.png
FINISH ADD 2/20/20text0
FINISH ADD 2/20/20png0.png
FINISH ADD 0/00/00text2
FINISH REMOVEFILE 1/10/10text0
FINISH REMOVEFILE 0/00/00text1
FINISH REMOVEDIR 9/99/
FINISH REMOVEDIR 9/99/
directory no longer exists; skipping
FINISH REMOVEDIR 9/98/
FINISH REMOVEFILE 9/97/970/97xtext0
FINISH REMOVEFILE 9/97/970/97xtext1
FINISH REMOVEDIR 9/97/970/
FINISH REMOVEFILE 9/97/971/97xtext0
FINISH REMOVEFILE 9/97/971/97xtext1
FINISH REMOVEDIR 9/97/971/
FINISH REMOVEDIR 9/97/
FINISH REMOVEFILE 9/96/96text0
FINISH REMOVEFILE 9/96/96text1
FINISH REMOVEDIR 9/96/
FINISH REMOVEDIR 9/95/
FINISH REMOVEDIR 9/95/
directory no longer exists; skipping
FINISH REMOVEDIR 9/94/
FINISH REMOVEDIR 9/94/
directory no longer exists; skipping
FINISH REMOVEDIR 9/93/
FINISH REMOVEDIR 9/92/
removing directory: 9/92/, rv: 0
FINISH REMOVEDIR 9/91/
removing directory: 9/91/, rv: 0
FINISH REMOVEDIR 9/90/
FINISH REMOVEDIR 9/90/
directory no longer exists; skipping
FINISH REMOVEDIR 8/89/
FINISH REMOVEDIR 8/89/
directory no longer exists; skipping
FINISH REMOVEDIR 8/88/
FINISH REMOVEFILE 8/87/870/87xtext0
FINISH REMOVEFILE 8/87/870/87xtext1
FINISH REMOVEDIR 8/87/870/
FINISH REMOVEFILE 8/87/871/87xtext0
FINISH REMOVEFILE 8/87/871/87xtext1
FINISH REMOVEDIR 8/87/871/
FINISH REMOVEDIR 8/87/
FINISH REMOVEFILE 8/86/86text0
FINISH REMOVEFILE 8/86/86text1
FINISH REMOVEDIR 8/86/
FINISH REMOVEDIR 8/85/
FINISH REMOVEDIR 8/85/
directory no longer exists; skipping
FINISH REMOVEDIR 8/84/
FINISH REMOVEDIR 8/84/
directory no longer exists; skipping
FINISH REMOVEDIR 8/83/
FINISH REMOVEDIR 8/82/
removing directory: 8/82/, rv: 0
FINISH REMOVEDIR 8/81/
removing directory: 8/81/, rv: 0
FINISH REMOVEDIR 8/80/
FINISH REMOVEDIR 8/80/
directory no longer exists; skipping
FINISH REMOVEFILE 7/70/7xtest.exe
FINISH REMOVEFILE 7/70/7xtext0
FINISH REMOVEFILE 7/70/7xtext1
FINISH REMOVEDIR 7/70/
FINISH REMOVEFILE 7/71/7xtest.exe
FINISH REMOVEFILE 7/71/7xtext0
FINISH REMOVEFILE 7/71/7xtext1
FINISH REMOVEDIR 7/71/
FINISH REMOVEFILE 7/7text0
FINISH REMOVEFILE 7/7text1
FINISH REMOVEDIR 7/
FINISH REMOVEDIR 6/
FINISH REMOVEFILE 5/5text1
FINISH REMOVEFILE 5/5text0
FINISH REMOVEFILE 5/5test.exe
FINISH REMOVEDIR 5/
FINISH REMOVEFILE 4/4text1
FINISH REMOVEFILE 4/4text0
FINISH REMOVEDIR 4/
FINISH REMOVEFILE 3/3text1
FINISH REMOVEFILE 3/3text0
FINISH REMOVEDIR 1/10/
FINISH REMOVEDIR 1/
succeeded
calling QuitProgressUI

Binary file not shown.

View file

@ -0,0 +1,19 @@
remove "searchplugins/searchpluginstext0"
remove "searchplugins/searchpluginspng1.png"
remove "searchplugins/searchpluginspng0.png"
remove "removed-files"
remove "precomplete"
remove "exe0.exe"
remove "2/20/20text0"
remove "2/20/20png0.png"
remove "0/0exe0.exe"
remove "0/00/00text2"
remove "0/00/00text0"
remove "0/00/00png0.png"
rmdir "searchplugins/"
rmdir "defaults/pref/"
rmdir "defaults/"
rmdir "2/20/"
rmdir "2/"
rmdir "0/00/"
rmdir "0/"

View file

@ -0,0 +1,22 @@
remove "Contents/Resources/searchplugins/searchpluginstext0"
remove "Contents/Resources/searchplugins/searchpluginspng1.png"
remove "Contents/Resources/searchplugins/searchpluginspng0.png"
remove "Contents/Resources/removed-files"
remove "Contents/Resources/precomplete"
remove "Contents/Resources/2/20/20text0"
remove "Contents/Resources/2/20/20png0.png"
remove "Contents/Resources/0/0exe0.exe"
remove "Contents/Resources/0/00/00text2"
remove "Contents/Resources/0/00/00text0"
remove "Contents/Resources/0/00/00png0.png"
remove "Contents/MacOS/exe0.exe"
rmdir "Contents/Resources/searchplugins/"
rmdir "Contents/Resources/defaults/pref/"
rmdir "Contents/Resources/defaults/"
rmdir "Contents/Resources/2/20/"
rmdir "Contents/Resources/2/"
rmdir "Contents/Resources/0/00/"
rmdir "Contents/Resources/0/"
rmdir "Contents/Resources/"
rmdir "Contents/MacOS/"
rmdir "Contents/"

View file

@ -0,0 +1,41 @@
a/b/text0
a/b/text1
a/b/3/3text0
a/b/3/3text1
a/b/4/4exe0.exe
a/b/4/4text0
a/b/4/4text1
a/b/4/
a/b/5/5text0
a/b/5/5text1
a/b/5/*
a/b/6/
a/b/7/*
a/b/8/80/
a/b/8/81/
a/b/8/82/
a/b/8/83/
a/b/8/84/
a/b/8/85/*
a/b/8/86/*
a/b/8/87/*
a/b/8/88/*
a/b/8/89/*
a/b/8/80/
a/b/8/84/*
a/b/8/85/*
a/b/8/89/
a/b/9/90/
a/b/9/91/
a/b/9/92/
a/b/9/93/
a/b/9/94/
a/b/9/95/*
a/b/9/96/*
a/b/9/97/*
a/b/9/98/*
a/b/9/99/*
a/b/9/90/
a/b/9/94/*
a/b/9/95/*
a/b/9/99/

View file

@ -0,0 +1,41 @@
Contents/Resources/text0
Contents/Resources/text1
Contents/Resources/3/3text0
Contents/Resources/3/3text1
Contents/Resources/4/exe0.exe
Contents/Resources/4/4text0
Contents/Resources/4/4text1
Contents/Resources/4/
Contents/Resources/5/5text0
Contents/Resources/5/5text1
Contents/Resources/5/*
Contents/Resources/6/
Contents/Resources/7/*
Contents/Resources/8/80/
Contents/Resources/8/81/
Contents/Resources/8/82/
Contents/Resources/8/83/
Contents/Resources/8/84/
Contents/Resources/8/85/*
Contents/Resources/8/86/*
Contents/Resources/8/87/*
Contents/Resources/8/88/*
Contents/Resources/8/89/*
Contents/Resources/8/80/
Contents/Resources/8/84/*
Contents/Resources/8/85/*
Contents/Resources/8/89/
Contents/Resources/9/90/
Contents/Resources/9/91/
Contents/Resources/9/92/
Contents/Resources/9/93/
Contents/Resources/9/94/
Contents/Resources/9/95/*
Contents/Resources/9/96/*
Contents/Resources/9/97/*
Contents/Resources/9/98/*
Contents/Resources/9/99/*
Contents/Resources/9/90/
Contents/Resources/9/94/*
Contents/Resources/9/95/*
Contents/Resources/9/99/

View file

@ -0,0 +1,63 @@
type "partial"
add "precomplete"
add "a/b/searchplugins/searchpluginstext0"
patch-if "a/b/searchplugins/searchpluginspng1.png" "a/b/searchplugins/searchpluginspng1.png.patch" "a/b/searchplugins/searchpluginspng1.png"
patch-if "a/b/searchplugins/searchpluginspng0.png" "a/b/searchplugins/searchpluginspng0.png.patch" "a/b/searchplugins/searchpluginspng0.png"
add-if "a/b/extensions/extensions1" "a/b/extensions/extensions1/extensions1text0"
patch-if "a/b/extensions/extensions1" "a/b/extensions/extensions1/extensions1png1.png.patch" "a/b/extensions/extensions1/extensions1png1.png"
patch-if "a/b/extensions/extensions1" "a/b/extensions/extensions1/extensions1png0.png.patch" "a/b/extensions/extensions1/extensions1png0.png"
add-if "a/b/extensions/extensions0" "a/b/extensions/extensions0/extensions0text0"
patch-if "a/b/extensions/extensions0" "a/b/extensions/extensions0/extensions0png1.png.patch" "a/b/extensions/extensions0/extensions0png1.png"
patch-if "a/b/extensions/extensions0" "a/b/extensions/extensions0/extensions0png0.png.patch" "a/b/extensions/extensions0/extensions0png0.png"
patch "a/b/exe0.exe.patch" "a/b/exe0.exe"
patch "a/b/0/0exe0.exe.patch" "a/b/0/0exe0.exe"
add "a/b/0/00/00text0"
patch "a/b/0/00/00png0.png.patch" "a/b/0/00/00png0.png"
add "a/b/2/20/20text0"
add "a/b/2/20/20png0.png"
add "a/b/0/00/00text2"
remove "a/b/1/10/10text0"
remove "a/b/0/00/00text1"
remove "a/b/text1"
remove "a/b/text0"
rmrfdir "a/b/9/99/"
rmdir "a/b/9/99/"
rmrfdir "a/b/9/98/"
rmrfdir "a/b/9/97/"
rmrfdir "a/b/9/96/"
rmrfdir "a/b/9/95/"
rmrfdir "a/b/9/95/"
rmrfdir "a/b/9/94/"
rmdir "a/b/9/94/"
rmdir "a/b/9/93/"
rmdir "a/b/9/92/"
rmdir "a/b/9/91/"
rmdir "a/b/9/90/"
rmdir "a/b/9/90/"
rmrfdir "a/b/8/89/"
rmdir "a/b/8/89/"
rmrfdir "a/b/8/88/"
rmrfdir "a/b/8/87/"
rmrfdir "a/b/8/86/"
rmrfdir "a/b/8/85/"
rmrfdir "a/b/8/85/"
rmrfdir "a/b/8/84/"
rmdir "a/b/8/84/"
rmdir "a/b/8/83/"
rmdir "a/b/8/82/"
rmdir "a/b/8/81/"
rmdir "a/b/8/80/"
rmdir "a/b/8/80/"
rmrfdir "a/b/7/"
rmdir "a/b/6/"
remove "a/b/5/5text1"
remove "a/b/5/5text0"
rmrfdir "a/b/5/"
remove "a/b/4/4text1"
remove "a/b/4/4text0"
remove "a/b/4/4exe0.exe"
rmdir "a/b/4/"
remove "a/b/3/3text1"
remove "a/b/3/3text0"
rmdir "a/b/1/10/"
rmdir "a/b/1/"

View file

@ -0,0 +1,6 @@
Performing a replace request
rename_file: proceeding to rename the directory
rename_file: proceeding to rename the directory
Now, remove the tmpDir
succeeded
calling QuitProgressUI

View file

@ -0,0 +1,632 @@
/* 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/. */
/* Shared code for xpcshell and mochitests-chrome */
/* eslint-disable no-undef */
Cu.import("resource://gre/modules/FileUtils.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
const PREF_APP_UPDATE_AUTO = "app.update.auto";
const PREF_APP_UPDATE_BACKGROUNDERRORS = "app.update.backgroundErrors";
const PREF_APP_UPDATE_BACKGROUNDMAXERRORS = "app.update.backgroundMaxErrors";
const PREF_APP_UPDATE_CHANNEL = "app.update.channel";
const PREF_APP_UPDATE_DOWNLOADBACKGROUNDINTERVAL = "app.update.download.backgroundInterval";
const PREF_APP_UPDATE_ENABLED = "app.update.enabled";
const PREF_APP_UPDATE_IDLETIME = "app.update.idletime";
const PREF_APP_UPDATE_LOG = "app.update.log";
const PREF_APP_UPDATE_NOTIFIEDUNSUPPORTED = "app.update.notifiedUnsupported";
const PREF_APP_UPDATE_PROMPTWAITTIME = "app.update.promptWaitTime";
const PREF_APP_UPDATE_RETRYTIMEOUT = "app.update.socket.retryTimeout";
const PREF_APP_UPDATE_SERVICE_ENABLED = "app.update.service.enabled";
const PREF_APP_UPDATE_SILENT = "app.update.silent";
const PREF_APP_UPDATE_SOCKET_MAXERRORS = "app.update.socket.maxErrors";
const PREF_APP_UPDATE_STAGING_ENABLED = "app.update.staging.enabled";
const PREF_APP_UPDATE_URL = "app.update.url";
const PREF_APP_UPDATE_URL_DETAILS = "app.update.url.details";
const PREFBRANCH_APP_UPDATE_NEVER = "app.update.never.";
const PREFBRANCH_APP_PARTNER = "app.partner.";
const PREF_DISTRIBUTION_ID = "distribution.id";
const PREF_DISTRIBUTION_VERSION = "distribution.version";
const PREF_TOOLKIT_TELEMETRY_ENABLED = "toolkit.telemetry.enabled";
const NS_APP_PROFILE_DIR_STARTUP = "ProfDS";
const NS_APP_USER_PROFILE_50_DIR = "ProfD";
const NS_GRE_DIR = "GreD";
const NS_GRE_BIN_DIR = "GreBinD";
const NS_XPCOM_CURRENT_PROCESS_DIR = "XCurProcD";
const XRE_EXECUTABLE_FILE = "XREExeF";
const XRE_UPDATE_ROOT_DIR = "UpdRootD";
const DIR_PATCH = "0";
const DIR_TOBEDELETED = "tobedeleted";
const DIR_UPDATES = "updates";
const DIR_UPDATED = IS_MACOSX ? "Updated.app" : "updated";
const FILE_ACTIVE_UPDATE_XML = "active-update.xml";
const FILE_APPLICATION_INI = "application.ini";
const FILE_BACKUP_UPDATE_LOG = "backup-update.log";
const FILE_LAST_UPDATE_LOG = "last-update.log";
const FILE_UPDATE_SETTINGS_INI = "update-settings.ini";
const FILE_UPDATE_SETTINGS_INI_BAK = "update-settings.ini.bak";
const FILE_UPDATER_INI = "updater.ini";
const FILE_UPDATES_XML = "updates.xml";
const FILE_UPDATE_LOG = "update.log";
const FILE_UPDATE_MAR = "update.mar";
const FILE_UPDATE_STATUS = "update.status";
const FILE_UPDATE_TEST = "update.test";
const FILE_UPDATE_VERSION = "update.version";
const UPDATE_SETTINGS_CONTENTS = "[Settings]\n" +
"ACCEPTED_MAR_CHANNEL_IDS=xpcshell-test\n";
const PR_RDWR = 0x04;
const PR_CREATE_FILE = 0x08;
const PR_TRUNCATE = 0x20;
const DEFAULT_UPDATE_VERSION = "999999.0";
var gChannel;
/* import-globals-from ../data/sharedUpdateXML.js */
Services.scriptloader.loadSubScript(DATA_URI_SPEC + "sharedUpdateXML.js", this);
const PERMS_FILE = FileUtils.PERMS_FILE;
const PERMS_DIRECTORY = FileUtils.PERMS_DIRECTORY;
const MODE_WRONLY = FileUtils.MODE_WRONLY;
const MODE_CREATE = FileUtils.MODE_CREATE;
const MODE_APPEND = FileUtils.MODE_APPEND;
const MODE_TRUNCATE = FileUtils.MODE_TRUNCATE;
const URI_UPDATES_PROPERTIES = "chrome://mozapps/locale/update/updates.properties";
const gUpdateBundle = Services.strings.createBundle(URI_UPDATES_PROPERTIES);
XPCOMUtils.defineLazyGetter(this, "gAUS", function test_gAUS() {
return Cc["@mozilla.org/updates/update-service;1"].
getService(Ci.nsIApplicationUpdateService).
QueryInterface(Ci.nsITimerCallback).
QueryInterface(Ci.nsIObserver).
QueryInterface(Ci.nsIUpdateCheckListener);
});
XPCOMUtils.defineLazyServiceGetter(this, "gUpdateManager",
"@mozilla.org/updates/update-manager;1",
"nsIUpdateManager");
XPCOMUtils.defineLazyGetter(this, "gUpdateChecker", function test_gUC() {
return Cc["@mozilla.org/updates/update-checker;1"].
createInstance(Ci.nsIUpdateChecker);
});
XPCOMUtils.defineLazyGetter(this, "gUP", function test_gUP() {
return Cc["@mozilla.org/updates/update-prompt;1"].
createInstance(Ci.nsIUpdatePrompt);
});
XPCOMUtils.defineLazyGetter(this, "gDefaultPrefBranch", function test_gDPB() {
return Services.prefs.getDefaultBranch(null);
});
XPCOMUtils.defineLazyGetter(this, "gPrefRoot", function test_gPR() {
return Services.prefs.getBranch(null);
});
XPCOMUtils.defineLazyServiceGetter(this, "gEnv",
"@mozilla.org/process/environment;1",
"nsIEnvironment");
XPCOMUtils.defineLazyGetter(this, "gZipW", function test_gZipW() {
return Cc["@mozilla.org/zipwriter;1"].
createInstance(Ci.nsIZipWriter);
});
/* Triggers post-update processing */
function testPostUpdateProcessing() {
gAUS.observe(null, "test-post-update-processing", "");
}
/* Initializes the update service stub */
function initUpdateServiceStub() {
Cc["@mozilla.org/updates/update-service-stub;1"].
createInstance(Ci.nsISupports);
}
/* Reloads the update metadata from disk */
function reloadUpdateManagerData() {
gUpdateManager.QueryInterface(Ci.nsIObserver).
observe(null, "um-reload-update-data", "");
}
const observer = {
observe: function(aSubject, aTopic, aData) {
if (aTopic == "nsPref:changed" && aData == PREF_APP_UPDATE_CHANNEL) {
let channel = gDefaultPrefBranch.getCharPref(PREF_APP_UPDATE_CHANNEL);
if (channel != gChannel) {
debugDump("Changing channel from " + channel + " to " + gChannel);
gDefaultPrefBranch.setCharPref(PREF_APP_UPDATE_CHANNEL, gChannel);
}
}
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver])
};
/**
* Sets the app.update.channel preference.
*
* @param aChannel
* The update channel.
*/
function setUpdateChannel(aChannel) {
gChannel = aChannel;
debugDump("setting default pref " + PREF_APP_UPDATE_CHANNEL + " to " + gChannel);
gDefaultPrefBranch.setCharPref(PREF_APP_UPDATE_CHANNEL, gChannel);
gPrefRoot.addObserver(PREF_APP_UPDATE_CHANNEL, observer, false);
}
/**
* Sets the app.update.url default preference.
*
* @param aURL
* The update url. If not specified 'URL_HOST + "/update.xml"' will be
* used.
*/
function setUpdateURL(aURL) {
let url = aURL ? aURL : URL_HOST + "/update.xml";
debugDump("setting " + PREF_APP_UPDATE_URL + " to " + url);
gDefaultPrefBranch.setCharPref(PREF_APP_UPDATE_URL, url);
}
/**
* Returns either the active or regular update database XML file.
*
* @param isActiveUpdate
* If true this will return the active-update.xml otherwise it will
* return the updates.xml file.
*/
function getUpdatesXMLFile(aIsActiveUpdate) {
let file = getUpdatesRootDir();
file.append(aIsActiveUpdate ? FILE_ACTIVE_UPDATE_XML : FILE_UPDATES_XML);
return file;
}
/**
* Writes the updates specified to either the active-update.xml or the
* updates.xml.
*
* @param aContent
* The updates represented as a string to write to the XML file.
* @param isActiveUpdate
* If true this will write to the active-update.xml otherwise it will
* write to the updates.xml file.
*/
function writeUpdatesToXMLFile(aContent, aIsActiveUpdate) {
writeFile(getUpdatesXMLFile(aIsActiveUpdate), aContent);
}
/**
* Writes the current update operation/state to a file in the patch
* directory, indicating to the patching system that operations need
* to be performed.
*
* @param aStatus
* The status value to write.
*/
function writeStatusFile(aStatus) {
let file = getUpdatesPatchDir();
file.append(FILE_UPDATE_STATUS);
writeFile(file, aStatus + "\n");
}
/**
* Writes the current update version to a file in the patch directory,
* indicating to the patching system the version of the update.
*
* @param aVersion
* The version value to write.
*/
function writeVersionFile(aVersion) {
let file = getUpdatesPatchDir();
file.append(FILE_UPDATE_VERSION);
writeFile(file, aVersion + "\n");
}
/**
* Gets the root directory for the updates directory.
*
* @return nsIFile for the updates root directory.
*/
function getUpdatesRootDir() {
return Services.dirsvc.get(XRE_UPDATE_ROOT_DIR, Ci.nsIFile);
}
/**
* Gets the updates directory.
*
* @return nsIFile for the updates directory.
*/
function getUpdatesDir() {
let dir = getUpdatesRootDir();
dir.append(DIR_UPDATES);
return dir;
}
/**
* Gets the directory for update patches.
*
* @return nsIFile for the updates directory.
*/
function getUpdatesPatchDir() {
let dir = getUpdatesDir();
dir.append(DIR_PATCH);
return dir;
}
/**
* Writes text to a file. This will replace existing text if the file exists
* and create the file if it doesn't exist.
*
* @param aFile
* The file to write to. Will be created if it doesn't exist.
* @param aText
* The text to write to the file. If there is existing text it will be
* replaced.
*/
function writeFile(aFile, aText) {
let fos = Cc["@mozilla.org/network/file-output-stream;1"].
createInstance(Ci.nsIFileOutputStream);
if (!aFile.exists()) {
aFile.create(Ci.nsILocalFile.NORMAL_FILE_TYPE, PERMS_FILE);
}
fos.init(aFile, MODE_WRONLY | MODE_CREATE | MODE_TRUNCATE, PERMS_FILE, 0);
fos.write(aText, aText.length);
fos.close();
}
/**
* Reads the current update operation/state in the status file in the patch
* directory including the error code if it is present.
*
* @return The status value.
*/
function readStatusFile() {
let file = getUpdatesPatchDir();
file.append(FILE_UPDATE_STATUS);
if (!file.exists()) {
debugDump("update status file does not exists! Path: " + file.path);
return STATE_NONE;
}
return readFile(file).split("\n")[0];
}
/**
* Reads the current update operation/state in the status file in the patch
* directory without the error code if it is present.
*
* @return The state value.
*/
function readStatusState() {
return readStatusFile().split(": ")[0];
}
/**
* Reads the current update operation/state in the status file in the patch
* directory with the error code.
*
* @return The state value.
*/
function readStatusFailedCode() {
return readStatusFile().split(": ")[1];
}
/**
* Reads text from a file and returns the string.
*
* @param aFile
* The file to read from.
* @return The string of text read from the file.
*/
function readFile(aFile) {
let fis = Cc["@mozilla.org/network/file-input-stream;1"].
createInstance(Ci.nsIFileInputStream);
if (!aFile.exists()) {
return null;
}
// Specifying -1 for ioFlags will open the file with the default of PR_RDONLY.
// Specifying -1 for perm will open the file with the default of 0.
fis.init(aFile, -1, -1, Ci.nsIFileInputStream.CLOSE_ON_EOF);
let sis = Cc["@mozilla.org/scriptableinputstream;1"].
createInstance(Ci.nsIScriptableInputStream);
sis.init(fis);
let text = sis.read(sis.available());
sis.close();
return text;
}
/**
* Reads the binary contents of a file and returns it as a string.
*
* @param aFile
* The file to read from.
* @return The contents of the file as a string.
*/
function readFileBytes(aFile) {
debugDump("attempting to read file, path: " + aFile.path);
let fis = Cc["@mozilla.org/network/file-input-stream;1"].
createInstance(Ci.nsIFileInputStream);
// Specifying -1 for ioFlags will open the file with the default of PR_RDONLY.
// Specifying -1 for perm will open the file with the default of 0.
fis.init(aFile, -1, -1, Ci.nsIFileInputStream.CLOSE_ON_EOF);
let bis = Cc["@mozilla.org/binaryinputstream;1"].
createInstance(Ci.nsIBinaryInputStream);
bis.setInputStream(fis);
let data = [];
let count = fis.available();
while (count > 0) {
let bytes = bis.readByteArray(Math.min(65535, count));
data.push(String.fromCharCode.apply(null, bytes));
count -= bytes.length;
if (bytes.length == 0) {
throw "Nothing read from input stream!";
}
}
data.join('');
fis.close();
return data.toString();
}
/* Returns human readable status text from the updates.properties bundle */
function getStatusText(aErrCode) {
return getString("check_error-" + aErrCode);
}
/* Returns a string from the updates.properties bundle */
function getString(aName) {
try {
return gUpdateBundle.GetStringFromName(aName);
} catch (e) {
}
return null;
}
/**
* Gets the file extension for an nsIFile.
*
* @param aFile
* The file to get the file extension for.
* @return The file extension.
*/
function getFileExtension(aFile) {
return Services.io.newFileURI(aFile).QueryInterface(Ci.nsIURL).
fileExtension;
}
/**
* Removes the updates.xml file, active-update.xml file, and all files and
* sub-directories in the updates directory except for the "0" sub-directory.
* This prevents some tests from failing due to files being left behind when the
* tests are interrupted.
*/
function removeUpdateDirsAndFiles() {
let file = getUpdatesXMLFile(true);
try {
if (file.exists()) {
file.remove(false);
}
} catch (e) {
logTestInfo("Unable to remove file. Path: " + file.path +
", Exception: " + e);
}
file = getUpdatesXMLFile(false);
try {
if (file.exists()) {
file.remove(false);
}
} catch (e) {
logTestInfo("Unable to remove file. Path: " + file.path +
", Exception: " + e);
}
// This fails sporadically on Mac OS X so wrap it in a try catch
let updatesDir = getUpdatesDir();
try {
cleanUpdatesDir(updatesDir);
} catch (e) {
logTestInfo("Unable to remove files / directories from directory. Path: " +
updatesDir.path + ", Exception: " + e);
}
}
/**
* Removes all files and sub-directories in the updates directory except for
* the "0" sub-directory.
*
* @param aDir
* nsIFile for the directory to be deleted.
*/
function cleanUpdatesDir(aDir) {
if (!aDir.exists()) {
return;
}
let dirEntries = aDir.directoryEntries;
while (dirEntries.hasMoreElements()) {
let entry = dirEntries.getNext().QueryInterface(Ci.nsIFile);
if (entry.isDirectory()) {
if (entry.leafName == DIR_PATCH && entry.parent.leafName == DIR_UPDATES) {
cleanUpdatesDir(entry);
entry.permissions = PERMS_DIRECTORY;
} else {
try {
entry.remove(true);
return;
} catch (e) {
}
cleanUpdatesDir(entry);
entry.permissions = PERMS_DIRECTORY;
try {
entry.remove(true);
} catch (e) {
logTestInfo("cleanUpdatesDir: unable to remove directory. Path: " +
entry.path + ", Exception: " + e);
throw (e);
}
}
} else {
entry.permissions = PERMS_FILE;
try {
entry.remove(false);
} catch (e) {
logTestInfo("cleanUpdatesDir: unable to remove file. Path: " +
entry.path + ", Exception: " + e);
throw (e);
}
}
}
}
/**
* Deletes a directory and its children. First it tries nsIFile::Remove(true).
* If that fails it will fall back to recursing, setting the appropriate
* permissions, and deleting the current entry.
*
* @param aDir
* nsIFile for the directory to be deleted.
*/
function removeDirRecursive(aDir) {
if (!aDir.exists()) {
return;
}
try {
debugDump("attempting to remove directory. Path: " + aDir.path);
aDir.remove(true);
return;
} catch (e) {
logTestInfo("non-fatal error removing directory. Exception: " + e);
}
let dirEntries = aDir.directoryEntries;
while (dirEntries.hasMoreElements()) {
let entry = dirEntries.getNext().QueryInterface(Ci.nsIFile);
if (entry.isDirectory()) {
removeDirRecursive(entry);
} else {
entry.permissions = PERMS_FILE;
try {
debugDump("attempting to remove file. Path: " + entry.path);
entry.remove(false);
} catch (e) {
logTestInfo("error removing file. Exception: " + e);
throw (e);
}
}
}
aDir.permissions = PERMS_DIRECTORY;
try {
debugDump("attempting to remove directory. Path: " + aDir.path);
aDir.remove(true);
} catch (e) {
logTestInfo("error removing directory. Exception: " + e);
throw (e);
}
}
/**
* Returns the directory for the currently running process. This is used to
* clean up after the tests and to locate the active-update.xml and updates.xml
* files.
*
* @return nsIFile for the current process directory.
*/
function getCurrentProcessDir() {
return Services.dirsvc.get(NS_XPCOM_CURRENT_PROCESS_DIR, Ci.nsIFile);
}
/**
* Gets the application base directory.
*
* @return nsIFile object for the application base directory.
*/
function getAppBaseDir() {
return Services.dirsvc.get(XRE_EXECUTABLE_FILE, Ci.nsIFile).parent;
}
/**
* Returns the Gecko Runtime Engine directory where files other than executable
* binaries are located. On Mac OS X this will be <bundle>/Contents/Resources/
* and the installation directory on all other platforms.
*
* @return nsIFile for the Gecko Runtime Engine directory.
*/
function getGREDir() {
return Services.dirsvc.get(NS_GRE_DIR, Ci.nsIFile);
}
/**
* Returns the Gecko Runtime Engine Binary directory where the executable
* binaries are located such as the updater binary (Windows and Linux) or
* updater package (Mac OS X). On Mac OS X this will be
* <bundle>/Contents/MacOS/ and the installation directory on all other
* platforms.
*
* @return nsIFile for the Gecko Runtime Engine Binary directory.
*/
function getGREBinDir() {
return Services.dirsvc.get(NS_GRE_BIN_DIR, Ci.nsIFile);
}
/**
* Logs TEST-INFO messages.
*
* @param aText
* The text to log.
* @param aCaller (optional)
* An optional Components.stack.caller. If not specified
* Components.stack.caller will be used.
*/
function logTestInfo(aText, aCaller) {
let caller = aCaller ? aCaller : Components.stack.caller;
let now = new Date();
let hh = now.getHours();
let mm = now.getMinutes();
let ss = now.getSeconds();
let ms = now.getMilliseconds();
let time = (hh < 10 ? "0" + hh : hh) + ":" +
(mm < 10 ? "0" + mm : mm) + ":" +
(ss < 10 ? "0" + ss : ss) + ":";
if (ms < 10) {
time += "00";
} else if (ms < 100) {
time += "0";
}
time += ms;
let msg = time + " | TEST-INFO | " + caller.filename + " | [" + caller.name +
" : " + caller.lineNumber + "] " + aText;
LOG_FUNCTION(msg);
}
/**
* Logs TEST-INFO messages when DEBUG_AUS_TEST evaluates to true.
*
* @param aText
* The text to log.
* @param aCaller (optional)
* An optional Components.stack.caller. If not specified
* Components.stack.caller will be used.
*/
function debugDump(aText, aCaller) {
if (DEBUG_AUS_TEST) {
let caller = aCaller ? aCaller : Components.stack.caller;
logTestInfo(aText, caller);
}
}

View file

@ -0,0 +1,364 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
/**
* Helper functions for creating xml strings used by application update tests.
*
* !IMPORTANT - This file contains everything needed (along with dependencies)
* by the updates.sjs file used by the mochitest-chrome tests. Since xpcshell
* used by the http server is launched with -v 170 this file must not use
* features greater than JavaScript 1.7.
*/
/* eslint-disable no-undef */
const FILE_SIMPLE_MAR = "simple.mar";
const SIZE_SIMPLE_MAR = "1031";
const MD5_HASH_SIMPLE_MAR = "1f8c038577bb6845d94ccec4999113ee";
const SHA1_HASH_SIMPLE_MAR = "5d49a672c87f10f31d7e326349564a11272a028b";
const SHA256_HASH_SIMPLE_MAR = "1aabbed5b1dd6e16e139afc5b43d479e254e0c26" +
"3c8fb9249c0a1bb93071c5fb";
const SHA384_HASH_SIMPLE_MAR = "26615014ea034af32ef5651492d5f493f5a7a1a48522e" +
"d24c366442a5ec21d5ef02e23fb58d79729b8ca2f9541" +
"99dd53";
const SHA512_HASH_SIMPLE_MAR = "922e5ae22081795f6e8d65a3c508715c9a314054179a8" +
"bbfe5f50dc23919ad89888291bc0a07586ab17dd0304a" +
"b5347473601127571c66f61f5080348e05c36b";
const STATE_NONE = "null";
const STATE_DOWNLOADING = "downloading";
const STATE_PENDING = "pending";
const STATE_PENDING_SVC = "pending-service";
const STATE_APPLYING = "applying";
const STATE_APPLIED = "applied";
const STATE_APPLIED_SVC = "applied-service";
const STATE_SUCCEEDED = "succeeded";
const STATE_DOWNLOAD_FAILED = "download-failed";
const STATE_FAILED = "failed";
const LOADSOURCE_ERROR_WRONG_SIZE = 2;
const CRC_ERROR = 4;
const READ_ERROR = 6;
const WRITE_ERROR = 7;
const MAR_CHANNEL_MISMATCH_ERROR = 22;
const VERSION_DOWNGRADE_ERROR = 23;
const SERVICE_COULD_NOT_COPY_UPDATER = 49;
const SERVICE_INVALID_APPLYTO_DIR_STAGED_ERROR = 52;
const SERVICE_INVALID_APPLYTO_DIR_ERROR = 54;
const SERVICE_INVALID_INSTALL_DIR_PATH_ERROR = 55;
const SERVICE_INVALID_WORKING_DIR_PATH_ERROR = 56;
const INVALID_APPLYTO_DIR_STAGED_ERROR = 72;
const INVALID_APPLYTO_DIR_ERROR = 74;
const INVALID_INSTALL_DIR_PATH_ERROR = 75;
const INVALID_WORKING_DIR_PATH_ERROR = 76;
const INVALID_CALLBACK_PATH_ERROR = 77;
const INVALID_CALLBACK_DIR_ERROR = 78;
const STATE_FAILED_DELIMETER = ": ";
const STATE_FAILED_LOADSOURCE_ERROR_WRONG_SIZE =
STATE_FAILED + STATE_FAILED_DELIMETER + LOADSOURCE_ERROR_WRONG_SIZE;
const STATE_FAILED_CRC_ERROR =
STATE_FAILED + STATE_FAILED_DELIMETER + CRC_ERROR;
const STATE_FAILED_READ_ERROR =
STATE_FAILED + STATE_FAILED_DELIMETER + READ_ERROR;
const STATE_FAILED_WRITE_ERROR =
STATE_FAILED + STATE_FAILED_DELIMETER + WRITE_ERROR;
const STATE_FAILED_MAR_CHANNEL_MISMATCH_ERROR =
STATE_FAILED + STATE_FAILED_DELIMETER + MAR_CHANNEL_MISMATCH_ERROR;
const STATE_FAILED_VERSION_DOWNGRADE_ERROR =
STATE_FAILED + STATE_FAILED_DELIMETER + VERSION_DOWNGRADE_ERROR;
const STATE_FAILED_SERVICE_COULD_NOT_COPY_UPDATER =
STATE_FAILED + STATE_FAILED_DELIMETER + SERVICE_COULD_NOT_COPY_UPDATER
const STATE_FAILED_SERVICE_INVALID_APPLYTO_DIR_STAGED_ERROR =
STATE_FAILED + STATE_FAILED_DELIMETER + SERVICE_INVALID_APPLYTO_DIR_STAGED_ERROR;
const STATE_FAILED_SERVICE_INVALID_APPLYTO_DIR_ERROR =
STATE_FAILED + STATE_FAILED_DELIMETER + SERVICE_INVALID_APPLYTO_DIR_ERROR;
const STATE_FAILED_SERVICE_INVALID_INSTALL_DIR_PATH_ERROR =
STATE_FAILED + STATE_FAILED_DELIMETER + SERVICE_INVALID_INSTALL_DIR_PATH_ERROR;
const STATE_FAILED_SERVICE_INVALID_WORKING_DIR_PATH_ERROR =
STATE_FAILED + STATE_FAILED_DELIMETER + SERVICE_INVALID_WORKING_DIR_PATH_ERROR;
const STATE_FAILED_INVALID_APPLYTO_DIR_STAGED_ERROR =
STATE_FAILED + STATE_FAILED_DELIMETER + INVALID_APPLYTO_DIR_STAGED_ERROR;
const STATE_FAILED_INVALID_APPLYTO_DIR_ERROR =
STATE_FAILED + STATE_FAILED_DELIMETER + INVALID_APPLYTO_DIR_ERROR;
const STATE_FAILED_INVALID_INSTALL_DIR_PATH_ERROR =
STATE_FAILED + STATE_FAILED_DELIMETER + INVALID_INSTALL_DIR_PATH_ERROR;
const STATE_FAILED_INVALID_WORKING_DIR_PATH_ERROR =
STATE_FAILED + STATE_FAILED_DELIMETER + INVALID_WORKING_DIR_PATH_ERROR;
const STATE_FAILED_INVALID_CALLBACK_PATH_ERROR =
STATE_FAILED + STATE_FAILED_DELIMETER + INVALID_CALLBACK_PATH_ERROR;
const STATE_FAILED_INVALID_CALLBACK_DIR_ERROR =
STATE_FAILED + STATE_FAILED_DELIMETER + INVALID_CALLBACK_DIR_ERROR;
/**
* Constructs a string representing a remote update xml file.
*
* @param aUpdates
* The string representing the update elements.
* @return The string representing a remote update xml file.
*/
function getRemoteUpdatesXMLString(aUpdates) {
return "<?xml version=\"1.0\"?>\n" +
"<updates>\n" +
aUpdates +
"</updates>\n";
}
/**
* Constructs a string representing an update element for a remote update xml
* file. See getUpdateString for parameter information not provided below.
*
* @param aPatches
* String representing the application update patches.
* @return The string representing an update element for an update xml file.
*/
function getRemoteUpdateString(aPatches, aType, aName, aDisplayVersion,
aAppVersion, aBuildID, aDetailsURL, aShowPrompt,
aShowNeverForVersion, aPromptWaitTime,
aBackgroundInterval, aCustom1, aCustom2) {
return getUpdateString(aType, aName, aDisplayVersion, aAppVersion,
aBuildID, aDetailsURL, aShowPrompt,
aShowNeverForVersion, aPromptWaitTime,
aBackgroundInterval, aCustom1, aCustom2) + ">\n" +
aPatches +
" </update>\n";
}
/**
* Constructs a string representing a patch element for a remote update xml
* file. See getPatchString for parameter information not provided below.
*
* @return The string representing a patch element for a remote update xml file.
*/
function getRemotePatchString(aType, aURL, aHashFunction, aHashValue, aSize) {
return getPatchString(aType, aURL, aHashFunction, aHashValue, aSize) +
"/>\n";
}
/**
* Constructs a string representing a local update xml file.
*
* @param aUpdates
* The string representing the update elements.
* @return The string representing a local update xml file.
*/
function getLocalUpdatesXMLString(aUpdates) {
if (!aUpdates || aUpdates == "") {
return "<updates xmlns=\"http://www.mozilla.org/2005/app-update\"/>";
}
return ("<updates xmlns=\"http://www.mozilla.org/2005/app-update\">" +
aUpdates +
"</updates>").replace(/>\s+\n*</g, '><');
}
/**
* Constructs a string representing an update element for a local update xml
* file. See getUpdateString for parameter information not provided below.
*
* @param aPatches
* String representing the application update patches.
* @param aServiceURL (optional)
* The update's xml url.
* If not specified it will default to 'http://test_service/'.
* @param aIsCompleteUpdate (optional)
* The string 'true' if this update was a complete update or the string
* 'false' if this update was a partial update.
* If not specified it will default to 'true'.
* @param aChannel (optional)
* The update channel name.
* If not specified it will default to the default preference value of
* app.update.channel.
* @param aForegroundDownload (optional)
* The string 'true' if this update was manually downloaded or the
* string 'false' if this update was automatically downloaded.
* If not specified it will default to 'true'.
* @param aPreviousAppVersion (optional)
* The application version prior to applying the update.
* If not specified it will not be present.
* @return The string representing an update element for an update xml file.
*/
function getLocalUpdateString(aPatches, aType, aName, aDisplayVersion,
aAppVersion, aBuildID, aDetailsURL, aServiceURL,
aInstallDate, aStatusText, aIsCompleteUpdate,
aChannel, aForegroundDownload, aShowPrompt,
aShowNeverForVersion, aPromptWaitTime,
aBackgroundInterval, aPreviousAppVersion,
aCustom1, aCustom2) {
let serviceURL = aServiceURL ? aServiceURL : "http://test_service/";
let installDate = aInstallDate ? aInstallDate : "1238441400314";
let statusText = aStatusText ? aStatusText : "Install Pending";
let isCompleteUpdate =
typeof aIsCompleteUpdate == "string" ? aIsCompleteUpdate : "true";
let channel = aChannel ? aChannel
: gDefaultPrefBranch.getCharPref(PREF_APP_UPDATE_CHANNEL);
let foregroundDownload =
typeof aForegroundDownload == "string" ? aForegroundDownload : "true";
let previousAppVersion = aPreviousAppVersion ? "previousAppVersion=\"" +
aPreviousAppVersion + "\" "
: "";
return getUpdateString(aType, aName, aDisplayVersion, aAppVersion, aBuildID,
aDetailsURL, aShowPrompt, aShowNeverForVersion,
aPromptWaitTime, aBackgroundInterval, aCustom1, aCustom2) +
" " +
previousAppVersion +
"serviceURL=\"" + serviceURL + "\" " +
"installDate=\"" + installDate + "\" " +
"statusText=\"" + statusText + "\" " +
"isCompleteUpdate=\"" + isCompleteUpdate + "\" " +
"channel=\"" + channel + "\" " +
"foregroundDownload=\"" + foregroundDownload + "\">" +
aPatches +
" </update>";
}
/**
* Constructs a string representing a patch element for a local update xml file.
* See getPatchString for parameter information not provided below.
*
* @param aSelected (optional)
* Whether this patch is selected represented or not. The string 'true'
* denotes selected and the string 'false' denotes not selected.
* If not specified it will default to the string 'true'.
* @param aState (optional)
* The patch's state.
* If not specified it will default to STATE_SUCCEEDED.
* @return The string representing a patch element for a local update xml file.
*/
function getLocalPatchString(aType, aURL, aHashFunction, aHashValue, aSize,
aSelected, aState) {
let selected = typeof aSelected == "string" ? aSelected : "true";
let state = aState ? aState : STATE_SUCCEEDED;
return getPatchString(aType, aURL, aHashFunction, aHashValue, aSize) + " " +
"selected=\"" + selected + "\" " +
"state=\"" + state + "\"/>\n";
}
/**
* Constructs a string representing an update element for a remote update xml
* file.
*
* @param aType (optional)
* The update's type which should be major or minor. If not specified it
* will default to 'major'.
* @param aName (optional)
* The update's name.
* If not specified it will default to 'App Update Test'.
* @param aDisplayVersion (optional)
* The update's display version.
* If not specified it will default to 'version #' where # is the value
* of DEFAULT_UPDATE_VERSION.
* @param aAppVersion (optional)
* The update's application version.
* If not specified it will default to the value of
* DEFAULT_UPDATE_VERSION.
* @param aBuildID (optional)
* The update's build id.
* If not specified it will default to '20080811053724'.
* @param aDetailsURL (optional)
* The update's details url.
* If not specified it will default to 'http://test_details/' due to due
* to bug 470244.
* @param aShowPrompt (optional)
* Whether to show the prompt for the update when auto update is
* enabled.
* If not specified it will not be present and the update service will
* default to false.
* @param aShowNeverForVersion (optional)
* Whether to show the 'No Thanks' button in the update prompt.
* If not specified it will not be present and the update service will
* default to false.
* @param aPromptWaitTime (optional)
* Override for the app.update.promptWaitTime preference.
* @param aBackgroundInterval (optional)
* Override for the app.update.download.backgroundInterval preference.
* @param aCustom1 (optional)
* A custom attribute name and attribute value to add to the xml.
* Example: custom1_attribute="custom1 value"
* If not specified it will not be present.
* @param aCustom2 (optional)
* A custom attribute name and attribute value to add to the xml.
* Example: custom2_attribute="custom2 value"
* If not specified it will not be present.
* @return The string representing an update element for an update xml file.
*/
function getUpdateString(aType, aName, aDisplayVersion, aAppVersion, aBuildID,
aDetailsURL, aShowPrompt, aShowNeverForVersion,
aPromptWaitTime, aBackgroundInterval, aCustom1,
aCustom2) {
let type = aType ? aType : "major";
let name = aName ? aName : "App Update Test";
let displayVersion = aDisplayVersion ? "displayVersion=\"" +
aDisplayVersion + "\" "
: "";
let appVersion = "appVersion=\"" +
(aAppVersion ? aAppVersion : DEFAULT_UPDATE_VERSION) +
"\" ";
let buildID = aBuildID ? aBuildID : "20080811053724";
// XXXrstrong - not specifying a detailsURL will cause a leak due to bug 470244
// let detailsURL = aDetailsURL ? "detailsURL=\"" + aDetailsURL + "\" " : "";
let detailsURL = "detailsURL=\"" +
(aDetailsURL ? aDetailsURL
: "http://test_details/") + "\" ";
let showPrompt = aShowPrompt ? "showPrompt=\"" + aShowPrompt + "\" " : "";
let showNeverForVersion = aShowNeverForVersion ? "showNeverForVersion=\"" +
aShowNeverForVersion + "\" "
: "";
let promptWaitTime = aPromptWaitTime ? "promptWaitTime=\"" + aPromptWaitTime +
"\" "
: "";
let backgroundInterval = aBackgroundInterval ? "backgroundInterval=\"" +
aBackgroundInterval + "\" "
: "";
let custom1 = aCustom1 ? aCustom1 + " " : "";
let custom2 = aCustom2 ? aCustom2 + " " : "";
return " <update type=\"" + type + "\" " +
"name=\"" + name + "\" " +
displayVersion +
appVersion +
detailsURL +
showPrompt +
showNeverForVersion +
promptWaitTime +
backgroundInterval +
custom1 +
custom2 +
"buildID=\"" + buildID + "\"";
}
/**
* Constructs a string representing a patch element for an update xml file.
*
* @param aType (optional)
* The patch's type which should be complete or partial.
* If not specified it will default to 'complete'.
* @param aURL (optional)
* The patch's url to the mar file.
* If not specified it will default to the value of:
* gURLData + FILE_SIMPLE_MAR
* @param aHashFunction (optional)
* The patch's hash function used to verify the mar file.
* If not specified it will default to 'MD5'.
* @param aHashValue (optional)
* The patch's hash value used to verify the mar file.
* If not specified it will default to the value of MD5_HASH_SIMPLE_MAR
* which is the MD5 hash value for the file specified by FILE_SIMPLE_MAR.
* @param aSize (optional)
* The patch's file size for the mar file.
* If not specified it will default to the file size for FILE_SIMPLE_MAR
* specified by SIZE_SIMPLE_MAR.
* @return The string representing a patch element for an update xml file.
*/
function getPatchString(aType, aURL, aHashFunction, aHashValue, aSize) {
let type = aType ? aType : "complete";
let url = aURL ? aURL : gURLData + FILE_SIMPLE_MAR;
let hashFunction = aHashFunction ? aHashFunction : "MD5";
let hashValue = aHashValue ? aHashValue : MD5_HASH_SIMPLE_MAR;
let size = aSize ? aSize : SIZE_SIMPLE_MAR;
return " <patch type=\"" + type + "\" " +
"URL=\"" + url + "\" " +
"hashFunction=\"" + hashFunction + "\" " +
"hashValue=\"" + hashValue + "\" " +
"size=\"" + size + "\"";
}

Binary file not shown.

View file

@ -0,0 +1,53 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* Preprocessed constants used by xpcshell tests */
const INSTALL_LOCALE = "@AB_CD@";
const MOZ_APP_NAME = "@MOZ_APP_NAME@";
const BIN_SUFFIX = "@BIN_SUFFIX@";
// MOZ_APP_VENDOR is optional.
#ifdef MOZ_APP_VENDOR
const MOZ_APP_VENDOR = "@MOZ_APP_VENDOR@";
#else
const MOZ_APP_VENDOR = "";
#endif
// MOZ_APP_BASENAME is not optional for tests.
const MOZ_APP_BASENAME = "@MOZ_APP_BASENAME@";
const APP_BIN_SUFFIX = "@BIN_SUFFIX@";
const APP_INFO_NAME = "XPCShell";
const APP_INFO_VENDOR = "Mozilla";
#ifdef XP_WIN
const IS_WIN = true;
#else
const IS_WIN = false;
#endif
#ifdef XP_MACOSX
const IS_MACOSX = true;
#else
const IS_MACOSX = false;
#endif
#ifdef XP_UNIX
const IS_UNIX = true;
#else
const IS_UNIX = false;
#endif
#ifdef MOZ_VERIFY_MAR_SIGNATURE
const MOZ_VERIFY_MAR_SIGNATURE = true;
#else
const MOZ_VERIFY_MAR_SIGNATURE = false;
#endif
#ifdef DISABLE_UPDATER_AUTHENTICODE_CHECK
const IS_AUTHENTICODE_CHECK_ENABLED = false;
#else
const IS_AUTHENTICODE_CHECK_ENABLED = true;
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,101 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.
HAS_MISC_RULE = True
FINAL_TARGET = '_tests/xpcshell/toolkit/mozapps/update/tests/data'
MOCHITEST_CHROME_MANIFESTS += ['chrome/chrome.ini']
XPCSHELL_TESTS_MANIFESTS += [
'unit_aus_update/xpcshell.ini',
'unit_base_updater/xpcshell.ini'
]
if CONFIG['MOZ_MAINTENANCE_SERVICE']:
XPCSHELL_TESTS_MANIFESTS += ['unit_service_updater/xpcshell.ini']
SimplePrograms([
'TestAUSHelper',
'TestAUSReadStrings',
])
LOCAL_INCLUDES += [
'/toolkit/mozapps/update',
'/toolkit/mozapps/update/common',
]
if CONFIG['OS_ARCH'] == 'WINNT':
USE_LIBS += [
'updatecommon-standalone',
]
OS_LIBS += [
'shlwapi',
]
else:
USE_LIBS += [
'updatecommon',
]
for var in ('MOZ_APP_NAME', 'MOZ_APP_BASENAME', 'MOZ_APP_DISPLAYNAME',
'MOZ_APP_VENDOR', 'BIN_SUFFIX', 'MOZ_DEBUG'):
DEFINES[var] = CONFIG[var]
DEFINES['NS_NO_XPCOM'] = True
if CONFIG['MOZ_MAINTENANCE_SERVICE']:
DEFINES['MOZ_MAINTENANCE_SERVICE'] = CONFIG['MOZ_MAINTENANCE_SERVICE']
# For debugging purposes only
#DEFINES['DISABLE_UPDATER_AUTHENTICODE_CHECK'] = True
if CONFIG['OS_ARCH'] == 'WINNT':
DEFINES['UNICODE'] = True
DEFINES['_UNICODE'] = True
USE_STATIC_LIBS = True
if CONFIG['GNU_CC']:
WIN32_EXE_LDFLAGS += ['-municode']
TEST_HARNESS_FILES.testing.mochitest.chrome.toolkit.mozapps.update.tests.data += [
'data/shared.js',
'data/sharedUpdateXML.js',
'data/simple.mar',
]
FINAL_TARGET_FILES += [
'data/complete.exe',
'data/complete.mar',
'data/complete.png',
'data/complete_log_success_mac',
'data/complete_log_success_win',
'data/complete_mac.mar',
'data/complete_precomplete',
'data/complete_precomplete_mac',
'data/complete_removed-files',
'data/complete_removed-files_mac',
'data/complete_update_manifest',
'data/old_version.mar',
'data/partial.exe',
'data/partial.mar',
'data/partial.png',
'data/partial_log_failure_mac',
'data/partial_log_failure_win',
'data/partial_log_success_mac',
'data/partial_log_success_win',
'data/partial_mac.mar',
'data/partial_precomplete',
'data/partial_precomplete_mac',
'data/partial_removed-files',
'data/partial_removed-files_mac',
'data/partial_update_manifest',
'data/replace_log_success',
'data/shared.js',
'data/sharedUpdateXML.js',
'data/simple.mar',
'data/wrong_product_channel.mar',
'data/xpcshellUtilsAUS.js',
]

View file

@ -0,0 +1,7 @@
"use strict";
module.exports = {
"extends": [
"../../../../../testing/xpcshell/xpcshell.eslintrc.js"
]
};

View file

@ -0,0 +1,138 @@
/* 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 run_test() {
setupTestCommon();
// Verify write access to the custom app dir
debugDump("testing write access to the application directory");
let testFile = getCurrentProcessDir();
testFile.append("update_write_access_test");
testFile.create(Ci.nsIFile.NORMAL_FILE_TYPE, PERMS_FILE);
Assert.ok(testFile.exists(), MSG_SHOULD_EXIST);
testFile.remove(false);
Assert.ok(!testFile.exists(), MSG_SHOULD_NOT_EXIST);
standardInit();
if (IS_WIN) {
// Create a mutex to prevent being able to check for or apply updates.
debugDump("attempting to create mutex");
let handle = createMutex(getPerInstallationMutexName());
Assert.ok(!!handle, "the update mutex should have been created");
// Check if available updates cannot be checked for when there is a mutex
// for this installation.
Assert.ok(!gAUS.canCheckForUpdates, "should not be able to check for " +
"updates when there is an update mutex");
// Check if updates cannot be applied when there is a mutex for this
// installation.
Assert.ok(!gAUS.canApplyUpdates, "should not be able to apply updates " +
"when there is an update mutex");
debugDump("destroying mutex");
closeHandle(handle);
}
// Check if available updates can be checked for
Assert.ok(gAUS.canCheckForUpdates, "should be able to check for updates");
// Check if updates can be applied
Assert.ok(gAUS.canApplyUpdates, "should be able to apply updates");
if (IS_WIN) {
// Attempt to create a mutex when application update has already created one
// with the same name.
debugDump("attempting to create mutex");
let handle = createMutex(getPerInstallationMutexName());
Assert.ok(!handle, "should not be able to create the update mutex when " +
"the application has created the update mutex");
}
doTestFinish();
}
/**
* Determines a unique mutex name for the installation.
*
* @return Global mutex path.
*/
function getPerInstallationMutexName() {
if (!IS_WIN) {
do_throw("Windows only function called by a different platform!");
}
let hasher = Cc["@mozilla.org/security/hash;1"].
createInstance(Ci.nsICryptoHash);
hasher.init(hasher.SHA1);
let exeFile = Services.dirsvc.get(XRE_EXECUTABLE_FILE, Ci.nsILocalFile);
let converter = Cc["@mozilla.org/intl/scriptableunicodeconverter"].
createInstance(Ci.nsIScriptableUnicodeConverter);
converter.charset = "UTF-8";
let data = converter.convertToByteArray(exeFile.path.toLowerCase());
hasher.update(data, data.length);
return "Global\\MozillaUpdateMutex-" + hasher.finish(true);
}
/**
* Closes a Win32 handle.
*
* @param aHandle
* The handle to close.
*/
function closeHandle(aHandle) {
if (!IS_WIN) {
do_throw("Windows only function called by a different platform!");
}
let lib = ctypes.open("kernel32.dll");
let CloseHandle = lib.declare("CloseHandle",
ctypes.winapi_abi,
ctypes.int32_t, /* success */
ctypes.void_t.ptr); /* handle */
CloseHandle(aHandle);
lib.close();
}
/**
* Creates a mutex.
*
* @param aName
* The name for the mutex.
* @return The Win32 handle to the mutex.
*/
function createMutex(aName) {
if (!IS_WIN) {
do_throw("Windows only function called by a different platform!");
}
const INITIAL_OWN = 1;
const ERROR_ALREADY_EXISTS = 0xB7;
let lib = ctypes.open("kernel32.dll");
let CreateMutexW = lib.declare("CreateMutexW",
ctypes.winapi_abi,
ctypes.void_t.ptr, /* return handle */
ctypes.void_t.ptr, /* security attributes */
ctypes.int32_t, /* initial owner */
ctypes.char16_t.ptr); /* name */
let handle = CreateMutexW(null, INITIAL_OWN, aName);
lib.close();
let alreadyExists = ctypes.winLastError == ERROR_ALREADY_EXISTS;
if (handle && !handle.isNull() && alreadyExists) {
closeHandle(handle);
handle = null;
}
if (handle && handle.isNull()) {
handle = null;
}
return handle;
}

View file

@ -0,0 +1,46 @@
/* 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/.
*/
/* General Update Manager Tests */
function run_test() {
setupTestCommon();
debugDump("testing removal of an active update for a channel that is not" +
"valid due to switching channels (Bug 486275).");
let patches = getLocalPatchString(null, null, null, null, null, null,
STATE_DOWNLOADING);
let updates = getLocalUpdateString(patches, null, null, "version 1.0", "1.0");
writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
writeStatusFile(STATE_DOWNLOADING);
patches = getLocalPatchString(null, null, null, null, null, null,
STATE_FAILED);
updates = getLocalUpdateString(patches, null, "Existing", "version 3.0",
"3.0", "3.0", null, null, null, null,
getString("patchApplyFailure"));
writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), false);
setUpdateChannel("original_channel");
standardInit();
Assert.equal(gUpdateManager.updateCount, 1,
"the update manager update count" + MSG_SHOULD_EQUAL);
let update = gUpdateManager.getUpdateAt(0);
Assert.equal(update.name, "Existing",
"the update's name" + MSG_SHOULD_EQUAL);
Assert.ok(!gUpdateManager.activeUpdate,
"there should not be an active update");
// Verify that the active-update.xml file has had the update from the old
// channel removed.
let file = getUpdatesXMLFile(true);
Assert.equal(readFile(file), getLocalUpdatesXMLString(""),
"the contents of active-update.xml" + MSG_SHOULD_EQUAL);
doTestFinish();
}

View file

@ -0,0 +1,29 @@
/* 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 run_test() {
setupTestCommon();
debugDump("testing cleanup of an update download in progress for an " +
"older version of the application on startup (Bug 485624)");
let patches = getLocalPatchString(null, null, null, null, null, null,
STATE_DOWNLOADING);
let updates = getLocalUpdateString(patches, null, null, "version 0.9", "0.9");
writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
writeStatusFile(STATE_DOWNLOADING);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
standardInit();
Assert.ok(!gUpdateManager.activeUpdate,
"there should not be an active update");
Assert.equal(gUpdateManager.updateCount, 0,
"the update manager update count" + MSG_SHOULD_EQUAL);
doTestFinish();
}

View file

@ -0,0 +1,30 @@
/* 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 run_test() {
setupTestCommon();
debugDump("testing removal of an update download in progress for the " +
"same version of the application with the same application " +
"build id on startup (Bug 536547)");
let patches = getLocalPatchString(null, null, null, null, null, null,
STATE_DOWNLOADING);
let updates = getLocalUpdateString(patches, null, null, "version 1.0", "1.0",
"2007010101");
writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
writeStatusFile(STATE_DOWNLOADING);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
standardInit();
Assert.ok(!gUpdateManager.activeUpdate,
"there should not be an active update");
Assert.equal(gUpdateManager.updateCount, 0,
"the update manager update count" + MSG_SHOULD_EQUAL);
doTestFinish();
}

View file

@ -0,0 +1,35 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
function run_test() {
setupTestCommon();
debugDump("testing update cleanup when reading the status file returns " +
"STATUS_NONE and the update xml has an update with " +
"STATE_DOWNLOADING (Bug 539717).");
writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
let patches = getLocalPatchString(null, null, null, null, null, null,
STATE_DOWNLOADING);
let updates = getLocalUpdateString(patches);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
writeStatusFile(STATE_NONE);
standardInit();
let dir = getUpdatesDir();
dir.append(DIR_PATCH);
Assert.ok(dir.exists(), MSG_SHOULD_EXIST);
let statusFile = dir.clone();
statusFile.append(FILE_UPDATE_STATUS);
Assert.ok(!statusFile.exists(), MSG_SHOULD_NOT_EXIST);
Assert.ok(!gUpdateManager.activeUpdate,
"there should not be an active update");
Assert.equal(gUpdateManager.updateCount, 0,
"the update manager update count" + MSG_SHOULD_EQUAL);
doTestFinish();
}

View file

@ -0,0 +1,37 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
function run_test() {
setupTestCommon();
debugDump("testing update cleanup when reading the status file returns " +
"STATUS_NONE, the version file is for a newer version, and the " +
"update xml has an update with STATE_PENDING (Bug 601701).");
writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
let patches = getLocalPatchString(null, null, null, null, null, null,
STATE_PENDING);
let updates = getLocalUpdateString(patches);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
writeVersionFile("99.9");
standardInit();
// Check that there is no activeUpdate first so the updates directory is
// cleaned up by the UpdateManager before the remaining tests.
Assert.ok(!gUpdateManager.activeUpdate,
"there should not be an active update");
Assert.equal(gUpdateManager.updateCount, 0,
"the update manager update count" + MSG_SHOULD_EQUAL);
let dir = getUpdatesDir();
dir.append(DIR_PATCH);
Assert.ok(dir.exists(), MSG_SHOULD_EXIST);
let versionFile = dir.clone();
versionFile.append(FILE_UPDATE_VERSION);
Assert.ok(!versionFile.exists(), MSG_SHOULD_NOT_EXIST);
doTestFinish();
}

View file

@ -0,0 +1,37 @@
/* 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 run_test() {
setupTestCommon();
debugDump("testing that the update.log is moved after a successful update");
writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
let patches = getLocalPatchString(null, null, null, null, null, null,
STATE_PENDING);
let updates = getLocalUpdateString(patches);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
writeStatusFile(STATE_SUCCEEDED);
let log = getUpdateLog(FILE_UPDATE_LOG);
writeFile(log, "Last Update Log");
standardInit();
Assert.ok(!log.exists(), MSG_SHOULD_NOT_EXIST);
log = getUpdateLog(FILE_LAST_UPDATE_LOG);
Assert.ok(log.exists(), MSG_SHOULD_EXIST);
Assert.equal(readFile(log), "Last Update Log",
"the last update log contents" + MSG_SHOULD_EQUAL);
log = getUpdateLog(FILE_BACKUP_UPDATE_LOG);
Assert.ok(!log.exists(), MSG_SHOULD_NOT_EXIST);
let dir = getUpdatesPatchDir();
Assert.ok(dir.exists(), MSG_SHOULD_EXIST);
doTestFinish();
}

View file

@ -0,0 +1,45 @@
/* 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 run_test() {
setupTestCommon();
debugDump("testing update logs are first in first out deleted");
writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
let patches = getLocalPatchString(null, null, null, null, null, null,
STATE_PENDING);
let updates = getLocalUpdateString(patches);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
writeStatusFile(STATE_SUCCEEDED);
let log = getUpdateLog(FILE_LAST_UPDATE_LOG);
writeFile(log, "Backup Update Log");
log = getUpdateLog(FILE_BACKUP_UPDATE_LOG);
writeFile(log, "To Be Deleted Backup Update Log");
log = getUpdateLog(FILE_UPDATE_LOG);
writeFile(log, "Last Update Log");
standardInit();
Assert.ok(!log.exists(), MSG_SHOULD_NOT_EXIST);
log = getUpdateLog(FILE_LAST_UPDATE_LOG);
Assert.ok(log.exists(), MSG_SHOULD_EXIST);
Assert.equal(readFile(log), "Last Update Log",
"the last update log contents" + MSG_SHOULD_EQUAL);
log = getUpdateLog(FILE_BACKUP_UPDATE_LOG);
Assert.ok(log.exists(), MSG_SHOULD_EXIST);
Assert.equal(readFile(log), "Backup Update Log",
"the backup update log contents" + MSG_SHOULD_EQUAL);
let dir = getUpdatesPatchDir();
Assert.ok(dir.exists(), MSG_SHOULD_EXIST);
doTestFinish();
}

View file

@ -0,0 +1,161 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
var gNextRunFunc;
var gExpectedStatusResult;
function run_test() {
// The network code that downloads the mar file accesses the profile to cache
// the download, but the profile is only available after calling
// do_get_profile in xpcshell tests. This prevents an error from being logged.
do_get_profile();
setupTestCommon();
debugDump("testing mar download and mar hash verification");
Services.prefs.setBoolPref(PREF_APP_UPDATE_STAGING_ENABLED, false);
start_httpserver();
setUpdateURL(gURLData + gHTTPHandlerPath);
standardInit();
// Only perform the non hash check tests when mar signing is enabled since the
// update service doesn't perform hash checks when mar signing is enabled.
if (MOZ_VERIFY_MAR_SIGNATURE) {
do_execute_soon(run_test_pt11);
} else {
do_execute_soon(run_test_pt1);
}
}
// The HttpServer must be stopped before calling do_test_finished
function finish_test() {
stop_httpserver(doTestFinish);
}
// Helper function for testing mar downloads that have the correct size
// specified in the update xml.
function run_test_helper_pt1(aMsg, aExpectedStatusResult, aNextRunFunc) {
gUpdates = null;
gUpdateCount = null;
gStatusResult = null;
gCheckFunc = check_test_helper_pt1_1;
gNextRunFunc = aNextRunFunc;
gExpectedStatusResult = aExpectedStatusResult;
debugDump(aMsg, Components.stack.caller);
gUpdateChecker.checkForUpdates(updateCheckListener, true);
}
function check_test_helper_pt1_1() {
Assert.equal(gUpdateCount, 1,
"the update count" + MSG_SHOULD_EQUAL);
gCheckFunc = check_test_helper_pt1_2;
let bestUpdate = gAUS.selectUpdate(gUpdates, gUpdateCount);
let state = gAUS.downloadUpdate(bestUpdate, false);
if (state == STATE_NONE || state == STATE_FAILED) {
do_throw("nsIApplicationUpdateService:downloadUpdate returned " + state);
}
gAUS.addDownloadListener(downloadListener);
}
function check_test_helper_pt1_2() {
Assert.equal(gStatusResult, gExpectedStatusResult,
"the download status result" + MSG_SHOULD_EQUAL);
gAUS.removeDownloadListener(downloadListener);
gNextRunFunc();
}
function setResponseBody(aHashFunction, aHashValue, aSize) {
let patches = getRemotePatchString(null, null,
aHashFunction, aHashValue, aSize);
let updates = getRemoteUpdateString(patches);
gResponseBody = getRemoteUpdatesXMLString(updates);
}
// mar download with a valid MD5 hash
function run_test_pt1() {
setResponseBody("MD5", MD5_HASH_SIMPLE_MAR);
run_test_helper_pt1("mar download with a valid MD5 hash",
Cr.NS_OK, run_test_pt2);
}
// mar download with an invalid MD5 hash
function run_test_pt2() {
setResponseBody("MD5", MD5_HASH_SIMPLE_MAR + "0");
run_test_helper_pt1("mar download with an invalid MD5 hash",
Cr.NS_ERROR_CORRUPTED_CONTENT, run_test_pt3);
}
// mar download with a valid SHA1 hash
function run_test_pt3() {
setResponseBody("SHA1", SHA1_HASH_SIMPLE_MAR);
run_test_helper_pt1("mar download with a valid SHA1 hash",
Cr.NS_OK, run_test_pt4);
}
// mar download with an invalid SHA1 hash
function run_test_pt4() {
setResponseBody("SHA1", SHA1_HASH_SIMPLE_MAR + "0");
run_test_helper_pt1("mar download with an invalid SHA1 hash",
Cr.NS_ERROR_CORRUPTED_CONTENT, run_test_pt5);
}
// mar download with a valid SHA256 hash
function run_test_pt5() {
setResponseBody("SHA256", SHA256_HASH_SIMPLE_MAR);
run_test_helper_pt1("mar download with a valid SHA256 hash",
Cr.NS_OK, run_test_pt6);
}
// mar download with an invalid SHA256 hash
function run_test_pt6() {
setResponseBody("SHA256", SHA256_HASH_SIMPLE_MAR + "0");
run_test_helper_pt1("mar download with an invalid SHA256 hash",
Cr.NS_ERROR_CORRUPTED_CONTENT, run_test_pt7);
}
// mar download with a valid SHA384 hash
function run_test_pt7() {
setResponseBody("SHA384", SHA384_HASH_SIMPLE_MAR);
run_test_helper_pt1("mar download with a valid SHA384 hash",
Cr.NS_OK, run_test_pt8);
}
// mar download with an invalid SHA384 hash
function run_test_pt8() {
setResponseBody("SHA384", SHA384_HASH_SIMPLE_MAR + "0");
run_test_helper_pt1("mar download with an invalid SHA384 hash",
Cr.NS_ERROR_CORRUPTED_CONTENT, run_test_pt9);
}
// mar download with a valid SHA512 hash
function run_test_pt9() {
setResponseBody("SHA512", SHA512_HASH_SIMPLE_MAR);
run_test_helper_pt1("mar download with a valid SHA512 hash",
Cr.NS_OK, run_test_pt10);
}
// mar download with an invalid SHA512 hash
function run_test_pt10() {
setResponseBody("SHA512", SHA512_HASH_SIMPLE_MAR + "0");
run_test_helper_pt1("mar download with an invalid SHA512 hash",
Cr.NS_ERROR_CORRUPTED_CONTENT, run_test_pt11);
}
// mar download with the mar not found
function run_test_pt11() {
let patches = getRemotePatchString(null, gURLData + "missing.mar");
let updates = getRemoteUpdateString(patches);
gResponseBody = getRemoteUpdatesXMLString(updates);
run_test_helper_pt1("mar download with the mar not found",
Cr.NS_ERROR_UNEXPECTED, run_test_pt12);
}
// mar download with a valid MD5 hash but invalid file size
function run_test_pt12() {
const arbitraryFileSize = 1024000;
setResponseBody("MD5", MD5_HASH_SIMPLE_MAR, arbitraryFileSize);
run_test_helper_pt1("mar download with a valid MD5 hash but invalid file size",
Cr.NS_ERROR_UNEXPECTED, finish_test);
}

View file

@ -0,0 +1,66 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
Components.utils.import("resource://testing-common/MockRegistrar.jsm");
const WindowWatcher = {
getNewPrompter: function WW_getNewPrompter(aParent) {
Assert.ok(!aParent,
"the aParent parameter should not be defined");
return {
alert: function WW_GNP_alert(aTitle, aText) {
let title = getString("updaterIOErrorTitle");
Assert.equal(aTitle, title,
"the ui string for title" + MSG_SHOULD_EQUAL);
let text = gUpdateBundle.formatStringFromName("updaterIOErrorMsg",
[Services.appinfo.name,
Services.appinfo.name], 2);
Assert.equal(aText, text,
"the ui string for message" + MSG_SHOULD_EQUAL);
doTestFinish();
}
};
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIWindowWatcher])
};
function run_test() {
setupTestCommon();
debugDump("testing download a complete on partial failure. Calling " +
"nsIUpdatePrompt::showUpdateError should call getNewPrompter " +
"and alert on the object returned by getNewPrompter when the " +
"update.state == " + STATE_FAILED + " and the update.errorCode " +
"== " + WRITE_ERROR + " (Bug 595059).");
Services.prefs.setBoolPref(PREF_APP_UPDATE_SILENT, false);
let windowWatcherCID =
MockRegistrar.register("@mozilla.org/embedcomp/window-watcher;1",
WindowWatcher);
do_register_cleanup(() => {
MockRegistrar.unregister(windowWatcherCID);
});
standardInit();
writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
let url = URL_HOST + "/" + FILE_COMPLETE_MAR;
let patches = getLocalPatchString("complete", url, null, null, null, null,
STATE_FAILED);
let updates = getLocalUpdateString(patches, null, null, "version 1.0", "1.0",
null, null, null, null, url);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
writeStatusFile(STATE_FAILED);
reloadUpdateManagerData();
let update = gUpdateManager.activeUpdate;
update.errorCode = WRITE_ERROR;
let prompter = Cc["@mozilla.org/updates/update-prompt;1"].
createInstance(Ci.nsIUpdatePrompt);
prompter.showUpdateError(update);
}

View file

@ -0,0 +1,225 @@
/* 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/.
*/
/* General MAR File Download Tests */
Components.utils.import("resource://testing-common/MockRegistrar.jsm");
const INC_CONTRACT_ID = "@mozilla.org/network/incremental-download;1";
// gIncrementalDownloadErrorType is used to loop through each of the connection
// error types in the Mock incremental downloader.
var gIncrementalDownloadErrorType = 0;
var gNextRunFunc;
var gExpectedStatusResult;
function run_test() {
setupTestCommon();
debugDump("testing mar downloads, mar hash verification, and " +
"mar download interrupted recovery");
Services.prefs.setBoolPref(PREF_APP_UPDATE_STAGING_ENABLED, false);
start_httpserver();
setUpdateURL(gURLData + gHTTPHandlerPath);
standardInit();
do_execute_soon(run_test_pt1);
}
// The HttpServer must be stopped before calling do_test_finished
function finish_test() {
stop_httpserver(doTestFinish);
}
// Helper function for testing mar downloads that have the correct size
// specified in the update xml.
function run_test_helper_pt1(aMsg, aExpectedStatusResult, aNextRunFunc) {
gUpdates = null;
gUpdateCount = null;
gStatusResult = null;
gCheckFunc = check_test_helper_pt1_1;
gNextRunFunc = aNextRunFunc;
gExpectedStatusResult = aExpectedStatusResult;
debugDump(aMsg, Components.stack.caller);
gUpdateChecker.checkForUpdates(updateCheckListener, true);
}
function check_test_helper_pt1_1() {
Assert.equal(gUpdateCount, 1,
"the update count" + MSG_SHOULD_EQUAL);
gCheckFunc = check_test_helper_pt1_2;
let bestUpdate = gAUS.selectUpdate(gUpdates, gUpdateCount);
let state = gAUS.downloadUpdate(bestUpdate, false);
if (state == STATE_NONE || state == STATE_FAILED) {
do_throw("nsIApplicationUpdateService:downloadUpdate returned " + state);
}
gAUS.addDownloadListener(downloadListener);
}
function check_test_helper_pt1_2() {
Assert.equal(gStatusResult, gExpectedStatusResult,
"the download status result" + MSG_SHOULD_EQUAL);
gAUS.removeDownloadListener(downloadListener);
gNextRunFunc();
}
function setResponseBody(aHashFunction, aHashValue, aSize) {
let patches = getRemotePatchString(null, null,
aHashFunction, aHashValue, aSize);
let updates = getRemoteUpdateString(patches);
gResponseBody = getRemoteUpdatesXMLString(updates);
}
function initMockIncrementalDownload() {
let incrementalDownloadCID =
MockRegistrar.register(INC_CONTRACT_ID, IncrementalDownload);
do_register_cleanup(() => {
MockRegistrar.unregister(incrementalDownloadCID);
});
}
/* This Mock incremental downloader is used to verify that connection
* interrupts work correctly in updater code. The implementation of
* the mock incremental downloader is very simple, it simply copies
* the file to the destination location.
*/
function IncrementalDownload() {
this.wrappedJSObject = this;
}
IncrementalDownload.prototype = {
/* nsIIncrementalDownload */
init: function(uri, file, chunkSize, intervalInSeconds) {
this._destination = file;
this._URI = uri;
this._finalURI = uri;
},
start: function(observer, ctxt) {
let tm = Cc["@mozilla.org/thread-manager;1"].
getService(Ci.nsIThreadManager);
// Do the actual operation async to give a chance for observers
// to add themselves.
tm.mainThread.dispatch(function() {
this._observer = observer.QueryInterface(Ci.nsIRequestObserver);
this._ctxt = ctxt;
this._observer.onStartRequest(this, this._ctxt);
let mar = getTestDirFile(FILE_SIMPLE_MAR);
mar.copyTo(this._destination.parent, this._destination.leafName);
let status = Cr.NS_OK;
switch (gIncrementalDownloadErrorType++) {
case 0:
status = Cr.NS_ERROR_NET_RESET;
break;
case 1:
status = Cr.NS_ERROR_CONNECTION_REFUSED;
break;
case 2:
status = Cr.NS_ERROR_NET_RESET;
break;
case 3:
status = Cr.NS_OK;
break;
case 4:
status = Cr.NS_ERROR_OFFLINE;
// After we report offline, we want to eventually show offline
// status being changed to online.
let tm2 = Cc["@mozilla.org/thread-manager;1"].
getService(Ci.nsIThreadManager);
tm2.mainThread.dispatch(function() {
Services.obs.notifyObservers(gAUS,
"network:offline-status-changed",
"online");
}, Ci.nsIThread.DISPATCH_NORMAL);
break;
}
this._observer.onStopRequest(this, this._ctxt, status);
}.bind(this), Ci.nsIThread.DISPATCH_NORMAL);
},
get URI() {
return this._URI;
},
get currentSize() {
throw Cr.NS_ERROR_NOT_IMPLEMENTED;
},
get destination() {
return this._destination;
},
get finalURI() {
return this._finalURI;
},
get totalSize() {
throw Cr.NS_ERROR_NOT_IMPLEMENTED;
},
/* nsIRequest */
cancel: function(aStatus) {
throw Cr.NS_ERROR_NOT_IMPLEMENTED;
},
suspend: function() {
throw Cr.NS_ERROR_NOT_IMPLEMENTED;
},
isPending: function() {
throw Cr.NS_ERROR_NOT_IMPLEMENTED;
},
_loadFlags: 0,
get loadFlags() {
return this._loadFlags;
},
set loadFlags(val) {
this._loadFlags = val;
},
_loadGroup: null,
get loadGroup() {
return this._loadGroup;
},
set loadGroup(val) {
this._loadGroup = val;
},
_name: "",
get name() {
return this._name;
},
_status: 0,
get status() {
return this._status;
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIIncrementalDownload])
};
// Test disconnecting during an update
function run_test_pt1() {
initMockIncrementalDownload();
setResponseBody("MD5", MD5_HASH_SIMPLE_MAR);
run_test_helper_pt1("mar download with connection interruption",
Cr.NS_OK, run_test_pt2);
}
// Test disconnecting during an update
function run_test_pt2() {
gIncrementalDownloadErrorType = 0;
Services.prefs.setIntPref(PREF_APP_UPDATE_SOCKET_MAXERRORS, 2);
Services.prefs.setIntPref(PREF_APP_UPDATE_RETRYTIMEOUT, 0);
setResponseBody("MD5", MD5_HASH_SIMPLE_MAR);
run_test_helper_pt1("mar download with connection interruption without recovery",
Cr.NS_ERROR_NET_RESET, run_test_pt3);
}
// Test entering offline mode while downloading
function run_test_pt3() {
gIncrementalDownloadErrorType = 4;
setResponseBody("MD5", MD5_HASH_SIMPLE_MAR);
run_test_helper_pt1("mar download with offline mode",
Cr.NS_OK, finish_test);
}

View file

@ -0,0 +1,37 @@
/* 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 run_test() {
setupTestCommon();
debugDump("testing resuming an update download in progress for the same " +
"version of the application on startup (Bug 485624)");
let patches = getLocalPatchString(null, null, null, null, null, null,
STATE_DOWNLOADING);
let updates = getLocalUpdateString(patches, null, null, "1.0", "1.0");
writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
writeStatusFile(STATE_DOWNLOADING);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
standardInit();
Assert.equal(gUpdateManager.updateCount, 1,
"the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
Assert.equal(gUpdateManager.activeUpdate.state, STATE_DOWNLOADING,
"the update manager activeUpdate state attribute" +
MSG_SHOULD_EQUAL);
// Pause the download and reload the Update Manager with an empty update so
// the Application Update Service doesn't write the update xml files during
// xpcom-shutdown which will leave behind the test directory.
gAUS.pauseDownload();
writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), true);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
reloadUpdateManagerData();
do_execute_soon(doTestFinish);
}

View file

@ -0,0 +1,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
const IS_SERVICE_TEST = false;
/* import-globals-from ../data/xpcshellUtilsAUS.js */
load("../data/xpcshellUtilsAUS.js");

View file

@ -0,0 +1,285 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
var gNextRunFunc;
var gExpectedCount;
function run_test() {
setupTestCommon();
debugDump("testing remote update xml attributes");
start_httpserver();
setUpdateURL(gURLData + gHTTPHandlerPath);
setUpdateChannel("test_channel");
// This test expects that the app.update.download.backgroundInterval
// preference doesn't already exist.
Services.prefs.deleteBranch("app.update.download.backgroundInterval");
standardInit();
do_execute_soon(run_test_pt01);
}
// Helper function for testing update counts returned from an update xml
function run_test_helper_pt1(aMsg, aExpectedCount, aNextRunFunc) {
gUpdates = null;
gUpdateCount = null;
gCheckFunc = check_test_helper_pt1;
gNextRunFunc = aNextRunFunc;
gExpectedCount = aExpectedCount;
debugDump(aMsg, Components.stack.caller);
gUpdateChecker.checkForUpdates(updateCheckListener, true);
}
function check_test_helper_pt1() {
Assert.equal(gUpdateCount, gExpectedCount,
"the update count" + MSG_SHOULD_EQUAL);
gNextRunFunc();
}
// update xml not found
function run_test_pt01() {
run_test_helper_pt1("testing update xml not available",
null, run_test_pt02);
}
// one update available and the update's property values
function run_test_pt02() {
debugDump("testing one update available and the update's property values");
gUpdates = null;
gUpdateCount = null;
gCheckFunc = check_test_pt02;
let patches = getRemotePatchString("complete", "http://complete/", "SHA1",
"98db9dad8e1d80eda7e1170d0187d6f53e477059",
"9856459");
patches += getRemotePatchString("partial", "http://partial/", "SHA1",
"e6678ca40ae7582316acdeddf3c133c9c8577de4",
"1316138");
let updates = getRemoteUpdateString(patches, "minor", "Minor Test",
"version 2.1a1pre", "2.1a1pre",
"20080811053724",
"http://details/",
"true",
"true", "345600", "1200",
"custom1_attr=\"custom1 value\"",
"custom2_attr=\"custom2 value\"");
gResponseBody = getRemoteUpdatesXMLString(updates);
gUpdateChecker.checkForUpdates(updateCheckListener, true);
}
function check_test_pt02() {
// XXXrstrong - not specifying a detailsURL will cause a leak due to bug 470244
// and until this is fixed this will not test the value for detailsURL when it
// isn't specified in the update xml.
// let defaultDetailsURL;
// try {
// Try using a default details URL supplied by the distribution
// if the update XML does not supply one.
// let formatter = Cc["@mozilla.org/toolkit/URLFormatterService;1"].
// getService(Ci.nsIURLFormatter);
// defaultDetailsURL = formatter.formatURLPref(PREF_APP_UPDATE_URL_DETAILS);
// } catch (e) {
// defaultDetailsURL = "";
// }
Assert.equal(gUpdateCount, 1,
"the update count" + MSG_SHOULD_EQUAL);
let bestUpdate = gAUS.selectUpdate(gUpdates, gUpdateCount).QueryInterface(Ci.nsIPropertyBag);
Assert.equal(bestUpdate.type, "minor",
"the update type attribute" + MSG_SHOULD_EQUAL);
Assert.equal(bestUpdate.name, "Minor Test",
"the update name attribute" + MSG_SHOULD_EQUAL);
Assert.equal(bestUpdate.displayVersion, "version 2.1a1pre",
"the update displayVersion attribute" + MSG_SHOULD_EQUAL);
Assert.equal(bestUpdate.appVersion, "2.1a1pre",
"the update appVersion attribute" + MSG_SHOULD_EQUAL);
Assert.equal(bestUpdate.buildID, "20080811053724",
"the update buildID attribute" + MSG_SHOULD_EQUAL);
Assert.equal(bestUpdate.detailsURL, "http://details/",
"the update detailsURL attribute" + MSG_SHOULD_EQUAL);
Assert.ok(bestUpdate.showPrompt,
"the update showPrompt attribute" + MSG_SHOULD_EQUAL);
Assert.ok(bestUpdate.showNeverForVersion,
"the update showNeverForVersion attribute" + MSG_SHOULD_EQUAL);
Assert.equal(bestUpdate.promptWaitTime, "345600",
"the update promptWaitTime attribute" + MSG_SHOULD_EQUAL);
// The default and maximum value for backgroundInterval is 600
Assert.equal(bestUpdate.getProperty("backgroundInterval"), "600",
"the update backgroundInterval attribute" + MSG_SHOULD_EQUAL);
Assert.equal(bestUpdate.serviceURL, gURLData + gHTTPHandlerPath + "?force=1",
"the update serviceURL attribute" + MSG_SHOULD_EQUAL);
Assert.equal(bestUpdate.channel, "test_channel",
"the update channel attribute" + MSG_SHOULD_EQUAL);
Assert.ok(!bestUpdate.isCompleteUpdate,
"the update isCompleteUpdate attribute" + MSG_SHOULD_EQUAL);
Assert.ok(!bestUpdate.isSecurityUpdate,
"the update isSecurityUpdate attribute" + MSG_SHOULD_EQUAL);
// Check that installDate is within 10 seconds of the current date.
Assert.ok((Date.now() - bestUpdate.installDate) < 10000,
"the update installDate attribute should be within 10 seconds of " +
"the current time");
Assert.ok(!bestUpdate.statusText,
"the update statusText attribute" + MSG_SHOULD_EQUAL);
// nsIUpdate:state returns an empty string when no action has been performed
// on an available update
Assert.equal(bestUpdate.state, "",
"the update state attribute" + MSG_SHOULD_EQUAL);
Assert.equal(bestUpdate.errorCode, 0,
"the update errorCode attribute" + MSG_SHOULD_EQUAL);
Assert.equal(bestUpdate.patchCount, 2,
"the update patchCount attribute" + MSG_SHOULD_EQUAL);
// XXX TODO - test nsIUpdate:serialize
Assert.equal(bestUpdate.getProperty("custom1_attr"), "custom1 value",
"the update custom1_attr property" + MSG_SHOULD_EQUAL);
Assert.equal(bestUpdate.getProperty("custom2_attr"), "custom2 value",
"the update custom2_attr property" + MSG_SHOULD_EQUAL);
let patch = bestUpdate.getPatchAt(0);
Assert.equal(patch.type, "complete",
"the update patch type attribute" + MSG_SHOULD_EQUAL);
Assert.equal(patch.URL, "http://complete/",
"the update patch URL attribute" + MSG_SHOULD_EQUAL);
Assert.equal(patch.hashFunction, "SHA1",
"the update patch hashFunction attribute" + MSG_SHOULD_EQUAL);
Assert.equal(patch.hashValue, "98db9dad8e1d80eda7e1170d0187d6f53e477059",
"the update patch hashValue attribute" + MSG_SHOULD_EQUAL);
Assert.equal(patch.size, 9856459,
"the update patch size attribute" + MSG_SHOULD_EQUAL);
// The value for patch.state can be the string 'null' as a valid value. This
// is confusing if it returns null which is an invalid value since the test
// failure output will show a failure for null == null. To lessen the
// confusion first check that the typeof for patch.state is string.
Assert.equal(typeof patch.state, "string",
"the update patch state typeof value should equal |string|");
Assert.equal(patch.state, STATE_NONE,
"the update patch state attribute" + MSG_SHOULD_EQUAL);
Assert.ok(!patch.selected,
"the update patch selected attribute" + MSG_SHOULD_EQUAL);
// XXX TODO - test nsIUpdatePatch:serialize
patch = bestUpdate.getPatchAt(1);
Assert.equal(patch.type, "partial",
"the update patch type attribute" + MSG_SHOULD_EQUAL);
Assert.equal(patch.URL, "http://partial/",
"the update patch URL attribute" + MSG_SHOULD_EQUAL);
Assert.equal(patch.hashFunction, "SHA1",
"the update patch hashFunction attribute" + MSG_SHOULD_EQUAL);
Assert.equal(patch.hashValue, "e6678ca40ae7582316acdeddf3c133c9c8577de4",
"the update patch hashValue attribute" + MSG_SHOULD_EQUAL);
Assert.equal(patch.size, 1316138,
"the update patch size attribute" + MSG_SHOULD_EQUAL);
Assert.equal(patch.state, STATE_NONE,
"the update patch state attribute" + MSG_SHOULD_EQUAL);
Assert.ok(!patch.selected,
"the update patch selected attribute" + MSG_SHOULD_EQUAL);
// XXX TODO - test nsIUpdatePatch:serialize
run_test_pt03();
}
// Empty update xml (an empty xml file returns a root node name of parsererror)
function run_test_pt03() {
gResponseBody = "<parsererror/>";
run_test_helper_pt1("testing empty update xml",
null, run_test_pt04);
}
// no updates available
function run_test_pt04() {
gResponseBody = getRemoteUpdatesXMLString("");
run_test_helper_pt1("testing no updates available",
0, run_test_pt05);
}
// one update available with two patches
function run_test_pt05() {
let patches = getRemotePatchString("complete");
patches += getRemotePatchString("partial");
let updates = getRemoteUpdateString(patches);
gResponseBody = getRemoteUpdatesXMLString(updates);
run_test_helper_pt1("testing one update available",
1, run_test_pt06);
}
// three updates available each with two patches
function run_test_pt06() {
let patches = getRemotePatchString("complete");
patches += getRemotePatchString("partial");
let updates = getRemoteUpdateString(patches);
updates += getRemoteUpdateString(patches);
updates += getRemoteUpdateString(patches);
gResponseBody = getRemoteUpdatesXMLString(updates);
run_test_helper_pt1("testing three updates available",
3, run_test_pt07);
}
// one update with complete and partial patches with size 0 specified in the
// update xml
function run_test_pt07() {
let patches = getRemotePatchString("complete", null, null, null, "0");
patches += getRemotePatchString("partial", null, null, null, "0");
let updates = getRemoteUpdateString(patches);
gResponseBody = getRemoteUpdatesXMLString(updates);
run_test_helper_pt1("testing one update with complete and partial " +
"patches with size 0", 0, run_test_pt08);
}
// one update with complete patch with size 0 specified in the update xml
function run_test_pt08() {
let patches = getRemotePatchString("complete", null, null, null, "0");
let updates = getRemoteUpdateString(patches);
gResponseBody = getRemoteUpdatesXMLString(updates);
run_test_helper_pt1("testing one update with complete patch with size 0",
0, run_test_pt9);
}
// one update with partial patch with size 0 specified in the update xml
function run_test_pt9() {
let patches = getRemotePatchString("partial", null, null, null, "0");
let updates = getRemoteUpdateString(patches);
gResponseBody = getRemoteUpdatesXMLString(updates);
run_test_helper_pt1("testing one update with partial patch with size 0",
0, run_test_pt10);
}
// check that updates for older versions of the application aren't selected
function run_test_pt10() {
let patches = getRemotePatchString("complete");
patches += getRemotePatchString("partial");
let updates = getRemoteUpdateString(patches, "minor", null, null, "1.0pre");
updates += getRemoteUpdateString(patches, "minor", null, null, "1.0a");
gResponseBody = getRemoteUpdatesXMLString(updates);
run_test_helper_pt1("testing two updates older than the current version",
2, check_test_pt10);
}
function check_test_pt10() {
let bestUpdate = gAUS.selectUpdate(gUpdates, gUpdateCount);
Assert.ok(!bestUpdate,
"there should be no update available");
run_test_pt11();
}
// check that updates for the current version of the application are selected
function run_test_pt11() {
let patches = getRemotePatchString("complete");
patches += getRemotePatchString("partial");
let updates = getRemoteUpdateString(patches, "minor", null, "version 1.0");
gResponseBody = getRemoteUpdatesXMLString(updates);
run_test_helper_pt1("testing one update equal to the current version",
1, check_test_pt11);
}
function check_test_pt11() {
let bestUpdate = gAUS.selectUpdate(gUpdates, gUpdateCount);
Assert.ok(!!bestUpdate,
"there should be one update available");
Assert.equal(bestUpdate.displayVersion, "version 1.0",
"the update displayVersion attribute" + MSG_SHOULD_EQUAL);
doTestFinish();
}

View file

@ -0,0 +1,75 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
Components.utils.import("resource://testing-common/MockRegistrar.jsm");
const WindowWatcher = {
openWindow: function(aParent, aUrl, aName, aFeatures, aArgs) {
gCheckFunc();
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIWindowWatcher])
};
const WindowMediator = {
getMostRecentWindow: function(aWindowType) {
do_execute_soon(check_status);
return { getInterface: XPCOMUtils.generateQI([Ci.nsIDOMWindow]) };
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIWindowMediator])
};
function run_test() {
setupTestCommon();
// Calling do_get_profile prevents an error from being logged
do_get_profile();
debugDump("testing that an update download doesn't start when the " +
PREF_APP_UPDATE_AUTO + " preference is false");
Services.prefs.setBoolPref(PREF_APP_UPDATE_AUTO, false);
Services.prefs.setBoolPref(PREF_APP_UPDATE_SILENT, false);
start_httpserver();
setUpdateURL(gURLData + gHTTPHandlerPath);
standardInit();
let windowWatcherCID =
MockRegistrar.register("@mozilla.org/embedcomp/window-watcher;1",
WindowWatcher);
let windowMediatorCID =
MockRegistrar.register("@mozilla.org/appshell/window-mediator;1",
WindowMediator);
do_register_cleanup(() => {
MockRegistrar.unregister(windowWatcherCID);
MockRegistrar.unregister(windowMediatorCID);
});
gCheckFunc = check_showUpdateAvailable;
let patches = getRemotePatchString("complete");
let updates = getRemoteUpdateString(patches, "minor", null, null, "1.0");
gResponseBody = getRemoteUpdatesXMLString(updates);
gAUS.notify(null);
}
function check_status() {
let status = readStatusFile();
Assert.notEqual(status, STATE_DOWNLOADING,
"the update state" + MSG_SHOULD_EQUAL);
// Pause the download and reload the Update Manager with an empty update so
// the Application Update Service doesn't write the update xml files during
// xpcom-shutdown which will leave behind the test directory.
gAUS.pauseDownload();
writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), true);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
reloadUpdateManagerData();
do_execute_soon(doTestFinish);
}
function check_showUpdateAvailable() {
do_throw("showUpdateAvailable should not have called openWindow!");
}

View file

@ -0,0 +1,76 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
Components.utils.import("resource://testing-common/MockRegistrar.jsm");
/**
* Test that nsIUpdatePrompt doesn't display UI for showUpdateAvailable and
* showUpdateError when the app.update.silent preference is true.
*/
const WindowWatcher = {
openWindow: function(aParent, aUrl, aName, aFeatures, aArgs) {
gCheckFunc();
},
getNewPrompter: function(aParent) {
gCheckFunc();
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIWindowWatcher])
};
function run_test() {
setupTestCommon();
debugDump("testing nsIUpdatePrompt notifications should not be seen " +
"when the " + PREF_APP_UPDATE_SILENT + " preference is true");
Services.prefs.setBoolPref(PREF_APP_UPDATE_SILENT, true);
let windowWatcherCID =
MockRegistrar.register("@mozilla.org/embedcomp/window-watcher;1",
WindowWatcher);
do_register_cleanup(() => {
MockRegistrar.unregister(windowWatcherCID);
});
standardInit();
debugDump("testing showUpdateAvailable should not call openWindow");
writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
let patches = getLocalPatchString(null, null, null, null, null, null,
STATE_FAILED);
let updates = getLocalUpdateString(patches);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
writeStatusFile(STATE_FAILED);
reloadUpdateManagerData();
gCheckFunc = check_showUpdateAvailable;
let update = gUpdateManager.activeUpdate;
gUP.showUpdateAvailable(update);
// Report a successful check after the call to showUpdateAvailable since it
// didn't throw and otherwise it would report no tests run.
Assert.ok(true,
"calling showUpdateAvailable should not attempt to open a window");
debugDump("testing showUpdateError should not call getNewPrompter");
gCheckFunc = check_showUpdateError;
update.errorCode = WRITE_ERROR;
gUP.showUpdateError(update);
// Report a successful check after the call to showUpdateError since it
// didn't throw and otherwise it would report no tests run.
Assert.ok(true,
"calling showUpdateError should not attempt to open a window");
doTestFinish();
}
function check_showUpdateAvailable() {
do_throw("showUpdateAvailable should not have called openWindow!");
}
function check_showUpdateError() {
do_throw("showUpdateError should not have seen getNewPrompter!");
}

View file

@ -0,0 +1,74 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
Cu.import("resource://testing-common/MockRegistrar.jsm");
const WindowWatcher = {
openWindow: function(aParent, aUrl, aName, aFeatures, aArgs) {
check_showUpdateAvailable();
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIWindowWatcher])
};
const WindowMediator = {
getMostRecentWindow: function(aWindowType) {
return null;
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIWindowMediator])
};
function run_test() {
setupTestCommon();
debugDump("testing nsIUpdatePrompt notifications should not be displayed " +
"when showUpdateAvailable is called for an unsupported system " +
"update when the unsupported notification has already been " +
"shown (bug 843497)");
start_httpserver();
setUpdateURL(gURLData + gHTTPHandlerPath);
standardInit();
let windowWatcherCID =
MockRegistrar.register("@mozilla.org/embedcomp/window-watcher;1",
WindowWatcher);
let windowMediatorCID =
MockRegistrar.register("@mozilla.org/appshell/window-mediator;1",
WindowMediator);
do_register_cleanup(() => {
MockRegistrar.unregister(windowWatcherCID);
MockRegistrar.unregister(windowMediatorCID);
});
Services.prefs.setBoolPref(PREF_APP_UPDATE_SILENT, false);
Services.prefs.setBoolPref(PREF_APP_UPDATE_NOTIFIEDUNSUPPORTED, true);
// This preference is used to determine when the background update check has
// completed since a successful check will clear the preference.
Services.prefs.setIntPref(PREF_APP_UPDATE_BACKGROUNDERRORS, 1);
gResponseBody = getRemoteUpdatesXMLString(" <update type=\"major\" " +
"name=\"Unsupported Update\" " +
"unsupported=\"true\" " +
"detailsURL=\"" + URL_HOST +
"\"></update>\n");
gAUS.notify(null);
do_execute_soon(check_test);
}
function check_test() {
if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_BACKGROUNDERRORS)) {
do_execute_soon(check_test);
return;
}
Assert.ok(true,
PREF_APP_UPDATE_BACKGROUNDERRORS + " preference should not exist");
stop_httpserver(doTestFinish);
}
function check_showUpdateAvailable() {
do_throw("showUpdateAvailable should not have called openWindow!");
}

View file

@ -0,0 +1,177 @@
/* 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 run_test() {
setupTestCommon();
debugDump("testing addition of a successful update to " + FILE_UPDATES_XML +
" and verification of update properties including the format " +
"prior to bug 530872");
setUpdateChannel("test_channel");
// This test expects that the app.update.download.backgroundInterval
// preference doesn't already exist.
Services.prefs.deleteBranch("app.update.download.backgroundInterval");
// XXXrstrong - not specifying a detailsURL will cause a leak due to bug 470244
// and until bug 470244 is fixed this will not test the value for detailsURL
// when it isn't specified in the update xml.
let patches = getLocalPatchString("partial", "http://partial/", "SHA256",
"cd43", "86", "true", STATE_PENDING);
let updates = getLocalUpdateString(patches, "major", "New", "version 4",
"4.0", "20070811053724",
"http://details1/",
"http://service1/", "1238441300314",
"test status text", "false",
"test_channel", "true", "true", "true",
"345600", "300", "3.0",
"custom1_attr=\"custom1 value\"",
"custom2_attr=\"custom2 value\"");
writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
writeStatusFile(STATE_SUCCEEDED);
patches = getLocalPatchString("complete", "http://complete/", "SHA1", "6232",
"75", "true", STATE_FAILED);
updates = getLocalUpdateString(patches, "major", "Existing", null, "3.0",
null,
"http://details2/",
"http://service2/", null,
getString("patchApplyFailure"), "true",
"test_channel", "false", null, null, "691200",
null, null,
"custom3_attr=\"custom3 value\"",
"custom4_attr=\"custom4 value\"");
writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), false);
standardInit();
Assert.ok(!gUpdateManager.activeUpdate,
"the update manager activeUpdate attribute" + MSG_SHOULD_EQUAL);
Assert.equal(gUpdateManager.updateCount, 2,
"the update manager updateCount attribute" + MSG_SHOULD_EQUAL);
debugDump("checking the activeUpdate properties");
let update = gUpdateManager.getUpdateAt(0).QueryInterface(Ci.nsIPropertyBag);
Assert.equal(update.state, STATE_SUCCEEDED,
"the update state attribute" + MSG_SHOULD_EQUAL);
Assert.equal(update.type, "major",
"the update type attribute" + MSG_SHOULD_EQUAL);
Assert.equal(update.name, "New",
"the update name attribute" + MSG_SHOULD_EQUAL);
Assert.equal(update.displayVersion, "version 4",
"the update displayVersion attribute" + MSG_SHOULD_EQUAL);
Assert.equal(update.appVersion, "4.0",
"the update appVersion attribute" + MSG_SHOULD_EQUAL);
Assert.equal(update.buildID, "20070811053724",
"the update buildID attribute" + MSG_SHOULD_EQUAL);
Assert.equal(update.detailsURL, "http://details1/",
"the update detailsURL attribute" + MSG_SHOULD_EQUAL);
Assert.equal(update.serviceURL, "http://service1/",
"the update serviceURL attribute" + MSG_SHOULD_EQUAL);
Assert.equal(update.installDate, "1238441300314",
"the update installDate attribute" + MSG_SHOULD_EQUAL);
// statusText is updated
Assert.equal(update.statusText, getString("installSuccess"),
"the update statusText attribute" + MSG_SHOULD_EQUAL);
Assert.ok(!update.isCompleteUpdate,
"the update isCompleteUpdate attribute" + MSG_SHOULD_EQUAL);
Assert.equal(update.channel, "test_channel",
"the update channel attribute" + MSG_SHOULD_EQUAL);
Assert.ok(!!update.showPrompt,
"the update showPrompt attribute" + MSG_SHOULD_EQUAL);
Assert.ok(!!update.showNeverForVersion,
"the update showNeverForVersion attribute" + MSG_SHOULD_EQUAL);
Assert.equal(update.promptWaitTime, "345600",
"the update promptWaitTime attribute" + MSG_SHOULD_EQUAL);
Assert.equal(update.getProperty("backgroundInterval"), "300",
"the update backgroundInterval attribute" + MSG_SHOULD_EQUAL);
Assert.equal(update.previousAppVersion, "3.0",
"the update previousAppVersion attribute" + MSG_SHOULD_EQUAL);
// Custom attributes
Assert.equal(update.getProperty("custom1_attr"), "custom1 value",
"the update custom1_attr property" + MSG_SHOULD_EQUAL);
Assert.equal(update.getProperty("custom2_attr"), "custom2 value",
"the update custom2_attr property" + MSG_SHOULD_EQUAL);
debugDump("checking the activeUpdate patch properties");
let patch = update.selectedPatch;
Assert.equal(patch.type, "partial",
"the update patch type attribute" + MSG_SHOULD_EQUAL);
Assert.equal(patch.URL, "http://partial/",
"the update patch URL attribute" + MSG_SHOULD_EQUAL);
Assert.equal(patch.hashFunction, "SHA256",
"the update patch hashFunction attribute" + MSG_SHOULD_EQUAL);
Assert.equal(patch.hashValue, "cd43",
"the update patch hashValue attribute" + MSG_SHOULD_EQUAL);
Assert.equal(patch.size, "86",
"the update patch size attribute" + MSG_SHOULD_EQUAL);
Assert.ok(!!patch.selected,
"the update patch selected attribute" + MSG_SHOULD_EQUAL);
Assert.equal(patch.state, STATE_SUCCEEDED,
"the update patch state attribute" + MSG_SHOULD_EQUAL);
debugDump("checking the first update properties");
update = gUpdateManager.getUpdateAt(1).QueryInterface(Ci.nsIPropertyBag);
Assert.equal(update.state, STATE_FAILED,
"the update state attribute" + MSG_SHOULD_EQUAL);
Assert.equal(update.name, "Existing",
"the update name attribute" + MSG_SHOULD_EQUAL);
Assert.equal(update.type, "major",
"the update type attribute" + MSG_SHOULD_EQUAL);
Assert.equal(update.displayVersion, "3.0",
"the update displayVersion attribute" + MSG_SHOULD_EQUAL);
Assert.equal(update.appVersion, "3.0",
"the update appVersion attribute" + MSG_SHOULD_EQUAL);
Assert.equal(update.detailsURL, "http://details2/",
"the update detailsURL attribute" + MSG_SHOULD_EQUAL);
Assert.equal(update.serviceURL, "http://service2/",
"the update serviceURL attribute" + MSG_SHOULD_EQUAL);
Assert.equal(update.installDate, "1238441400314",
"the update installDate attribute" + MSG_SHOULD_EQUAL);
Assert.equal(update.statusText, getString("patchApplyFailure"),
"the update statusText attribute" + MSG_SHOULD_EQUAL);
Assert.equal(update.buildID, "20080811053724",
"the update buildID attribute" + MSG_SHOULD_EQUAL);
Assert.ok(!!update.isCompleteUpdate,
"the update isCompleteUpdate attribute" + MSG_SHOULD_EQUAL);
Assert.equal(update.channel, "test_channel",
"the update channel attribute" + MSG_SHOULD_EQUAL);
Assert.ok(!update.showPrompt,
"the update showPrompt attribute" + MSG_SHOULD_EQUAL);
Assert.ok(!update.showNeverForVersion,
"the update showNeverForVersion attribute" + MSG_SHOULD_EQUAL);
Assert.equal(update.promptWaitTime, "691200",
"the update promptWaitTime attribute" + MSG_SHOULD_EQUAL);
// The default and maximum value for backgroundInterval is 600
Assert.equal(update.getProperty("backgroundInterval"), "600",
"the update backgroundInterval attribute" + MSG_SHOULD_EQUAL);
Assert.equal(update.previousAppVersion, null,
"the update previousAppVersion attribute" + MSG_SHOULD_EQUAL);
// Custom attributes
Assert.equal(update.getProperty("custom3_attr"), "custom3 value",
"the update custom3_attr property" + MSG_SHOULD_EQUAL);
Assert.equal(update.getProperty("custom4_attr"), "custom4 value",
"the update custom4_attr property" + MSG_SHOULD_EQUAL);
debugDump("checking the first update patch properties");
patch = update.selectedPatch;
Assert.equal(patch.type, "complete",
"the update patch type attribute" + MSG_SHOULD_EQUAL);
Assert.equal(patch.URL, "http://complete/",
"the update patch URL attribute" + MSG_SHOULD_EQUAL);
Assert.equal(patch.hashFunction, "SHA1",
"the update patch hashFunction attribute" + MSG_SHOULD_EQUAL);
Assert.equal(patch.hashValue, "6232",
"the update patch hashValue attribute" + MSG_SHOULD_EQUAL);
Assert.equal(patch.size, "75",
"the update patch size attribute" + MSG_SHOULD_EQUAL);
Assert.ok(!!patch.selected,
"the update patch selected attribute" + MSG_SHOULD_EQUAL);
Assert.equal(patch.state, STATE_FAILED,
"the update patch state attribute" + MSG_SHOULD_EQUAL);
doTestFinish();
}

View file

@ -0,0 +1,305 @@
/* 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/.
*/
/* General URL Construction Tests */
const URL_PREFIX = URL_HOST + "/";
var gAppInfo;
// Since gUpdateChecker.checkForUpdates uses XMLHttpRequest and XMLHttpRequest
// can be slow it combines the checks whenever possible.
function run_test() {
// This test needs access to omni.ja to read the update.locale file so don't
// use a custom directory for the application directory.
gUseTestAppDir = false;
setupTestCommon();
standardInit();
gAppInfo = Cc["@mozilla.org/xre/app-info;1"].
getService(Ci.nsIXULAppInfo).
QueryInterface(Ci.nsIXULRuntime);
do_execute_soon(run_test_pt1);
}
// url constructed with:
// %PRODUCT%
// %VERSION%
// %BUILD_ID%
// %BUILD_TARGET%
// %LOCALE%
// %CHANNEL%
// %PLATFORM_VERSION%
// %OS_VERSION%
// %SYSTEM_CAPABILITIES%
// %DISTRIBUTION%
// %DISTRIBUTION_VERSION%
function run_test_pt1() {
gCheckFunc = check_test_pt1;
// The code that gets the locale accesses the profile which is only available
// after calling do_get_profile in xpcshell tests. This prevents an error from
// being logged.
do_get_profile();
setUpdateChannel("test_channel");
gDefaultPrefBranch.setCharPref(PREF_DISTRIBUTION_ID, "test_distro");
gDefaultPrefBranch.setCharPref(PREF_DISTRIBUTION_VERSION, "test_distro_version");
let url = URL_PREFIX + "%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/" +
"%LOCALE%/%CHANNEL%/%PLATFORM_VERSION%/%OS_VERSION%/" +
"%SYSTEM_CAPABILITIES%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/" +
"updates.xml";
debugDump("testing url construction - url: " + url);
setUpdateURL(url);
try {
gUpdateChecker.checkForUpdates(updateCheckListener, true);
} catch (e) {
debugDump("The following error is most likely due to a missing " +
"update.locale file");
do_throw(e);
}
}
function check_test_pt1() {
let url = URL_PREFIX + gAppInfo.name + "/" + gAppInfo.version + "/" +
gAppInfo.appBuildID + "/" + gAppInfo.OS + "_" + getABI() + "/" +
INSTALL_LOCALE + "/test_channel/" + gAppInfo.platformVersion + "/" +
getOSVersion() + "/" + getSystemCapabilities() +
"/test_distro/test_distro_version/updates.xml?force=1";
// Log the urls since Assert.equal won't print the entire urls to the log.
if (gRequestURL != url) {
logTestInfo("expected url: " + url);
logTestInfo("returned url: " + gRequestURL);
}
Assert.equal(gRequestURL, url,
"the url" + MSG_SHOULD_EQUAL);
run_test_pt2();
}
// url constructed with:
// %CHANNEL% with distribution partners
// %CUSTOM% parameter
// force param when there already is a param - bug 454357
function run_test_pt2() {
gCheckFunc = check_test_pt2;
let url = URL_PREFIX + "%CHANNEL%/updates.xml?custom=%CUSTOM%";
debugDump("testing url constructed with %CHANNEL% - " + url);
setUpdateURL(url);
gDefaultPrefBranch.setCharPref(PREFBRANCH_APP_PARTNER + "test_partner1",
"test_partner1");
gDefaultPrefBranch.setCharPref(PREFBRANCH_APP_PARTNER + "test_partner2",
"test_partner2");
Services.prefs.setCharPref("app.update.custom", "custom");
gUpdateChecker.checkForUpdates(updateCheckListener, true);
}
function check_test_pt2() {
let url = URL_PREFIX + "test_channel-cck-test_partner1-test_partner2/" +
"updates.xml?custom=custom&force=1";
Assert.equal(gRequestURL, url,
"the url" + MSG_SHOULD_EQUAL);
doTestFinish();
}
function getABI() {
let abi;
try {
abi = gAppInfo.XPCOMABI;
} catch (e) {
do_throw("nsIXULAppInfo:XPCOMABI not defined\n");
}
if (IS_MACOSX) {
// Mac universal build should report a different ABI than either macppc
// or mactel. This is necessary since nsUpdateService.js will set the ABI to
// Universal-gcc3 for Mac universal builds.
let macutils = Cc["@mozilla.org/xpcom/mac-utils;1"].
getService(Ci.nsIMacUtils);
if (macutils.isUniversalBinary) {
abi += "-u-" + macutils.architecturesInBinary;
}
} else if (IS_WIN) {
// Windows build should report the CPU architecture that it's running on.
abi += "-" + getProcArchitecture();
}
return abi;
}
function getOSVersion() {
let sysInfo = Cc["@mozilla.org/system-info;1"].getService(Ci.nsIPropertyBag2);
let osVersion = sysInfo.getProperty("name") + " " + sysInfo.getProperty("version");
if (IS_WIN) {
try {
let servicePack = getServicePack();
osVersion += "." + servicePack;
} catch (e) {
do_throw("Failure obtaining service pack: " + e);
}
if ("5.0" === sysInfo.getProperty("version")) { // Win2K
osVersion += " (unknown)";
} else {
try {
osVersion += " (" + getProcArchitecture() + ")";
} catch (e) {
do_throw("Failed to obtain processor architecture: " + e);
}
}
}
if (osVersion) {
try {
osVersion += " (" + sysInfo.getProperty("secondaryLibrary") + ")";
} catch (e) {
// Not all platforms have a secondary widget library, so an error is
// nothing to worry about.
}
osVersion = encodeURIComponent(osVersion);
}
return osVersion;
}
function getServicePack() {
// NOTE: This function is a helper function and not a test. Thus,
// it uses throw() instead of do_throw(). Any tests that use this function
// should catch exceptions thrown in this function and deal with them
// appropriately (usually by calling do_throw).
const BYTE = ctypes.uint8_t;
const WORD = ctypes.uint16_t;
const DWORD = ctypes.uint32_t;
const WCHAR = ctypes.char16_t;
const BOOL = ctypes.int;
// This structure is described at:
// http://msdn.microsoft.com/en-us/library/ms724833%28v=vs.85%29.aspx
const SZCSDVERSIONLENGTH = 128;
const OSVERSIONINFOEXW = new ctypes.StructType('OSVERSIONINFOEXW',
[
{dwOSVersionInfoSize: DWORD},
{dwMajorVersion: DWORD},
{dwMinorVersion: DWORD},
{dwBuildNumber: DWORD},
{dwPlatformId: DWORD},
{szCSDVersion: ctypes.ArrayType(WCHAR, SZCSDVERSIONLENGTH)},
{wServicePackMajor: WORD},
{wServicePackMinor: WORD},
{wSuiteMask: WORD},
{wProductType: BYTE},
{wReserved: BYTE}
]);
let kernel32 = ctypes.open("kernel32");
try {
let GetVersionEx = kernel32.declare("GetVersionExW",
ctypes.default_abi,
BOOL,
OSVERSIONINFOEXW.ptr);
let winVer = OSVERSIONINFOEXW();
winVer.dwOSVersionInfoSize = OSVERSIONINFOEXW.size;
if (0 === GetVersionEx(winVer.address())) {
// Using "throw" instead of "do_throw" (see NOTE above)
throw ("Failure in GetVersionEx (returned 0)");
}
return winVer.wServicePackMajor + "." + winVer.wServicePackMinor;
} finally {
kernel32.close();
}
}
function getProcArchitecture() {
// NOTE: This function is a helper function and not a test. Thus,
// it uses throw() instead of do_throw(). Any tests that use this function
// should catch exceptions thrown in this function and deal with them
// appropriately (usually by calling do_throw).
const WORD = ctypes.uint16_t;
const DWORD = ctypes.uint32_t;
// This structure is described at:
// http://msdn.microsoft.com/en-us/library/ms724958%28v=vs.85%29.aspx
const SYSTEM_INFO = new ctypes.StructType('SYSTEM_INFO',
[
{wProcessorArchitecture: WORD},
{wReserved: WORD},
{dwPageSize: DWORD},
{lpMinimumApplicationAddress: ctypes.voidptr_t},
{lpMaximumApplicationAddress: ctypes.voidptr_t},
{dwActiveProcessorMask: DWORD.ptr},
{dwNumberOfProcessors: DWORD},
{dwProcessorType: DWORD},
{dwAllocationGranularity: DWORD},
{wProcessorLevel: WORD},
{wProcessorRevision: WORD}
]);
let kernel32 = ctypes.open("kernel32");
try {
let GetNativeSystemInfo = kernel32.declare("GetNativeSystemInfo",
ctypes.default_abi,
ctypes.void_t,
SYSTEM_INFO.ptr);
let sysInfo = SYSTEM_INFO();
// Default to unknown
sysInfo.wProcessorArchitecture = 0xffff;
GetNativeSystemInfo(sysInfo.address());
switch (sysInfo.wProcessorArchitecture) {
case 9:
return "x64";
case 6:
return "IA64";
case 0:
return "x86";
default:
// Using "throw" instead of "do_throw" (see NOTE above)
throw ("Unknown architecture returned from GetNativeSystemInfo: " + sysInfo.wProcessorArchitecture);
}
} finally {
kernel32.close();
}
}
/**
* Provides system capability information for application update though it may
* be used by other consumers.
*/
function getSystemCapabilities() {
if (IS_WIN) {
const PF_MMX_INSTRUCTIONS_AVAILABLE = 3; // MMX
const PF_XMMI_INSTRUCTIONS_AVAILABLE = 6; // SSE
const PF_XMMI64_INSTRUCTIONS_AVAILABLE = 10; // SSE2
const PF_SSE3_INSTRUCTIONS_AVAILABLE = 13; // SSE3
let lib = ctypes.open("kernel32.dll");
let IsProcessorFeaturePresent = lib.declare("IsProcessorFeaturePresent",
ctypes.winapi_abi,
ctypes.int32_t, /* success */
ctypes.uint32_t); /* DWORD */
let instructionSet = "unknown";
try {
if (IsProcessorFeaturePresent(PF_SSE3_INSTRUCTIONS_AVAILABLE)) {
instructionSet = "SSE3";
} else if (IsProcessorFeaturePresent(PF_XMMI64_INSTRUCTIONS_AVAILABLE)) {
instructionSet = "SSE2";
} else if (IsProcessorFeaturePresent(PF_XMMI_INSTRUCTIONS_AVAILABLE)) {
instructionSet = "SSE";
} else if (IsProcessorFeaturePresent(PF_MMX_INSTRUCTIONS_AVAILABLE)) {
instructionSet = "MMX";
}
} catch (e) {
Cu.reportError("Error getting processor instruction set. " +
"Exception: " + e);
}
lib.close();
return instructionSet;
}
return "NA";
}

View file

@ -0,0 +1,27 @@
; 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/.
[DEFAULT]
tags = appupdate
head = head_update.js
tail =
[canCheckForAndCanApplyUpdates.js]
[urlConstruction.js]
[updateManagerXML.js]
[remoteUpdateXML.js]
[downloadAndHashCheckMar.js]
[cleanupDownloadingForOlderAppVersion.js]
[cleanupDownloadingForDifferentChannel.js]
[cleanupDownloadingForSameVersionAndBuildID.js]
[cleanupDownloadingIncorrectStatus.js]
[cleanupPendingVersionFileIncorrectStatus.js]
[cleanupSuccessLogMove.js]
[cleanupSuccessLogsFIFO.js]
[downloadInterruptedRecovery.js]
[downloadResumeForSameAppVersion.js]
[downloadCompleteAfterPartialFailure.js]
[uiSilentPref.js]
[uiUnsupportedAlreadyNotified.js]
[uiAutoPref.js]

Some files were not shown because too many files have changed in this diff Show more