Skip to content

Commit

Permalink
[ResourceTiming]: Update nested-context family of tests
Browse files Browse the repository at this point in the history
This change updates the named tests to more closely conform to the new
style guide in wpt/resource-timing/CodingConventions.md.

There should be no behavioural changes with this CL.

GithubIssue: w3c/resource-timing#254
Bug: 1171767
Change-Id: I69b85941d4e65351fde398c24e6c34b40f51adae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3141532
Auto-Submit: Tom McKee <tommckee@chromium.org>
Reviewed-by: Yoav Weiss <yoavweiss@chromium.org>
Commit-Queue: Yoav Weiss <yoavweiss@chromium.org>
Cr-Commit-Position: refs/heads/main@{#925777}
  • Loading branch information
tommckee1 authored and chromium-wpt-export-bot committed Sep 28, 2021
1 parent a9327c5 commit 258520b
Show file tree
Hide file tree
Showing 17 changed files with 205 additions and 141 deletions.
20 changes: 14 additions & 6 deletions resource-timing/nested-context-navigations-embed.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,19 @@
<script src="/common/get-host-info.sub.js"></script>
<script src="resources/nested-contexts.js"></script>
<script>
open_test_window("resources/embed-navigate-back.html", "Test that embed navigations are not observable by the parent, even after history navigations by the parent");
open_test_window("resources/embed-navigate-back.html?crossorigin", "Test that crossorigin embed navigations are not observable by the parent, even after history navigations by the parent");
open_test_window("resources/embed-navigate.html", "Test that embed navigations are not observable by the parent");
open_test_window("resources/embed-navigate.html?crossorigin", "Test that crossorigin embed navigations are not observable by the parent");
open_test_window("resources/embed-refresh.html", "Test that embed refreshes are not observable by the parent");
open_test_window("resources/embed-refresh.html?crossorigin", "Test that crossorigin embed refreshes are not observable by the parent");
open_test_window("resources/embed-navigate-back.html",
"Test that embed navigations are not observable by the parent, even " +
"after history navigations by the parent");
open_test_window("resources/embed-navigate-back.html?crossorigin",
"Test that crossorigin embed navigations are not observable by the " +
"parent, even after history navigations by the parent");
open_test_window("resources/embed-navigate.html",
"Test that embed navigations are not observable by the parent");
open_test_window("resources/embed-navigate.html?crossorigin",
"Test that crossorigin embed navigations are not observable by the parent");
open_test_window("resources/embed-refresh.html",
"Test that embed refreshes are not observable by the parent");
open_test_window("resources/embed-refresh.html?crossorigin",
"Test that crossorigin embed refreshes are not observable by the parent");
</script>

21 changes: 15 additions & 6 deletions resource-timing/nested-context-navigations-iframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,20 @@
<script src="/common/get-host-info.sub.js"></script>
<script src="resources/nested-contexts.js"></script>
<script>
open_test_window("resources/iframe-navigate-back.html", "Test that iframe navigations are not observable by the parent, even after history navigations by the parent");
open_test_window("resources/iframe-navigate-back.html?crossorigin", "Test that crossorigin iframe navigations are not observable by the parent, even after history navigations by the parent");
open_test_window("resources/iframe-navigate.html", "Test that iframe navigations are not observable by the parent");
open_test_window("resources/iframe-navigate.html?crossorigin", "Test that crossorigin iframe navigations are not observable by the parent");
open_test_window("resources/iframe-refresh.html", "Test that iframe refreshes are not observable by the parent");
open_test_window("resources/iframe-refresh.html?crossorigin", "Test that crossorigin iframe refreshes are not observable by the parent");
open_test_window("resources/iframe-navigate-back.html",
"Test that iframe navigations are not observable by the parent, even " +
"after history navigations by the parent");
open_test_window("resources/iframe-navigate-back.html?crossorigin",
"Test that crossorigin iframe navigations are not observable by the " +
"parent, even after history navigations by the parent");
open_test_window("resources/iframe-navigate.html",
"Test that iframe navigations are not observable by the parent");
open_test_window("resources/iframe-navigate.html?crossorigin",
"Test that crossorigin iframe navigations are not observable by the " +
"parent");
open_test_window("resources/iframe-refresh.html",
"Test that iframe refreshes are not observable by the parent");
open_test_window("resources/iframe-refresh.html?crossorigin",
"Test that crossorigin iframe refreshes are not observable by the parent");
</script>

21 changes: 15 additions & 6 deletions resource-timing/nested-context-navigations-object.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,20 @@
<script src="/common/get-host-info.sub.js"></script>
<script src="resources/nested-contexts.js"></script>
<script>
open_test_window("resources/object-navigate-back.html", "Test that object navigations are not observable by the parent, even after history navigations by the parent");
open_test_window("resources/object-navigate-back.html?crossorigin", "Test that crossorigin object navigations are not observable by the parent, even after history navigations by the parent");
open_test_window("resources/object-navigate.html", "Test that object navigations are not observable by the parent");
open_test_window("resources/object-navigate.html?crossorigin", "Test that crossorigin object navigations are not observable by the parent");
open_test_window("resources/object-refresh.html", "Test that object refreshes are not observable by the parent");
open_test_window("resources/object-refresh.html?crossorigin", "Test that crossorigin object refreshes are not observable by the parent");
open_test_window("resources/object-navigate-back.html",
"Test that object navigations are not observable by the parent, even " +
"after history navigations by the parent");
open_test_window("resources/object-navigate-back.html?crossorigin",
"Test that crossorigin object navigations are not observable by the " +
"parent, even after history navigations by the parent");
open_test_window("resources/object-navigate.html",
"Test that object navigations are not observable by the parent");
open_test_window("resources/object-navigate.html?crossorigin",
"Test that crossorigin object navigations are not observable by the " +
"parent");
open_test_window("resources/object-refresh.html",
"Test that object refreshes are not observable by the parent");
open_test_window("resources/object-refresh.html?crossorigin",
"Test that crossorigin object refreshes are not observable by the parent");
</script>

4 changes: 2 additions & 2 deletions resource-timing/resources/document-navigated.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<meta charset="utf-8" />
</head>
<body>
navigated document!
Navigated document!
<script>
top.postMessage("navigated", "*");
top.postMessage("navigated", "*");
</script>
</body>
</html>
4 changes: 2 additions & 2 deletions resource-timing/resources/document-refreshed.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<meta charset="utf-8" />
</head>
<body>
Refreshed document!
Refreshed document!
<script>
top.postMessage("refreshed", "*");
top.postMessage("refreshed", "*");
</script>
</body>
</html>
2 changes: 1 addition & 1 deletion resource-timing/resources/document-that-navigates.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</head>
<body>
<script>
location.href="document-navigated.html";
location.href="document-navigated.html";
</script>
</body>
</html>
3 changes: 2 additions & 1 deletion resource-timing/resources/document-that-refreshes.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
<meta charset="utf-8" />
<meta http-equiv="refresh" content="0;document-refreshed.html">
</head>
<body></body>
<body>
</body>
</html>
11 changes: 7 additions & 4 deletions resource-timing/resources/embed-navigate-back.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
<head>
<meta charset="utf-8" />
<title>Resource Timing embed navigate - back button navigation</title>
<body onunload="/*disable bfcache*/"></body>
</head>
<body onunload="/*disable bfcache*/">
<script src="/common/get-host-info.sub.js"></script>
<script src="nested-contexts.js"></script>
<script>
setup_back_navigation("embed-navigate-back.html");
setup_back_navigation("embed-navigate-back.html");
</script>
<embed type="text/html">
<embed id="target" type="text/html">
<script>
document.getElementsByTagName("embed")[0].src = pre_navigate_url;
target.src = pre_navigate_url;
</script>
</body>
</html>
11 changes: 7 additions & 4 deletions resource-timing/resources/embed-navigate.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
<head>
<meta charset="utf-8" />
<title>Resource Timing embed navigate</title>
</head>
<body>
<script src="/common/get-host-info.sub.js"></script>
<script src="nested-contexts.js"></script>
<script>
setup_navigate_test();
setup_navigate_test();
</script>
<div id=log></div>
<embed type="text/html">
<embed id="target" type="text/html">
<script>
document.getElementsByTagName("embed")[0].src = pre_navigate_url;
target.src = pre_navigate_url;
</script>
</body>
</html>
11 changes: 7 additions & 4 deletions resource-timing/resources/embed-refresh.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
<head>
<meta charset="utf-8" />
<title>Resource Timing embed refresh</title>
</head>
<body>
<script src="/common/get-host-info.sub.js"></script>
<script src="nested-contexts.js"></script>
<script>
setup_refresh_test();
setup_refresh_test();
</script>
<div id=log></div>
<embed type="text/html">
<embed id="target" type="text/html">
<script>
document.getElementsByTagName("embed")[0].src = pre_refresh_url;
target.src = pre_refresh_url;
</script>
</body>
</html>
11 changes: 7 additions & 4 deletions resource-timing/resources/iframe-navigate-back.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
<head>
<meta charset="utf-8" />
<title>Resource Timing iframe navigate - back button navigation</title>
<body onunload="/*disable bfcache*/"></body>
</head>
<body onunload="/*disable bfcache*/">
<script src="/common/get-host-info.sub.js"></script>
<script src="nested-contexts.js"></script>
<script>
setup_back_navigation("iframe-navigate-back.html");
setup_back_navigation("iframe-navigate-back.html");
</script>
<iframe></iframe>
<iframe id="target"></iframe>
<script>
document.getElementsByTagName("iframe")[0].src = pre_navigate_url;
target.src = pre_navigate_url;
</script>
</body>
</html>
11 changes: 7 additions & 4 deletions resource-timing/resources/iframe-navigate.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
<head>
<meta charset="utf-8" />
<title>Resource Timing iframe navigate</title>
</head>
<body>
<script src="/common/get-host-info.sub.js"></script>
<script src="nested-contexts.js"></script>
<script>
setup_navigate_test();
setup_navigate_test();
</script>
<div id=log></div>
<iframe></iframe>
<iframe id="target"></iframe>
<script>
document.getElementsByTagName("iframe")[0].src = pre_navigate_url;
target.src = pre_navigate_url;
</script>
</body>
</html>
11 changes: 7 additions & 4 deletions resource-timing/resources/iframe-refresh.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
<head>
<meta charset="utf-8" />
<title>Resource Timing iframe refresh</title>
</head>
<body>
<script src="/common/get-host-info.sub.js"></script>
<script src="nested-contexts.js"></script>
<script>
setup_refresh_test();
setup_refresh_test();
</script>
<div id=log></div>
<iframe></iframe>
<iframe id="target"></iframe>
<script>
document.getElementsByTagName("iframe")[0].src = pre_refresh_url;
target.src = pre_refresh_url;
</script>
</body>
</html>
Loading

0 comments on commit 258520b

Please sign in to comment.