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

Unified Diff: LayoutTests/inspector/console/console-filter-level-test.html

Issue 102003004: [DevTools] Do not filter manually entered commands in console. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed blank lines. 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
« no previous file with comments | « no previous file | LayoutTests/inspector/console/console-filter-level-test-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/inspector/console/console-filter-level-test.html
diff --git a/LayoutTests/inspector/console/console-filter-level-test.html b/LayoutTests/inspector/console/console-filter-level-test.html
new file mode 100644
index 0000000000000000000000000000000000000000..caa60f82caa0fa4f112e17b7fb36fd08dd5303e3
--- /dev/null
+++ b/LayoutTests/inspector/console/console-filter-level-test.html
@@ -0,0 +1,103 @@
+<html>
+<head>
+<script src="../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../http/tests/inspector/console-test.js"></script>
+<script src="resources/log-source.js"></script>
+<script>
+// Create a mix of log messages from different source files
+function onload()
+{
+ console.info("sample info");
+ console.log("sample log");
+ console.warn("sample warning");
+ console.debug("sample debug");
+ console.error("sample error");
+
+ console.info("abc info");
+ console.info("def info");
+
+ console.warn("abc warn");
+ console.warn("def warn");
+
+ runTest();
+}
+
+function test()
+{
+ var messagesElement = WebInspector.consoleView.messagesElement;
+
+ function dumpVisibleMessages()
+ {
+ var children = WebInspector.consoleView.topGroup.element.childNodes[0].childNodes;
+
+ for (var i = 0; i < children.length; i++)
+ InspectorTest.addResult(">" + children[i].textContent);
+ }
+
+ var testSuite = [
+ function beforeFilter(next)
+ {
+ InspectorTest.addResult(arguments.callee.name);
+ dumpVisibleMessages();
+ next();
+ },
+
+ function onlyWarning(next)
+ {
+ WebInspector.consoleView._filter._levelFilterUI._toggleTypeFilter("warning");
+ dumpVisibleMessages();
+ next();
+ },
+
+ function onlyLog(next)
+ {
+ WebInspector.consoleView._filter._levelFilterUI._toggleTypeFilter("log");
+ dumpVisibleMessages();
+ next();
+ },
+
+ function onlyErrorDebug(next)
+ {
+ WebInspector.consoleView._filter._levelFilterUI._toggleTypeFilter("error");
+ WebInspector.consoleView._filter._levelFilterUI._toggleTypeFilter("debug", true);
+ dumpVisibleMessages();
+ next();
+ },
+
+ function onlyAbcMessagePlain(next)
+ {
+ WebInspector.consoleView._filter._levelFilterUI._toggleTypeFilter(WebInspector.NamedBitSetFilterUI.ALL_TYPES);
+ WebInspector.consoleView._filter._textFilterUI.setValue("abc");
+ dumpVisibleMessages();
+ next();
+ },
+
+ function onlyAbcMessageRegex(next)
+ {
+ WebInspector.consoleView._filter._textFilterUI._regexCheckBox.checked = "checked";
+ WebInspector.consoleView._filter._textFilterUI.setValue("ab[a-z]");
+ dumpVisibleMessages();
+ next();
+ },
+
+ function onlyAbcMessageRegexWarning(next)
+ {
+ WebInspector.consoleView._filter._levelFilterUI._toggleTypeFilter("warning", false);
+ dumpVisibleMessages();
+ next();
+ }
+ ]
+
+ InspectorTest.evaluateInConsole("'Should be always visible'", InspectorTest.runTestSuite.bind(InspectorTest, testSuite));
+}
+
+</script>
+</head>
+
+<body onload="onload()">
+<p>
+ Tests that console can filter messages by source.
+</p>
+
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/inspector/console/console-filter-level-test-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698