Merge pull request #709 from pagespeed/xqyin-color-messages

Color messages in the message_history page. Add system test for this change.
This commit is contained in:
xqyin
2014-05-28 17:39:05 -04:00
2 changed files with 13 additions and 1 deletions
+1 -1
View File
@@ -2443,7 +2443,7 @@ ngx_int_t ps_simple_handler(ngx_http_request_t* r,
"Please check if it's enabled in pagespeed.conf.\n",
message_handler);
} else {
HtmlKeywords::WritePre(log, &writer, message_handler);
HtmlKeywords::WritePre(log, "", &writer, message_handler);
}
break;
}
+12
View File
@@ -2633,6 +2633,18 @@ OUTFILE=$OUTDIR/etags
$WGET -o $OUTFILE -O /dev/null --header "If-None-Match: $ETAG" $URL
check fgrep -q "awaiting response... 304" $OUTFILE
# Test if the warning messages are colored in message_history page.
# We color the messages in message_history page to make it clearer to read.
# Red for Error messages. Blue for Warning messages.
# Orange for Fatal messages. Black by default.
# Won't test Error messages and Fatal messages in this test.
# TODO(xqyin): test all the types of messages in future unit test.
start_test Messages are colored in message_history
INJECT=$($CURL --silent $HOSTNAME/?PageSpeed=Warning_trigger)
OUT=$($WGET -q -O - $HOSTNAME/pagespeed_admin/message_history | \
grep Warning_trigger)
check_from "$OUT" fgrep -q "color:blue;"
start_test PageSpeed resources should have a content length.
URL="$EXAMPLE_ROOT/styles/W.rewrite_css_images.css.pagespeed.cf.Hash.css"
OUT=$($WGET_DUMP --save-headers $URL)