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

Unified Diff: chrome/test/data/predictor/predictor_cross_site_subframe_nav.html

Issue 1881463003: Add a browsertest suite for net predictor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a "forgetting" test + fix typo Created 4 years, 8 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
Index: chrome/test/data/predictor/predictor_cross_site_subframe_nav.html
diff --git a/chrome/test/data/predictor/predictor_cross_site_subframe_nav.html b/chrome/test/data/predictor/predictor_cross_site_subframe_nav.html
new file mode 100644
index 0000000000000000000000000000000000000000..09da4f4516a45876633915b79cf1e29ff01ee9f3
--- /dev/null
+++ b/chrome/test/data/predictor/predictor_cross_site_subframe_nav.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<p>
+This page loads an empty cross-site iframe, and exposes a method to navigate it.
+</p>
+<script>
+function getFrameDocument() {
+ return window.frames['iframe'].contentWindow.document;
+}
+
+var navigated = false;
+function notifyLoaded() {
+ if (navigated) {
+ window.domAutomationController.send(true);
+ }
+}
+
+function navigateSubframe(url) {
+ navigated = true;
+ getFrameDocument().location.href = url;
+}
+</script>
+<iframe id="iframe" src="" onload="notifyLoaded();"></iframe>

Powered by Google App Engine
This is Rietveld 408576698