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!

-

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/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 + - - - - - - - --> + + + + +

+ Index - +]]>Log Out - + Edit Strings - + Preferences +]]>Log In - + Create Account +]]> + ]]> diff --git a/mozilla/webtools/bugzilla3/tests/output/http/userPrefs.index b/mozilla/webtools/bugzilla3/tests/output/http/userPrefs.index new file mode 100644 index 00000000000..d6cc2cdcaf7 --- /dev/null +++ b/mozilla/webtools/bugzilla3/tests/output/http/userPrefs.index @@ -0,0 +1,74 @@ +COSES +1 + + + + + + + +Incomplete

]]>
+ + + + + + \ No newline at end of file diff --git a/mozilla/webtools/bugzilla3/tests/output/http/userPrefs.notification b/mozilla/webtools/bugzilla3/tests/output/http/userPrefs.notification new file mode 100644 index 00000000000..2d048ef24fc --- /dev/null +++ b/mozilla/webtools/bugzilla3/tests/output/http/userPrefs.notification @@ -0,0 +1,14 @@ +COSES +1 + + + + + + + + + + + + \ No newline at end of file diff --git a/mozilla/webtools/bugzilla3/tests/output/http/userPrefs.success b/mozilla/webtools/bugzilla3/tests/output/http/userPrefs.success new file mode 100644 index 00000000000..2d048ef24fc --- /dev/null +++ b/mozilla/webtools/bugzilla3/tests/output/http/userPrefs.success @@ -0,0 +1,14 @@ +COSES +1 + + + + + + + + + + + + \ No newline at end of file diff --git a/mozilla/webtools/bugzilla3/tests/style b/mozilla/webtools/bugzilla3/tests/style index fe7727f4bd0..52c069d113a 100644 --- a/mozilla/webtools/bugzilla3/tests/style +++ b/mozilla/webtools/bugzilla3/tests/style @@ -1 +1,6 @@ -/* plif.css */ \ No newline at end of file +/* plif.css */ + +h1 { font: 900 2em Verdana, sans-serif; border-bottom: solid; margin: 0; } +div.footer { border-top: solid; } +div.footer p { margin: 0.75em; font-size: 0.75em; } +body { border-bottom: solid; } \ No newline at end of file