From b29b4c46986b4c4d74f9b4b98fcdb514bbf0799c Mon Sep 17 00:00:00 2001 From: Gu Weiyi Date: Tue, 19 Sep 2017 14:59:12 +0800 Subject: [PATCH] [mobile, wearable][behavior][CSP]change test precondition and steps Change-Id: I6d7ab4c71d030b411d5fc542a442e6f589a0bb68 Signed-off-by: Gu Weiyi --- mobile/tct-behavior-tests/tests/CSP/index.html | 2 +- mobile/tct-behavior-tests/tests/CSP/res/csp-asterisk.html | 3 ++- mobile/tct-behavior-tests/tests/CSP/res/csp-cross-origin.html | 2 ++ .../tests/CSP/res/default-policy-by-directives-csp.html | 2 ++ .../tests/CSP/res/default-policy-by-directives-report-only.html | 2 ++ mobile/tct-behavior-tests/tests/CSP/res/default-src_asterisk.html | 2 ++ mobile/tct-behavior-tests/tests/CSP/res/default-src_cross_origin.html | 2 ++ .../tests/CSP/res/sandbox-same-origin-allow-scripts.html | 2 ++ wearable/tct-behavior-tests/tests/CSP/index.html | 2 +- wearable/tct-behavior-tests/tests/CSP/res/csp-asterisk.html | 3 ++- wearable/tct-behavior-tests/tests/CSP/res/csp-cross-origin.html | 2 ++ .../tests/CSP/res/default-policy-by-directives-csp.html | 2 ++ .../tests/CSP/res/default-policy-by-directives-report-only.html | 2 ++ wearable/tct-behavior-tests/tests/CSP/res/default-src_asterisk.html | 2 ++ .../tct-behavior-tests/tests/CSP/res/default-src_cross_origin.html | 2 ++ .../tests/CSP/res/sandbox-same-origin-allow-scripts.html | 2 ++ 16 files changed, 30 insertions(+), 4 deletions(-) diff --git a/mobile/tct-behavior-tests/tests/CSP/index.html b/mobile/tct-behavior-tests/tests/CSP/index.html index afb641c..a518d3a 100755 --- a/mobile/tct-behavior-tests/tests/CSP/index.html +++ b/mobile/tct-behavior-tests/tests/CSP/index.html @@ -215,7 +215,7 @@ Authors:

Test Note:

Verifies the functionality of CSP worked well.

Test Pre-condition:

-

Tinyweb server launched with the command: "tinyweb -ssl_certificate /usr/share/tinyweb/server.pem -document_root / -listening_ports 80,8080,8081,8082,8083,8443s".

+

Tinyweb server launched with the command: "$cd 'web-tct-path'; python ./scripts/tct-config-device.py --check proc=tinyweb".

Test Purpose:

Verifies the functionality of CSP worked well when script-src, object-src, style-src, img-src, media-src, frame-src, font-src, connect-src directives set different values.

Expected Result:

diff --git a/mobile/tct-behavior-tests/tests/CSP/res/csp-asterisk.html b/mobile/tct-behavior-tests/tests/CSP/res/csp-asterisk.html index ea1eed6..5b31bd5 100755 --- a/mobile/tct-behavior-tests/tests/CSP/res/csp-asterisk.html +++ b/mobile/tct-behavior-tests/tests/CSP/res/csp-asterisk.html @@ -69,8 +69,9 @@ Authors:

Test Step:

    -
  1. $ web-tct_2.3/tools/python tct-config-device.py --check proc=tinyweb
  2. Click the "Install" button to install the widget.
  3. +
  4. In sdb shell: su root; password: tizen; echo "User::Shell User::Pkg::beh1csp001 rwx" | smackload +echo "User::Pkg::beh1csp001 User::Shell rwx" | smackload
  5. Click the "Launch" button to launch the widget.
  6. Click the "Uninstall" button to uninstall the widget.
