| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 984 | 984 |
| 985 /** | 985 /** |
| 986 * @param {string} experimentName | 986 * @param {string} experimentName |
| 987 */ | 987 */ |
| 988 enableForTest: function(experimentName) | 988 enableForTest: function(experimentName) |
| 989 { | 989 { |
| 990 this._checkExperiment(experimentName); | 990 this._checkExperiment(experimentName); |
| 991 this._enabledTransiently[experimentName] = true; | 991 this._enabledTransiently[experimentName] = true; |
| 992 }, | 992 }, |
| 993 | 993 |
| 994 clearForTest: function() |
| 995 { |
| 996 this._experiments = []; |
| 997 this._experimentNames = {}; |
| 998 this._enabledTransiently = {}; |
| 999 }, |
| 1000 |
| 994 cleanUpStaleExperiments: function() | 1001 cleanUpStaleExperiments: function() |
| 995 { | 1002 { |
| 996 var experimentsSetting = Runtime._experimentsSetting(); | 1003 var experimentsSetting = Runtime._experimentsSetting(); |
| 997 var cleanedUpExperimentSetting = {}; | 1004 var cleanedUpExperimentSetting = {}; |
| 998 for (var i = 0; i < this._experiments.length; ++i) { | 1005 for (var i = 0; i < this._experiments.length; ++i) { |
| 999 var experimentName = this._experiments[i].name; | 1006 var experimentName = this._experiments[i].name; |
| 1000 if (experimentsSetting[experimentName]) | 1007 if (experimentsSetting[experimentName]) |
| 1001 cleanedUpExperimentSetting[experimentName] = true; | 1008 cleanedUpExperimentSetting[experimentName] = true; |
| 1002 } | 1009 } |
| 1003 this._setExperimentsSetting(cleanedUpExperimentSetting); | 1010 this._setExperimentsSetting(cleanedUpExperimentSetting); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1063 Runtime.experiments = new Runtime.ExperimentsSupport(); | 1070 Runtime.experiments = new Runtime.ExperimentsSupport(); |
| 1064 Runtime.experiments.register("remoteModules", "Remote Modules", true); | 1071 Runtime.experiments.register("remoteModules", "Remote Modules", true); |
| 1065 | 1072 |
| 1066 /** | 1073 /** |
| 1067 * @type {?string} | 1074 * @type {?string} |
| 1068 */ | 1075 */ |
| 1069 Runtime._remoteBase = Runtime.queryParam("remoteBase"); | 1076 Runtime._remoteBase = Runtime.queryParam("remoteBase"); |
| 1070 | 1077 |
| 1071 /** @type {!Runtime} */ | 1078 /** @type {!Runtime} */ |
| 1072 var runtime; | 1079 var runtime; |
| OLD | NEW |