|
11 | 11 |
|
12 | 12 | from cefpython3 import cefpython as cef |
13 | 13 |
|
| 14 | +import glob |
14 | 15 | import os |
15 | 16 | import sys |
16 | 17 |
|
@@ -126,15 +127,39 @@ def test_main(self): |
126 | 127 | # Test initialization of CEF |
127 | 128 | settings = { |
128 | 129 | "debug": False, |
129 | | - "log_severity": cef.LOGSEVERITY_ERROR, |
| 130 | + "log_severity": cef.LOGSEVERITY_WARNING, |
130 | 131 | "log_file": "", |
131 | 132 | } |
132 | 133 | if "--debug" in sys.argv: |
133 | 134 | settings["debug"] = True |
134 | 135 | settings["log_severity"] = cef.LOGSEVERITY_INFO |
| 136 | + if "--debug-warning" in sys.argv: |
| 137 | + settings["debug"] = True |
| 138 | + settings["log_severity"] = cef.LOGSEVERITY_WARNING |
135 | 139 | cef.Initialize(settings) |
136 | 140 | subtest_message("cef.Initialize() ok") |
137 | 141 |
|
| 142 | + # CRL set file |
| 143 | + certrevoc_dir = "" |
| 144 | + if WINDOWS: |
| 145 | + certrevoc_dir = r"C:\localappdata\Google\Chrome\User Data" \ |
| 146 | + r"\CertificateRevocation" |
| 147 | + elif LINUX: |
| 148 | + certrevoc_dir = r"/home/*/.config/google-chrome" \ |
| 149 | + r"/CertificateRevocation" |
| 150 | + elif MAC: |
| 151 | + certrevoc_dir = r"/Users/*/Library/Application Support/Google" \ |
| 152 | + r"/Chrome/CertificateRevocation" |
| 153 | + if os.path.exists(certrevoc_dir): |
| 154 | + crlset_files = glob.iglob(os.path.join(certrevoc_dir, "*", |
| 155 | + "crl-set")) |
| 156 | + crlset = "" |
| 157 | + for crlset in crlset_files: |
| 158 | + pass |
| 159 | + if os.path.exists(crlset): |
| 160 | + cef.LoadCrlSetsFile(crlset) |
| 161 | + subtest_message("cef.LoadCrlSetsFile ok") |
| 162 | + |
138 | 163 | # High DPI on Windows |
139 | 164 | if WINDOWS: |
140 | 165 | self.assertIsInstance(cef.DpiAware.GetSystemDpi(), tuple) |
|
0 commit comments