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

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

Issue 2876683002: DevTools: simplify network throttling presets (Closed)
Patch Set: update browser test Created 3 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/network_conditions/NetworkConditionsSelector.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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 step1(); 696 step1();
697 697
698 function step1() { 698 function step1() {
699 testPreset( 699 testPreset(
700 NetworkConditions.NetworkConditionsSelector.presets[0], 700 NetworkConditions.NetworkConditionsSelector.presets[0],
701 ['offline event: online = false', 'connection change event: type = non e; downlinkMax = 0'], step2); 701 ['offline event: online = false', 'connection change event: type = non e; downlinkMax = 0'], step2);
702 } 702 }
703 703
704 function step2() { 704 function step2() {
705 testPreset( 705 testPreset(
706 NetworkConditions.NetworkConditionsSelector.presets[2], 706 NetworkConditions.NetworkConditionsSelector.presets[1],
707 ['online event: online = true', 'connection change event: type = cellu lar; downlinkMax = 0.244140625'], 707 ['online event: online = true', 'connection change event: type = cellu lar; downlinkMax = 0.390625'], step3);
708 step3);
709 } 708 }
710 709
711 function step3() { 710 function step3() {
712 testPreset( 711 testPreset(
713 NetworkConditions.NetworkConditionsSelector.presets[8], 712 NetworkConditions.NetworkConditionsSelector.presets[2],
714 ['connection change event: type = wifi; downlinkMax = 30'], test.relea seControl.bind(test)); 713 ['connection change event: type = cellular; downlinkMax = 1.4400000000 000002'],
714 test.releaseControl.bind(test));
715 } 715 }
716 }; 716 };
717 717
718 TestSuite.prototype.testScreenshotRecording = function() { 718 TestSuite.prototype.testScreenshotRecording = function() {
719 var test = this; 719 var test = this;
720 720
721 function performActionsInPage(callback) { 721 function performActionsInPage(callback) {
722 var count = 0; 722 var count = 0;
723 var div = document.createElement('div'); 723 var div = document.createElement('div');
724 div.setAttribute('style', 'left: 0px; top: 0px; width: 100px; height: 100p x; position: absolute;'); 724 div.setAttribute('style', 'left: 0px; top: 0px; width: 100px; height: 100p x; position: absolute;');
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 if (runtimeModel.executionContexts().length >= n) 1100 if (runtimeModel.executionContexts().length >= n)
1101 callback.call(null); 1101 callback.call(null);
1102 else 1102 else
1103 this.addSniffer(SDK.RuntimeModel.prototype, '_executionContextCreated', checkForExecutionContexts.bind(this)); 1103 this.addSniffer(SDK.RuntimeModel.prototype, '_executionContextCreated', checkForExecutionContexts.bind(this));
1104 } 1104 }
1105 }; 1105 };
1106 1106
1107 1107
1108 window.uiTests = new TestSuite(window.domAutomationController); 1108 window.uiTests = new TestSuite(window.domAutomationController);
1109 })(window); 1109 })(window);
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/network_conditions/NetworkConditionsSelector.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698