summaryrefslogtreecommitdiffstats
path: root/layout/tools/tests/content_dumping.html
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /layout/tools/tests/content_dumping.html
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'layout/tools/tests/content_dumping.html')
-rw-r--r--layout/tools/tests/content_dumping.html101
1 files changed, 101 insertions, 0 deletions
diff --git a/layout/tools/tests/content_dumping.html b/layout/tools/tests/content_dumping.html
new file mode 100644
index 000000000..d89b802a3
--- /dev/null
+++ b/layout/tools/tests/content_dumping.html
@@ -0,0 +1,101 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
+<html>
+<head>
+ <title>Control Frame</title>
+</head>
+
+<script type="application/javascript">
+
+const nsILayoutDebuggingTools = Components.interfaces.nsILayoutDebuggingTools;
+var gDebugTools;
+
+function Init()
+{
+ netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+ gDebugTools = Components.classes["@mozilla.org/layout-debug/layout-debuggingtools;1"].createInstance(nsILayoutDebuggingTools);
+ gDebugTools.init(window.frames.pageframe);
+}
+
+function SetShowFrameBorders(inShow)
+{
+ netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+ gDebugTools.visualDebugging = inShow;
+}
+
+function SetShowEventTargetBorders(inShow)
+{
+ netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+ gDebugTools.visualEventDebugging = inShow;
+}
+
+function SetShowReflowStats(inShow)
+{
+ netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+ gDebugTools.reflowCounts = inShow;
+}
+
+function DumpFrames()
+{
+ netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+ gDebugTools.dumpFrames();
+}
+
+function DumpContent()
+{
+ netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+ gDebugTools.dumpContent();
+}
+
+function DumpViews()
+{
+ netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+ gDebugTools.dumpViews();
+}
+
+function DumpWebShells()
+{
+ netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+ gDebugTools.dumpWebShells();
+}
+
+function InputKey(inEvent)
+{
+ if (inEvent.keyCode == KeyEvent.DOM_VK_RETURN)
+ {
+ var pageFrame = window.frames.pageframe;
+ pageFrame.location.href = document.dumpform.urlfield.value;
+ inEvent.preventDefault(); // avoid form submit on hitting return
+ }
+}
+
+function IframeLoaded()
+{
+ netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+ document.dumpform.urlfield.value = window.frames.pageframe.location.href;
+}
+</script>
+
+<body onload="Init()">
+
+<form name="dumpform">
+<div style="margin-bottom: 5px">
+URL: <input type="text" size="100" name="urlfield" value="http://www.mozilla.org" onkeypress="InputKey(event)"></input>
+</div>
+<div>
+<input type="button" value="Dump Frames" onclick="DumpFrames()">
+<input type="button" value="Dump Content" onclick="DumpContent()">
+<input type="button" value="Dump Views" onclick="DumpViews()">
+<input type="button" value="Dump WebShells" onclick="DumpWebShells()">
+
+<input type="checkbox" id="showBordersCheck" name="showBordersCheck"
+ onchange="SetShowFrameBorders(document.dumpform.showBordersCheck.checked)"></input>
+<label for="showBordersCheck">Show Frame Borders</label>
+</div>
+</form>
+
+<iframe name="pageframe" style="border: 1px solid black; width:800px; height:800px;" onload="IframeLoaded()"></iframe>
+
+</body>
+</html>
+