| Index: ui/webui/resources/js/webui_resource_test.js
|
| diff --git a/ui/webui/resources/js/webui_resource_test.js b/ui/webui/resources/js/webui_resource_test.js
|
| index 2b1660a85d9349b66f89fd1052efbd8da30bc817..5b2f3ebace8cd0a6f2dc8a3984b0b44233b4414c 100644
|
| --- a/ui/webui/resources/js/webui_resource_test.js
|
| +++ b/ui/webui/resources/js/webui_resource_test.js
|
| @@ -143,8 +143,17 @@ function assertDeepEquals(expected, observed, opt_message) {
|
| */
|
| function runTests() {
|
| for (var name in window) {
|
| - if (typeof window[name] == 'function' && /^test/.test(name))
|
| - testCases.push(name);
|
| + try {
|
| + if (typeof window[name] == 'function' && /^test/.test(name))
|
| + testCases.push(name);
|
| + } catch(e) {
|
| + if (location.protocol == 'data:' && e.name == 'SecurityError') {
|
| + // Sometimes this file gets loaded as a data: URI. That causes issues
|
| + // when it touches window.caches or window.cookie.
|
| + } else {
|
| + throw e;
|
| + }
|
| + }
|
| }
|
| if (!testCases.length) {
|
| console.error('Failed to find test cases.');
|
|
|