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

Unified Diff: components/test_runner/test_runner.cc

Issue 1989103006: Fix event warning crash when a listener is removed while dispatching event (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed AtomicString usage Created 4 years, 7 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 | « components/test_runner/test_runner.h ('k') | components/test_runner/web_frame_test_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/test_runner/test_runner.cc
diff --git a/components/test_runner/test_runner.cc b/components/test_runner/test_runner.cc
index 18285eb09bd27972a340151d90fd4623e407a1df..99d728b2a6f11354303aa9158f0351c51ffe984d 100644
--- a/components/test_runner/test_runner.cc
+++ b/components/test_runner/test_runner.cc
@@ -211,6 +211,7 @@ class TestRunnerBindings : public gin::Wrappable<TestRunnerBindings> {
void SetDatabaseQuota(int quota);
void SetDomainRelaxationForbiddenForURLScheme(bool forbidden,
const std::string& scheme);
+ void SetDumpConsoleMessages(bool value);
void SetImagesAllowed(bool allowed);
void SetIsolatedWorldContentSecurityPolicy(int world_id,
const std::string& policy);
@@ -511,6 +512,8 @@ gin::ObjectTemplateBuilder TestRunnerBindings::GetObjectTemplateBuilder(
.SetMethod("setDatabaseQuota", &TestRunnerBindings::SetDatabaseQuota)
.SetMethod("setDomainRelaxationForbiddenForURLScheme",
&TestRunnerBindings::SetDomainRelaxationForbiddenForURLScheme)
+ .SetMethod("setDumpConsoleMessages",
+ &TestRunnerBindings::SetDumpConsoleMessages)
.SetMethod("setIconDatabaseEnabled", &TestRunnerBindings::NotImplemented)
.SetMethod("setImagesAllowed", &TestRunnerBindings::SetImagesAllowed)
.SetMethod("setIsolatedWorldContentSecurityPolicy",
@@ -697,6 +700,11 @@ void TestRunnerBindings::SetDomainRelaxationForbiddenForURLScheme(
view_runner_->SetDomainRelaxationForbiddenForURLScheme(forbidden, scheme);
}
+void TestRunnerBindings::SetDumpConsoleMessages(bool enabled) {
+ if (runner_)
+ runner_->SetDumpConsoleMessages(enabled);
+}
+
v8::Local<v8::Value>
TestRunnerBindings::EvaluateScriptInIsolatedWorldAndReturnValue(
int world_id, const std::string& script) {
@@ -2553,6 +2561,15 @@ void TestRunner::DumpNavigationPolicy() {
OnLayoutTestRuntimeFlagsChanged();
}
+void TestRunner::SetDumpConsoleMessages(bool value) {
+ layout_test_runtime_flags_.set_dump_console_messages(value);
+ OnLayoutTestRuntimeFlagsChanged();
+}
+
+bool TestRunner::ShouldDumpConsoleMessages() const {
+ return layout_test_runtime_flags_.dump_console_messages();
+}
+
void TestRunner::CloseWebInspector() {
delegate_->CloseDevTools();
}
« no previous file with comments | « components/test_runner/test_runner.h ('k') | components/test_runner/web_frame_test_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698