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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/host/InspectorFrontendHost.js

Issue 2522613003: DevTools: respect isUnderTest conditions in the browser tests. (Closed)
Patch Set: Created 4 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 // so the host instance should not initialized there. 515 // so the host instance should not initialized there.
516 initializeInspectorFrontendHost(); 516 initializeInspectorFrontendHost();
517 window.InspectorFrontendAPI = new InspectorFrontendAPIImpl(); 517 window.InspectorFrontendAPI = new InspectorFrontendAPIImpl();
518 Common.setLocalizationPlatform(InspectorFrontendHost.platform()); 518 Common.setLocalizationPlatform(InspectorFrontendHost.platform());
519 })(); 519 })();
520 520
521 /** 521 /**
522 * @type {!Common.EventTarget} 522 * @type {!Common.EventTarget}
523 */ 523 */
524 InspectorFrontendHost.events; 524 InspectorFrontendHost.events;
525
526 /**
527 * @param {!Object<string, string>=} prefs
528 * @return {boolean}
529 */
530 Host.isUnderTest = function(prefs) {
531 if (InspectorFrontendHost.isUnderTest())
532 return true;
533
534 if (prefs)
535 return prefs['isUnderTest'] === 'true';
536 return Common.settings.createSetting('isUnderTest', false).get();
537 };
OLDNEW
« no previous file with comments | « chrome/browser/devtools/devtools_window_testing.cc ('k') | third_party/WebKit/Source/devtools/front_end/main/Main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698