From a0eed131218bb5f922acf52bf3c0a8011fee608a Mon Sep 17 00:00:00 2001 From: "ruijingx.a.han" Date: Wed, 3 Jul 2013 22:36:53 -0700 Subject: [PATCH] Add 4 tests for tct-sp02-wrt-tests component due to wrt spec update. Change-Id: Ibd8c85d92850989bce78909f1f2e95928bf6df4e Signed-off-by: ruijingx.a.han --- tct-sp02-wrt-tests/config-xml-with-csp/config.xml | 9 ++ tct-sp02-wrt-tests/config-xml-with-csp/custom.png | Bin 0 -> 3777 bytes tct-sp02-wrt-tests/config-xml-with-csp/index.html | 80 +++++++++++++++ .../config-xml-with-csp/support/csp.js | 33 +++++++ .../default-policy-by-directives-csp/config.xml | 9 ++ .../default-policy-by-directives-csp/custom.png | Bin 0 -> 3777 bytes .../default-policy-by-directives-csp/index.html | 109 +++++++++++++++++++++ .../support/COPYING | 64 ++++++++++++ .../support/blue-100x100.png | Bin 0 -> 385 bytes .../support/csp.js | 33 +++++++ .../support/red-100x100.png | Bin 0 -> 401 bytes .../support/red-green.theora.ogv | Bin 0 -> 10292 bytes .../w3c/support/COPYING | 12 +++ .../w3c/support/CanvasTest.ttf | Bin 0 -> 2528 bytes .../config.xml | 9 ++ .../custom.png | Bin 0 -> 3777 bytes .../index.html | 109 +++++++++++++++++++++ .../support/COPYING | 64 ++++++++++++ .../support/blue-100x100.png | Bin 0 -> 385 bytes .../support/csp.js | 33 +++++++ .../support/red-100x100.png | Bin 0 -> 401 bytes .../support/red-green.theora.ogv | Bin 0 -> 10292 bytes .../w3c/support/COPYING | 12 +++ .../w3c/support/CanvasTest.ttf | Bin 0 -> 2528 bytes .../enforce-csp-to-resource/config.xml | 9 ++ .../enforce-csp-to-resource/custom.png | Bin 0 -> 3777 bytes .../enforce-csp-to-resource/index.html | 79 +++++++++++++++ .../enforce-csp-to-resource/support/csp.js | 33 +++++++ tct-sp02-wrt-tests/tests.xml | 100 +++++++++++++++++++ 29 files changed, 797 insertions(+) create mode 100644 tct-sp02-wrt-tests/config-xml-with-csp/config.xml create mode 100644 tct-sp02-wrt-tests/config-xml-with-csp/custom.png create mode 100644 tct-sp02-wrt-tests/config-xml-with-csp/index.html create mode 100644 tct-sp02-wrt-tests/config-xml-with-csp/support/csp.js create mode 100644 tct-sp02-wrt-tests/default-policy-by-directives-csp/config.xml create mode 100644 tct-sp02-wrt-tests/default-policy-by-directives-csp/custom.png create mode 100644 tct-sp02-wrt-tests/default-policy-by-directives-csp/index.html create mode 100644 tct-sp02-wrt-tests/default-policy-by-directives-csp/support/COPYING create mode 100644 tct-sp02-wrt-tests/default-policy-by-directives-csp/support/blue-100x100.png create mode 100644 tct-sp02-wrt-tests/default-policy-by-directives-csp/support/csp.js create mode 100644 tct-sp02-wrt-tests/default-policy-by-directives-csp/support/red-100x100.png create mode 100644 tct-sp02-wrt-tests/default-policy-by-directives-csp/support/red-green.theora.ogv create mode 100644 tct-sp02-wrt-tests/default-policy-by-directives-csp/w3c/support/COPYING create mode 100644 tct-sp02-wrt-tests/default-policy-by-directives-csp/w3c/support/CanvasTest.ttf create mode 100644 tct-sp02-wrt-tests/default-policy-by-directives-report-only/config.xml create mode 100644 tct-sp02-wrt-tests/default-policy-by-directives-report-only/custom.png create mode 100644 tct-sp02-wrt-tests/default-policy-by-directives-report-only/index.html create mode 100644 tct-sp02-wrt-tests/default-policy-by-directives-report-only/support/COPYING create mode 100644 tct-sp02-wrt-tests/default-policy-by-directives-report-only/support/blue-100x100.png create mode 100644 tct-sp02-wrt-tests/default-policy-by-directives-report-only/support/csp.js create mode 100644 tct-sp02-wrt-tests/default-policy-by-directives-report-only/support/red-100x100.png create mode 100644 tct-sp02-wrt-tests/default-policy-by-directives-report-only/support/red-green.theora.ogv create mode 100644 tct-sp02-wrt-tests/default-policy-by-directives-report-only/w3c/support/COPYING create mode 100644 tct-sp02-wrt-tests/default-policy-by-directives-report-only/w3c/support/CanvasTest.ttf create mode 100644 tct-sp02-wrt-tests/enforce-csp-to-resource/config.xml create mode 100644 tct-sp02-wrt-tests/enforce-csp-to-resource/custom.png create mode 100644 tct-sp02-wrt-tests/enforce-csp-to-resource/index.html create mode 100644 tct-sp02-wrt-tests/enforce-csp-to-resource/support/csp.js diff --git a/tct-sp02-wrt-tests/config-xml-with-csp/config.xml b/tct-sp02-wrt-tests/config-xml-with-csp/config.xml new file mode 100644 index 0000000..c1c7ad9 --- /dev/null +++ b/tct-sp02-wrt-tests/config-xml-with-csp/config.xml @@ -0,0 +1,9 @@ + + + connect-src * + + + + config-xml-with-csp + + diff --git a/tct-sp02-wrt-tests/config-xml-with-csp/custom.png b/tct-sp02-wrt-tests/config-xml-with-csp/custom.png new file mode 100644 index 0000000000000000000000000000000000000000..6bdebd113e90aeb44fe9d81c9cdd825071e23af7 GIT binary patch literal 3777 zcmV;y4nFaTP)6?8>dbVG7wVRUJ4ZXi@?ZDjy6F)uhTFgZ_y%On5*4jM^B zK~#90?VZ1G@okr>^5y^?Bp`ziNKhGQ0Sir1@qCgm>3O zpYQv;&-*^lOH$Y|sx6@cpbns6zGVGd18@}ZFxLPE=I>qGzrA5w97StkzM!&hKvb$N zp#j6l4H$+O5zCsOT>_C0aROpW%RuC^su}J&>6PH^Q;@Pirfjn4C0yqULttV zmUpfJoWT%7u7b$i2*5P_OYPgT?l*XT zd?9z!JaK9sfb{ynr0NY)5r8??cW{4#yr_sUM38uFKqq~IYD+i+@C}IZ!yo|o#=Lfk zl9&fD=k@0xE)0L1v25sL^S34j#B8ln^_${RaPV zd?CLH`@zsdfSK6&ChX@3sqnk738YX0FjKlckf1NGhydzgQpsUsfDVZ9^Naw)Mu7<& z1DKUOe+bteLI%|K8$1=XvMA6HKwSUU5qKyFIs|k;jK56;9twN~U`G8UufKgfHEp++ zARZv`vLr%c_}Xr55NHN|+qyB6095<}!j(awxz;}b8T+>#5kPHKu3+5|aG&<-?J@!k zTYBQ@0Z8xPIaYdsRUV)TV*Fh~fML@mRtaFG%OGqmo;F<)fH`-(uiLeEnIo@t0WS~G zOuj9IjA*)Fa0G$on*YC2Y78M8er?YY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2{IJqnZT~!B9s8kRAQ(T5K^V-PWSo|y10FOAz$q`_=f;a!hV*JC|?ZQ zV(5jtjdvlCcpz7V8u#r)*>HXeQbd{u`iSt{=ScgIsx6@oqsBaUJB#lLB7nxQEpEKI zH}Xa_B7)3_YW*}w+K6fsWvNWl0&0v^D^d?@uf$YN1cE?|uLE6ci~kof&bsx9FR zz+aL+&yMoNuq`H9k(J5~X{s&Z6h>V-i3@@u!bt2SzF9Z5I}%k}LJfup$dIs}3v7_p z+mzG#85fQ1 r9#me#c%UY5cVp!)fL`8$xTyRe`)Jg&1RiM`00000NkvXXu0mjfhlveJ literal 0 HcmV?d00001 diff --git a/tct-sp02-wrt-tests/config-xml-with-csp/index.html b/tct-sp02-wrt-tests/config-xml-with-csp/index.html new file mode 100644 index 0000000..2f47314 --- /dev/null +++ b/tct-sp02-wrt-tests/config-xml-with-csp/index.html @@ -0,0 +1,80 @@ + + + + + + WRT Test: config-xml-with-csp + + + + + + + + +

