From 5785c3c2a06337580e040f84bb6ddb95cc24399c Mon Sep 17 00:00:00 2001 From: kkapsner Date: Wed, 22 May 2019 23:39:56 +0200 Subject: [PATCH] Added test with iFrame For #321 --- test/navigatorTest.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/test/navigatorTest.js b/test/navigatorTest.js index 3012aee..aebf109 100644 --- a/test/navigatorTest.js +++ b/test/navigatorTest.js @@ -32,3 +32,23 @@ Object.keys(navigator.__proto__).sort().forEach(function(property){ log(property + ": " + value); } }); + +var section = document.createElement("h2"); +section.textContent = "Values in iFrame"; +document.getElementById("log").append(section); + +log = createLog(); + +var iframe = document.createElement("iframe"); +document.body.appendChild(iframe); +var iframeWindow = frames[frames.length - 1]; + +Object.keys(navigator.__proto__).sort().forEach(function(property){ + "use strict"; + + var value = iframeWindow.navigator[property]; + if ((typeof value) === "string"){ + log(property + "@iframe: " + value); + } +}); +document.body.removeChild(iframe); \ No newline at end of file