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

Unified Diff: tools/android/loading/loading_model.py

Issue 1708223005: Loading model test tweak. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: push up MakeGraph Created 4 years, 10 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 | « no previous file | tools/android/loading/loading_model_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/android/loading/loading_model.py
diff --git a/tools/android/loading/loading_model.py b/tools/android/loading/loading_model.py
index 5deec0337bbcda128e24bd7e27b66126b67482eb..f9905a058f618e44c15bcfb15ba11158d835e63c 100644
--- a/tools/android/loading/loading_model.py
+++ b/tools/android/loading/loading_model.py
@@ -31,6 +31,10 @@ class ResourceGraph(object):
See model parameters in Set().
"""
+ # The lens to build request dependencies. Exposed here for subclasses in
+ # unittesting.
+ REQUEST_LENS = request_dependencies_lens.RequestDependencyLens
+
EDGE_KIND_KEY = 'edge_kind'
EDGE_KINDS = request_track.Request.INITIATORS + (
'script_inferred', 'after-load', 'before-load', 'timing')
@@ -477,8 +481,7 @@ class ResourceGraph(object):
self._nodes.append(node)
self._node_info.append(node_info)
- dependencies = request_dependencies_lens.RequestDependencyLens(
- trace).GetRequestDependencies()
+ dependencies = self.REQUEST_LENS(trace).GetRequestDependencies()
for dep in dependencies:
(parent_rq, child_rq, reason) = dep
parent = self._node_info[index_by_request[parent_rq]]
« no previous file with comments | « no previous file | tools/android/loading/loading_model_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698