diff --git a/mobile/tct-behavior-tests/tests/CSP/res/csp-cross-origin.html b/mobile/tct-behavior-tests/tests/CSP/res/csp-cross-origin.html index 15baea4..70680a4 100755 --- a/mobile/tct-behavior-tests/tests/CSP/res/csp-cross-origin.html +++ b/mobile/tct-behavior-tests/tests/CSP/res/csp-cross-origin.html @@ -70,6 +70,8 @@ Authors:

Test Step:

  1. Click the "Install" button to install the widget.
  2. +
  3. In sdb shell: su root; password: tizen; echo "User::Shell User::Pkg::beh1csp002 rwx" | smackload +echo "User::Pkg::beh1csp002 User::Shell rwx" | smackload
  4. Click the "Launch" button to launch the widget.
  5. Click the "Uninstall" button to uninstall the widget.
diff --git a/mobile/tct-behavior-tests/tests/CSP/res/default-policy-by-directives-csp.html b/mobile/tct-behavior-tests/tests/CSP/res/default-policy-by-directives-csp.html index 2aa72e7..a3ff77e 100755 --- a/mobile/tct-behavior-tests/tests/CSP/res/default-policy-by-directives-csp.html +++ b/mobile/tct-behavior-tests/tests/CSP/res/default-policy-by-directives-csp.html @@ -70,6 +70,8 @@ Authors:

Test Step:

  1. Click the "Install" button to install the widget.
  2. +
  3. In sdb shell: su root; password: tizen; echo "User::Shell User::Pkg::beh1csp016 rwx" | smackload +echo "User::Pkg::beh1csp016 User::Shell rwx" | smackload
  4. Click the "Launch" button to launch the widget.
  5. Click the "Uninstall" button to uninstall the widget.
diff --git a/mobile/tct-behavior-tests/tests/CSP/res/default-policy-by-directives-report-only.html b/mobile/tct-behavior-tests/tests/CSP/res/default-policy-by-directives-report-only.html index 9a0f395..b5eb15d 100755 --- a/mobile/tct-behavior-tests/tests/CSP/res/default-policy-by-directives-report-only.html +++ b/mobile/tct-behavior-tests/tests/CSP/res/default-policy-by-directives-report-only.html @@ -70,6 +70,8 @@ Authors:

Test Step:

  1. Click the "Install" button to install the widget.
  2. +
  3. In sdb shell: su root; password :tizen; echo "User::Shell User::Pkg::beh1csp017 rwx" | smackload +echo "User::Pkg::beh1csp017 User::Shell rwx" | smackload
  4. Click the "Launch" button to launch the widget.
  5. Click the "Uninstall" button to uninstall the widget.
diff --git a/mobile/tct-behavior-tests/tests/CSP/res/default-src_asterisk.html b/mobile/tct-behavior-tests/tests/CSP/res/default-src_asterisk.html index 9365374..6091561 100755 --- a/mobile/tct-behavior-tests/tests/CSP/res/default-src_asterisk.html +++ b/mobile/tct-behavior-tests/tests/CSP/res/default-src_asterisk.html @@ -70,6 +70,8 @@ Authors:

Test Step:

  1. Click the "Install" button to install the widget.
  2. +
  3. In sdb shell: su root; password :tizen; echo "User::Shell User::Pkg::beh1csp015 rwx" | smackload +echo "User::Pkg::beh1csp015 User::Shell rwx" | smackload
  4. Click the "Launch" button to launch the widget.
  5. Click the "Uninstall" button to uninstall the widget.
diff --git a/mobile/tct-behavior-tests/tests/CSP/res/default-src_cross_origin.html b/mobile/tct-behavior-tests/tests/CSP/res/default-src_cross_origin.html index ebe5e6e..2170c5b 100755 --- a/mobile/tct-behavior-tests/tests/CSP/res/default-src_cross_origin.html +++ b/mobile/tct-behavior-tests/tests/CSP/res/default-src_cross_origin.html @@ -70,6 +70,8 @@ Authors:

Test Step:

  1. Click the "Install" button to install the widget.
  2. +
  3. In sdb shell: su root; password :tizen; echo "User::Shell User::Pkg::beh1csp014 rwx" | smackload +echo "User::Pkg::beh1csp014 User::Shell rwx" | smackload
  4. Click the "Launch" button to launch the widget.
  5. Click the "Uninstall" button to uninstall the widget.
