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
+
+
]]>+]]> + + + + \ 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! - +From here you may: Say Hello or Edit The Strings.
-If prompted for a username/password, use "open"/"sesame".
--]]>Welcome to the Main PLIF Test Application]]>
-- - -- -]]> +You have logged in! You may log out. + See also:
+ +]]>If you have already registered you may log in. + Otherwise you may create an account.
+]]>diff --git a/mozilla/webtools/bugzilla3/tests/output/http/login.accessDenied b/mozilla/webtools/bugzilla3/tests/output/http/login.accessDenied index 3a9adf8630b..346f1dd70a0 100644 --- a/mozilla/webtools/bugzilla3/tests/output/http/login.accessDenied +++ b/mozilla/webtools/bugzilla3/tests/output/http/login.accessDenied @@ -15,9 +15,5 @@ COSES ]]> - ]]> -- ]]> -\ No newline at end of file diff --git a/mozilla/webtools/bugzilla3/tests/output/http/login.detailsSent b/mozilla/webtools/bugzilla3/tests/output/http/login.detailsSent index b1d61f2b50b..a72d8151824 100644 --- a/mozilla/webtools/bugzilla3/tests/output/http/login.detailsSent +++ b/mozilla/webtools/bugzilla3/tests/output/http/login.detailsSent @@ -16,9 +16,5 @@ COSES ]]> - ]]> -- ]]> -\ No newline at end of file diff --git a/mozilla/webtools/bugzilla3/tests/output/http/login.failed b/mozilla/webtools/bugzilla3/tests/output/http/login.failed index 458bdcb447e..62959b8112b 100644 --- a/mozilla/webtools/bugzilla3/tests/output/http/login.failed +++ b/mozilla/webtools/bugzilla3/tests/output/http/login.failed @@ -23,7 +23,7 @@ contact: ]]> - +
-]]> -- ]]> -\ No newline at end of file diff --git a/mozilla/webtools/bugzilla3/tests/output/http/login.requestAccount b/mozilla/webtools/bugzilla3/tests/output/http/login.requestAccount new file mode 100644 index 00000000000..9720124703d --- /dev/null +++ b/mozilla/webtools/bugzilla3/tests/output/http/login.requestAccount @@ -0,0 +1,36 @@ +COSES +1 + + + + \ No newline at end of file diff --git a/mozilla/webtools/bugzilla3/tests/output/http/template.html.footer b/mozilla/webtools/bugzilla3/tests/output/http/template.html.footer index eaabff4b3b4..535109a2a56 100644 --- a/mozilla/webtools/bugzilla3/tests/output/http/template.html.footer +++ b/mozilla/webtools/bugzilla3/tests/output/http/template.html.footer @@ -8,7 +8,32 @@ COSES + - - - - - - - --> + + + ++ + ++ + + ++]]>
To create a new account fill in your e-mail address or other +means of contact in the form below and hit the submit button: + ++ + ++ +
+ +]]>+ + + Index - +]]>
Log Out - + Edit Strings - + Preferences +]]> Log In - + Create Account +]]> +