From 1a59f5e0ddfc75b2371289fe4bcd2093538abf53 Mon Sep 17 00:00:00 2001 From: Stephen Heaps Date: Tue, 29 Oct 2024 13:24:47 -0400 Subject: [PATCH] Add local frames test page. --- local-frames/brave-logo-sans-text.svg | 1 + local-frames/test.html | 44 +++++++++++++++++++++++++++ local-frames/test.js | 17 +++++++++++ 3 files changed, 62 insertions(+) create mode 100644 local-frames/brave-logo-sans-text.svg create mode 100644 local-frames/test.html create mode 100644 local-frames/test.js diff --git a/local-frames/brave-logo-sans-text.svg b/local-frames/brave-logo-sans-text.svg new file mode 100644 index 0000000..062dc89 --- /dev/null +++ b/local-frames/brave-logo-sans-text.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/local-frames/test.html b/local-frames/test.html new file mode 100644 index 0000000..831fd77 --- /dev/null +++ b/local-frames/test.html @@ -0,0 +1,44 @@ + + + + +
+ +
+ + + + + \ No newline at end of file diff --git a/local-frames/test.js b/local-frames/test.js new file mode 100644 index 0000000..1ed1263 --- /dev/null +++ b/local-frames/test.js @@ -0,0 +1,17 @@ +console.log('First Party Local Frame'); + +const text = document.createElement('h1'); +text.textContent = 'First Party Local Script'; +document.body.appendChild(text); + +var xhttp = new XMLHttpRequest(); +xhttp.onreadystatechange = function() { + if (this.readyState == 4 && this.status == 200) { + // Typical action to be performed when the document is ready: + const hp = document.createElement('p'); + hp.textContent = xhttp.responseText; + document.body.appendChild(hp); + } +}; +xhttp.open("GET", "https://blockrequests.localframetesting.xyz/ads/index.txt", true); +xhttp.send(); \ No newline at end of file