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

Unified Diff: third_party/WebKit/LayoutTests/inspector/console/console-clear-function.html

Issue 2970313002: DevTools: do not clear console when preserving log (Closed)
Patch Set: remove unused file Created 3 years, 5 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/console/console-clear-function-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/inspector/console/console-clear-function.html
diff --git a/third_party/WebKit/LayoutTests/inspector/console/console-clear-function.html b/third_party/WebKit/LayoutTests/inspector/console/console-clear-function.html
index 691ce566696ea3b712a80701254f7db356a1cb24..d282e05314ac01a4dceef7b3f40cea58d7175483 100644
--- a/third_party/WebKit/LayoutTests/inspector/console/console-clear-function.html
+++ b/third_party/WebKit/LayoutTests/inspector/console/console-clear-function.html
@@ -12,23 +12,40 @@ function log()
console.log("three");
}
-log();
-
-function foo()
+function clearConsoleFromPage()
{
console.clear();
}
async function test()
{
- InspectorTest.addResult("=== Before clear ===");
- InspectorTest.dumpConsoleMessages();
-
- await InspectorTest.RuntimeAgent.evaluate("foo();");
-
- InspectorTest.addResult("=== After clear ===");
- InspectorTest.dumpConsoleMessages();
- InspectorTest.completeTest();
+ InspectorTest.runTestSuite([
+ async function clearFromConsoleAPI(next) {
+ await InspectorTest.RuntimeAgent.evaluate("log();");
+ InspectorTest.addResult("=== Before clear ===");
+ InspectorTest.dumpConsoleMessages();
+
+ await InspectorTest.RuntimeAgent.evaluate("clearConsoleFromPage();");
+
+ InspectorTest.addResult("=== After clear ===");
+ InspectorTest.dumpConsoleMessages();
+ next();
+ },
+
+ async function shouldNotClearWithPreserveLog(next) {
+ await InspectorTest.RuntimeAgent.evaluate("log();");
+ InspectorTest.addResult("=== Before clear ===");
+ InspectorTest.dumpConsoleMessages();
+ Common.moduleSetting("preserveConsoleLog").set(true);
+
+ await InspectorTest.RuntimeAgent.evaluate("clearConsoleFromPage();");
+
+ InspectorTest.addResult("=== After clear ===");
+ InspectorTest.dumpConsoleMessages();
+ Common.moduleSetting("preserveConsoleLog").set(false);
+ next();
+ }
+ ]);
}
</script>
@@ -38,7 +55,7 @@ async function test()
<p>
Tests that console is cleared via console.clear() method
</p>
-<a href="https://bugs.webkit.org/show_bug.cgi?id=101021">Bug 101021 </a>
+<a href="https://bugs.webkit.org/show_bug.cgi?id=101021">Bug 101021</a>
</body>
</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/console/console-clear-function-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698