OLD | NEW |
1 # Copyright 2012 The Chromium Authors. All rights reserved. | 1 # Copyright 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import logging | 5 import logging |
6 import os | 6 import os |
7 import shutil | 7 import shutil |
8 import tempfile | 8 import tempfile |
9 import unittest | 9 import unittest |
10 | 10 |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 webview_context = webview_contexts[0] | 200 webview_context = webview_contexts[0] |
201 webview_context.WaitForDocumentReadyStateToBeComplete() | 201 webview_context.WaitForDocumentReadyStateToBeComplete() |
202 # Check that the context has the right url from the <webview> element. | 202 # Check that the context has the right url from the <webview> element. |
203 self.assertTrue(webview_context.GetUrl().startswith('data:')) | 203 self.assertTrue(webview_context.GetUrl().startswith('data:')) |
204 # Check |test_input_id| element is accessible from the webview context. | 204 # Check |test_input_id| element is accessible from the webview context. |
205 self.assertTrue(webview_context.EvaluateJavaScript( | 205 self.assertTrue(webview_context.EvaluateJavaScript( |
206 'document.getElementById("test_input_id") != null')) | 206 'document.getElementById("test_input_id") != null')) |
207 # Check that |test_input_id| is not accessible from outside webview context | 207 # Check that |test_input_id| is not accessible from outside webview context |
208 self.assertFalse(self._extension.EvaluateJavaScript( | 208 self.assertFalse(self._extension.EvaluateJavaScript( |
209 'document.getElementById("test_input_id") != null')) | 209 'document.getElementById("test_input_id") != null')) |
| 210 |
| 211 def testExtensionCrashSync(self): |
| 212 self.CreateBrowserWithExtension('crash_extension') |
| 213 self._browser.tabs[0].Navigate('chrome://extensions') |
| 214 raw_input('Press enter to continue') |
OLD | NEW |