Commit 4e8ee876 authored by Noel Gordon's avatar Noel Gordon Committed by Commit Bot

Rename FileManagerBrowserTestBase OnMessage to OnCommand

The test extension comments say they send commands to the browser test
(FileManagerBrowserTestBase) harness. OnMessage() processes them: call
that routine OnCommand instead, to make it clear that it processes the
command messages sent by the test extensions.

No change in behavior, no new tests.

Bug: 833834
Change-Id: Ifea9996804dbc59b434f2b3cf3e5564172e1a22a
Reviewed-on: https://chromium-review.googlesource.com/1034614
Commit-Queue: Noel Gordon <noel@chromium.org>
Reviewed-by: default avatarLuciano Pacheco (SYD) <lucmult@chromium.org>
Cr-Commit-Position: refs/heads/master@{#554727}
parent 4741ed4f
......@@ -635,7 +635,7 @@ void FileManagerBrowserTestBase::RunTestMessageLoop() {
}
std::string output;
OnMessage(name, *message_dictionary, &output);
OnCommand(name, *message_dictionary, &output);
if (HasFatalFailure())
break;
......@@ -643,10 +643,11 @@ void FileManagerBrowserTestBase::RunTestMessageLoop() {
}
}
void FileManagerBrowserTestBase::OnMessage(const std::string& name,
void FileManagerBrowserTestBase::OnCommand(const std::string& name,
const base::DictionaryValue& value,
std::string* output) {
base::ScopedAllowBlockingForTesting allow_blocking;
if (name == "getTestName") {
// Pass the test case name.
*output = GetTestCaseNameParam();
......
......@@ -65,13 +65,13 @@ class FileManagerBrowserTestBase : public ExtensionApiTest {
void InstallExtension(const base::FilePath& path, const char* manifest_name);
// Runs the test: awaits chrome.test messsage commands and chrome.test PASS
// or FAIL messsages to process. |OnMessage| is used to handle the commands
// or FAIL messsages to process. |OnCommand| is used to handle the commands
// sent from the test extension. Returns on test PASS or FAIL.
void RunTestMessageLoop();
// Process test extension command |name|, with arguments |value|. Write the
// results to |output|.
void OnMessage(const std::string& name,
void OnCommand(const std::string& name,
const base::DictionaryValue& value,
std::string* output);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment