From a11d9d72f3898bd1e7f9b9773dd9ba4bebff395c Mon Sep 17 00:00:00 2001 From: "Liu, Xin" Date: Wed, 21 Aug 2013 17:01:21 +0800 Subject: [PATCH] Fixed TTS-1906 by moving 8 TCs to tct-navigationtiming-w3c-tests from delta Signed-off-by: Liu, Xin --- .../w3c/test_document_open.htm | 112 ++++++++++++ .../w3c/test_navigate_within_document.htm | 100 +++++++++++ .../test_navigation_redirectCount_none.htm | 46 +++++ .../w3c/test_navigation_type_enums.htm | 49 ++++++ .../w3c/test_navigation_type_reload.htm | 144 ++++++++++++++++ .../w3c/test_no_previous_document.htm | 58 +++++++ .../w3c/test_timing_client_redirect.htm | 78 +++++++++ .../w3c/test_timing_reload.htm | 122 +++++++++++++ .../w3c/test_timing_server_redirect.htm | 55 ++++++ tct-navigationtiming-w3c-tests/tests.xml | 160 ++++++++++++++++++ 10 files changed, 924 insertions(+) create mode 100644 tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_document_open.htm create mode 100644 tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_navigate_within_document.htm create mode 100644 tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_navigation_redirectCount_none.htm create mode 100644 tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_navigation_type_enums.htm create mode 100644 tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_navigation_type_reload.htm create mode 100644 tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_no_previous_document.htm create mode 100644 tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_timing_client_redirect.htm create mode 100644 tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_timing_reload.htm create mode 100644 tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_timing_server_redirect.htm diff --git a/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_document_open.htm b/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_document_open.htm new file mode 100644 index 000000000..3e6656c6b --- /dev/null +++ b/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_document_open.htm @@ -0,0 +1,112 @@ + + + + + window.performance.timing for dynamically created documents + + + + + + + + + + +

Description

+

This test validates window.performance.timing remains constant when a + document is replaced using document.open.

+ +

This page should be loaded with a yellow frame below. It then replaces the + document in that frame with a green document.

+ +

The test passes if all of the checks to performance.timing are correct and + the frame below ends with a green background.

+ +
+
+ + + diff --git a/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_navigate_within_document.htm b/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_navigate_within_document.htm new file mode 100644 index 000000000..c567e40ef --- /dev/null +++ b/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_navigate_within_document.htm @@ -0,0 +1,100 @@ + + + + + window.performance.timing in document navigation + + + + + + + + +

Description

+

This test validates that all of the window.performance.timing attributes remain unchanged after an in document navigation (URL fragment change).

+ +
+ + + diff --git a/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_navigation_redirectCount_none.htm b/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_navigation_redirectCount_none.htm new file mode 100644 index 000000000..8f778c3ff --- /dev/null +++ b/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_navigation_redirectCount_none.htm @@ -0,0 +1,46 @@ + + + + + window.performance.navigation.redirectCount on a non-redirected navigation + + + + + + + + +

Description

+

This test validates that the value of the window.performance.navigation.redirectCount attribute, as well as the window.performance.timing.redirectStart and redirectEnd attributes on a non-redirected navigation.

+ +
+ + + + diff --git a/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_navigation_type_enums.htm b/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_navigation_type_enums.htm new file mode 100644 index 000000000..0e6eeb1c6 --- /dev/null +++ b/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_navigation_type_enums.htm @@ -0,0 +1,49 @@ + + + + + window.performance.navigation enums + + + + + + + + +

Description

+

This test validates that the TYPE_* enumerations of window.performance.navigation exist and their values are correct.

+ +
+ + + + diff --git a/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_navigation_type_reload.htm b/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_navigation_type_reload.htm new file mode 100644 index 000000000..b3ca40cd0 --- /dev/null +++ b/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_navigation_type_reload.htm @@ -0,0 +1,144 @@ + + + + + window.performance.navigation.type with a reloaded navigation + + + + + + + + + + +

Description

+

This test validates the value of window.performance.navigation.type and the values of + window.performance.timing.* with a reloaded navigation.

+ +

This page should be loaded with a green background frame below. The frame will be automatically reloaded + and then verified that +

+

+ +
+
+ + + diff --git a/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_no_previous_document.htm b/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_no_previous_document.htm new file mode 100644 index 000000000..aed699b77 --- /dev/null +++ b/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_no_previous_document.htm @@ -0,0 +1,58 @@ + + + + + window.performance.timing attributes on an initial navigation + + + + + + + + + + + + +

Description

+

This test validates the unload event times are 0 when there is no previous document.

+ +

