[cleanup][last_focus_time test] While reading the code.
* Remove namespace in struct mention in TestPoint name.
* Fewer lines of code to init a VectorPtr with 1 element.
TEST=existing
Change-Id: I4c1f8bc23c0ae9ac7daa5d8fe518071dd3807dfa
diff --git a/tests/last_focus_time/last_focus_time_test_session_shell.cc b/tests/last_focus_time/last_focus_time_test_session_shell.cc
index a2a5680..4de1a82 100644
--- a/tests/last_focus_time/last_focus_time_test_session_shell.cc
+++ b/tests/last_focus_time/last_focus_time_test_session_shell.cc
@@ -36,9 +36,9 @@
private:
TestPoint last_focus_time_created_{
- "fuchsia::modular::StoryInfo::last_focus_time increased after create"};
+ "StoryInfo::last_focus_time increased after create"};
TestPoint last_focus_time_focused_{
- "fuchsia::modular::StoryInfo::last_focus_time increased after focus"};
+ "StoryInfo::last_focus_time increased after focus"};
// |fuchsia::modular::StoryProviderWatcher|
void OnChange(
@@ -173,15 +173,13 @@
void CreateStory() {
puppet_master_->ControlStory(kStoryName, story_puppet_master_.NewRequest());
- fidl::VectorPtr<fuchsia::modular::StoryCommand> commands;
fuchsia::modular::AddMod add_mod;
add_mod.mod_name.push_back("mod1");
add_mod.intent.handler = kCommonNullModule;
add_mod.intent.action = kCommonNullAction;
- fuchsia::modular::StoryCommand command;
- command.set_add_mod(std::move(add_mod));
- commands.push_back(std::move(command));
+ auto commands = fidl::VectorPtr<fuchsia::modular::StoryCommand>::New(1);
+ commands->at(0).set_add_mod(std::move(add_mod));
story_puppet_master_->Enqueue(std::move(commands));
story_puppet_master_->Execute(