aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2011-11-30 15:38:27 +0100
committerPeter Andersson <[email protected]>2011-11-30 15:38:27 +0100
commit53e920c49505e6835f8d69604e5bd2018edefe85 (patch)
treee6ef5947cf2f582c1a24051aa9cff106174632eb /lib/common_test
parentb243b515c69a2585829ec65307ae5d0aff9ac2c6 (diff)
downloadotp-53e920c49505e6835f8d69604e5bd2018edefe85.tar.gz
otp-53e920c49505e6835f8d69604e5bd2018edefe85.tar.bz2
otp-53e920c49505e6835f8d69604e5bd2018edefe85.zip
Bugfixes and improvements of the the CSS stylesheet implementation
Diffstat (limited to 'lib/common_test')
-rw-r--r--lib/common_test/priv/ct_default.css2
-rw-r--r--lib/common_test/src/ct_logs.erl28
2 files changed, 14 insertions, 16 deletions
diff --git a/lib/common_test/priv/ct_default.css b/lib/common_test/priv/ct_default.css
index a64e1ec576..75f8d5db8a 100644
--- a/lib/common_test/priv/ct_default.css
+++ b/lib/common_test/priv/ct_default.css
@@ -147,7 +147,7 @@ td a:visited {
}
tr:hover th[scope=row], tr:hover td {
- background-color: #808080;
+ background-color: #D1D1D1;
color: #fff;
}
diff --git a/lib/common_test/src/ct_logs.erl b/lib/common_test/src/ct_logs.erl
index d66a31d9a5..19ad7b26d8 100644
--- a/lib/common_test/src/ct_logs.erl
+++ b/lib/common_test/src/ct_logs.erl
@@ -223,7 +223,6 @@ init_tc(RefreshLog) ->
%%%
%%% <p>This function is called by ct_framework:end_tc/3</p>
end_tc(TCPid) ->
- io:format(xhtml("<br>", "<br />")),
%% use call here so that the TC process will wait and receive
%% possible exit signals from ct_logs before end_tc returns ok
call({end_tc,TCPid}).
@@ -745,20 +744,19 @@ print_style(Fd,StyleSheet) ->
0 -> string:str(Str,"<STYLE>");
N0 -> N0
end,
- case Pos0 of
- 0 -> print_style_error(Fd,StyleSheet,missing_style_tag);
- _ ->
- Pos1 = case string:str(Str,"</style>") of
- 0 -> string:str(Str,"</STYLE>");
- N1 -> N1
- end,
- case Pos1 of
- 0 ->
- print_style_error(Fd,StyleSheet,missing_style_end_tag);
- _ ->
- Style = string:sub_string(Str,Pos0,Pos1+7),
- io:format(Fd,"~s\n",[Style])
- end
+ Pos1 = case string:str(Str,"</style>") of
+ 0 -> string:str(Str,"</STYLE>");
+ N1 -> N1
+ end,
+ if (Pos0 == 0) and (Pos1 /= 0) ->
+ print_style_error(Fd,StyleSheet,missing_style_start_tag);
+ (Pos0 /= 0) and (Pos1 == 0) ->
+ print_style_error(Fd,StyleSheet,missing_style_end_tag);
+ Pos0 /= 0 ->
+ Style = string:sub_string(Str,Pos0,Pos1+7),
+ io:format(Fd,"~s\n",[Style]);
+ Pos0 == 0 ->
+ io:format(Fd,"<style>~s</style>\n",[Str])
end;
{error,Reason} ->
print_style_error(Fd,StyleSheet,Reason)