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

Side by Side Diff: Source/devtools/front_end/Runtime.js

Issue 1170193002: [DevTools] Add uiTest.testSettings. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed review comments Created 5 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/devtools/front_end/main/Main.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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;
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/main/Main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698