Update web_engine recipe for 2.7 release branches.

Change-Id: I07b22cc72db180403a238754057c86e653f322a8
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/19780
Reviewed-by: Casey Hillers <chillers@google.com>
Commit-Queue: Godofredo Contreras <godofredoc@google.com>
diff --git a/recipes/web_engine_2_7_0.expected/linux-post-submit.json b/recipes/web_engine_2_7_0.expected/linux-post-submit.json
index 97fa6d2..6b7dbaa 100644
--- a/recipes/web_engine_2_7_0.expected/linux-post-submit.json
+++ b/recipes/web_engine_2_7_0.expected/linux-post-submit.json
@@ -837,7 +837,7 @@
     },
     "infra_step": true,
     "name": "buildbucket.schedule",
-    "stdin": "{\"requests\": [{\"scheduleBuild\": {\"builder\": {\"builder\": \"Linux Web Drone\"}, \"experimental\": \"NO\", \"fields\": \"builder,createTime,createdBy,critical,endTime,id,input,number,output,startTime,status,updateTime\", \"priority\": 25, \"properties\": {\"command_args\": [\"test\", \"--browser=chrome\"], \"command_name\": \"chrome-unit-linux\", \"dependencies\": [\"chrome\", \"goldens_repo\"], \"git_ref\": \"refs/heads/master\", \"git_url\": \"https://chromium.googlesource.com/external/github.com/flutter/engine\", \"local_engine_cas_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855/0\"}, \"requestId\": \"0-00000000-0000-0000-0000-000000001337\", \"swarming\": {\"parentRunId\": \"fake-task-id\"}, \"tags\": [{\"key\": \"user_agent\", \"value\": \"recipe\"}]}}, {\"scheduleBuild\": {\"builder\": {\"builder\": \"Linux Web Drone\"}, \"experimental\": \"NO\", \"fields\": \"builder,createTime,createdBy,critical,endTime,id,input,number,output,startTime,status,updateTime\", \"priority\": 25, \"properties\": {\"command_args\": [\"test\", \"--browser=firefox\"], \"command_name\": \"firefox-unit-linux\", \"dependencies\": [], \"git_ref\": \"refs/heads/master\", \"git_url\": \"https://chromium.googlesource.com/external/github.com/flutter/engine\", \"local_engine_cas_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855/0\"}, \"requestId\": \"0-00000000-0000-0000-0000-00000000133a\", \"swarming\": {\"parentRunId\": \"fake-task-id\"}, \"tags\": [{\"key\": \"user_agent\", \"value\": \"recipe\"}]}}]}",
+    "stdin": "{\"requests\": [{\"scheduleBuild\": {\"builder\": {\"builder\": \"Linux Web Drone\"}, \"experimental\": \"NO\", \"fields\": \"builder,createTime,createdBy,critical,endTime,id,input,number,output,startTime,status,updateTime\", \"priority\": 25, \"properties\": {\"command_args\": [\"test\", \"--browser=chrome\"], \"command_name\": \"chrome-unit-linux\", \"git_ref\": \"refs/heads/master\", \"git_url\": \"https://chromium.googlesource.com/external/github.com/flutter/engine\", \"inherited_dependencies\": [], \"local_engine_cas_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855/0\", \"web_dependencies\": [\"chrome\", \"goldens_repo\"]}, \"requestId\": \"0-00000000-0000-0000-0000-000000001337\", \"swarming\": {\"parentRunId\": \"fake-task-id\"}, \"tags\": [{\"key\": \"user_agent\", \"value\": \"recipe\"}]}}, {\"scheduleBuild\": {\"builder\": {\"builder\": \"Linux Web Drone\"}, \"experimental\": \"NO\", \"fields\": \"builder,createTime,createdBy,critical,endTime,id,input,number,output,startTime,status,updateTime\", \"priority\": 25, \"properties\": {\"command_args\": [\"test\", \"--browser=firefox\"], \"command_name\": \"firefox-unit-linux\", \"git_ref\": \"refs/heads/master\", \"git_url\": \"https://chromium.googlesource.com/external/github.com/flutter/engine\", \"inherited_dependencies\": [], \"local_engine_cas_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855/0\", \"web_dependencies\": []}, \"requestId\": \"0-00000000-0000-0000-0000-00000000133a\", \"swarming\": {\"parentRunId\": \"fake-task-id\"}, \"tags\": [{\"key\": \"user_agent\", \"value\": \"recipe\"}]}}]}",
     "~followup_annotations": [
       "@@@STEP_LOG_LINE@json.output@{@@@",
       "@@@STEP_LOG_LINE@json.output@  \"responses\": [@@@",
@@ -876,13 +876,14 @@
       "@@@STEP_LOG_LINE@request@            \"--browser=chrome\"@@@",
       "@@@STEP_LOG_LINE@request@          ], @@@",
       "@@@STEP_LOG_LINE@request@          \"command_name\": \"chrome-unit-linux\", @@@",
-      "@@@STEP_LOG_LINE@request@          \"dependencies\": [@@@",
-      "@@@STEP_LOG_LINE@request@            \"chrome\", @@@",
-      "@@@STEP_LOG_LINE@request@            \"goldens_repo\"@@@",
-      "@@@STEP_LOG_LINE@request@          ], @@@",
       "@@@STEP_LOG_LINE@request@          \"git_ref\": \"refs/heads/master\", @@@",
       "@@@STEP_LOG_LINE@request@          \"git_url\": \"https://chromium.googlesource.com/external/github.com/flutter/engine\", @@@",
-      "@@@STEP_LOG_LINE@request@          \"local_engine_cas_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855/0\"@@@",
+      "@@@STEP_LOG_LINE@request@          \"inherited_dependencies\": [], @@@",
+      "@@@STEP_LOG_LINE@request@          \"local_engine_cas_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855/0\", @@@",
+      "@@@STEP_LOG_LINE@request@          \"web_dependencies\": [@@@",
+      "@@@STEP_LOG_LINE@request@            \"chrome\", @@@",
+      "@@@STEP_LOG_LINE@request@            \"goldens_repo\"@@@",
+      "@@@STEP_LOG_LINE@request@          ]@@@",
       "@@@STEP_LOG_LINE@request@        }, @@@",
       "@@@STEP_LOG_LINE@request@        \"requestId\": \"0-00000000-0000-0000-0000-000000001337\", @@@",
       "@@@STEP_LOG_LINE@request@        \"swarming\": {@@@",
@@ -910,10 +911,11 @@
       "@@@STEP_LOG_LINE@request@            \"--browser=firefox\"@@@",
       "@@@STEP_LOG_LINE@request@          ], @@@",
       "@@@STEP_LOG_LINE@request@          \"command_name\": \"firefox-unit-linux\", @@@",
-      "@@@STEP_LOG_LINE@request@          \"dependencies\": [], @@@",
       "@@@STEP_LOG_LINE@request@          \"git_ref\": \"refs/heads/master\", @@@",
       "@@@STEP_LOG_LINE@request@          \"git_url\": \"https://chromium.googlesource.com/external/github.com/flutter/engine\", @@@",
-      "@@@STEP_LOG_LINE@request@          \"local_engine_cas_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855/0\"@@@",
+      "@@@STEP_LOG_LINE@request@          \"inherited_dependencies\": [], @@@",
+      "@@@STEP_LOG_LINE@request@          \"local_engine_cas_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855/0\", @@@",
+      "@@@STEP_LOG_LINE@request@          \"web_dependencies\": []@@@",
       "@@@STEP_LOG_LINE@request@        }, @@@",
       "@@@STEP_LOG_LINE@request@        \"requestId\": \"0-00000000-0000-0000-0000-00000000133a\", @@@",
       "@@@STEP_LOG_LINE@request@        \"swarming\": {@@@",
diff --git a/recipes/web_engine_2_7_0.expected/linux-pre-submit.json b/recipes/web_engine_2_7_0.expected/linux-pre-submit.json
index f49d542..e52806b 100644
--- a/recipes/web_engine_2_7_0.expected/linux-pre-submit.json
+++ b/recipes/web_engine_2_7_0.expected/linux-pre-submit.json
@@ -852,7 +852,7 @@
     },
     "infra_step": true,
     "name": "buildbucket.schedule",