diff --git a/mobile/tct-behavior-tests/tests/CSP/res/sandbox-same-origin-allow-scripts.html b/mobile/tct-behavior-tests/tests/CSP/res/sandbox-same-origin-allow-scripts.html index f2b474f..b206326 100755 --- a/mobile/tct-behavior-tests/tests/CSP/res/sandbox-same-origin-allow-scripts.html +++ b/mobile/tct-behavior-tests/tests/CSP/res/sandbox-same-origin-allow-scripts.html @@ -70,6 +70,8 @@ Authors:

Test Step:

  1. Click the "Install" button to install the widget.
  2. +
  3. In sdb shell: su root; password :tizen; echo "User::Shell User::Pkg::beh1csp008 rwx" | smackload +echo "User::Pkg::beh1csp008 User::Shell rwx" | smackload
  4. Click the "Launch" button to launch the widget.
  5. Click the "Uninstall" button to uninstall the widget.
diff --git a/wearable/tct-behavior-tests/tests/CSP/index.html b/wearable/tct-behavior-tests/tests/CSP/index.html index 66efe17..2f30afe 100755 --- a/wearable/tct-behavior-tests/tests/CSP/index.html +++ b/wearable/tct-behavior-tests/tests/CSP/index.html @@ -150,7 +150,7 @@ Authors:

Test Note:

Verifies the functionality of CSP worked well.

Test Pre-condition:

-

Tinyweb server launched with the command: "tinyweb -ssl_certificate /usr/share/tinyweb/server.pem -document_root / -listening_ports 80,8080,8081,8082,8083,8443s".

+

Tinyweb server launched with the command: "$cd 'web-tct-path'; python ./scripts/tct-config-device.py --check proc=tinyweb".

Test Purpose:

Verifies the functionality of CSP worked well when script-src, object-src, style-src, img-src, media-src, frame-src, font-src, connect-src directives set different values.

Expected Result:

diff --git a/wearable/tct-behavior-tests/tests/CSP/res/csp-asterisk.html b/wearable/tct-behavior-tests/tests/CSP/res/csp-asterisk.html index cb0d909..3105eed 100755 --- a/wearable/tct-behavior-tests/tests/CSP/res/csp-asterisk.html +++ b/wearable/tct-behavior-tests/tests/CSP/res/csp-asterisk.html @@ -69,8 +69,9 @@ Authors:

Test Step:

    -
  1. $ web-tct_2.3/tools/python tct-config-device.py --check proc=tinyweb
  2. Click the "Install" button to install the widget.
  3. +
  4. In sdb shell: su root; password: tizen; echo "User::Shell User::Pkg::beh1csp001 rwx" | smackload +echo "User::Pkg::beh1csp001 User::Shell rwx" | smackload
  5. Click the "Launch" button to launch the widget.
  6. Click the "Uninstall" button to uninstall the widget.
diff --git a/wearable/tct-behavior-tests/tests/CSP/res/csp-cross-origin.html b/wearable/tct-behavior-tests/tests/CSP/res/csp-cross-origin.html index ee39244..4450862 100755 --- a/wearable/tct-behavior-tests/tests/CSP/res/csp-cross-origin.html +++ b/wearable/tct-behavior-tests/tests/CSP/res/csp-cross-origin.html @@ -70,6 +70,8 @@ Authors:

Test Step:

  1. Click the "Install" button to install the widget.
  2. +
  3. In sdb shell: su root; password: tizen; echo "User::Shell User::Pkg::beh1csp002 rwx" | smackload +echo "User::Pkg::beh1csp002 User::Shell rwx" | smackload
  4. Click the "Launch" button to launch the widget.
  5. Click the "Uninstall" button to uninstall the widget.
diff --git a/wearable/tct-behavior-tests/tests/CSP/res/default-policy-by-directives-csp.html b/wearable/tct-behavior-tests/tests/CSP/res/default-policy-by-directives-csp.html index 056e2aa..07eaf2b 100755 --- a/wearable/tct-behavior-tests/tests/CSP/res/default-policy-by-directives-csp.html +++ b/wearable/tct-behavior-tests/tests/CSP/res/default-policy-by-directives-csp.html @@ -70,6 +70,8 @@ Authors:

