diff --git a/devel/apache_cleanup.sh b/devel/apache_cleanup.sh index 96a2a4f05..a0d136956 100755 --- a/devel/apache_cleanup.sh +++ b/devel/apache_cleanup.sh @@ -1,4 +1,18 @@ #!/bin/bash +# +# Copyright 2010 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # See bug 3103898 and # http://carlosrivero.com/fix-apache diff --git a/devel/apache_configure_https_port.sh b/devel/apache_configure_https_port.sh index 932d52afb..6730c6056 100755 --- a/devel/apache_configure_https_port.sh +++ b/devel/apache_configure_https_port.sh @@ -1,5 +1,19 @@ #!/bin/bash # +# Copyright 2011 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Script to enable SSL on the given port for Apache, usually in ~/apache2. # # usage: apache_configure_https_port.sh apache-root-directory https-port diff --git a/devel/apache_configure_php5_from_etc_php5.sh b/devel/apache_configure_php5_from_etc_php5.sh index e73dcc13e..9f72d37b0 100755 --- a/devel/apache_configure_php5_from_etc_php5.sh +++ b/devel/apache_configure_php5_from_etc_php5.sh @@ -1,5 +1,19 @@ #!/bin/bash # +# Copyright 2012 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Script to enable PHP5 in Apache assuming it has already been installed into # the standard Ubuntu directory (/etc/apache, /usr/apache) rather than the # ~/apache2 directory we use [in other words, modules have been apt install'd diff --git a/devel/apache_create_server_certificate.sh b/devel/apache_create_server_certificate.sh index 76055a40c..6d0a30378 100755 --- a/devel/apache_create_server_certificate.sh +++ b/devel/apache_create_server_certificate.sh @@ -1,5 +1,19 @@ #!/bin/bash # +# Copyright 2012 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Script to create a server certificate (and key) file for Apache, # usually in ~/apache2. # diff --git a/devel/apache_install.sh b/devel/apache_install.sh index bd543dfc7..2f2fa7899 100755 --- a/devel/apache_install.sh +++ b/devel/apache_install.sh @@ -1,5 +1,19 @@ #!/bin/bash # +# Copyright 2010 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Script to install a debuggable mod_pagespeed.so into the Apache # distribution, usually in ~/apache2. diff --git a/devel/apache_rotate_logs.sh b/devel/apache_rotate_logs.sh index 67478865e..1c1ced0d4 100755 --- a/devel/apache_rotate_logs.sh +++ b/devel/apache_rotate_logs.sh @@ -1,4 +1,19 @@ #!/bin/bash +# +# Copyright 2011 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Rotate the logs in the apache logs directory specified on the command line, # and gzip them, then erase old logs if disk usage is over 85%. Note that # apache must be stopped when we do this. Note also that we take pains not to diff --git a/devel/check_tests_are_run.sh b/devel/check_tests_are_run.sh index 8edc3c94e..9a2c17f3b 100755 --- a/devel/check_tests_are_run.sh +++ b/devel/check_tests_are_run.sh @@ -1,5 +1,19 @@ #!/bin/bash # +# Copyright 2011 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Scans source directories for _test.cc files and makes sure they are mentioned # in the appropriate gyp files. # diff --git a/devel/checkin_test_helpers.sh b/devel/checkin_test_helpers.sh index f6dae3f3d..5b124fdf7 100755 --- a/devel/checkin_test_helpers.sh +++ b/devel/checkin_test_helpers.sh @@ -1,6 +1,19 @@ #!/bin/bash # -# Copyright 2011 Google Inc. All Rights Reserved. +# Copyright 2011 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Author: sligocki@google.com (Shawn Ligocki) # # Helper functions for holding locks so that checkin tests from two clients diff --git a/devel/doxify.sh b/devel/doxify.sh index 9accc2140..295e77255 100755 --- a/devel/doxify.sh +++ b/devel/doxify.sh @@ -1,5 +1,19 @@ #!/bin/bash # +# Copyright 2003 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Runs a file in $1 through a giant sed script, transforming normal # C++ comments to Doxygen comments. The resultant file is placed in # $2/$1, so $2 must be a subdirectory. diff --git a/devel/doxify_tree.sh b/devel/doxify_tree.sh index 1ed1ff9ac..505c42a8e 100755 --- a/devel/doxify_tree.sh +++ b/devel/doxify_tree.sh @@ -1,5 +1,19 @@ #!/bin/bash # +# Copyright 2010 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Processes the open-source header files using Doxygen. Each header # must be preprocessed using doxify.sh to convert normal C++ comments # into Doxygen Usage. diff --git a/devel/fetch_all.py b/devel/fetch_all.py index 5d8f7e90b..18003ecec 100755 --- a/devel/fetch_all.py +++ b/devel/fetch_all.py @@ -1,7 +1,18 @@ #!/usr/bin/python # -# Copyright 2010 Google Inc. All Rights Reserved. - +# Copyright 2010 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. """Fetches a set of URLs via a proxy, keeping statistics. This script attempts to fetch all URLs in the list given on diff --git a/devel/gcov-all.sh b/devel/gcov-all.sh index 4f0dd2fb0..c1525b99f 100755 --- a/devel/gcov-all.sh +++ b/devel/gcov-all.sh @@ -1,5 +1,19 @@ #!/bin/bash # +# Copyright 2011 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # A helper for running gcov on all of the project sources. # Usage: # gcov-all.sh (--prepare | --summarize) path diff --git a/devel/mps_generate_load.sh b/devel/mps_generate_load.sh index 82cad55f4..52f637f4c 100755 --- a/devel/mps_generate_load.sh +++ b/devel/mps_generate_load.sh @@ -1,5 +1,19 @@ #!/bin/bash # +# Copyright 2012 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # This script is intended to be run from devel/mps_load_test.sh, although it can # be run directly as well. # diff --git a/devel/mps_load_test.sh b/devel/mps_load_test.sh index f76bac37d..8d08b74f8 100755 --- a/devel/mps_load_test.sh +++ b/devel/mps_load_test.sh @@ -1,5 +1,19 @@ #!/bin/bash # +# Copyright 2012 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Note: this script is not yet usable outside Google, because it depends on a # corpus database that we can't open source. It should be possible to create a # db with a combination of mod_pagespeed's slurping and a headless browser, but diff --git a/devel/scrape_error_log_for_crashes.sh b/devel/scrape_error_log_for_crashes.sh index f0c210077..a759afabd 100755 --- a/devel/scrape_error_log_for_crashes.sh +++ b/devel/scrape_error_log_for_crashes.sh @@ -1,4 +1,18 @@ #!/bin/bash +# +# Copyright 2012 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. if [ $# -lt 2 ]; then echo Usage: $0 error_log_filename stop_filename diff --git a/devel/slurp_test.sh b/devel/slurp_test.sh index 46c78e334..c6491f193 100755 --- a/devel/slurp_test.sh +++ b/devel/slurp_test.sh @@ -1,4 +1,18 @@ #!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. set -e set -u diff --git a/devel/trace_stress_test.sh b/devel/trace_stress_test.sh index 0f819d3e9..799cc9cd1 100755 --- a/devel/trace_stress_test.sh +++ b/devel/trace_stress_test.sh @@ -1,4 +1,18 @@ #!/bin/bash +# +# Copyright 2012 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # This scripts reads a list of URLs from the provided file, and # fetches them in parallel from a local slurping proxy in a randomized # order. Loading times and statuses for them are then output to diff --git a/devel/trace_stress_test_percentiles.sh b/devel/trace_stress_test_percentiles.sh index f28778dd0..fcbd85413 100755 --- a/devel/trace_stress_test_percentiles.sh +++ b/devel/trace_stress_test_percentiles.sh @@ -1,4 +1,18 @@ #!/bin/bash +# +# Copyright 2012 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # This script takes the output of trace_stress_test.sh and reports cheap and # cheerful median, 75th, 90th, 95th, 99th, and worst latencies. if [ "X$1" == "X" ]; then diff --git a/devel/turn_on_timewait_recyling.sh b/devel/turn_on_timewait_recyling.sh index a46e84f1b..68274cce0 100755 --- a/devel/turn_on_timewait_recyling.sh +++ b/devel/turn_on_timewait_recyling.sh @@ -1,5 +1,19 @@ #!/bin/bash # +# Copyright 2012 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Makes linux enable fast reuse of sockets in TIME-WAIT state. We need this for # load testing so that we don't run out of connection table slots and fail to # get a socket. This isn't generally a good idea to set on public-facing diff --git a/install/apache_experiment_ga_test.sh b/install/apache_experiment_ga_test.sh index 12023227b..4d907187e 100755 --- a/install/apache_experiment_ga_test.sh +++ b/install/apache_experiment_ga_test.sh @@ -1,6 +1,19 @@ #!/bin/bash # -# Copyright 2012 Google Inc. All Rights Reserved. +# Copyright 2012 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Author: jefftk@google.com (Jeff Kaufman) # # Runs all Apache-specific experiment framework tests that depend on AnalyticsID diff --git a/install/apache_experiment_no_ga_test.sh b/install/apache_experiment_no_ga_test.sh index db2d4f914..ea023fe6e 100755 --- a/install/apache_experiment_no_ga_test.sh +++ b/install/apache_experiment_no_ga_test.sh @@ -1,6 +1,19 @@ #!/bin/bash # -# Copyright 2012 Google Inc. All Rights Reserved. +# Copyright 2012 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Author: jefftk@google.com (Jeff Kaufman) # # Runs all Apache-specific experiment framework tests that depend on AnalyticsID diff --git a/install/apache_experiment_test.sh b/install/apache_experiment_test.sh index 2805fc1b7..d3337d1d3 100755 --- a/install/apache_experiment_test.sh +++ b/install/apache_experiment_test.sh @@ -1,6 +1,19 @@ #!/bin/bash # -# Copyright 2012 Google Inc. All Rights Reserved. +# Copyright 2012 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Author: jefftk@google.com (Jeff Kaufman) # # Runs all Apache-specific experiment framework tests that don't depend on diff --git a/install/apache_https_fetch_test.sh b/install/apache_https_fetch_test.sh index 3620a9ca0..4e7a4ea37 100755 --- a/install/apache_https_fetch_test.sh +++ b/install/apache_https_fetch_test.sh @@ -1,4 +1,18 @@ #!/bin/bash +# +# Copyright 2013 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # Tests that mod_pagespeed can fetch HTTPS resources. Note that mod_pagespeed # does not work like this by default: a flag must be specified in diff --git a/install/build_development_apache.sh b/install/build_development_apache.sh index 19bcb00a3..495440c1a 100755 --- a/install/build_development_apache.sh +++ b/install/build_development_apache.sh @@ -1,4 +1,18 @@ #!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # Install mod_pagespeed testing version of Apache for use in checkin test. # This also installs the dependencies for mod_h2 if you're building 2.4 # diff --git a/install/build_mps.sh b/install/build_mps.sh index c9d968c85..c82373689 100755 --- a/install/build_mps.sh +++ b/install/build_mps.sh @@ -1,5 +1,19 @@ #!/bin/bash -# Copyright 2016 Google Inc. All Rights Reserved. +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Author: cheesy@google.com (Steve Hill) # # Script to build mod_pagespeed. diff --git a/install/build_on_vm.sh b/install/build_on_vm.sh index 523d0629a..f26fa3a7d 100755 --- a/install/build_on_vm.sh +++ b/install/build_on_vm.sh @@ -1,5 +1,19 @@ #!/bin/bash -# Copyright 2016 Google Inc. All Rights Reserved. +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Author: cheesy@google.com (Steve Hill) # # Build a mod_pagespeed release on a gcloud VM. diff --git a/install/build_psol.sh b/install/build_psol.sh index a895d6e82..66b848c6f 100755 --- a/install/build_psol.sh +++ b/install/build_psol.sh @@ -1,5 +1,19 @@ #!/bin/bash -# Copyright 2016 Google Inc. All Rights Reserved. +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Author: cheesy@google.com (Steve Hill) # # Builds psol tarball from a mod_pagespeed checkout. diff --git a/install/build_release.sh b/install/build_release.sh index f59b0b63d..10e21b085 100755 --- a/install/build_release.sh +++ b/install/build_release.sh @@ -1,4 +1,18 @@ #!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. source "$(dirname "$BASH_SOURCE")/build_env.sh" || exit 1 diff --git a/install/centos/build_env.sh b/install/centos/build_env.sh index d5c677f68..00d945057 100644 --- a/install/centos/build_env.sh +++ b/install/centos/build_env.sh @@ -1,5 +1,19 @@ #!/bin/bash -# Copyright 2016 Google Inc. All Rights Reserved. +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Author: cheesy@google.com (Steve Hill) # # Sets common environment variables requires for building PageSpeed stuff. diff --git a/install/centos/install_mps_package.sh b/install/centos/install_mps_package.sh index 429fa5479..3171bcfca 100644 --- a/install/centos/install_mps_package.sh +++ b/install/centos/install_mps_package.sh @@ -1,5 +1,19 @@ #!/bin/bash -# Copyright 2016 Google Inc. All Rights Reserved. +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Author: cheesy@google.com (Steve Hill) # # Remove old mod_pagespeed debs and install a new one. diff --git a/install/centos/install_required_packages.sh b/install/centos/install_required_packages.sh index c372a2a69..c421c872f 100644 --- a/install/centos/install_required_packages.sh +++ b/install/centos/install_required_packages.sh @@ -1,5 +1,19 @@ #!/bin/bash -# Copyright 2016 Google Inc. All Rights Reserved. +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Author: cheesy@google.com (Steve Hill) # # Install packages required for building mod_pagespeed. diff --git a/install/centos/run_in_chroot.sh b/install/centos/run_in_chroot.sh index de81d8548..a815fbed6 100644 --- a/install/centos/run_in_chroot.sh +++ b/install/centos/run_in_chroot.sh @@ -1,5 +1,19 @@ #!/bin/bash -# Copyright 2016 Google Inc. All Rights Reserved. +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Author: cheesy@google.com (Steve Hill) # # This script emulates the behavior of schroot, which: diff --git a/install/centos/setup_chroot.sh b/install/centos/setup_chroot.sh index b6fc33c02..8411db0e5 100644 --- a/install/centos/setup_chroot.sh +++ b/install/centos/setup_chroot.sh @@ -1,5 +1,19 @@ #!/bin/bash -# Copyright 2016 Google Inc. All Rights Reserved. +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Author: cheesy@google.com (Steve Hill) # # Setup a 32-bit chroot for CentOS. diff --git a/install/clean_slate_for_tests.sh b/install/clean_slate_for_tests.sh index d045eb0b7..c41e4a1f4 100755 --- a/install/clean_slate_for_tests.sh +++ b/install/clean_slate_for_tests.sh @@ -1,5 +1,19 @@ #!/bin/sh # +# Copyright 2012 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Deletes the specified cache directories and the apache log. Note that this # is not necessary or sufficient for purging the cache in a running system, # because it does not affect the in-memory cache, or any external caches like diff --git a/install/find_redis_cluster.sh b/install/find_redis_cluster.sh index 1533bfadc..5c624170c 100644 --- a/install/find_redis_cluster.sh +++ b/install/find_redis_cluster.sh @@ -1,5 +1,19 @@ #!/bin/bash # +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Checks that redis-server and redis-cli exist and supports Redis Cluster. # If $REDIS_SERVER/$REDIS_CLI are not set, defaults them to # redis-server/redis-cli. diff --git a/install/install_apxs.sh b/install/install_apxs.sh index 0497ec788..b464e01d1 100755 --- a/install/install_apxs.sh +++ b/install/install_apxs.sh @@ -1,5 +1,19 @@ #!/bin/bash # +# Copyright 2011 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Install Page Speed, using the Apache apxs tool to determine the # installation locations. # diff --git a/install/install_from_source.sh b/install/install_from_source.sh index 5a460b014..cebba169c 100755 --- a/install/install_from_source.sh +++ b/install/install_from_source.sh @@ -1,5 +1,19 @@ #!/bin/bash -# Copyright 2016 Google Inc. All Rights Reserved. +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Author: cheesy@google.com (Steve Hill) # # Trivial wrapper for shell function that installs a package from source diff --git a/install/opensuse-initd-wrapper.sh b/install/opensuse-initd-wrapper.sh index bf5b7061f..f7fdd7ad3 100755 --- a/install/opensuse-initd-wrapper.sh +++ b/install/opensuse-initd-wrapper.sh @@ -1,4 +1,19 @@ #!/bin/sh +# +# Copyright 2012 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Takes care of conflict in shell vars used by us and system scripts unset APACHE_MODULES /etc/init.d/apache2 $* diff --git a/install/opensuse.sh b/install/opensuse.sh index 807baf754..6cf0bd346 100755 --- a/install/opensuse.sh +++ b/install/opensuse.sh @@ -1,4 +1,19 @@ #!/bin/sh +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + set -x SUFFIX= diff --git a/install/os_redirector.sh b/install/os_redirector.sh index e45ec9ee1..6326e5d93 100755 --- a/install/os_redirector.sh +++ b/install/os_redirector.sh @@ -1,5 +1,19 @@ #!/bin/bash -# Copyright 2016 Google Inc. All Rights Reserved. +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Author: cheesy@google.com (Steve Hill) # # Locate and run the OS-specific version of a PageSpeed setup script. diff --git a/install/prepare_ngx_pagespeed_examples.sh b/install/prepare_ngx_pagespeed_examples.sh index b95653c31..e8d478f29 100755 --- a/install/prepare_ngx_pagespeed_examples.sh +++ b/install/prepare_ngx_pagespeed_examples.sh @@ -1,4 +1,18 @@ #!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # This script prepares ngx_pagespeed_example.tar.gz for ngxpagespeed.com # Usage: diff --git a/install/run_program_with_ext_caches.sh b/install/run_program_with_ext_caches.sh index b044b8741..4ffe8a5a9 100755 --- a/install/run_program_with_ext_caches.sh +++ b/install/run_program_with_ext_caches.sh @@ -1,5 +1,19 @@ #!/bin/bash # +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Starts all external cache servers and sets environment appropriately, then # runs single command in $@. There should be no substitutions in $@, as they may # happen in between starts of different servers. diff --git a/install/run_program_with_memcached.sh b/install/run_program_with_memcached.sh index 724a90a49..28c19e86f 100755 --- a/install/run_program_with_memcached.sh +++ b/install/run_program_with_memcached.sh @@ -1,5 +1,19 @@ #!/bin/bash # +# Copyright 2014 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Checks that that memcached is already installed, and then runs it on # random port with temporary working directory. Port is saved in $MEMCACHED_PORT # env variable. Commands in $@ (e.g. a test binary) are then run and server is diff --git a/install/run_program_with_redis.sh b/install/run_program_with_redis.sh index cf3fe9cbe..3aef23dce 100755 --- a/install/run_program_with_redis.sh +++ b/install/run_program_with_redis.sh @@ -1,5 +1,19 @@ #!/bin/bash # +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Checks that that redis is already installed, and then runs it on # random port with temporary working directory. Port is saved in $REDIS_PORT env # variable. Commands in $@ (e.g. a test binary) are then run and server is then diff --git a/install/run_program_with_redis_cluster.sh b/install/run_program_with_redis_cluster.sh index 54d2a6a38..c06831af0 100755 --- a/install/run_program_with_redis_cluster.sh +++ b/install/run_program_with_redis_cluster.sh @@ -1,5 +1,19 @@ #!/bin/bash # +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Sets up Redis Cluster and runs corresponding unit tests. # TODO(yeputons) it does not know what to do in open-source yet diff --git a/install/run_with_log.sh b/install/run_with_log.sh index 9e8e4b51e..26107d959 100755 --- a/install/run_with_log.sh +++ b/install/run_with_log.sh @@ -1,5 +1,19 @@ #!/bin/bash -# Copyright 2016 Google Inc. All Rights Reserved. +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Author: cheesy@google.com (Steve Hill) # # Trivial wrapper for shell function that writes output to a log. diff --git a/install/shell_utils.sh b/install/shell_utils.sh index f3dd3d7e1..4aedeaeb3 100644 --- a/install/shell_utils.sh +++ b/install/shell_utils.sh @@ -1,4 +1,19 @@ -# Copyright 2011 Google Inc. All Rights Reserved. +#!/bin/bash +# +# Copyright 2011 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Author: sligocki@google.com (Shawn Ligocki) # # Common shell utils. diff --git a/install/start_background_server.sh b/install/start_background_server.sh index f8d83b8ea..a71262c71 100755 --- a/install/start_background_server.sh +++ b/install/start_background_server.sh @@ -1,5 +1,19 @@ #!/bin/bash # +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Helping script which runs arbitrary server process (e.g. memcached or # redis-server) in a temporary directory on random available port. # diff --git a/install/start_php.sh b/install/start_php.sh index dde0fe0fb..6f99e4c62 100755 --- a/install/start_php.sh +++ b/install/start_php.sh @@ -1,4 +1,18 @@ #!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # Starts a php-cgi server on the specified port. If there's already one running # on that port that it looks like it started, kills that one first. diff --git a/install/stop_apache.sh b/install/stop_apache.sh index de040c065..ad1ee0c1d 100755 --- a/install/stop_apache.sh +++ b/install/stop_apache.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2011 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. #!/bin/sh # # Yet Another Attempt (YAA) at robustly stopping Apache. Fun facts: diff --git a/install/stress_test.sh b/install/stress_test.sh index 4e11c2ac2..77bb1c8a4 100755 --- a/install/stress_test.sh +++ b/install/stress_test.sh @@ -1,5 +1,19 @@ #!/bin/bash -# Copyright 2010 Google Inc. All Rights Reserved. +# +# Copyright 2010 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Author: abliss@google.com (Adam Bliss) # # Usage: ./stress_test.sh HOSTPORT diff --git a/install/test_package.sh b/install/test_package.sh index c8e019d01..7304064e3 100755 --- a/install/test_package.sh +++ b/install/test_package.sh @@ -1,5 +1,19 @@ #!/bin/bash -# Copyright 2016 Google Inc. All Rights Reserved. +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Author: cheesy@google.com (Steve Hill) # # Install a mod_pagespeed package and run tests on it. diff --git a/install/ubuntu/build_env.sh b/install/ubuntu/build_env.sh index 635d629d1..41f4eb2cc 100644 --- a/install/ubuntu/build_env.sh +++ b/install/ubuntu/build_env.sh @@ -1,5 +1,19 @@ #!/bin/bash -# Copyright 2016 Google Inc. All Rights Reserved. +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Author: cheesy@google.com (Steve Hill) # # Sets common environment variables requires for building PageSpeed stuff. diff --git a/install/ubuntu/install_mps_package.sh b/install/ubuntu/install_mps_package.sh index 65cd7b826..88da26ab6 100644 --- a/install/ubuntu/install_mps_package.sh +++ b/install/ubuntu/install_mps_package.sh @@ -1,5 +1,19 @@ #!/bin/bash -# Copyright 2016 Google Inc. All Rights Reserved. +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Author: cheesy@google.com (Steve Hill) # # Remove old mod_pagespeed debs and install a new one. diff --git a/install/ubuntu/install_required_packages.sh b/install/ubuntu/install_required_packages.sh index 854738b34..eec01dfaa 100644 --- a/install/ubuntu/install_required_packages.sh +++ b/install/ubuntu/install_required_packages.sh @@ -1,5 +1,19 @@ #!/bin/bash -# Copyright 2016 Google Inc. All Rights Reserved. +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Author: cheesy@google.com (Steve Hill) # # Install packages required for building mod_pagespeed. diff --git a/install/ubuntu/run_in_chroot.sh b/install/ubuntu/run_in_chroot.sh index 3a4d60754..3c5879b1a 100644 --- a/install/ubuntu/run_in_chroot.sh +++ b/install/ubuntu/run_in_chroot.sh @@ -1,5 +1,19 @@ #!/bin/sh -# Copyright 2016 Google Inc. All Rights Reserved. +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Author: cheesy@google.com (Steve Hill) # # Run a single command in a chroot via schroot. diff --git a/install/ubuntu/setup_chroot.sh b/install/ubuntu/setup_chroot.sh index 766b7d7fb..659ac57af 100644 --- a/install/ubuntu/setup_chroot.sh +++ b/install/ubuntu/setup_chroot.sh @@ -1,5 +1,19 @@ #!/bin/bash -# Copyright 2016 Google Inc. All Rights Reserved. +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Author: cheesy@google.com (Steve Hill) # # Setup a 32-bit chroot for Ubuntu. diff --git a/install/verify_nginx_release.sh b/install/verify_nginx_release.sh index 1d65fda8e..9c79b9fe8 100755 --- a/install/verify_nginx_release.sh +++ b/install/verify_nginx_release.sh @@ -1,5 +1,19 @@ #!/bin/sh # +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Checks that an nginx release builds and passes tests. This ensures that the # PSOL tarball is good, and that it's compatible with the nginx code we intend # to release. diff --git a/net/instaweb/http/http_response_parser_test.cc b/net/instaweb/http/http_response_parser_test.cc index 98e8c616d..aafdc3424 100644 --- a/net/instaweb/http/http_response_parser_test.cc +++ b/net/instaweb/http/http_response_parser_test.cc @@ -1,4 +1,17 @@ -// Copyright 2010 and onwards Google Inc. +// Copyright 2010 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// // Author: jmarantz@google.com (Joshua Marantz) #include "net/instaweb/http/public/http_response_parser.h" diff --git a/net/instaweb/rewriter/css_move_to_head_filter_test.cc b/net/instaweb/rewriter/css_move_to_head_filter_test.cc index 1501f9799..dd59a4e8b 100644 --- a/net/instaweb/rewriter/css_move_to_head_filter_test.cc +++ b/net/instaweb/rewriter/css_move_to_head_filter_test.cc @@ -1,4 +1,17 @@ -// Copyright 2010 Google Inc. All Rights Reserved. +// Copyright 2010 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// // Author: sligocki@google.com (Shawn Ligocki) #include "net/instaweb/rewriter/public/css_move_to_head_filter.h" diff --git a/net/instaweb/rewriter/css_url_counter.cc b/net/instaweb/rewriter/css_url_counter.cc index acbcb0069..f0e56cba9 100644 --- a/net/instaweb/rewriter/css_url_counter.cc +++ b/net/instaweb/rewriter/css_url_counter.cc @@ -1,4 +1,17 @@ -// Copyright 2012 Google Inc. All Rights Reserved. +// Copyright 2012 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// // Author: sligocki@google.com (Shawn Ligocki) #include "net/instaweb/rewriter/public/css_url_counter.h" diff --git a/net/instaweb/rewriter/css_url_extractor.cc b/net/instaweb/rewriter/css_url_extractor.cc index 01d667d14..397ba6de9 100644 --- a/net/instaweb/rewriter/css_url_extractor.cc +++ b/net/instaweb/rewriter/css_url_extractor.cc @@ -1,4 +1,17 @@ -// Copyright 2013 Google Inc. All Rights Reserved. +// Copyright 2013 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// // Author: mpalem@google.com (Maya Palem) #include "net/instaweb/rewriter/public/css_url_extractor.h" diff --git a/net/instaweb/rewriter/html_minifier_main.cc b/net/instaweb/rewriter/html_minifier_main.cc index cce6bf9a1..91c489ab1 100644 --- a/net/instaweb/rewriter/html_minifier_main.cc +++ b/net/instaweb/rewriter/html_minifier_main.cc @@ -1,4 +1,17 @@ -// Copyright 2010 Google Inc. All Rights Reserved. +// Copyright 2010 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// // Author: bmcquade@google.com (Bryan McQuade) // // Simple HTML minifier, based on pagespeed's minify_html.cc diff --git a/net/instaweb/rewriter/mock_resource_callback.cc b/net/instaweb/rewriter/mock_resource_callback.cc index df2d7f898..d153423c2 100644 --- a/net/instaweb/rewriter/mock_resource_callback.cc +++ b/net/instaweb/rewriter/mock_resource_callback.cc @@ -1,4 +1,17 @@ -// Copyright 2011 Google Inc. All Rights Reserved. +// Copyright 2011 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// // Author: sligocki@google.com (Shawn Ligocki) #include "net/instaweb/rewriter/public/mock_resource_callback.h" diff --git a/pagespeed/apache/gzip_test.sh b/pagespeed/apache/gzip_test.sh index d4720f87a..252b308c9 100755 --- a/pagespeed/apache/gzip_test.sh +++ b/pagespeed/apache/gzip_test.sh @@ -1,5 +1,19 @@ #!/bin/bash -# Copyright 2010 Google Inc. All Rights Reserved. +# +# Copyright 2010 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Author: morlovich@google.com (Maks Orlovich) # # Runs the measurement proxy tests. This is isolated in a separate file diff --git a/pagespeed/apache/mock_apache.cc b/pagespeed/apache/mock_apache.cc index d426dade5..f7ad334d3 100644 --- a/pagespeed/apache/mock_apache.cc +++ b/pagespeed/apache/mock_apache.cc @@ -1,3 +1,18 @@ +// Copyright 2016 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Author: jefftk@google.com (Jeff Kaufman) #include "pagespeed/apache/mock_apache.h" #include diff --git a/pagespeed/apache/process_scope_test.sh b/pagespeed/apache/process_scope_test.sh index 536ce350c..cc678a60b 100755 --- a/pagespeed/apache/process_scope_test.sh +++ b/pagespeed/apache/process_scope_test.sh @@ -1,5 +1,19 @@ #!/bin/bash -# Copyright 2010 Google Inc. All Rights Reserved. +# +# Copyright 2010 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Author: morlovich@google.com (Maks Orlovich) # # Runs apache process-scope tests. Note that the config required for this test diff --git a/pagespeed/apache/system_test.sh b/pagespeed/apache/system_test.sh index 9fe3e1872..48a4a906e 100755 --- a/pagespeed/apache/system_test.sh +++ b/pagespeed/apache/system_test.sh @@ -1,5 +1,19 @@ #!/bin/bash -# Copyright 2010 Google Inc. All Rights Reserved. +# +# Copyright 2010 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Author: abliss@google.com (Adam Bliss) # # Runs all Apache-specific and general system tests. diff --git a/pagespeed/apache/system_tests/beacons_load.sh b/pagespeed/apache/system_tests/beacons_load.sh index 0b5987813..ed96d721b 100644 --- a/pagespeed/apache/system_tests/beacons_load.sh +++ b/pagespeed/apache/system_tests/beacons_load.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2012 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # This is dependent upon having a beacon handler. test_filter add_instrumentation beacons load. OUT=$($CURL -sSi $PRIMARY_SERVER/$BEACON_HANDLER?ets=load:13) diff --git a/pagespeed/apache/system_tests/blocking_rewrite.sh b/pagespeed/apache/system_tests/blocking_rewrite.sh index 319e6f7df..e412f116c 100644 --- a/pagespeed/apache/system_tests/blocking_rewrite.sh +++ b/pagespeed/apache/system_tests/blocking_rewrite.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2013 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. if [ "${FIRST_RUN:-}" = "true" ]; then # Likewise, blocking rewrite tests are only run once. start_test Blocking rewrite enabled. diff --git a/pagespeed/apache/system_tests/cache_flushing.sh b/pagespeed/apache/system_tests/cache_flushing.sh index 27ad68be6..272946102 100644 --- a/pagespeed/apache/system_tests/cache_flushing.sh +++ b/pagespeed/apache/system_tests/cache_flushing.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test Cache flushing works by touching cache.flush in cache directory. # If we write fixed values into the css file here, there is a risk that diff --git a/pagespeed/apache/system_tests/compressed_cache.sh b/pagespeed/apache/system_tests/compressed_cache.sh index c48c1349a..cfc3e58e6 100644 --- a/pagespeed/apache/system_tests/compressed_cache.sh +++ b/pagespeed/apache/system_tests/compressed_cache.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. function scrape_secondary_stat { http_proxy=$SECONDARY_HOSTNAME $WGET_DUMP \ "$SECONDARY_ROOT/mod_pagespeed_statistics/" | \ diff --git a/pagespeed/apache/system_tests/connection_refused.sh b/pagespeed/apache/system_tests/connection_refused.sh index d99f3665d..c372d72fb 100644 --- a/pagespeed/apache/system_tests/connection_refused.sh +++ b/pagespeed/apache/system_tests/connection_refused.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # connection_refused.html references modpagespeed.com:1023/someimage.png. # mod_pagespeed will attempt to connect to that host and port to fetch the # input resource using serf. We expect the connection to be refused. Relies diff --git a/pagespeed/apache/system_tests/content_encoding_leak.sh b/pagespeed/apache/system_tests/content_encoding_leak.sh index 6c2cf4a64..e16d598b8 100644 --- a/pagespeed/apache/system_tests/content_encoding_leak.sh +++ b/pagespeed/apache/system_tests/content_encoding_leak.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # Regression test for a bug we used to have; a leak on nonsense # Content-Encoding. This will not trigger immediately, but at process exit. diff --git a/pagespeed/apache/system_tests/custom_fetch_headers.sh b/pagespeed/apache/system_tests/custom_fetch_headers.sh index d405a15b6..ac093f60b 100644 --- a/pagespeed/apache/system_tests/custom_fetch_headers.sh +++ b/pagespeed/apache/system_tests/custom_fetch_headers.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test Send custom fetch headers on resource re-fetches. PLAIN_HEADER="header=value" X_OTHER_HEADER="x-other=False" diff --git a/pagespeed/apache/system_tests/encoded_absolute_urls.sh b/pagespeed/apache/system_tests/encoded_absolute_urls.sh index 84739b403..6ce463702 100644 --- a/pagespeed/apache/system_tests/encoded_absolute_urls.sh +++ b/pagespeed/apache/system_tests/encoded_absolute_urls.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test Encoded absolute urls are not respected HOST_NAME="http://absolute-urls.example.com" diff --git a/pagespeed/apache/system_tests/fetch_gzipped.sh b/pagespeed/apache/system_tests/fetch_gzipped.sh index 9916d7cac..bf17ba70b 100644 --- a/pagespeed/apache/system_tests/fetch_gzipped.sh +++ b/pagespeed/apache/system_tests/fetch_gzipped.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test Fetch gzipped, make sure that we have cache compressed at gzip 9. URL="$PRIMARY_SERVER/mod_pagespeed_test/invalid.css" fetch_until -gzip $URL "wc -c" 27 diff --git a/pagespeed/apache/system_tests/forbid_all_disabled.sh b/pagespeed/apache/system_tests/forbid_all_disabled.sh index 19390efbf..af6daee3b 100644 --- a/pagespeed/apache/system_tests/forbid_all_disabled.sh +++ b/pagespeed/apache/system_tests/forbid_all_disabled.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # Test ForbidAllDisabledFilters, which is set in config for # /mod_pagespeed_test/forbid_all_disabled/disabled/ where we've disabled # remove_quotes, remove_comments, and collapse_whitespace (which are enabled diff --git a/pagespeed/apache/system_tests/handler_quoting.sh b/pagespeed/apache/system_tests/handler_quoting.sh index e45bcdcfc..ed38c1580 100644 --- a/pagespeed/apache/system_tests/handler_quoting.sh +++ b/pagespeed/apache/system_tests/handler_quoting.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # None of these tests apply to nginx because it doesn't echo back urls or log # them in these cases. diff --git a/pagespeed/apache/system_tests/htaccess_override.sh b/pagespeed/apache/system_tests/htaccess_override.sh index 2ec17dbfc..684770c7c 100644 --- a/pagespeed/apache/system_tests/htaccess_override.sh +++ b/pagespeed/apache/system_tests/htaccess_override.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test Make sure Disallow/Allow overrides work in htaccess hierarchies DISALLOWED=$($WGET_DUMP "$TEST_ROOT"/htaccess/purple.css) check_from "$DISALLOWED" fgrep -q MediumPurple diff --git a/pagespeed/apache/system_tests/if_parsing.sh b/pagespeed/apache/system_tests/if_parsing.sh index 4874b6d23..1ee27d1ea 100644 --- a/pagespeed/apache/system_tests/if_parsing.sh +++ b/pagespeed/apache/system_tests/if_parsing.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test If parsing # $STATISTICS_URL ends in ?ModPagespeed=off, so we need & for now. # If we remove the query from $STATISTICS_URL, s/&/?/. diff --git a/pagespeed/apache/system_tests/index_html_handling.sh b/pagespeed/apache/system_tests/index_html_handling.sh index 4acfac17b..5d7549de8 100644 --- a/pagespeed/apache/system_tests/index_html_handling.sh +++ b/pagespeed/apache/system_tests/index_html_handling.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # This tests whether fetching "/" gets you "/index.html". With async # rewriting, it is not deterministic whether inline css gets # rewritten. That's not what this is trying to test, so we use diff --git a/pagespeed/apache/system_tests/inline_google_font_css.sh b/pagespeed/apache/system_tests/inline_google_font_css.sh index cbb00e75f..13c579103 100644 --- a/pagespeed/apache/system_tests/inline_google_font_css.sh +++ b/pagespeed/apache/system_tests/inline_google_font_css.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. if ! "$SKIP_EXTERNAL_RESOURCE_TESTS"; then start_test inline_google_font_css before move_to_head and move_above_scripts URL="$TEST_ROOT/move_font_css_to_head.html" diff --git a/pagespeed/apache/system_tests/loopback.sh b/pagespeed/apache/system_tests/loopback.sh index 963952ec5..f866e4028 100644 --- a/pagespeed/apache/system_tests/loopback.sh +++ b/pagespeed/apache/system_tests/loopback.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # Test that loopback route fetcher works with vhosts not listening on # 127.0.0.1 Only run this during CACHE_FLUSH_TEST as that is when # APACHE_TERTIARY_PORT is set. diff --git a/pagespeed/apache/system_tests/map_proxy_domain_for_cdn.sh b/pagespeed/apache/system_tests/map_proxy_domain_for_cdn.sh index c961ea37f..f8634f59a 100644 --- a/pagespeed/apache/system_tests/map_proxy_domain_for_cdn.sh +++ b/pagespeed/apache/system_tests/map_proxy_domain_for_cdn.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test MapProxyDomain for CDN setup # Test transitive ProxyMapDomain. In this mode we have three hosts: cdn, # proxy, and origin. Proxy runs MPS and fetches resources from origin, diff --git a/pagespeed/apache/system_tests/max_html_parse_bytes.sh b/pagespeed/apache/system_tests/max_html_parse_bytes.sh index d8a5420bd..474ebddc6 100644 --- a/pagespeed/apache/system_tests/max_html_parse_bytes.sh +++ b/pagespeed/apache/system_tests/max_html_parse_bytes.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test When ModPagespeedMaxHtmlParseBytes is not set, we do not insert \ a redirect. OUT=$(http_proxy=$SECONDARY_HOSTNAME $WGET_DUMP \ diff --git a/pagespeed/apache/system_tests/mod_pagespeed_message.sh b/pagespeed/apache/system_tests/mod_pagespeed_message.sh index b1bf252c9..d1ada2dfb 100644 --- a/pagespeed/apache/system_tests/mod_pagespeed_message.sh +++ b/pagespeed/apache/system_tests/mod_pagespeed_message.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # Note: There is a similar test in system_test.sh # Test /mod_pagespeed_message exists. start_test Check if /mod_pagespeed_message page exists. diff --git a/pagespeed/apache/system_tests/mod_rewrite.sh b/pagespeed/apache/system_tests/mod_rewrite.sh index 04e7b8999..57f02a4ff 100644 --- a/pagespeed/apache/system_tests/mod_rewrite.sh +++ b/pagespeed/apache/system_tests/mod_rewrite.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test mod_rewrite check $WGET_DUMP $TEST_ROOT/redirect/php/ -O $OUTDIR/redirect_php.html check \ diff --git a/pagespeed/apache/system_tests/pagespeed_admin.sh b/pagespeed/apache/system_tests/pagespeed_admin.sh index cca911f65..1a986b0b5 100644 --- a/pagespeed/apache/system_tests/pagespeed_admin.sh +++ b/pagespeed/apache/system_tests/pagespeed_admin.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # Check all the pagespeed_admin pages, both in its default location and an # alternate. start_test pagespeed_admin and alternate_admin_path diff --git a/pagespeed/apache/system_tests/pass_through_headers.sh b/pagespeed/apache/system_tests/pass_through_headers.sh index 243ea9942..222039c60 100644 --- a/pagespeed/apache/system_tests/pass_through_headers.sh +++ b/pagespeed/apache/system_tests/pass_through_headers.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test Pass through headers when Cache-Control is set early on HTML. http_proxy=$SECONDARY_HOSTNAME $WGET_DUMP \ http://issue809.example.com/mod_pagespeed_example/index.html \ diff --git a/pagespeed/apache/system_tests/proxying.sh b/pagespeed/apache/system_tests/proxying.sh index 0567691fb..116213fd5 100644 --- a/pagespeed/apache/system_tests/proxying.sh +++ b/pagespeed/apache/system_tests/proxying.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test Issue 609 -- proxying non-.pagespeed content, and caching it locally URL="$PRIMARY_SERVER/modpagespeed_http/not_really_a_font.woff" echo $WGET_DUMP $URL .... diff --git a/pagespeed/apache/system_tests/purging_disabled.sh b/pagespeed/apache/system_tests/purging_disabled.sh index 671070cbd..ec8818b6e 100644 --- a/pagespeed/apache/system_tests/purging_disabled.sh +++ b/pagespeed/apache/system_tests/purging_disabled.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test Base config has purging disabled. Check error message syntax. OUT=$($WGET_DUMP "$HOSTNAME/pagespeed_admin/cache?purge=*") check_from "$OUT" fgrep -q "ModPagespeedEnableCachePurge on" diff --git a/pagespeed/apache/system_tests/response_headers.sh b/pagespeed/apache/system_tests/response_headers.sh index c0b2a1914..72cb87b68 100644 --- a/pagespeed/apache/system_tests/response_headers.sh +++ b/pagespeed/apache/system_tests/response_headers.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test Request Headers affect MPS options # Get the special file response_headers.html and test the result. diff --git a/pagespeed/apache/system_tests/statistics.sh b/pagespeed/apache/system_tests/statistics.sh index 7e0c82449..2d8c7b6de 100644 --- a/pagespeed/apache/system_tests/statistics.sh +++ b/pagespeed/apache/system_tests/statistics.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # Determine whether statistics are enabled or not. If not, don't test them, # but do an additional regression test that tries harder to get a cache miss. if [ $statistics_enabled = "1" ]; then diff --git a/pagespeed/apache/system_tests/statistics_logging.sh b/pagespeed/apache/system_tests/statistics_logging.sh index ede2a0671..44b678ada 100644 --- a/pagespeed/apache/system_tests/statistics_logging.sh +++ b/pagespeed/apache/system_tests/statistics_logging.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test Statistics logging works. check ls $MOD_PAGESPEED_STATS_LOG check [ $(grep "timestamp: " $MOD_PAGESPEED_STATS_LOG | wc -l) -ge 1 ] diff --git a/pagespeed/apache/system_tests/unload_handler.sh b/pagespeed/apache/system_tests/unload_handler.sh index 4b32d8d17..00fc87c6e 100644 --- a/pagespeed/apache/system_tests/unload_handler.sh +++ b/pagespeed/apache/system_tests/unload_handler.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test add_instrumentation has added unload handler with \ ModPagespeedReportUnloadTime enabled in APACHE_SECONDARY_PORT. URL="$SECONDARY_TEST_ROOT/add_instrumentation.html\ diff --git a/pagespeed/apache/system_tests/unplugged.sh b/pagespeed/apache/system_tests/unplugged.sh index 65629b167..9d2cf6a27 100644 --- a/pagespeed/apache/system_tests/unplugged.sh +++ b/pagespeed/apache/system_tests/unplugged.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test PageSpeed Unplugged and Off SPROXY="http://localhost:$APACHE_SECONDARY_PORT" VHOST_MPS_OFF="http://mpsoff.example.com" diff --git a/pagespeed/apache/system_tests/vhost_inheritance.sh b/pagespeed/apache/system_tests/vhost_inheritance.sh index 1fb513691..608e1cfea 100644 --- a/pagespeed/apache/system_tests/vhost_inheritance.sh +++ b/pagespeed/apache/system_tests/vhost_inheritance.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test vhost inheritance works echo $WGET_DUMP $SECONDARY_CONFIG_URL SECONDARY_CONFIG=$($WGET_DUMP $SECONDARY_CONFIG_URL) diff --git a/pagespeed/apache/system_tests/x_forwarded_proto.sh b/pagespeed/apache/system_tests/x_forwarded_proto.sh index 1972084f6..88d2ad329 100644 --- a/pagespeed/apache/system_tests/x_forwarded_proto.sh +++ b/pagespeed/apache/system_tests/x_forwarded_proto.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test Respect X-Forwarded-Proto when told to FETCHED=$OUTDIR/x_forwarded_proto URL=$TEST_ROOT/?PageSpeedFilters=add_base_tag diff --git a/pagespeed/automatic/system_test.sh b/pagespeed/automatic/system_test.sh index 8e88bc050..46419d494 100755 --- a/pagespeed/automatic/system_test.sh +++ b/pagespeed/automatic/system_test.sh @@ -1,5 +1,19 @@ #!/bin/bash -# Copyright 2010 Google Inc. All Rights Reserved. +# +# Copyright 2010 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Author: abliss@google.com (Adam Bliss) # # Generic system test, which should work on any implementation of Page Speed diff --git a/pagespeed/automatic/system_test_helpers.sh b/pagespeed/automatic/system_test_helpers.sh index 8908d3406..db6845f33 100644 --- a/pagespeed/automatic/system_test_helpers.sh +++ b/pagespeed/automatic/system_test_helpers.sh @@ -1,6 +1,19 @@ #!/bin/bash # -# Copyright 2012 Google Inc. All Rights Reserved. +# Copyright 2012 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Author: jefftk@google.com (Jeff Kaufman) # # Set up variables and functions for use by various system tests. diff --git a/pagespeed/automatic/system_tests/add_instrumentation.sh b/pagespeed/automatic/system_tests/add_instrumentation.sh index cab831696..a95df609b 100644 --- a/pagespeed/automatic/system_tests/add_instrumentation.sh +++ b/pagespeed/automatic/system_tests/add_instrumentation.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. test_filter add_instrumentation adds 2 script tags check run_wget_with_args $URL # Counts occurances of ' diff --git a/pagespeed/system/external_server_spec.h b/pagespeed/system/external_server_spec.h index fcbbb4def..f881f632a 100644 --- a/pagespeed/system/external_server_spec.h +++ b/pagespeed/system/external_server_spec.h @@ -1,3 +1,19 @@ +/* + * Copyright 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Author: yeputons@google.com (Egor Suvorov) #ifndef PAGESPEED_SYSTEM_EXTERNAL_SERVER_SPEC_H_ #define PAGESPEED_SYSTEM_EXTERNAL_SERVER_SPEC_H_ diff --git a/pagespeed/system/external_server_spec_test.cc b/pagespeed/system/external_server_spec_test.cc index 3d8537e3b..bf7e96fd5 100644 --- a/pagespeed/system/external_server_spec_test.cc +++ b/pagespeed/system/external_server_spec_test.cc @@ -1,6 +1,20 @@ +// Copyright 2016 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Author: yeputons@google.com (Egor Suvorov) #include "pagespeed/system/external_server_spec.h" - #include "pagespeed/kernel/base/gtest.h" namespace net_instaweb { diff --git a/pagespeed/system/pathological_server.py b/pagespeed/system/pathological_server.py index c6fb73957..1e74c00ad 100755 --- a/pagespeed/system/pathological_server.py +++ b/pagespeed/system/pathological_server.py @@ -1,4 +1,18 @@ #!/usr/bin/python +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. """Simple python server for testing remote_config in tricky situations. Usage: diff --git a/pagespeed/system/remote_config_test.sh b/pagespeed/system/remote_config_test.sh index 68f8fcf0e..1e7c9cda8 100755 --- a/pagespeed/system/remote_config_test.sh +++ b/pagespeed/system/remote_config_test.sh @@ -1,5 +1,19 @@ #!/bin/bash # +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Run the remote config tests. # # We need to know the directory this file is located in. Unfortunately, diff --git a/pagespeed/system/system_test.sh b/pagespeed/system/system_test.sh index db04e5495..f5197599f 100755 --- a/pagespeed/system/system_test.sh +++ b/pagespeed/system/system_test.sh @@ -1,5 +1,19 @@ #!/bin/bash # +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Runs system tests for system/ and automatic/. # # See automatic/system_test_helpers.sh for usage. diff --git a/pagespeed/system/system_tests/add_instrumentation.sh b/pagespeed/system/system_tests/add_instrumentation.sh index ef39bbb7a..6c858d2ff 100644 --- a/pagespeed/system/system_tests/add_instrumentation.sh +++ b/pagespeed/system/system_tests/add_instrumentation.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test HTML add_instrumentation CDATA $WGET -O $WGET_OUTPUT $TEST_ROOT/add_instrumentation.html\ ?PageSpeedFilters=add_instrumentation diff --git a/pagespeed/system/system_tests/add_resource_headers.sh b/pagespeed/system/system_tests/add_resource_headers.sh index d2a0f15e9..07c0bc7fa 100644 --- a/pagespeed/system/system_tests/add_resource_headers.sh +++ b/pagespeed/system/system_tests/add_resource_headers.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test AddResourceHeaders works for pagespeed resources. URL="$TEST_ROOT/compressed/hello_js.custom_ext.pagespeed.ce.HdziXmtLIV.txt" fetch_until -save "$URL" 'fgrep -c text/javascript' 1 --save-headers diff --git a/pagespeed/system/system_tests/ajax_overrides_experiments.sh b/pagespeed/system/system_tests/ajax_overrides_experiments.sh index cc1b3d7b6..c502690d8 100644 --- a/pagespeed/system/system_tests/ajax_overrides_experiments.sh +++ b/pagespeed/system/system_tests/ajax_overrides_experiments.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test Ajax overrides experiments # Normally, we expect this less HTML file to have a added diff --git a/pagespeed/system/system_tests/aris.sh b/pagespeed/system/system_tests/aris.sh index c48d2a68d..9483f3e18 100644 --- a/pagespeed/system/system_tests/aris.sh +++ b/pagespeed/system/system_tests/aris.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test aris disables js inlining for introspective js and only i-js URL="$TEST_ROOT/avoid_renaming_introspective_javascript__on/" URL+="?PageSpeedFilters=inline_javascript" diff --git a/pagespeed/system/system_tests/authorization_basic.sh b/pagespeed/system/system_tests/authorization_basic.sh index 8a749cd71..46cbd9cd7 100644 --- a/pagespeed/system/system_tests/authorization_basic.sh +++ b/pagespeed/system/system_tests/authorization_basic.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test authorized resources do not get cached and optimized. URL="$TEST_ROOT/auth/medium_purple.css" AUTH="Authorization:Basic dXNlcjE6cGFzc3dvcmQ=" diff --git a/pagespeed/system/system_tests/bad_query_params_and_headers.sh b/pagespeed/system/system_tests/bad_query_params_and_headers.sh index 5f9ee2ad5..aedd2646b 100644 --- a/pagespeed/system/system_tests/bad_query_params_and_headers.sh +++ b/pagespeed/system/system_tests/bad_query_params_and_headers.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test Accept bad query params and headers # The examples page should have this EXPECTED_EXAMPLES_TEXT on it. diff --git a/pagespeed/system/system_tests/broken_fetch_ipro_record.sh b/pagespeed/system/system_tests/broken_fetch_ipro_record.sh index e86b2a163..7cfd4e906 100644 --- a/pagespeed/system/system_tests/broken_fetch_ipro_record.sh +++ b/pagespeed/system/system_tests/broken_fetch_ipro_record.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test Broken fetches with ipro-recording 404 after cache flush. # Note that failed cached results from an earlier run can disturb this diff --git a/pagespeed/system/system_tests/cache_compression_pre_gzipping.sh b/pagespeed/system/system_tests/cache_compression_pre_gzipping.sh index f44037da8..3118f531b 100644 --- a/pagespeed/system/system_tests/cache_compression_pre_gzipping.sh +++ b/pagespeed/system/system_tests/cache_compression_pre_gzipping.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. function php_ipro_record() { local url="$1" local max_cache_bytes="$2" diff --git a/pagespeed/system/system_tests/cache_partial_html.sh b/pagespeed/system/system_tests/cache_partial_html.sh index 4af266818..e2cecd3dc 100644 --- a/pagespeed/system/system_tests/cache_partial_html.sh +++ b/pagespeed/system/system_tests/cache_partial_html.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test cache_partial_html enabled has no effect $WGET -O $WGET_OUTPUT $TEST_ROOT/add_instrumentation.html\ ?PageSpeedFilters=cache_partial_html diff --git a/pagespeed/system/system_tests/cache_purge.sh b/pagespeed/system/system_tests/cache_purge.sh index ccfb61a75..c0d52f676 100644 --- a/pagespeed/system/system_tests/cache_purge.sh +++ b/pagespeed/system/system_tests/cache_purge.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test Cache purge test cache_purge_test http://purge.example.com diff --git a/pagespeed/system/system_tests/check_headers.sh b/pagespeed/system/system_tests/check_headers.sh index 6ec46d40a..ab8b8c4cb 100644 --- a/pagespeed/system/system_tests/check_headers.sh +++ b/pagespeed/system/system_tests/check_headers.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test Check for correct default pagespeed header format. # This will be X-Page-Speed in nginx and X-ModPagespeed in apache. Accept both. OUT=$($WGET_DUMP $EXAMPLE_ROOT/combine_css.html) diff --git a/pagespeed/system/system_tests/client_domain_rewrite.sh b/pagespeed/system/system_tests/client_domain_rewrite.sh index b5ca56cb5..3e0041bab 100644 --- a/pagespeed/system/system_tests/client_domain_rewrite.sh +++ b/pagespeed/system/system_tests/client_domain_rewrite.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # This test checks that the ClientDomainRewrite directive can turn on. start_test ClientDomainRewrite on directive HOST_NAME="http://client-domain-rewrite.example.com" diff --git a/pagespeed/system/system_tests/combine_javascript.sh b/pagespeed/system/system_tests/combine_javascript.sh index 49a3b7516..2c92ed1c0 100644 --- a/pagespeed/system/system_tests/combine_javascript.sh +++ b/pagespeed/system/system_tests/combine_javascript.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. test_filter combine_javascript combines 2 JS files into 1. start_test combine_javascript with long URL still works URL=$TEST_ROOT/combine_js_very_many.html?PageSpeedFilters=combine_javascript diff --git a/pagespeed/system/system_tests/controller.sh b/pagespeed/system/system_tests/controller.sh index 72c83e8a0..1e540209a 100644 --- a/pagespeed/system/system_tests/controller.sh +++ b/pagespeed/system/system_tests/controller.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test IPRO requests are routed through the controller API STATS=$OUTDIR/controller_stats diff --git a/pagespeed/system/system_tests/controller_process_handling.sh b/pagespeed/system/system_tests/controller_process_handling.sh index 164a10cef..4167467cf 100644 --- a/pagespeed/system/system_tests/controller_process_handling.sh +++ b/pagespeed/system/system_tests/controller_process_handling.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. function get_controller_pid() { grep "Controller running with PID " $ERROR_LOG | tail -n 1 | awk '{print $NF}' } diff --git a/pagespeed/system/system_tests/critical_image_beaconing.sh b/pagespeed/system/system_tests/critical_image_beaconing.sh index 000fcab2f..0abead19a 100644 --- a/pagespeed/system/system_tests/critical_image_beaconing.sh +++ b/pagespeed/system/system_tests/critical_image_beaconing.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # Verify that we can send a critical image beacon and that lazyload_images # does not try to lazyload the critical images. start_test lazyload_images,rewrite_images with critical images beacon diff --git a/pagespeed/system/system_tests/cross_site_fetch.sh b/pagespeed/system/system_tests/cross_site_fetch.sh index 54b3304b4..c330aa89f 100644 --- a/pagespeed/system/system_tests/cross_site_fetch.sh +++ b/pagespeed/system/system_tests/cross_site_fetch.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # Test lying host headers for cross-site fetch. This should fetch from localhost # and therefore succeed. start_test Lying host headers for cross-site fetch diff --git a/pagespeed/system/system_tests/css_combining_authorization.sh b/pagespeed/system/system_tests/css_combining_authorization.sh index 8b33e74a0..f1dca8a88 100644 --- a/pagespeed/system/system_tests/css_combining_authorization.sh +++ b/pagespeed/system/system_tests/css_combining_authorization.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test can combine css with authorized ids only URL="$TEST_ROOT/combine_css_with_ids.html?PageSpeedFilters=combine_css" # Test big.css and bold.css are combined, but not yellow.css or blue.css. diff --git a/pagespeed/system/system_tests/domain_rewrite_hyperlinks.sh b/pagespeed/system/system_tests/domain_rewrite_hyperlinks.sh index fb7d9f887..48e96b861 100644 --- a/pagespeed/system/system_tests/domain_rewrite_hyperlinks.sh +++ b/pagespeed/system/system_tests/domain_rewrite_hyperlinks.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # This test checks that the DomainRewriteHyperlinks directive # can turn off. See mod_pagespeed_test/rewrite_domains.html: it has # one URL, one
URL, and one url, all referencing diff --git a/pagespeed/system/system_tests/downstream_cache_integration_headers.sh b/pagespeed/system/system_tests/downstream_cache_integration_headers.sh index 973175198..222974cd1 100644 --- a/pagespeed/system/system_tests/downstream_cache_integration_headers.sh +++ b/pagespeed/system/system_tests/downstream_cache_integration_headers.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test Downstream cache integration caching headers. URL="http://downstreamcacheresource.example.com/mod_pagespeed_example/images/" URL+="xCuppa.png.pagespeed.ic.0.png" diff --git a/pagespeed/system/system_tests/downstream_cache_rebeaconing.sh b/pagespeed/system/system_tests/downstream_cache_rebeaconing.sh index 95e01f133..ed89269d0 100644 --- a/pagespeed/system/system_tests/downstream_cache_rebeaconing.sh +++ b/pagespeed/system/system_tests/downstream_cache_rebeaconing.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # Verify that downstream caches and rebeaconing interact correctly for images. start_test lazyload_images,rewrite_images with downstream cache rebeaconing HOST_NAME="http://downstreamcacherebeacon.example.com" diff --git a/pagespeed/system/system_tests/embed_config.sh b/pagespeed/system/system_tests/embed_config.sh index 7eab19995..7d3e46183 100644 --- a/pagespeed/system/system_tests/embed_config.sh +++ b/pagespeed/system/system_tests/embed_config.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test Embed image configuration in rewritten image URL. # The embedded configuration is placed between the "pagespeed" and "ic", e.g. # *xPuzzle.jpg.pagespeed.gp+jp+pj+js+rj+rp+rw+ri+cp+md+iq=73.ic.oFXPiLYMka.jpg diff --git a/pagespeed/system/system_tests/experiment_device_types.sh b/pagespeed/system/system_tests/experiment_device_types.sh index e67846465..339a61a72 100644 --- a/pagespeed/system/system_tests/experiment_device_types.sh +++ b/pagespeed/system/system_tests/experiment_device_types.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. readonly EXP_DEVICES_EXAMPLE="http://experiment.devicematch.example.com/mod_pagespeed_example" readonly EXP_DEVICES_EXTEND_CACHE="$EXP_DEVICES_EXAMPLE/extend_cache.html" diff --git a/pagespeed/system/system_tests/flush_handling.sh b/pagespeed/system/system_tests/flush_handling.sh index 5bd310352..ff67d966c 100644 --- a/pagespeed/system/system_tests/flush_handling.sh +++ b/pagespeed/system/system_tests/flush_handling.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # Test our handling of headers when a FLUSH event occurs, using PHP. # Tests that require PHP can be disabled by setting DISABLE_PHP_TESTS to # non-empty, to cater to admins who don't want PHP installed. diff --git a/pagespeed/system/system_tests/flush_subresources.sh b/pagespeed/system/system_tests/flush_subresources.sh index da7235630..03611c240 100644 --- a/pagespeed/system/system_tests/flush_subresources.sh +++ b/pagespeed/system/system_tests/flush_subresources.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test flush_subresources rewriter is not applied URL="$TEST_ROOT/flush_subresources.html?\ PageSpeedFilters=flush_subresources,extend_cache_css,\ diff --git a/pagespeed/system/system_tests/forbid_filters.sh b/pagespeed/system/system_tests/forbid_filters.sh index 123036ca1..aa881fdd3 100644 --- a/pagespeed/system/system_tests/forbid_filters.sh +++ b/pagespeed/system/system_tests/forbid_filters.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # Test ForbidFilters, which is set in the config for the VHost # forbidden.example.com, where we've forbidden remove_quotes, remove_comments, # collapse_whitespace, rewrite_css, and resize_images; we've also disabled diff --git a/pagespeed/system/system_tests/handler_access_messages.sh b/pagespeed/system/system_tests/handler_access_messages.sh index a1ae53f75..29c3a478f 100644 --- a/pagespeed/system/system_tests/handler_access_messages.sh +++ b/pagespeed/system/system_tests/handler_access_messages.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test Handler access restrictions function expect_handler() { local host_prefix="$1" diff --git a/pagespeed/system/system_tests/image_rewrite_locking.sh b/pagespeed/system/system_tests/image_rewrite_locking.sh index eff89f842..951b31f1e 100644 --- a/pagespeed/system/system_tests/image_rewrite_locking.sh +++ b/pagespeed/system/system_tests/image_rewrite_locking.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # Ideally the system should only rewrite an image once when when it gets # a burst of requests. A bug was fixed where we were not obeying a # failed lock and were rewriting it potentially many times. It still diff --git a/pagespeed/system/system_tests/inline_unauth.sh b/pagespeed/system/system_tests/inline_unauth.sh index df44b74e6..3900e1a55 100644 --- a/pagespeed/system/system_tests/inline_unauth.sh +++ b/pagespeed/system/system_tests/inline_unauth.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. test_filter inline_javascript inlines a small JS file start_test no inlining of unauthorized resources URL="$TEST_ROOT/unauthorized/inline_unauthorized_javascript.html?" diff --git a/pagespeed/system/system_tests/instant_ipro.sh b/pagespeed/system/system_tests/instant_ipro.sh index c8dcf1359..3ac3b9c25 100644 --- a/pagespeed/system/system_tests/instant_ipro.sh +++ b/pagespeed/system/system_tests/instant_ipro.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # Tests that we get instant ipro rewrites with LoadFromFile and # InPlaceWaitForOptimized get us first-pass rewrites. start_test instant ipro with InPlaceWaitForOptimized and LoadFromFile diff --git a/pagespeed/system/system_tests/ipro_caching.sh b/pagespeed/system/system_tests/ipro_caching.sh index f30c51f41..1dc66641f 100644 --- a/pagespeed/system/system_tests/ipro_caching.sh +++ b/pagespeed/system/system_tests/ipro_caching.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test IPRO flow uses cache as expected. # TODO(sligocki): Use separate VHost instead to separate stats. STATS=$OUTDIR/blocking_rewrite_stats diff --git a/pagespeed/system/system_tests/ipro_fixed_size.sh b/pagespeed/system/system_tests/ipro_fixed_size.sh index 7848240b7..d07d9a6dc 100644 --- a/pagespeed/system/system_tests/ipro_fixed_size.sh +++ b/pagespeed/system/system_tests/ipro_fixed_size.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test IPRO-optimized resources should have fixed size, not chunked. URL="$EXAMPLE_ROOT/images/Puzzle.jpg" URL+="?PageSpeedJpegRecompressionQuality=75" diff --git a/pagespeed/system/system_tests/ipro_for_browser.sh b/pagespeed/system/system_tests/ipro_for_browser.sh index c3d1c5d1d..8e779b9ac 100644 --- a/pagespeed/system/system_tests/ipro_for_browser.sh +++ b/pagespeed/system/system_tests/ipro_for_browser.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # Optimize in-place images for browser. Ideal test matrix (not covered yet): # User-Agent: Accept: Image type Result # ----------- ------- ---------- ---------------------------------- diff --git a/pagespeed/system/system_tests/ipro_load_from_file.sh b/pagespeed/system/system_tests/ipro_load_from_file.sh index 6e27929da..7a0d25bdc 100644 --- a/pagespeed/system/system_tests/ipro_load_from_file.sh +++ b/pagespeed/system/system_tests/ipro_load_from_file.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test load from file with ipro URL="http://lff-ipro.example.com/mod_pagespeed_test/lff_ipro/fake.woff" OUT=$(http_proxy=$SECONDARY_HOSTNAME $WGET -O - $URL) diff --git a/pagespeed/system/system_tests/ipro_max_cachable.sh b/pagespeed/system/system_tests/ipro_max_cachable.sh index aef024a68..c27c69481 100644 --- a/pagespeed/system/system_tests/ipro_max_cachable.sh +++ b/pagespeed/system/system_tests/ipro_max_cachable.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test max cacheable content length with ipro URL="http://max-cacheable-content-length.example.com/mod_pagespeed_example/" URL+="images/BikeCrashIcn.png" diff --git a/pagespeed/system/system_tests/ipro_noop.sh b/pagespeed/system/system_tests/ipro_noop.sh index 52c53cb0b..6f40ab18b 100644 --- a/pagespeed/system/system_tests/ipro_noop.sh +++ b/pagespeed/system/system_tests/ipro_noop.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test Ipro transcode to webp, iterating with Noop # There's a trick for making demo pages that show the fully optimized ipro # images without relying on the user flushing the browser cache, which relies diff --git a/pagespeed/system/system_tests/ipro_source_map.sh b/pagespeed/system/system_tests/ipro_source_map.sh index b82521b1f..39645a14a 100644 --- a/pagespeed/system/system_tests/ipro_source_map.sh +++ b/pagespeed/system/system_tests/ipro_source_map.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test IPRO source map tests URL="$TEST_ROOT/experimental_js_minifier/script.js" URL+="?PageSpeedFilters=rewrite_javascript,include_js_source_maps" diff --git a/pagespeed/system/system_tests/ipro_vary_cookie.sh b/pagespeed/system/system_tests/ipro_vary_cookie.sh index 53f53938c..7a7404599 100644 --- a/pagespeed/system/system_tests/ipro_vary_cookie.sh +++ b/pagespeed/system/system_tests/ipro_vary_cookie.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # Even though we don't have a cookie, we will conservatively avoid # optimizing resources with Vary:Cookie set on the response, so we # will not get the instant response, of "body{background:#9370db}": diff --git a/pagespeed/system/system_tests/json_content_type.sh b/pagespeed/system/system_tests/json_content_type.sh index 789c653fb..cb89fe8fc 100644 --- a/pagespeed/system/system_tests/json_content_type.sh +++ b/pagespeed/system/system_tests/json_content_type.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test json keeps its content type URL="$TEST_ROOT/example.json" OUT=$($WGET_DUMP "$URL?PageSpeed=off") diff --git a/pagespeed/system/system_tests/large_html_files.sh b/pagespeed/system/system_tests/large_html_files.sh index 47ce35a31..e074c5684 100644 --- a/pagespeed/system/system_tests/large_html_files.sh +++ b/pagespeed/system/system_tests/large_html_files.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # Test handling of large HTML files. We first test with a cold cache, and verify # that we bail out of parsing and insert a script redirecting to # ?PageSpeed=off. This should also insert an entry into the property cache so diff --git a/pagespeed/system/system_tests/load_from_file.sh b/pagespeed/system/system_tests/load_from_file.sh index 0bf76e08a..f622b81f4 100644 --- a/pagespeed/system/system_tests/load_from_file.sh +++ b/pagespeed/system/system_tests/load_from_file.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test LoadFromFile URL=$TEST_ROOT/load_from_file/index.html?PageSpeedFilters=inline_css fetch_until $URL 'grep -c blue' 1 diff --git a/pagespeed/system/system_tests/long_url_handling.sh b/pagespeed/system/system_tests/long_url_handling.sh index 245298d6a..b40dddb29 100644 --- a/pagespeed/system/system_tests/long_url_handling.sh +++ b/pagespeed/system/system_tests/long_url_handling.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test long url handling # This is an extremely long url, enough that it should give a 4xx server error. OUT=$($CURL -sS -D- "$TEST_ROOT/$(head -c 10000 < /dev/zero | tr '\0' 'a')") diff --git a/pagespeed/system/system_tests/map_proxy_domain.sh b/pagespeed/system/system_tests/map_proxy_domain.sh index 9ca7f05a6..7350ced6d 100644 --- a/pagespeed/system/system_tests/map_proxy_domain.sh +++ b/pagespeed/system/system_tests/map_proxy_domain.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test MapProxyDomain # depends on MapProxyDomain in the config file LEAF="proxy_external_resource.html?PageSpeedFilters=-inline_images" diff --git a/pagespeed/system/system_tests/mapped_domain_relative_css.sh b/pagespeed/system/system_tests/mapped_domain_relative_css.sh index 3bec7091d..ccc1035a8 100644 --- a/pagespeed/system/system_tests/mapped_domain_relative_css.sh +++ b/pagespeed/system/system_tests/mapped_domain_relative_css.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # http://github.com/pagespeed/mod_pagespeed/issues/494 -- test # that fetching a css with embedded relative images from a different # VirtualHost, accessing the same content, and rewrite-mapped to the diff --git a/pagespeed/system/system_tests/max_cachable.sh b/pagespeed/system/system_tests/max_cachable.sh index 085ab95ce..cf593e809 100644 --- a/pagespeed/system/system_tests/max_cachable.sh +++ b/pagespeed/system/system_tests/max_cachable.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # Test max_cacheable_response_content_length. There are two Javascript files # in the html file. The smaller Javascript file should be rewritten while # the larger one shouldn't. diff --git a/pagespeed/system/system_tests/max_combined_css_bytes.sh b/pagespeed/system/system_tests/max_combined_css_bytes.sh index da63de4cd..3bc2d1240 100644 --- a/pagespeed/system/system_tests/max_combined_css_bytes.sh +++ b/pagespeed/system/system_tests/max_combined_css_bytes.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # TODO(sligocki): Following test only works with query_params. Fix to work # with any method and get rid of this manual set. filter_spec_method="query_params" diff --git a/pagespeed/system/system_tests/message_history_colors.sh b/pagespeed/system/system_tests/message_history_colors.sh index 3f6545591..675d2e591 100644 --- a/pagespeed/system/system_tests/message_history_colors.sh +++ b/pagespeed/system/system_tests/message_history_colors.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # 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. Brown for Warning messages. diff --git a/pagespeed/system/system_tests/modify_caching_headers.sh b/pagespeed/system/system_tests/modify_caching_headers.sh index a585a72e4..1cef84e5a 100644 --- a/pagespeed/system/system_tests/modify_caching_headers.sh +++ b/pagespeed/system/system_tests/modify_caching_headers.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test ModifyCachingHeaders URL=$TEST_ROOT/retain_cache_control/index.html OUT=$($WGET_DUMP $URL) diff --git a/pagespeed/system/system_tests/more_custom_headers.sh b/pagespeed/system/system_tests/more_custom_headers.sh index 9ecea2ce0..cccfafb44 100644 --- a/pagespeed/system/system_tests/more_custom_headers.sh +++ b/pagespeed/system/system_tests/more_custom_headers.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test Custom headers remain on HTML, but cache should be disabled. URL=$TEST_ROOT/rewrite_compressed_js.html echo $WGET_DUMP $URL diff --git a/pagespeed/system/system_tests/no_critical_unauthorized_resources.sh b/pagespeed/system/system_tests/no_critical_unauthorized_resources.sh index ece2f4d22..d1573533d 100644 --- a/pagespeed/system/system_tests/no_critical_unauthorized_resources.sh +++ b/pagespeed/system/system_tests/no_critical_unauthorized_resources.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. test_filter prioritize_critical_css start_test no critical selectors chosen from unauthorized resources diff --git a/pagespeed/system/system_tests/no_respect_vary.sh b/pagespeed/system/system_tests/no_respect_vary.sh index 78fb29a72..514297d51 100644 --- a/pagespeed/system/system_tests/no_respect_vary.sh +++ b/pagespeed/system/system_tests/no_respect_vary.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # Tests that an origin header with a Vary header other than Vary:Accept-Encoding # loses that header when we are not respecting vary. start_test Vary:User-Agent on resources is held by our cache. diff --git a/pagespeed/system/system_tests/no_transform.sh b/pagespeed/system/system_tests/no_transform.sh index e8d7aee34..9ca1bbd50 100644 --- a/pagespeed/system/system_tests/no_transform.sh +++ b/pagespeed/system/system_tests/no_transform.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # When Cache-Control: no-transform is in the response make sure that # the URL is not rewritten and that the no-transform header remains # in the resource. diff --git a/pagespeed/system/system_tests/optimize_for_bandwidth.sh b/pagespeed/system/system_tests/optimize_for_bandwidth.sh index fc4d58fa6..ee6bb8a5d 100644 --- a/pagespeed/system/system_tests/optimize_for_bandwidth.sh +++ b/pagespeed/system/system_tests/optimize_for_bandwidth.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test OptimizeForBandwidth # We use blocking-rewrite tests because we want to make sure we don't # get rewritten URLs when we don't want them. diff --git a/pagespeed/system/system_tests/outline_javascript_limit.sh b/pagespeed/system/system_tests/outline_javascript_limit.sh index 06897cf7a..4778ca993 100644 --- a/pagespeed/system/system_tests/outline_javascript_limit.sh +++ b/pagespeed/system/system_tests/outline_javascript_limit.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. test_filter outline_javascript outlines large scripts, but not small ones. check run_wget_with_args $URL check egrep -q '/dev/null; then diff --git a/pagespeed/system/system_tests/strip_subresources.sh b/pagespeed/system/system_tests/strip_subresources.sh index 7d5c5d0e5..41cb85ed5 100644 --- a/pagespeed/system/system_tests/strip_subresources.sh +++ b/pagespeed/system/system_tests/strip_subresources.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. start_test Strip subresources default behaviour URL="$TEST_ROOT/strip_subresource_hints/default/index.html" echo $WGET_DUMP $URL diff --git a/pagespeed/system/system_tests/url_valued_attributes.sh b/pagespeed/system/system_tests/url_valued_attributes.sh index 5aced81cf..50530c5a9 100644 --- a/pagespeed/system/system_tests/url_valued_attributes.sh +++ b/pagespeed/system/system_tests/url_valued_attributes.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # Test to make sure dynamically defined url-valued attributes are rewritten by # rewrite_domains. See mod_pagespeed_test/rewrite_domains.html: in addition # to having one URL, one URL, and one url it also has one diff --git a/pagespeed/system/system_tests/x_header_value.sh b/pagespeed/system/system_tests/x_header_value.sh index 86f24693c..9411ac9f0 100644 --- a/pagespeed/system/system_tests/x_header_value.sh +++ b/pagespeed/system/system_tests/x_header_value.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # This test checks that the XHeaderValue directive works. start_test XHeaderValue directive diff --git a/pagespeed/system/system_tests/x_sendfile.sh b/pagespeed/system/system_tests/x_sendfile.sh index c8c2ef85e..6fcd28df4 100644 --- a/pagespeed/system/system_tests/x_sendfile.sh +++ b/pagespeed/system/system_tests/x_sendfile.sh @@ -1,3 +1,18 @@ +#!/bin/bash +# +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # Test that we do not rewrite resources when the X-Sendfile header is set, or # when the X-Accel-Redirect header is set. start_test check that rewriting only happens without X-Sendfile diff --git a/pagespeed/system/tcp_connection_for_testing.cc b/pagespeed/system/tcp_connection_for_testing.cc index 15b8c9225..5cefddfbd 100644 --- a/pagespeed/system/tcp_connection_for_testing.cc +++ b/pagespeed/system/tcp_connection_for_testing.cc @@ -1,3 +1,18 @@ +// Copyright 2016 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Author: cheesy@google.com (Steve Hill) #include "pagespeed/system/tcp_connection_for_testing.h" #include diff --git a/url/base/string16.h b/url/base/string16.h index 3ef9c25a7..24e23fc6d 100644 --- a/url/base/string16.h +++ b/url/base/string16.h @@ -1,3 +1,19 @@ +/* + * Copyright 2015 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Author: morlovich@google.com (Maks Orlovich) #ifndef URL_COMPAT_STRING16_H #define URL_COMPAT_STRING16_H // We have both of: