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

Unified Diff: content/test/data/simple_links.html

Issue 868313004: Revert "Revert of PlzNavigate: Add a browser test for basic navigations" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Nasko's comments Created 5 years, 11 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 | « content/renderer/render_frame_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/data/simple_links.html
diff --git a/content/test/data/simple_links.html b/content/test/data/simple_links.html
new file mode 100644
index 0000000000000000000000000000000000000000..e5206796c18df919716a7dd710559cfc0d052011
--- /dev/null
+++ b/content/test/data/simple_links.html
@@ -0,0 +1,33 @@
+<html>
+
+ <head><title>Simple links</title>
+ <script>
+ function simulateClick(target) {
+ var evt = document.createEvent("MouseEvents");
+ evt.initMouseEvent("click", true, true, window,
+ 0, 0, 0, 0, 0, false, false,
+ false, false, 0, null);
+
+ return target.dispatchEvent(evt);
+ }
+
+ function setPortNumber(portNumber) {
+ var link = document.getElementById("cross_site_link");
+ link.setAttribute("href", "http://foo.com:" + portNumber + "/title2.html");
+ return true;
+ }
+
+ function clickSameSiteLink() {
+ return simulateClick(document.getElementById("same_site_link"));
+ }
+
+ function clickCrossSiteLink() {
+ return simulateClick(document.getElementById("cross_site_link"));
+ }
+ </script>
+ </head>
+
+<a href="title2.html" id="same_site_link">same-site</a><br>
+<a href="http://foo.com/title2.html" id="cross_site_link">cross-site</a><br>
+
+</html>
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698