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

Unified Diff: LayoutTests/inspector/console-document-write-from-external-script-logging.html

Issue 110183005: DevTools: added console warning when call to document.write() from async script is ignored (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed tests Created 7 years 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
Index: LayoutTests/inspector/console-document-write-from-external-script-logging.html
diff --git a/LayoutTests/inspector/console-document-write-from-external-script-logging.html b/LayoutTests/inspector/console-document-write-from-external-script-logging.html
new file mode 100644
index 0000000000000000000000000000000000000000..3508442ff29e7eae83f6194e8fac5715fa836f3f
--- /dev/null
+++ b/LayoutTests/inspector/console-document-write-from-external-script-logging.html
@@ -0,0 +1,29 @@
+<html>
+<head>
+<script src="../http/tests/inspector/inspector-test.js"></script>
+<script src="../http/tests/inspector/console-test.js"></script>
+<script>
+function loadExternalScript()
+{
+ var scriptElement = document.createElement("script");
+ scriptElement.src = "resources/external-script-with-document-write.js";
+ document.body.appendChild(scriptElement);
+}
+
+function test()
+{
+ InspectorTest.addConsoleSniffer(step1);
+ InspectorTest.evaluateInPage("loadExternalScript()", function(){});
+
+ function step1()
+ {
+ InspectorTest.dumpConsoleMessages();
+ InspectorTest.completeTest();
+ }
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>Tests that ignored document.write() called from an external asynchronously loaded script is reported to console as a warning</p>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698