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

Unified Diff: chrome/test/mini_installer/process_verifier.py

Issue 2747023002: Cleanup machine based on the state in configuration file for mini installer test.
Patch Set: refactor to use visitor pattern Created 3 years, 9 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 | « chrome/test/mini_installer/process.py ('k') | chrome/test/mini_installer/registry.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/mini_installer/process_verifier.py
diff --git a/chrome/test/mini_installer/process_verifier.py b/chrome/test/mini_installer/process_verifier.py
deleted file mode 100644
index adf1e1d0cafdfdd5dca655ad0a5ac0d90d9df026..0000000000000000000000000000000000000000
--- a/chrome/test/mini_installer/process_verifier.py
+++ /dev/null
@@ -1,33 +0,0 @@
-# Copyright 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import chrome_helper
-import verifier
-
-
-class ProcessVerifier(verifier.Verifier):
- """Verifies that the running processes match the expectation dictionaries."""
-
- def _VerifyExpectation(self, expectation_name, expectation,
- variable_expander):
- """Overridden from verifier.Verifier.
-
- This method will throw an AssertionError if process state doesn't match the
- |expectation|.
-
- Args:
- expectation_name: Path to the process being verified. It is expanded using
- Expand.
- expectation: A dictionary with the following key and value:
- 'running' a boolean indicating whether the process should be running.
- variable_expander: A VariableExpander object.
- """
- # Create a list of paths of all running processes.
- running_process_paths = [path for (_, path) in
- chrome_helper.GetProcessIDAndPathPairs()]
- process_path = variable_expander.Expand(expectation_name)
- is_running = process_path in running_process_paths
- assert expectation['running'] == is_running, \
- ('Process %s is running' % process_path) if is_running else \
- ('Process %s is not running' % process_path)
« no previous file with comments | « chrome/test/mini_installer/process.py ('k') | chrome/test/mini_installer/registry.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698