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

Unified Diff: components/test_runner/test_runner.cc

Issue 2404443002: Web MIDI: use midi_service.mojom for media::midi::Result (Closed)
Patch Set: yhirano@ review Created 4 years, 2 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: components/test_runner/test_runner.cc
diff --git a/components/test_runner/test_runner.cc b/components/test_runner/test_runner.cc
index 86185b48a8917e53e83714249e615ee18fc4d34a..461e9516091edaa26d3e2689f95b79ec5905082f 100644
--- a/components/test_runner/test_runner.cc
+++ b/components/test_runner/test_runner.cc
@@ -1349,8 +1349,11 @@ void TestRunnerBindings::SetPOSIXLocale(const std::string& locale) {
}
void TestRunnerBindings::SetMIDIAccessorResult(bool result) {
- if (runner_)
- runner_->SetMIDIAccessorResult(result);
+ if (runner_) {
+ runner_->SetMIDIAccessorResult(
+ result ? midi::mojom::Result::OK
+ : midi::mojom::Result::INITIALIZATION_ERROR);
+ }
}
void TestRunnerBindings::SimulateWebNotificationClick(const std::string& title,
@@ -1645,7 +1648,7 @@ void TestRunner::Reset() {
dump_back_forward_list_ = false;
test_repaint_ = false;
sweep_horizontally_ = false;
- midi_accessor_result_ = true;
+ midi_accessor_result_ = midi::mojom::Result::OK;
has_custom_text_output_ = false;
custom_text_output_.clear();
@@ -1942,7 +1945,7 @@ bool TestRunner::shouldDumpNavigationPolicy() const {
return layout_test_runtime_flags_.dump_navigation_policy();
}
-bool TestRunner::midiAccessorResult() {
+midi::mojom::Result TestRunner::midiAccessorResult() {
return midi_accessor_result_;
}
@@ -2681,7 +2684,7 @@ void TestRunner::SetPOSIXLocale(const std::string& locale) {
delegate_->SetLocale(locale);
}
-void TestRunner::SetMIDIAccessorResult(bool result) {
+void TestRunner::SetMIDIAccessorResult(midi::mojom::Result result) {
midi_accessor_result_ = result;
}

Powered by Google App Engine
This is Rietveld 408576698