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

Unified Diff: chrome/test/data/ads_observer/docwrite_provisional_frame.html

Issue 2861433005: [PageLoadMetrics] Reenable AdsMetrics and handle case where navigation aborts (Closed)
Patch Set: Address comments from PS6 Created 3 years, 7 months 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
« no previous file with comments | « chrome/test/BUILD.gn ('k') | chrome/test/data/ads_observer/pixel.png » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/ads_observer/docwrite_provisional_frame.html
diff --git a/chrome/test/data/ads_observer/docwrite_provisional_frame.html b/chrome/test/data/ads_observer/docwrite_provisional_frame.html
new file mode 100644
index 0000000000000000000000000000000000000000..c2a8cc0fa883e8335d7fde608e53b027ebd477ab
--- /dev/null
+++ b/chrome/test/data/ads_observer/docwrite_provisional_frame.html
@@ -0,0 +1,20 @@
+<html>
+<iframe id="slow_frame" name="google_ads_iframe" src="/slow?100"></iframe>
+
+<script>
+ window.addEventListener('message', function(e) {
+ domAutomationController.setAutomationId(0);
+ window.domAutomationController.send(e.data);
+ });
+
+ // slow takes 100 seconds to load, plenty of time to overwrite the
+ // provisional load.
+ let iframe = document.getElementById("slow_frame");
+ let doc = iframe.contentDocument;
+
+ doc.open();
+ doc.write("<html>Rewritten. <img src=pixel.png> <img src=pixel2.png> <img src=pixel3.png onload='parent.postMessage(&quot;loaded&quot;, &quot;*&quot;);'></html>");
+ doc.close();
+</script>
+
+</html>
« no previous file with comments | « chrome/test/BUILD.gn ('k') | chrome/test/data/ads_observer/pixel.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698