File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 7
7
import logging
8
8
import os
9
9
import subprocess
10
+ import sys
10
11
11
12
from contextlib import AbstractContextManager
12
- from typing import List
13
13
14
14
# From vpython wheel.
15
15
# pylint: disable=import-error
@@ -31,7 +31,7 @@ class ChromeDriverWrapper(AbstractContextManager):
31
31
communicating with it. This class expects the chromedriver exists at
32
32
clang_x64/stripped/chromedriver in output dir."""
33
33
34
- def __init__ (self , extra_args : List [ str ] = None ):
34
+ def __init__ (self ):
35
35
# The reference of the webdriver.Chrome instance.
36
36
self ._driver = None
37
37
@@ -44,7 +44,13 @@ def __init__(self, extra_args: List[str] = None):
44
44
self ._proc : subprocess .Popen = None
45
45
46
46
# Extra arguments sent to run_test.py webpage process.
47
- self ._extra_args = extra_args or []
47
+ self ._extra_args = []
48
+ for arg in sys .argv :
49
+ # The image update should happen before running the
50
+ # web_engine_shell.
51
+ if (arg .startswith ('--os-check=' ) or
52
+ arg .startswith ('--system-image-dir=' )):
53
+ self ._extra_args .append (arg )
48
54
49
55
def __enter__ (self ):
50
56
"""Starts the run_test.py and the chromedriver connecting to it, must be
You can’t perform that action at this time.
0 commit comments