-    "stdin": "{\"requests\": [{\"scheduleBuild\": {\"builder\": {\"builder\": \"Linux Web Drone\"}, \"experimental\": \"NO\", \"fields\": \"builder,createTime,createdBy,critical,endTime,id,input,number,output,startTime,status,updateTime\", \"priority\": 25, \"properties\": {\"command_args\": [\"test\", \"--browser=chrome\"], \"command_name\": \"chrome-unit-linux\", \"dependencies\": [\"chrome\", \"goldens_repo\"], \"git_ref\": \"refs/pull/1/head\", \"git_url\": \"https://mygitrepo\", \"local_engine_cas_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855/0\"}, \"requestId\": \"0-00000000-0000-0000-0000-000000001337\", \"swarming\": {\"parentRunId\": \"fake-task-id\"}, \"tags\": [{\"key\": \"user_agent\", \"value\": \"recipe\"}]}}, {\"scheduleBuild\": {\"builder\": {\"builder\": \"Linux Web Drone\"}, \"experimental\": \"NO\", \"fields\": \"builder,createTime,createdBy,critical,endTime,id,input,number,output,startTime,status,updateTime\", \"priority\": 25, \"properties\": {\"command_args\": [\"test\", \"--browser=firefox\"], \"command_name\": \"firefox-unit-linux\", \"dependencies\": [], \"git_ref\": \"refs/pull/1/head\", \"git_url\": \"https://mygitrepo\", \"local_engine_cas_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855/0\"}, \"requestId\": \"0-00000000-0000-0000-0000-00000000133a\", \"swarming\": {\"parentRunId\": \"fake-task-id\"}, \"tags\": [{\"key\": \"user_agent\", \"value\": \"recipe\"}]}}]}",
+    "stdin": "{\"requests\": [{\"scheduleBuild\": {\"builder\": {\"builder\": \"Linux Web Drone\"}, \"experimental\": \"NO\", \"fields\": \"builder,createTime,createdBy,critical,endTime,id,input,number,output,startTime,status,updateTime\", \"priority\": 25, \"properties\": {\"command_args\": [\"test\", \"--browser=chrome\"], \"command_name\": \"chrome-unit-linux\", \"git_ref\": \"refs/pull/1/head\", \"git_url\": \"https://mygitrepo\", \"inherited_dependencies\": [], \"local_engine_cas_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855/0\", \"web_dependencies\": [\"chrome\", \"goldens_repo\"]}, \"requestId\": \"0-00000000-0000-0000-0000-000000001337\", \"swarming\": {\"parentRunId\": \"fake-task-id\"}, \"tags\": [{\"key\": \"user_agent\", \"value\": \"recipe\"}]}}, {\"scheduleBuild\": {\"builder\": {\"builder\": \"Linux Web Drone\"}, \"experimental\": \"NO\", \"fields\": \"builder,createTime,createdBy,critical,endTime,id,input,number,output,startTime,status,updateTime\", \"priority\": 25, \"properties\": {\"command_args\": [\"test\", \"--browser=firefox\"], \"command_name\": \"firefox-unit-linux\", \"git_ref\": \"refs/pull/1/head\", \"git_url\": \"https://mygitrepo\", \"inherited_dependencies\": [], \"local_engine_cas_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855/0\", \"web_dependencies\": []}, \"requestId\": \"0-00000000-0000-0000-0000-00000000133a\", \"swarming\": {\"parentRunId\": \"fake-task-id\"}, \"tags\": [{\"key\": \"user_agent\", \"value\": \"recipe\"}]}}]}",
     "~followup_annotations": [
       "@@@STEP_LOG_LINE@json.output@{@@@",
       "@@@STEP_LOG_LINE@json.output@  \"responses\": [@@@",
@@ -891,13 +891,14 @@
       "@@@STEP_LOG_LINE@request@            \"--browser=chrome\"@@@",
       "@@@STEP_LOG_LINE@request@          ], @@@",
       "@@@STEP_LOG_LINE@request@          \"command_name\": \"chrome-unit-linux\", @@@",
-      "@@@STEP_LOG_LINE@request@          \"dependencies\": [@@@",
-      "@@@STEP_LOG_LINE@request@            \"chrome\", @@@",
-      "@@@STEP_LOG_LINE@request@            \"goldens_repo\"@@@",
-      "@@@STEP_LOG_LINE@request@          ], @@@",
       "@@@STEP_LOG_LINE@request@          \"git_ref\": \"refs/pull/1/head\", @@@",
       "@@@STEP_LOG_LINE@request@          \"git_url\": \"https://mygitrepo\", @@@",
-      "@@@STEP_LOG_LINE@request@          \"local_engine_cas_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855/0\"@@@",
+      "@@@STEP_LOG_LINE@request@          \"inherited_dependencies\": [], @@@",
+      "@@@STEP_LOG_LINE@request@          \"local_engine_cas_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855/0\", @@@",
+      "@@@STEP_LOG_LINE@request@          \"web_dependencies\": [@@@",
+      "@@@STEP_LOG_LINE@request@            \"chrome\", @@@",
+      "@@@STEP_LOG_LINE@request@            \"goldens_repo\"@@@",
+      "@@@STEP_LOG_LINE@request@          ]@@@",
       "@@@STEP_LOG_LINE@request@        }, @@@",
       "@@@STEP_LOG_LINE@request@        \"requestId\": \"0-00000000-0000-0000-0000-000000001337\", @@@",
       "@@@STEP_LOG_LINE@request@        \"swarming\": {@@@",
@@ -925,10 +926,11 @@
       "@@@STEP_LOG_LINE@request@            \"--browser=firefox\"@@@",
       "@@@STEP_LOG_LINE@request@          ], @@@",
       "@@@STEP_LOG_LINE@request@          \"command_name\": \"firefox-unit-linux\", @@@",
-      "@@@STEP_LOG_LINE@request@          \"dependencies\": [], @@@",
       "@@@STEP_LOG_LINE@request@          \"git_ref\": \"refs/pull/1/head\", @@@",
       "@@@STEP_LOG_LINE@request@          \"git_url\": \"https://mygitrepo\", @@@",
-      "@@@STEP_LOG_LINE@request@          \"local_engine_cas_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855/0\"@@@",
+      "@@@STEP_LOG_LINE@request@          \"inherited_dependencies\": [], @@@",
+      "@@@STEP_LOG_LINE@request@          \"local_engine_cas_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855/0\", @@@",
+      "@@@STEP_LOG_LINE@request@          \"web_dependencies\": []@@@",
       "@@@STEP_LOG_LINE@request@        }, @@@",
       "@@@STEP_LOG_LINE@request@        \"requestId\": \"0-00000000-0000-0000-0000-00000000133a\", @@@",
       "@@@STEP_LOG_LINE@request@        \"swarming\": {@@@",
diff --git a/recipes/web_engine_2_7_0.py b/recipes/web_engine_2_7_0.py
index 7e8f547..e762857 100644
--- a/recipes/web_engine_2_7_0.py
+++ b/recipes/web_engine_2_7_0.py
@@ -248,11 +248,11 @@
   # For running Chrome Unit tests:
   command_name = 'chrome-unit-linux'
   # These are the required dependencies.
-  dependencies = ['chrome', 'goldens_repo']
+  web_dependencies = ['chrome', 'goldens_repo']
   # These are the felt commands which will be used.
   command_args = ['test', '--browser=chrome']
   addShardTask(
-      api, reqs, command_name, dependencies, command_args, cas_hash
+      api, reqs, command_name, web_dependencies, command_args, cas_hash
   )
 
   # For running Firefox Unit tests:
@@ -260,22 +260,26 @@
   # We don't need extra dependencies since felt tools handles firefox itself.
   # TODO(nurhan): Use cipd packages for Firefox. As we are doing for chrome
   # still respect to the version from browser_lock.yaml.
-  dependencies = []
+  web_dependencies = []
   # These are the felt commands which will be used.
   command_args = ['test', '--browser=firefox']
   addShardTask(
-      api, reqs, command_name, dependencies, command_args, cas_hash
+      api, reqs, command_name, web_dependencies, command_args, cas_hash
   )
 
   return api.buildbucket.schedule(reqs)
 
 
 def addShardTask(
-    api, reqs, command_name, dependencies, command_args, cas_hash
+    api, reqs, command_name, web_dependencies, command_args, cas_hash
 ):
+  # These are dependencies specified in the yaml file. We want to pass them down
+  # to drones so they also install these dependencies.
+  inherited_dependencies = [{'dependency': d['dependency']} for d in api.properties.get('dependencies', [])]
   drone_props = {
-      'command_name': command_name, 'dependencies': dependencies,
-      'command_args': command_args, 'local_engine_cas_hash': cas_hash
+      'command_name': command_name, 'web_dependencies': web_dependencies,
+      'command_args': command_args, 'local_engine_cas_hash': cas_hash,
+      'inherited_dependencies': inherited_dependencies,
   }
 
   git_url = GIT_REPO