Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Unified Diff: ui/webui/resources/js/webui_resource_test.js

Issue 1246253002: Convert i18n_process.css to use /deep/ instead of ::shadow and add tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: thestig@ review Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/webui/resources/css/i18n_process.css ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.');
« no previous file with comments | « ui/webui/resources/css/i18n_process.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698