From 8e3c42f18d1a28cc3896eac168824db3f37f3aac Mon Sep 17 00:00:00 2001
From: "ian%hixie.ch"
Date: Sun, 30 Dec 2001 02:33:44 +0000
Subject: [PATCH] * Enabled Taint mode. * Added the HTTP Logout module, integer
user fields, and the user prefs module to the test app. * Changed
unknownCommand to noCommand. Unknown commands now cause errors. * Changed the
arbitrary default command to some other arbitrary default command and made
the login command consistent with it. * Filled in the stylesheet a little. *
Added an error page. * Reworked the hello page. * Moved some stuff into the
common footer. * Added a request login page. * Did some other minor fixups. *
Added some incomplete userPrefs pages.
git-svn-id: svn://10.0.0.236/trunk@111174 18797224-902f-48f8-a5cc-f745e15eee43
---
mozilla/webtools/bugzilla3/tests/Main | 22 ++++--
.../bugzilla3/tests/output/http/error | 22 ++++++
.../bugzilla3/tests/output/http/hello | 25 +++----
.../tests/output/http/login.accessDenied | 4 -
.../tests/output/http/login.detailsSent | 4 -
.../bugzilla3/tests/output/http/login.failed | 6 +-
.../tests/output/http/login.requestAccount | 36 +++++++++
.../tests/output/http/template.html.footer | 25 +++++++
.../tests/output/http/userPrefs.index | 74 +++++++++++++++++++
.../tests/output/http/userPrefs.notification | 14 ++++
.../tests/output/http/userPrefs.success | 14 ++++
mozilla/webtools/bugzilla3/tests/style | 7 +-
12 files changed, 220 insertions(+), 33 deletions(-)
create mode 100644 mozilla/webtools/bugzilla3/tests/output/http/error
create mode 100644 mozilla/webtools/bugzilla3/tests/output/http/login.requestAccount
create mode 100644 mozilla/webtools/bugzilla3/tests/output/http/userPrefs.index
create mode 100644 mozilla/webtools/bugzilla3/tests/output/http/userPrefs.notification
create mode 100644 mozilla/webtools/bugzilla3/tests/output/http/userPrefs.success
diff --git a/mozilla/webtools/bugzilla3/tests/Main b/mozilla/webtools/bugzilla3/tests/Main
index 1e8b2d16715..4d057568fb0 100755
--- a/mozilla/webtools/bugzilla3/tests/Main
+++ b/mozilla/webtools/bugzilla3/tests/Main
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl -wT
# -*- Mode: perl; tab-width: 4; indent-tabs-mode: nil; -*-
#
# This file is MPL/GPL dual-licensed under the following terms:
@@ -28,7 +28,6 @@
# under either the MPL or the GPL.
use strict; # enable stricter Perl syntax rules
-use diagnostics; # enable fuller diagnostics
use lib "."; # this is required to use the app's modules
use lib "../../PLIF"; # this is required to use PLIF
use vars qw(@ISA);
@@ -59,29 +58,40 @@ sub registerServices {
PLIF::Service::User
PLIF::Service::Passwords
PLIF::Service::UserField::String
+ PLIF::Service::UserField::Integer
PLIF::Service::UserFieldFactory
PLIF::Service::Components::AdminCommands
PLIF::Service::Components::Login
PLIF::Service::Components::CosesEditor
+ PLIF::Service::Components::UserPrefs
PLIF::Service::ContactMethod::Email
PLIF::Service::ContactMethod::AIM
+ PLIF::ProtocolHelper::Logout::HTTP
Output
Configuration
));
}
-sub unknownCommand {
+sub noCommand {
my $self = shift;
- $self->output->hello({});
+ my $user = $self->getObject('user');
+ if (defined($user)) {
+ my %strings = @{$self->getCollectingServiceList('dispatcher.output')->strings};
+ $self->output->hello(\%strings);
+ } else {
+ $self->output->hello();
+ }
}
sub cmdLogin {
my $self = shift;
- my $user = $self->getService('user.login')->hasRight($self, 'hello');
+ my $user = $self->getObject('user');
if (defined($user)) {
my %strings = @{$self->getCollectingServiceList('dispatcher.output')->strings};
$self->output->hello(\%strings);
- } # else, user has been notified
+ } else {
+ $self->getService('user.login')->requireLogin($self);
+ }
}
sub name {
diff --git a/mozilla/webtools/bugzilla3/tests/output/http/error b/mozilla/webtools/bugzilla3/tests/output/http/error
new file mode 100644
index 00000000000..13cd184db73
--- /dev/null
+++ b/mozilla/webtools/bugzilla3/tests/output/http/error
@@ -0,0 +1,22 @@
+COSES
+1
+
+
+
+
+
+
+
+
+An internal error occured. Please report this bug, including the
+date and time of the error along with the information included
+below:
+
+
]]>
+]]>
+
+
+
+
\ No newline at end of file
diff --git a/mozilla/webtools/bugzilla3/tests/output/http/hello b/mozilla/webtools/bugzilla3/tests/output/http/hello
index e60033062ac..5aeb4d60b4b 100644
--- a/mozilla/webtools/bugzilla3/tests/output/http/hello
+++ b/mozilla/webtools/bugzilla3/tests/output/http/hello
@@ -7,20 +7,19 @@ COSES
-This is the main page of the test PLIF project. It is being generated from an XML text file!
-