"Fossies" - the Fresh Open Source Software Archive

Member "incubator-pagespeed-mod-1.14.36.1/pagespeed/system/system_tests/add_instrumentation.sh" (28 Feb 2020, 1485 Bytes) of package /linux/www/apache_httpd_modules/incubator-pagespeed-mod-1.14.36.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "add_instrumentation.sh": 1.13.35.2_vs_1.14.36.1.

    1 #!/bin/bash
    2 #
    3 #
    4 # Licensed under the Apache License, Version 2.0 (the "License");
    5 # you may not use this file except in compliance with the License.
    6 # You may obtain a copy of the License at
    7 #
    8 #      http://www.apache.org/licenses/LICENSE-2.0
    9 #
   10 # Unless required by applicable law or agreed to in writing, software
   11 # distributed under the License is distributed on an "AS IS" BASIS,
   12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   13 # See the License for the specific language governing permissions and
   14 # limitations under the License.
   15 start_test HTML add_instrumentation CDATA
   16 $WGET -O $WGET_OUTPUT $TEST_ROOT/add_instrumentation.html\
   17 ?PageSpeedFilters=add_instrumentation
   18 check [ $(grep -c "\&" $WGET_OUTPUT) = 0 ]
   19 # In some servers PageSpeed runs before response headers are finalized, which
   20 # means it has to  assume the page is xhtml because the 'Content-Type' header
   21 # might just not have been set yet.  In others it runs after, and so it can
   22 # trust what it sees in the headers.  See RewriteDriver::MimeTypeXhtmlStatus().
   23 if $HEADERS_FINALIZED; then
   24   check [ $(grep -c '//<\!\[CDATA\[' $WGET_OUTPUT) = 0 ]
   25 else
   26   check [ $(grep -c '//<\!\[CDATA\[' $WGET_OUTPUT) = 1 ]
   27 fi
   28 
   29 start_test XHTML add_instrumentation also lacks '&amp;' and contains CDATA
   30 $WGET -O $WGET_OUTPUT $TEST_ROOT/add_instrumentation.xhtml\
   31 ?PageSpeedFilters=add_instrumentation
   32 check [ $(grep -c "\&amp;" $WGET_OUTPUT) = 0 ]
   33 check [ $(grep -c '//<\!\[CDATA\[' $WGET_OUTPUT) = 1 ]