deploy_chrome: Clean up file-copy logic.

Remove unused embedded content_shell deployment. Create list
of files shared between Chrome and app_shell. Remove unused
"owner" variable in Path class.

BUG=chromium:403571
TEST=built chromeos-chrome for lumpy and mappy; also updated
     deploy_chrome_unittest.py to test for app_shell
CQ-DEPEND=I42682b354c5bf19064bfd122bbb798316f77c905

Change-Id: I420648634e0e0ae44fb1904bbc1569ab44d449db
Reviewed-on: https://chromium-review.googlesource.com/212630
Reviewed-by: Steve Fung <stevefung@chromium.org>
Tested-by: Daniel Erat <derat@chromium.org>
Commit-Queue: Daniel Erat <derat@chromium.org>
diff --git a/scripts/deploy_chrome_unittest.py b/scripts/deploy_chrome_unittest.py
index e0ee919..20bea62 100755
--- a/scripts/deploy_chrome_unittest.py
+++ b/scripts/deploy_chrome_unittest.py
@@ -286,7 +286,7 @@
 
 
 class DeployTestBuildDir(cros_test_lib.MockTempDirTestCase):
-  """Setup a deploy object with a build-dir for use in Content Shell tests"""
+  """Set up a deploy object with a build-dir for use in deployment type tests"""
 
   def _GetDeployChrome(self, args):
     options, _ = _ParseCommandLine(args)
@@ -302,40 +302,39 @@
                              '--board=lumpy', '--staging-only', '--cache-dir',
                              self.tempdir, '--sloppy'])
 
+  def getCopyPath(self, source_path):
+    """Return a chrome_util.Path or None if not present."""
+    paths = [p for p in self.deploy.copy_paths if p.src == source_path]
+    return paths[0] if paths else None
 
-class TestContentDeploymentType(DeployTestBuildDir):
+class TestDeploymentType(DeployTestBuildDir):
   """Test detection of deployment type using build dir."""
 
-  def testContentShellDetection(self):
-    """Check for a content_shell deployment"""
-    osutils.Touch(os.path.join(self.deploy.options.build_dir,
-                               'system.unand/chrome/eureka_shell'),
+  def testAppShellDetection(self):
+    """Check for an app_shell deployment"""
+    osutils.Touch(os.path.join(self.deploy.options.build_dir, 'app_shell'),
                   makedirs=True)
     self.deploy._CheckDeployType()
-    self.assertTrue(self.deploy.content_shell)
+    self.assertTrue(self.getCopyPath('app_shell'))
+    self.assertFalse(self.getCopyPath('chrome'))
 
-  def testContentShellOnlyDetection(self):
-    """Check for a content_shell deployment when no chrome exists."""
-    osutils.Touch(os.path.join(self.deploy.options.build_dir, 'content_shell'),
-                  makedirs=True)
-    self.deploy._CheckDeployType()
-    self.assertTrue(self.deploy.content_shell)
-
-  def testChromeAndContentShellDetection(self):
-    """Check for a regular chrome deployment when content_shell also exists."""
+  def testChromeAndAppShellDetection(self):
+    """Check for a regular chrome deployment when app_shell also exists."""
     osutils.Touch(os.path.join(self.deploy.options.build_dir, 'chrome'),
                   makedirs=True)
-    osutils.Touch(os.path.join(self.deploy.options.build_dir, 'content_shell'),
+    osutils.Touch(os.path.join(self.deploy.options.build_dir, 'app_shell'),
                   makedirs=True)
     self.deploy._CheckDeployType()
-    self.assertFalse(self.deploy.content_shell)
+    self.assertFalse(self.getCopyPath('app_shell'))
+    self.assertTrue(self.getCopyPath('chrome'))
 
   def testChromeDetection(self):
     """Check for a regular chrome deployment"""
     osutils.Touch(os.path.join(self.deploy.options.build_dir, 'chrome'),
                   makedirs=True)
     self.deploy._CheckDeployType()
-    self.assertFalse(self.deploy.content_shell)
+    self.assertFalse(self.getCopyPath('app_shell'))
+    self.assertTrue(self.getCopyPath('chrome'))
 
 if __name__ == '__main__':
   cros_test_lib.main()