| Index: chrome/test/functional/special_tabs.py
|
| ===================================================================
|
| --- chrome/test/functional/special_tabs.py (revision 103935)
|
| +++ chrome/test/functional/special_tabs.py (working copy)
|
| @@ -43,7 +43,7 @@
|
| 'chrome://credits': { 'title': 'Credits', 'CSP': False },
|
| 'chrome://downloads': { 'title': 'Downloads' },
|
| 'chrome://dns': { 'title': 'About DNS' },
|
| - 'chrome://settings/extensionSettings': { 'title': 'Extensions' },
|
| + 'chrome://settings/extensions': { 'title': 'Extensions' },
|
| 'chrome://flags': {},
|
| 'chrome://flash': {},
|
| 'chrome://gpu-internals': {},
|
| @@ -58,11 +58,11 @@
|
| 'chrome://plugins': { 'title': 'Plug-ins' },
|
| 'chrome://sessions': { 'title': 'Sessions' },
|
| 'chrome://settings': { 'title': 'Preferences - Basics' },
|
| - 'chrome://stats': { 'CSP': False },
|
| + 'chrome://stats': {},
|
| 'chrome://sync': { 'title': 'Sync Internals' },
|
| 'chrome://sync-internals': { 'title': 'Sync Internals' },
|
| 'chrome://tasks': { 'title': 'Task Manager - Chromium' },
|
| - 'chrome://terms': { 'CSP': False },
|
| + 'chrome://terms': {},
|
| 'chrome://textfields': { 'title': 'chrome://textfields', 'CSP': False },
|
| 'chrome://version': { 'title': 'About Version' },
|
| 'chrome://view-http-cache': {},
|
| @@ -281,10 +281,10 @@
|
| self.assertEqual(expected_title, actual_title)
|
| include_list = []
|
| exclude_list = []
|
| - if 'CSP' in properties and not properties['CSP']:
|
| + no_csp = 'CSP' in properties and not properties['CSP']
|
| + if no_csp:
|
| exclude_list.extend(['X-WebKit-CSP'])
|
| else:
|
| - include_list.extend(['X-WebKit-CSP'])
|
| exclude_list.extend(['<script>', 'onclick=', 'onload=',
|
| 'onchange=', 'onsubmit=', 'javascript:'])
|
| if 'includes' in properties:
|
| @@ -293,6 +293,19 @@
|
| exclude_list.extend(properties['exlcudes'])
|
| test_utils.StringContentCheck(self, self.GetTabContents(),
|
| include_list, exclude_list)
|
| + result = self.ExecuteJavascript("""
|
| + var r = 'blocked';
|
| + var f = 'executed';
|
| + var s = document.createElement('script');
|
| + s.textContent = 'r = f';
|
| + document.body.appendChild(s);
|
| + window.domAutomationController.send(r);
|
| + """)
|
| + logging.debug('has csp %s, result %s.' % (not no_csp, result))
|
| + if no_csp:
|
| + self.assertEqual(result, 'executed');
|
| + else:
|
| + self.assertEqual(result, 'blocked');
|
|
|
| def testAboutAppCacheTab(self):
|
| """Test App Cache tab to confirm about page populates caches."""
|
|
|