[modular] Fix & renable flaky tests embed_shell and story_shell

There is a race condition between the story shell getting a ViewOwner
for the module, and the module dropping the ViewOwner on the floor
(because its a test module which doesn't care to draw things on the
screen).  The issue happens when the latter happens first, and the
ViewOwner that the story shell receives is invalid, which causes the
FIDL call to fail (since the FIDL interface requires it to be valid).

Fixes in this patch:
* Hold onto ViewProvider in these test modules indefinitely so ViewOwner
is not dropped on the floor
* unrelated: fix FindAnchor() to use ModuleData::is_embedded, since the
other signal is not accurate.

Additional cleanup:
* Clearer names which would've helped me follow code quicker
(e.g., ProcessPendingStoryShellViews)
* Fix code to follow fuchsia/google C++ style guide (e.g., data types declared
 in the class first).

MF-174 #done

TEST=embed_shell and story_shell don't flake for me anymore.

Change-Id: I42250accaf301c10ec66dbdb2df37515f55408a5
8 files changed
tree: 38a227d45fd7cda31ee768fd14e87378527f639a
  1. .clang-format
  2. .clang-tidy
  3. .gitignore
  5. BUILD.gn
  9. README.md
  10. bin/
  11. boards/
  12. build/
  13. cloud/
  14. docs/
  15. examples/
  16. infra/
  17. lib/
  18. navbar.md
  19. packages/
  20. products/
  21. public/
  22. tests/
  23. third_party/
  24. web/


Peridot is a framework for composed, intelligent and distributed user experiences.

Applications not explicitly designed to interoperate (and possibly implemented in different programming languages) are ephemerally downloaded and dynamically composed to run in a shared context. The framework manages application lifecycle, resources and view hierarchy; and well as context and suggestion infrastructure.

State of Peridot experiences is transparently synchronized across user devices using a distributed offline-first storage system.

Read more