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

Unified Diff: third_party/WebKit/Source/devtools/tests/console/console-assert.html

Issue 2772553002: DevTools: copy console tests to /Source/devtools/tests/ (Closed)
Patch Set: w/ docs & moves Created 3 years, 9 months 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: third_party/WebKit/Source/devtools/tests/console/console-assert.html
diff --git a/third_party/WebKit/Source/devtools/tests/console/console-assert.html b/third_party/WebKit/Source/devtools/tests/console/console-assert.html
new file mode 100644
index 0000000000000000000000000000000000000000..5f7dcc0b7febcf79f2b7ebbf2595ba0f614086a8
--- /dev/null
+++ b/third_party/WebKit/Source/devtools/tests/console/console-assert.html
@@ -0,0 +1,49 @@
+<html>
+<head>
+<script src="../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../http/tests/inspector/console-test.js"></script>
+
+<script>
+function b()
+{
+ console.assert(false, 1);
+ console.assert(false, "a", "b");
+}
+
+function a()
+{
+ b();
+}
+//# sourceURL=console-assert.html
+</script>
+
+<script>
+function test()
+{
+ var callCount = 0;
+ function callback()
+ {
+ if (++callCount === 2)
+ InspectorTest.expandConsoleMessages(onExpandedMessages);
+ }
+
+ function onExpandedMessages()
+ {
+ InspectorTest.dumpConsoleMessages();
+ InspectorTest.completeTest();
+ }
+
+ InspectorTest.evaluateInPage("setTimeout(a, 0)");
+ InspectorTest.addConsoleSniffer(callback, true);
+}
+
+</script>
+</head>
+
+<body onload="runTest()">
+<p>
+Tests that console.assert() will dump a message and stack trace with source URLs and line numbers.
+</p>
+
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698