FAIL

+

Test did not run.

+ + + + + diff --git a/tct-sp02-wrt-tests/config-xml-with-csp/support/csp.js b/tct-sp02-wrt-tests/config-xml-with-csp/support/csp.js new file mode 100644 index 0000000..de46ff6 --- /dev/null +++ b/tct-sp02-wrt-tests/config-xml-with-csp/support/csp.js @@ -0,0 +1,33 @@ +/* +Copyright (c) 2013 Intel Corporation. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of works must retain the original copyright notice, this list + of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the original copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. +* Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this work without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Authors: + Zhang, Zhiqiang + +*/ + +var X = 10; +var Y = eval(X + 17); \ No newline at end of file diff --git a/tct-sp02-wrt-tests/default-policy-by-directives-csp/config.xml b/tct-sp02-wrt-tests/default-policy-by-directives-csp/config.xml new file mode 100644 index 0000000..438a2dc --- /dev/null +++ b/tct-sp02-wrt-tests/default-policy-by-directives-csp/config.xml @@ -0,0 +1,9 @@ + + + + + + + default-policy-by-directives-csp + + diff --git a/tct-sp02-wrt-tests/default-policy-by-directives-csp/custom.png b/tct-sp02-wrt-tests/default-policy-by-directives-csp/custom.png new file mode 100644 index 0000000000000000000000000000000000000000..6bdebd113e90aeb44fe9d81c9cdd825071e23af7 GIT binary patch literal 3777 zcmV;y4nFaTP)6?8>dbVG7wVRUJ4ZXi@?ZDjy6F)uhTFgZ_y%On5*4jM^B zK~#90?VZ1G@okr>^5y^?Bp`ziNKhGQ0Sir1@qCgm>3O zpYQv;&-*^lOH$Y|sx6@cpbns6zGVGd18@}ZFxLPE=I>qGzrA5w97StkzM!&hKvb$N zp#j6l4H$+O5zCsOT>_C0aROpW%RuC^su}J&>6PH^Q;@Pirfjn4C0yqULttV zmUpfJoWT%7u7b$i2*5P_OYPgT?l*XT zd?9z!JaK9sfb{ynr0NY)5r8??cW{4#yr_sUM38uFKqq~IYD+i+@C}IZ!yo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JMNGGZ zce}MHb8YsJ#$Lr(QL{FaMup-j96T>M3Oel5t;&nCxxv+l58UP4c8W)=QHkv1nTjYrjWO zE(+BN=`d`I6yPigd!12R2u+Df0nRyENs0HfO+4zeip4E zq)LC?tztW=HieJ{9s3_{0gz!}_i@J?%`?ERRZY1c+?nSHxRL6X!jI=`FuIz1$KwCO`aTj z2I2*F0TF9D^GX2_FR(ML?ES!+heunG8NpWL8Ts1@QfEw_BD%f!+AdJ}Nwp<(5mU(+ zAvG?BZL#6^rl30wnjit;HX$P5BLD*xwv8|3(SC#Hk%QaH5(4qpVOtE8*b7yGNQQ!~ zAdu^~2)o&=2{IJqnZT~!B9s8kRAQ(T5K^V-PWSo|y10FOAz$q`_=f;a!hV*JC|?ZQ zV(5jtjdvlCcpz7V8u#r)*>HXeQbd{u`iSt{=ScgIsx6@oqsBaUJB#lLB7nxQEpEKI zH}Xa_B7)3_YW*}w+K6fsWvNWl0&0v^D^d?@uf$YN1cE?|uLE6ci~kof&bsx9FR zz+aL+&yMoNuq`H9k(J5~X{s&Z6h>V-i3@@u!bt2SzF9Z5I}%k}LJfup$dIs}3v7_p z+mzG#85fQ1 r9#me#c%UY5cVp!)fL`8$xTyRe`)Jg&1RiM`00000NkvXXu0mjfhlveJ literal 0 HcmV?d00001 diff --git a/tct-sp02-wrt-tests/default-policy-by-directives-csp/index.html b/tct-sp02-wrt-tests/default-policy-by-directives-csp/index.html new file mode 100644 index 0000000..2393cc6 --- /dev/null +++ b/tct-sp02-wrt-tests/default-policy-by-directives-csp/index.html @@ -0,0 +1,109 @@ + + + + + + WRT Test: default-policy-by-directives-csp + + + + + + + + + +

FAIL

+

Test did not run.

+ + +