mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 18:51:28 +00:00
--NOT PART OF DEFAULT BUILD--
XMLterm changes only. Added a coupled of pagelet test scripts.
This commit is contained in:
parent
62e8f2f3e5
commit
990f06577a
34
extensions/xmlterm/scripts/xrpchelp
Executable file
34
extensions/xmlterm/scripts/xrpchelp
Executable file
@ -0,0 +1,34 @@
|
||||
#!/usr/bin/perl
|
||||
# Usage: xrpchelp <server-URL> [<method-name>]
|
||||
|
||||
use Frontier::Client;
|
||||
|
||||
die "Usage: xrpchelp <server-URL> [<method-name>]\n"
|
||||
unless (@ARGV == 1) or (@ARGV == 2);
|
||||
|
||||
my $url = shift @ARGV; # XML-RPC server URL
|
||||
|
||||
$server = Frontier::Client->new( 'url' => $url, 'debug' => 0 );
|
||||
|
||||
my $cookie = $ENV{LTERM_COOKIE}; # Cookie for security
|
||||
print "\e{S$cookie\012"; # Escape sequence for start of HTML
|
||||
|
||||
if (@ARGV) { # Print help string for method
|
||||
|
||||
print $server->call("system.methodHelp", @ARGV), "\n"; # Print method help
|
||||
|
||||
} else { # List all method names
|
||||
|
||||
my $list = $server->call("system.listMethods", @ARGV); # Get method names
|
||||
|
||||
print "<OL>\n"; # Ordered list start tag
|
||||
|
||||
foreach $method (@$list) { # For each method name, add list element
|
||||
print qq%<LI><SPAN CLASS='textlink' onClick="return HandleEvent(event,
|
||||
'click','sendln',-\#,'xrpchelp $url $method')">$method</SPAN>\n%;
|
||||
}
|
||||
|
||||
print "</OL>\n"; # Ordered list end tag
|
||||
}
|
||||
|
||||
print "\000"; # Escape sequence for end of HTML
|
43
extensions/xmlterm/scripts/xtst
Executable file
43
extensions/xmlterm/scripts/xtst
Executable file
@ -0,0 +1,43 @@
|
||||
#!/usr/bin/perl
|
||||
# Script to test remote cookie handling
|
||||
|
||||
use strict;
|
||||
|
||||
use POSIX qw(:termios_h);
|
||||
|
||||
my ($term, $oterm, $echo, $noecho, $fd_stdin);
|
||||
|
||||
$fd_stdin = fileno(STDIN);
|
||||
|
||||
$term = POSIX::Termios->new();
|
||||
$term->getattr($fd_stdin);
|
||||
$oterm = $term->getlflag();
|
||||
|
||||
$echo = ECHO | ECHOK | ICANON;
|
||||
$noecho = $oterm & ~$echo;
|
||||
|
||||
my ($old_vmin, $old_vtime);
|
||||
$old_vmin = $term->getcc(VMIN);
|
||||
$old_vtime = $term->getcc(VTIME);
|
||||
|
||||
$term->setlflag($noecho); # Suppress input echo
|
||||
$term->setcc(VMIN, 0); # Minimum characters to read
|
||||
$term->setcc(VTIME, 30); # Wait in units of 0.1 seconds
|
||||
$term->setattr($fd_stdin, TCSANOW);
|
||||
|
||||
print "VMIN,VTIME = ", $old_vmin, ",", $old_vtime, "\n";
|
||||
print "VMIN,VTIME = ", $term->getcc(VMIN), ",", $term->getcc(VTIME), "\n";
|
||||
|
||||
print "\e{A\n"; # HTML stream escape sequence
|
||||
|
||||
my $key = "";
|
||||
my $key2 = "";
|
||||
print "nread=", sysread(STDIN, $key, 1), "\n";
|
||||
sysread(STDIN, $key2, 21);
|
||||
print "--> $key2\n";
|
||||
|
||||
$term->setlflag($echo);
|
||||
$term->setcc(VMIN, $old_vmin);
|
||||
$term->setcc(VTIME, $old_vtime);
|
||||
$term->setattr($fd_stdin, TCSANOW);
|
||||
|
Loading…
Reference in New Issue
Block a user