Index: Source/devtools/front_end/Runtime.js |
diff --git a/Source/devtools/front_end/Runtime.js b/Source/devtools/front_end/Runtime.js |
index 3e4c635a9d3662cab38121d29a3fd4cee4624496..53b8d4415b31f2eae7851e23a4349530c77d296e 100644 |
--- a/Source/devtools/front_end/Runtime.js |
+++ b/Source/devtools/front_end/Runtime.js |
@@ -1042,6 +1042,18 @@ |
var name = pair.shift(); |
Runtime._queryParamsObject[name] = pair.join("="); |
} |
+ |
+ // Patch settings from the URL param (for tests). |
+ var settingsParam = Runtime.queryParam("settings"); |
+ if (settingsParam) { |
+ try { |
+ var settings = JSON.parse(window.decodeURI(settingsParam)); |
+ for (var key in settings) |
+ window.localStorage[key] = settings[key]; |
+ } catch(e) { |
+ // Ignore malformed settings. |
+ } |
+ } |
})();} |