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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/devtools-js/console-clear.js

Issue 2837083003: DevTools: create test infrastructure so devtools drives the test (Closed)
Patch Set: all Created 3 years, 6 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/LayoutTests/http/tests/inspector/devtools-js/console-clear.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/devtools-js/console-clear.js b/third_party/WebKit/LayoutTests/http/tests/inspector/devtools-js/console-clear.js
new file mode 100644
index 0000000000000000000000000000000000000000..9218aecb2041200641cd56576598dae46e5bb8bc
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/devtools-js/console-clear.js
@@ -0,0 +1,29 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+(async function() {
+ TestRunner.addResult("Tests that console is cleared upon requestClearMessages call.\n");
+
+ await TestRunner.loadPanel("console")
+ await TestRunner.loadLazyModules(["console_test_runner"]);
dgozman 2017/06/19 22:55:51 loadModule("console_test_runner")
chenwilliam 2017/06/19 23:48:17 Done.
+
+ function log() {
+ // Fill console.
+ console.log("one");
+ console.log("two");
+ console.log("three");
+ }
+
+ await TestRunner.evaluateInPagePromise(`(${log.toString()})()`);
+ TestRunner.addResult("=== Before clear ===");
+ ConsoleTestRunner.dumpConsoleMessages();
+
+ Console.ConsoleView.clearConsole();
+ TestRunner.deprecatedRunAfterPendingDispatches(callback);
+ function callback() {
+ TestRunner.addResult("=== After clear ===");
+ ConsoleTestRunner.dumpConsoleMessages();
+ TestRunner.completeTest();
+ }
+})();

Powered by Google App Engine
This is Rietveld 408576698