+ + + diff --git a/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_timing_client_redirect.htm b/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_timing_client_redirect.htm new file mode 100644 index 000000000..f9a2206f4 --- /dev/null +++ b/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_timing_client_redirect.htm @@ -0,0 +1,78 @@ + + + + + window.performance.timing.redirect attributes on a client redirect navigation + + + + + + + + + + + +

Description

+

This test validates the values of the window.navigation.redirectCount and the + window.performance.timing.redirectStart/End times on a client side redirect.

+ +

+ + + diff --git a/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_timing_reload.htm b/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_timing_reload.htm new file mode 100644 index 000000000..b341aface --- /dev/null +++ b/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_timing_reload.htm @@ -0,0 +1,122 @@ + + + + + window.performance.timing attributes after a reloaded navigation + + + + + + + + + + +

Description

+

This test validates that the window.performance.timing attributes change when a page is reloaded.

+ +

This page should be loaded with a green background frame below. The frame will be automatically reloaded + and then verified that the window.performance.timing attributes have been updated to the new reloaded navigation timings.

+ +
+
+ + + + diff --git a/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_timing_server_redirect.htm b/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_timing_server_redirect.htm new file mode 100644 index 000000000..963e785fe --- /dev/null +++ b/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_timing_server_redirect.htm @@ -0,0 +1,55 @@ + + + + + window.performance.timing.redirect attributes on a same-origin server redirected navigation + + + + + + + + + + + +

Description

+

This test validates the values of the window.performance.redirectCount and the + window.performance.timing.redirectStart/End times for a same-origin server side redirect navigation.

+ +
+
+ + + + diff --git a/tct-navigationtiming-w3c-tests/tests.xml b/tct-navigationtiming-w3c-tests/tests.xml index 1d6ab16eb..3676671d9 100644 --- a/tct-navigationtiming-w3c-tests/tests.xml +++ b/tct-navigationtiming-w3c-tests/tests.xml @@ -745,6 +745,166 @@ + + + + + + + This page should be loaded with a yellow frame. It then replaces the document in that frame with a green document. + The test passes if all of the checks to performance.timing are correct and the frame ends with a green background. + + + /opt/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_document_open.htm + + + + + http://www.w3.org/TR/2012/REC-navigation-timing-20121217/ + TBD + + + + + + + + + + This page should be loaded with a yellow frame. It then redirect the document in that frame with a green document. After the page loads, the frame is navigated to a new blank page with a green background. + This test passes if all of the checks to the values of the window.navigation.redirectCount and the window.performance.timing.redirectStart/End times are zero. + + + /opt/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_timing_client_redirect.htm + + + + + http://www.w3.org/TR/2012/REC-navigation-timing-20121217/ + TBD + + + + + + + + + + This page should be redirect to a green frame by the php in same-origin server. After the page redirected, the frame is navigated to a new blank page with a green background. + This test passes if all of the checks to the values of the window.navigation.redirectCount and the window.performance.timing.redirectStart/End times are set correctlly. + + + http://127.0.0.1:80/opt/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_timing_server_redirect.htm + + + + + http://www.w3.org/TR/2012/REC-navigation-timing-20121217/ + TBD + + + + + + + + + + Navigate in document (URL fragment change) + The test passes if all of the checks to performance.timing remain unchanged. + + + /opt/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_navigate_within_document.htm + + + + + http://www.w3.org/TR/2012/REC-navigation-timing-20121217/ + TBD + + + + + + + + + + No redirected navigation is invoked. + This test passes if all of the checks to the values of window.performance.navigation.redirectCount attribute, window.performance.timing.redirectStart and redirectEnd are zero. + + + /opt/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_navigation_redirectCount_none.htm + + + + + http://www.w3.org/TR/2012/REC-navigation-timing-20121217/ + TBD + + + + + + + + + + This page be loaded with a green background frame. The frame will be automatically reloaded. + The window.performance.navigation.type = TYPE_RELOAD. All of the widow.performance.timing.* values after reload are > all of the window.performance.timing.* values prior to reload. + + + /opt/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_navigation_type_reload.htm + + + + + http://www.w3.org/TR/2012/REC-navigation-timing-20121217/ + TBD + + + + + + + + + + Navigated with no previous document. + The window.performance.navigation.type = TYPE_NAVIGATE. Window.performance.timing.unloadEventStart and window.performance.timing.unloadEventEnd values are 0. + + + /opt/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_no_previous_document.htm + + + + + http://www.w3.org/TR/2012/REC-navigation-timing-20121217/ + TBD + + + + + + + + + + This page should be loaded with a green background frame. The frame will be automatically reloaded. + Window.performance.timing attributes have been updated to the new reloaded navigation timings. + + + /opt/tct-navigationtiming-w3c-tests/navigationtiming/w3c/test_timing_reload.htm + + + + + http://www.w3.org/TR/2012/REC-navigation-timing-20121217/ + TBD + + + -- 2.34.1