graphics_*: mark as python3 converted.

BUG=b:201842108
TEST=visual inspection

Change-Id: Icbd951df463fa678f3266b2c7eeef9fdd8567191
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/3201052
Auto-Submit: Ilja H. Friedel <[email protected]>
Tested-by: Ilja H. Friedel <[email protected]>
Reviewed-by: Po-Hsien Wang <[email protected]>
Commit-Queue: Po-Hsien Wang <[email protected]>
diff --git a/client/cros/chrome_binary_test.py b/client/cros/chrome_binary_test.py
index 2a8290f..fbb071b 100755
--- a/client/cros/chrome_binary_test.py
+++ b/client/cros/chrome_binary_test.py
@@ -1,3 +1,4 @@
+# Lint as: python2, python3
 # Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
@@ -8,7 +9,7 @@
 import tempfile
 import xml.etree.ElementTree as ET
 
-import common
+from . import common
 from autotest_lib.client.bin import test, utils
 from autotest_lib.client.common_lib import error
 from autotest_lib.client.common_lib import file_utils
diff --git a/client/cros/graphics/graphics_uinput.py b/client/cros/graphics/graphics_uinput.py
index 9516d6e..72e7e0c 100644
--- a/client/cros/graphics/graphics_uinput.py
+++ b/client/cros/graphics/graphics_uinput.py
@@ -1,3 +1,4 @@
+# Lint as: python2, python3
 # Copyright 2020 The Chromium OS Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/client/cros/graphics/graphics_utils.py b/client/cros/graphics/graphics_utils.py
index c37b045..307e923 100644
--- a/client/cros/graphics/graphics_utils.py
+++ b/client/cros/graphics/graphics_utils.py
@@ -1,3 +1,4 @@
+# Lint as: python2, python3
 # Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
@@ -829,7 +830,7 @@
             Otherwise, return False.
     """
     outputs = get_display_output_state()
-    for output in outputs.keys():
+    for output in list(outputs.keys()):
         if outputs[output] and (output.startswith('HDMI')
                 or output.startswith('DP')
                 or output.startswith('DVI')
@@ -845,7 +846,7 @@
             Otherwise, return False.
     """
     outputs = get_display_output_state()
-    for output in outputs.keys():
+    for output in list(outputs.keys()):
         # reference: chromium_org/chromeos/display/output_util.cc
         if (output.startswith('eDP')
                 or output.startswith('LVDS')
diff --git a/client/cros/image_comparison/comparison_result.py b/client/cros/image_comparison/comparison_result.py
index 72d0744..35c5769 100644
--- a/client/cros/image_comparison/comparison_result.py
+++ b/client/cros/image_comparison/comparison_result.py
@@ -1,3 +1,4 @@
+# Lint as: python2, python3
 # Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/client/cros/image_comparison/pdiff_image_comparer.py b/client/cros/image_comparison/pdiff_image_comparer.py
index 1b382da..5a3c254 100644
--- a/client/cros/image_comparison/pdiff_image_comparer.py
+++ b/client/cros/image_comparison/pdiff_image_comparer.py
@@ -1,3 +1,4 @@
+# Lint as: python2, python3
 # Copyright 2015 The Chromium OS Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
@@ -104,4 +105,4 @@
         return self
 
     def __exit__(self, exc_type, exc_val, exc_tb):
-        pass
\ No newline at end of file
+        pass
diff --git a/server/site_tests/graphics_MultipleDisplays/control.aquarium_blob b/server/site_tests/graphics_MultipleDisplays/control.aquarium_blob
index e3e7945..c2709df 100644
--- a/server/site_tests/graphics_MultipleDisplays/control.aquarium_blob
+++ b/server/site_tests/graphics_MultipleDisplays/control.aquarium_blob
@@ -4,6 +4,7 @@
 
 from autotest_lib.server import utils
 
+PY_VERSION = 3
 AUTHOR = "chromeos-chameleon"
 NAME = "graphics_MultipleDisplays.aquarium_blob"
 PURPOSE = "Test multiple WebGL windows on internal and external displays."
diff --git a/server/site_tests/graphics_MultipleDisplays/control.aquarium_vp9_blob_h264 b/server/site_tests/graphics_MultipleDisplays/control.aquarium_vp9_blob_h264
index e870189..b7c0b4b 100644
--- a/server/site_tests/graphics_MultipleDisplays/control.aquarium_vp9_blob_h264
+++ b/server/site_tests/graphics_MultipleDisplays/control.aquarium_vp9_blob_h264
@@ -4,6 +4,7 @@
 
 from autotest_lib.server import utils
 
+PY_VERSION = 3
 AUTHOR = "chromeos-chameleon"
 NAME = "graphics_MultipleDisplays.aquarium_vp9_blob_h264"
 PURPOSE = "Test WebGL and video playback on internal and external displays."
diff --git a/server/site_tests/graphics_MultipleDisplays/graphics_MultipleDisplays.py b/server/site_tests/graphics_MultipleDisplays/graphics_MultipleDisplays.py
index 37d86ee..49ad538 100644
--- a/server/site_tests/graphics_MultipleDisplays/graphics_MultipleDisplays.py
+++ b/server/site_tests/graphics_MultipleDisplays/graphics_MultipleDisplays.py
@@ -1,3 +1,4 @@
+# Lint as: python2, python3
 # Copyright 2018 The Chromium OS Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/server/site_tests/graphics_PowerConsumption/control b/server/site_tests/graphics_PowerConsumption/control
index 30b04f1..b78d636 100644
--- a/server/site_tests/graphics_PowerConsumption/control
+++ b/server/site_tests/graphics_PowerConsumption/control
@@ -2,6 +2,7 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
+PY_VERSION = 3
 AUTHOR = "Chrome OS Team"
 NAME = "graphics_PowerConsumption"
 TIME = "MEDIUM"
diff --git a/server/site_tests/graphics_PowerConsumption/graphics_PowerConsumption.py b/server/site_tests/graphics_PowerConsumption/graphics_PowerConsumption.py
index 207413b..c56b39b 100644
--- a/server/site_tests/graphics_PowerConsumption/graphics_PowerConsumption.py
+++ b/server/site_tests/graphics_PowerConsumption/graphics_PowerConsumption.py
@@ -1,3 +1,4 @@
+# Lint as: python2, python3
 # Copyright 2017 The Chromium OS Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/server/site_tests/graphics_TraceReplayExtended/control.glxgears_1minute b/server/site_tests/graphics_TraceReplayExtended/control.glxgears_1minute
index 416dd70..98c2ba9 100644
--- a/server/site_tests/graphics_TraceReplayExtended/control.glxgears_1minute
+++ b/server/site_tests/graphics_TraceReplayExtended/control.glxgears_1minute
@@ -2,6 +2,7 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
+PY_VERSION = 3
 AUTHOR = "Chrome OS Team"
 NAME = "graphics_TraceReplayExtended.glxgears_1minute"
 TIME = "MEDIUM"
diff --git a/server/site_tests/graphics_TraceReplayExtended/graphics_TraceReplayExtended.py b/server/site_tests/graphics_TraceReplayExtended/graphics_TraceReplayExtended.py
index fc4e96e..887eb3e 100644
--- a/server/site_tests/graphics_TraceReplayExtended/graphics_TraceReplayExtended.py
+++ b/server/site_tests/graphics_TraceReplayExtended/graphics_TraceReplayExtended.py
@@ -1,3 +1,4 @@
+# Lint as: python2, python3
 # Copyright 2021 The Chromium OS Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.