summaryrefslogtreecommitdiffstats
path: root/WebCore/manual-tests/load-deferrer-script-element.html
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/manual-tests/load-deferrer-script-element.html')
-rw-r--r--WebCore/manual-tests/load-deferrer-script-element.html44
1 files changed, 44 insertions, 0 deletions
diff --git a/WebCore/manual-tests/load-deferrer-script-element.html b/WebCore/manual-tests/load-deferrer-script-element.html
new file mode 100644
index 0000000..c0ad773
--- /dev/null
+++ b/WebCore/manual-tests/load-deferrer-script-element.html
@@ -0,0 +1,44 @@
+<html>
+<head>
+<script>
+function log(message)
+{
+ document.getElementById("result").innerHTML += message + "<br>";
+}
+
+function loadJSFile(){
+ var s = document.createElement('script')
+ s.setAttribute("type", "text/javascript")
+ s.setAttribute("src", "resources/load-deferrer-script-element.js")
+
+ document.getElementsByTagName("head")[0].appendChild(s);
+}
+
+jsLoaded = false;
+runningModal = false;
+
+// This line will load external script into memory.
+loadJSFile();
+
+function runModal()
+{
+ jsLoaded = true;
+ loadJSFile();
+
+ runningModal = true;
+ alert("Scripts should not be running in the background!");
+ runningModal = false;
+}
+</script>
+</head>
+
+<body>
+
+<p>This tests the bug https://bugs.webkit.org/show_bug.cgi?id=38910.
+Click the button, wait 5 seconds and close it.
+The test passes if no error messages show up in the page!</p>
+<input id="button" type="button" value="click me" onclick="runModal()"/>
+<p id="result"></p>
+
+</body>
+</html>