Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4746)

Unified Diff: chrome/test/data/subresource_filter/frame_with_delayed_script.html

Issue 2574193002: Make subresource filter activation agnostic of in-page navigations. (Closed)
Patch Set: Final test fix. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/subresource_filter/frame_with_delayed_script.html
diff --git a/chrome/test/data/subresource_filter/frame_with_delayed_script.html b/chrome/test/data/subresource_filter/frame_with_delayed_script.html
index d7033a31bfd3fd1a4670f71dd16d4eec49077fb3..1b7d4d38876c78d8b815e398a968a7cdabcb2012 100644
--- a/chrome/test/data/subresource_filter/frame_with_delayed_script.html
+++ b/chrome/test/data/subresource_filter/frame_with_delayed_script.html
@@ -1,15 +1,14 @@
<html>
<head>
<script type="text/javascript">
- function runny() {
- var s = document.createElement("script");
- s.type = "text/javascript"
- s.src = "included_script.js";
- // Makes sure that the test would non-flakily fail if the subresource
- // is allowed to load.
- s.async = false;
- document.head.appendChild(s);
- }
+ function insertScriptElementAndReportSuccess() {
+ var s = document.createElement("script");
+ s.type = "text/javascript"
+ s.src = "included_script.js";
+ s.onload = () => { window.domAutomationController.send(true); }
+ s.onerror = () => { window.domAutomationController.send(false); }
+ document.head.appendChild(s);
+ }
</script>
</head>
</html>

Powered by Google App Engine
This is Rietveld 408576698