Test Step:

  1. Click the "Install" button to install the widget.
  2. +
  3. In sdb shell: su root; password: tizen; echo "User::Shell User::Pkg::beh1csp016 rwx" | smackload +echo "User::Pkg::beh1csp016 User::Shell rwx" | smackload
  4. Click the "Launch" button to launch the widget.
  5. Click the "Uninstall" button to uninstall the widget.
diff --git a/wearable/tct-behavior-tests/tests/CSP/res/default-policy-by-directives-report-only.html b/wearable/tct-behavior-tests/tests/CSP/res/default-policy-by-directives-report-only.html index 210de3f..d31c247 100755 --- a/wearable/tct-behavior-tests/tests/CSP/res/default-policy-by-directives-report-only.html +++ b/wearable/tct-behavior-tests/tests/CSP/res/default-policy-by-directives-report-only.html @@ -70,6 +70,8 @@ Authors:

Test Step:

  1. Click the "Install" button to install the widget.
  2. +
  3. In sdb shell: su root; password :tizen; echo "User::Shell User::Pkg::beh1csp017 rwx" | smackload +echo "User::Pkg::beh1csp017 User::Shell rwx" | smackload
  4. Click the "Launch" button to launch the widget.
  5. Click the "Uninstall" button to uninstall the widget.
diff --git a/wearable/tct-behavior-tests/tests/CSP/res/default-src_asterisk.html b/wearable/tct-behavior-tests/tests/CSP/res/default-src_asterisk.html index 21b20d3..b9e96a7 100755 --- a/wearable/tct-behavior-tests/tests/CSP/res/default-src_asterisk.html +++ b/wearable/tct-behavior-tests/tests/CSP/res/default-src_asterisk.html @@ -70,6 +70,8 @@ Authors:

Test Step:

  1. Click the "Install" button to install the widget.
  2. +
  3. In sdb shell: su root; password :tizen; echo "User::Shell User::Pkg::beh1csp015 rwx" | smackload +echo "User::Pkg::beh1csp015 User::Shell rwx" | smackload
  4. Click the "Launch" button to launch the widget.
  5. Click the "Uninstall" button to uninstall the widget.
diff --git a/wearable/tct-behavior-tests/tests/CSP/res/default-src_cross_origin.html b/wearable/tct-behavior-tests/tests/CSP/res/default-src_cross_origin.html index 8d87ec4..acc8b97 100755 --- a/wearable/tct-behavior-tests/tests/CSP/res/default-src_cross_origin.html +++ b/wearable/tct-behavior-tests/tests/CSP/res/default-src_cross_origin.html @@ -70,6 +70,8 @@ Authors:

Test Step:

  1. Click the "Install" button to install the widget.
  2. +
  3. In sdb shell: su root; password :tizen; echo "User::Shell User::Pkg::beh1csp014 rwx" | smackload +echo "User::Pkg::beh1csp014 User::Shell rwx" | smackload
  4. Click the "Launch" button to launch the widget.
  5. Click the "Uninstall" button to uninstall the widget.
diff --git a/wearable/tct-behavior-tests/tests/CSP/res/sandbox-same-origin-allow-scripts.html b/wearable/tct-behavior-tests/tests/CSP/res/sandbox-same-origin-allow-scripts.html index ed7b809..0e4ddd2 100755 --- a/wearable/tct-behavior-tests/tests/CSP/res/sandbox-same-origin-allow-scripts.html +++ b/wearable/tct-behavior-tests/tests/CSP/res/sandbox-same-origin-allow-scripts.html @@ -70,6 +70,8 @@ Authors:

Test Step:

  1. Click the "Install" button to install the widget.
  2. +
  3. In sdb shell: su root; password :tizen; echo "User::Shell User::Pkg::beh1csp008 rwx" | smackload +echo "User::Pkg::beh1csp008 User::Shell rwx" | smackload
  4. Click the "Launch" button to launch the widget.
  5. Click the "Uninstall" button to uninstall the widget.
-- 2.7.4