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

Side by Side Diff: chrome/test/data/webui/net_internals/log_view_painter.js

Issue 451623002: Getting rid of net::LOAD_ENABLE_LOAD_TIMING (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed content/browser/loader/resource_scheduler_unittest.cc. Created 6 years, 4 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 | content/browser/loader/resource_dispatcher_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Include test fixture. 5 // Include test fixture.
6 GEN_INCLUDE(['net_internals_test.js']); 6 GEN_INCLUDE(['net_internals_test.js']);
7 7
8 // Anonymous namespace 8 // Anonymous namespace
9 (function() { 9 (function() {
10 10
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 'phase': EventPhase.PHASE_BEGIN, 195 'phase': EventPhase.PHASE_BEGIN,
196 'source': { 196 'source': {
197 'id': 146, 197 'id': 146,
198 'type': EventSourceType.URL_REQUEST 198 'type': EventSourceType.URL_REQUEST
199 }, 199 },
200 'time': '953534778', 200 'time': '953534778',
201 'type': EventType.REQUEST_ALIVE 201 'type': EventType.REQUEST_ALIVE
202 }, 202 },
203 { 203 {
204 'params': { 204 'params': {
205 'load_flags': 136446208, 205 'load_flags': 68222976,
206 'method': 'GET', 206 'method': 'GET',
207 'priority': 4, 207 'priority': 4,
208 'url': 'http://www.google.com/' 208 'url': 'http://www.google.com/'
209 }, 209 },
210 'phase': EventPhase.PHASE_BEGIN, 210 'phase': EventPhase.PHASE_BEGIN,
211 'source': { 211 'source': {
212 'id': 146, 212 'id': 146,
213 'type': EventSourceType.URL_REQUEST 213 'type': EventSourceType.URL_REQUEST
214 }, 214 },
215 'time': '953534792', 215 'time': '953534792',
216 'type': EventType.URL_REQUEST_START_JOB 216 'type': EventType.URL_REQUEST_START_JOB
217 }, 217 },
218 { 218 {
219 'phase': EventPhase.PHASE_END, 219 'phase': EventPhase.PHASE_END,
220 'source': { 220 'source': {
221 'id': 146, 221 'id': 146,
222 'type': EventSourceType.URL_REQUEST 222 'type': EventSourceType.URL_REQUEST
223 }, 223 },
224 'time': '953534800', 224 'time': '953534800',
225 'type': EventType.URL_REQUEST_START_JOB 225 'type': EventType.URL_REQUEST_START_JOB
226 }, 226 },
227 { 227 {
228 'params': { 228 'params': {
229 'load_flags': 136446208, 229 'load_flags': 68222976,
230 'method': 'GET', 230 'method': 'GET',
231 'priority': 4, 231 'priority': 4,
232 'url': 'http://www.google.com/' 232 'url': 'http://www.google.com/'
233 }, 233 },
234 'phase': EventPhase.PHASE_BEGIN, 234 'phase': EventPhase.PHASE_BEGIN,
235 'source': { 235 'source': {
236 'id': 146, 236 'id': 146,
237 'type': EventSourceType.URL_REQUEST 237 'type': EventSourceType.URL_REQUEST
238 }, 238 },
239 'time': '953534802', 239 'time': '953534802',
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 'type': EventSourceType.URL_REQUEST 726 'type': EventSourceType.URL_REQUEST
727 }, 727 },
728 'time': '953535567', 728 'time': '953535567',
729 'type': EventType.REQUEST_ALIVE 729 'type': EventType.REQUEST_ALIVE
730 } 730 }
731 ]; 731 ];
732 732
733 testCase.expectedText = 733 testCase.expectedText =
734 't=1338864633224 [st= 0] +REQUEST_ALIVE [dt=789]\n' + 734 't=1338864633224 [st= 0] +REQUEST_ALIVE [dt=789]\n' +
735 't=1338864633238 [st= 14] URL_REQUEST_START_JOB [dt=8]\n' + 735 't=1338864633238 [st= 14] URL_REQUEST_START_JOB [dt=8]\n' +
736 ' --> load_flags = 136446208 ' + 736 ' --> load_flags = 68222976 ' +
737 '(ENABLE_LOAD_TIMING | MAIN_FRAME | MAYBE_USER_GESTURE ' + 737 '(MAIN_FRAME | MAYBE_USER_GESTURE ' +
738 '| VERIFY_EV_CERT)\n' + 738 '| VERIFY_EV_CERT)\n' +
739 ' --> method = "GET"\n' + 739 ' --> method = "GET"\n' +
740 ' --> priority = 4\n' + 740 ' --> priority = 4\n' +
741 ' --> url = "http://www.google.com/"\n' + 741 ' --> url = "http://www.google.com/"\n' +
742 't=1338864633248 [st= 24] +URL_REQUEST_START_JOB [dt=279]\n' + 742 't=1338864633248 [st= 24] +URL_REQUEST_START_JOB [dt=279]\n' +
743 ' --> load_flags = 136446208 ' + 743 ' --> load_flags = 68222976 ' +
744 '(ENABLE_LOAD_TIMING | MAIN_FRAME | MAYBE_USER_GESTURE ' + 744 '(MAIN_FRAME | MAYBE_USER_GESTURE ' +
745 '| VERIFY_EV_CERT)\n' + 745 '| VERIFY_EV_CERT)\n' +
746 ' --> method = "GET"\n' + 746 ' --> method = "GET"\n' +
747 ' --> priority = 4\n' + 747 ' --> priority = 4\n' +
748 ' --> url = "http://www.google.com/"\n' + 748 ' --> url = "http://www.google.com/"\n' +
749 't=1338864633255 [st= 31] HTTP_CACHE_GET_BACKEND [dt=1]\n' + 749 't=1338864633255 [st= 31] HTTP_CACHE_GET_BACKEND [dt=1]\n' +
750 't=1338864633257 [st= 33] HTTP_CACHE_OPEN_ENTRY [dt=5]\n' + 750 't=1338864633257 [st= 33] HTTP_CACHE_OPEN_ENTRY [dt=5]\n' +
751 't=1338864633263 [st= 39] HTTP_CACHE_ADD_TO_ENTRY [dt=1]\n' + 751 't=1338864633263 [st= 39] HTTP_CACHE_ADD_TO_ENTRY [dt=1]\n' +
752 't=1338864633269 [st= 45] HTTP_CACHE_READ_INFO [dt=4]\n' + 752 't=1338864633269 [st= 45] HTTP_CACHE_READ_INFO [dt=4]\n' +
753 't=1338864633276 [st= 52] +HTTP_STREAM_REQUEST [dt=72]\n' + 753 't=1338864633276 [st= 52] +HTTP_STREAM_REQUEST [dt=72]\n' +
754 't=1338864633344 [st=120] HTTP_STREAM_REQUEST_BOUND_TO_JOB\n' + 754 't=1338864633344 [st=120] HTTP_STREAM_REQUEST_BOUND_TO_JOB\n' +
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 'phase': EventPhase.PHASE_BEGIN, 812 'phase': EventPhase.PHASE_BEGIN,
813 'source': { 813 'source': {
814 'id': 146, 814 'id': 146,
815 'type': EventSourceType.URL_REQUEST 815 'type': EventSourceType.URL_REQUEST
816 }, 816 },
817 'time': '953534778', 817 'time': '953534778',
818 'type': EventType.REQUEST_ALIVE 818 'type': EventType.REQUEST_ALIVE
819 }, 819 },
820 { 820 {
821 'params': { 821 'params': {
822 'load_flags': 256, 822 'load_flags': 0,
823 'method': 'GET', 823 'method': 'GET',
824 'priority': 4, 824 'priority': 4,
825 'url': 'http://www.google.com/' 825 'url': 'http://www.google.com/'
826 }, 826 },
827 'phase': EventPhase.PHASE_BEGIN, 827 'phase': EventPhase.PHASE_BEGIN,
828 'source': { 828 'source': {
829 'id': 146, 829 'id': 146,
830 'type': EventSourceType.URL_REQUEST 830 'type': EventSourceType.URL_REQUEST
831 }, 831 },
832 'time': '953534910', 832 'time': '953534910',
833 'type': EventType.URL_REQUEST_START_JOB 833 'type': EventType.URL_REQUEST_START_JOB
834 }, 834 },
835 { 835 {
836 'phase': EventPhase.PHASE_END, 836 'phase': EventPhase.PHASE_END,
837 'source': { 837 'source': {
838 'id': 146, 838 'id': 146,
839 'type': EventSourceType.URL_REQUEST 839 'type': EventSourceType.URL_REQUEST
840 }, 840 },
841 'time': '953534970', 841 'time': '953534970',
842 'type': EventType.URL_REQUEST_START_JOB 842 'type': EventType.URL_REQUEST_START_JOB
843 }, 843 },
844 ]; 844 ];
845 845
846 testCase.expectedText = 846 testCase.expectedText =
847 't=1338864633224 [st= 0] +REQUEST_ALIVE [dt=?]\n' + 847 't=1338864633224 [st= 0] +REQUEST_ALIVE [dt=?]\n' +
848 't=1338864633356 [st=132] URL_REQUEST_START_JOB [dt=60]\n' + 848 't=1338864633356 [st=132] URL_REQUEST_START_JOB [dt=60]\n' +
849 ' --> load_flags = 256 (ENABLE_LOAD_TIMING)\n' + 849 ' --> load_flags = 0 (NORMAL)\n' +
850 ' --> method = "GET"\n' + 850 ' --> method = "GET"\n' +
851 ' --> priority = 4\n' + 851 ' --> priority = 4\n' +
852 ' --> url = "http://www.google.com/"'; 852 ' --> url = "http://www.google.com/"';
853 853
854 return testCase; 854 return testCase;
855 } 855 }
856 856
857 /** 857 /**
858 * Test case for a URLRequest that was not completed that came from a loaded 858 * Test case for a URLRequest that was not completed that came from a loaded
859 * log file. 859 * log file.
860 */ 860 */
861 function painterTestURLRequestIncompleteFromLoadedLog() { 861 function painterTestURLRequestIncompleteFromLoadedLog() {
862 var testCase = painterTestURLRequestIncomplete(); 862 var testCase = painterTestURLRequestIncomplete();
863 testCase.logCreationTime = 1338864634013; 863 testCase.logCreationTime = 1338864634013;
864 testCase.expectedText = 864 testCase.expectedText =
865 't=1338864633224 [st= 0] +REQUEST_ALIVE [dt=789+]\n' + 865 't=1338864633224 [st= 0] +REQUEST_ALIVE [dt=789+]\n' +
866 't=1338864633356 [st=132] URL_REQUEST_START_JOB [dt=60]\n' + 866 't=1338864633356 [st=132] URL_REQUEST_START_JOB [dt=60]\n' +
867 ' --> load_flags = 256 (ENABLE_LOAD_TIMING)\n' + 867 ' --> load_flags = 0 (NORMAL)\n' +
868 ' --> method = "GET"\n' + 868 ' --> method = "GET"\n' +
869 ' --> priority = 4\n' + 869 ' --> priority = 4\n' +
870 ' --> url = "http://www.google.com/"\n' + 870 ' --> url = "http://www.google.com/"\n' +
871 't=1338864634013 [st=789]'; 871 't=1338864634013 [st=789]';
872 return testCase; 872 return testCase;
873 } 873 }
874 874
875 /** 875 /**
876 * Test case for a URLRequest that was not completed that came from a loaded 876 * Test case for a URLRequest that was not completed that came from a loaded
877 * log file when there's only a begin event. 877 * log file when there's only a begin event.
(...skipping 21 matching lines...) Expand all
899 'phase': EventPhase.PHASE_BEGIN, 899 'phase': EventPhase.PHASE_BEGIN,
900 'source': { 900 'source': {
901 'id': 318, 901 'id': 318,
902 'type': EventSourceType.URL_REQUEST 902 'type': EventSourceType.URL_REQUEST
903 }, 903 },
904 'time': '953675448', 904 'time': '953675448',
905 'type': EventType.REQUEST_ALIVE 905 'type': EventType.REQUEST_ALIVE
906 }, 906 },
907 { 907 {
908 'params': { 908 'params': {
909 'load_flags': 136446208, 909 'load_flags': 68222976,
910 'method': 'GET', 910 'method': 'GET',
911 'priority': 4, 911 'priority': 4,
912 'url': 'http://www.doesnotexistdomain.com/' 912 'url': 'http://www.doesnotexistdomain.com/'
913 }, 913 },
914 'phase': EventPhase.PHASE_BEGIN, 914 'phase': EventPhase.PHASE_BEGIN,
915 'source': { 915 'source': {
916 'id': 318, 916 'id': 318,
917 'type': EventSourceType.URL_REQUEST 917 'type': EventSourceType.URL_REQUEST
918 }, 918 },
919 'time': '953675455', 919 'time': '953675455',
920 'type': EventType.URL_REQUEST_START_JOB 920 'type': EventType.URL_REQUEST_START_JOB
921 }, 921 },
922 { 922 {
923 'phase': EventPhase.PHASE_END, 923 'phase': EventPhase.PHASE_END,
924 'source': { 924 'source': {
925 'id': 318, 925 'id': 318,
926 'type': EventSourceType.URL_REQUEST 926 'type': EventSourceType.URL_REQUEST
927 }, 927 },
928 'time': '953675460', 928 'time': '953675460',
929 'type': EventType.URL_REQUEST_START_JOB 929 'type': EventType.URL_REQUEST_START_JOB
930 }, 930 },
931 { 931 {
932 'params': { 932 'params': {
933 'load_flags': 136446208, 933 'load_flags': 68222976,
934 'method': 'GET', 934 'method': 'GET',
935 'priority': 4, 935 'priority': 4,
936 'url': 'http://www.doesnotexistdomain.com/' 936 'url': 'http://www.doesnotexistdomain.com/'
937 }, 937 },
938 'phase': EventPhase.PHASE_BEGIN, 938 'phase': EventPhase.PHASE_BEGIN,
939 'source': { 939 'source': {
940 'id': 318, 940 'id': 318,
941 'type': EventSourceType.URL_REQUEST 941 'type': EventSourceType.URL_REQUEST
942 }, 942 },
943 'time': '953675460', 943 'time': '953675460',
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1058 'type': EventSourceType.URL_REQUEST 1058 'type': EventSourceType.URL_REQUEST
1059 }, 1059 },
1060 'time': '953675923', 1060 'time': '953675923',
1061 'type': EventType.REQUEST_ALIVE 1061 'type': EventType.REQUEST_ALIVE
1062 } 1062 }
1063 ]; 1063 ];
1064 1064
1065 testCase.expectedText = 1065 testCase.expectedText =
1066 't=1338864773894 [st= 0] +REQUEST_ALIVE [dt=475]\n' + 1066 't=1338864773894 [st= 0] +REQUEST_ALIVE [dt=475]\n' +
1067 't=1338864773901 [st= 7] URL_REQUEST_START_JOB [dt=5]\n' + 1067 't=1338864773901 [st= 7] URL_REQUEST_START_JOB [dt=5]\n' +
1068 ' --> load_flags = 136446208 (' + 1068 ' --> load_flags = 68222976 (' +
1069 'ENABLE_LOAD_TIMING | MAIN_FRAME | MAYBE_USER_GESTURE ' + 1069 'MAIN_FRAME | MAYBE_USER_GESTURE ' +
1070 '| VERIFY_EV_CERT)\n' + 1070 '| VERIFY_EV_CERT)\n' +
1071 ' --> method = "GET"\n' + 1071 ' --> method = "GET"\n' +
1072 ' --> priority = 4\n' + 1072 ' --> priority = 4\n' +
1073 ' --> url = "http://www.doesnotexistdomain.com/"\n' + 1073 ' --> url = "http://www.doesnotexistdomain.com/"\n' +
1074 't=1338864773906 [st= 12] +URL_REQUEST_START_JOB [dt=245]\n' + 1074 't=1338864773906 [st= 12] +URL_REQUEST_START_JOB [dt=245]\n' +
1075 ' --> load_flags = 136446208 (' + 1075 ' --> load_flags = 68222976 (' +
1076 'ENABLE_LOAD_TIMING | MAIN_FRAME | MAYBE_USER_GESTURE ' + 1076 'MAIN_FRAME | MAYBE_USER_GESTURE ' +
1077 '| VERIFY_EV_CERT)\n' + 1077 '| VERIFY_EV_CERT)\n' +
1078 ' --> method = "GET"\n' + 1078 ' --> method = "GET"\n' +
1079 ' --> priority = 4\n' + 1079 ' --> priority = 4\n' +
1080 ' --> url = "http://www.doesnotexistdomain.com/"\n' + 1080 ' --> url = "http://www.doesnotexistdomain.com/"\n' +
1081 't=1338864773915 [st= 21] HTTP_CACHE_GET_BACKEND [dt=0]\n' + 1081 't=1338864773915 [st= 21] HTTP_CACHE_GET_BACKEND [dt=0]\n' +
1082 't=1338864773915 [st= 21] HTTP_CACHE_OPEN_ENTRY [dt=1]\n' + 1082 't=1338864773915 [st= 21] HTTP_CACHE_OPEN_ENTRY [dt=1]\n' +
1083 ' --> net_error = -2 (ERR_FAILED)\n' + 1083 ' --> net_error = -2 (ERR_FAILED)\n' +
1084 't=1338864773917 [st= 23] HTTP_CACHE_CREATE_ENTRY [dt=2]\n' + 1084 't=1338864773917 [st= 23] HTTP_CACHE_CREATE_ENTRY [dt=2]\n' +
1085 't=1338864773919 [st= 25] HTTP_CACHE_ADD_TO_ENTRY [dt=1]\n' + 1085 't=1338864773919 [st= 25] HTTP_CACHE_ADD_TO_ENTRY [dt=1]\n' +
1086 't=1338864773920 [st= 26] HTTP_STREAM_REQUEST [dt=225]\n' + 1086 't=1338864773920 [st= 26] HTTP_STREAM_REQUEST [dt=225]\n' +
(...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after
2044 * Tests the formatting of a URL request that was just finishing up when 2044 * Tests the formatting of a URL request that was just finishing up when
2045 * net-internals was opened. 2045 * net-internals was opened.
2046 */ 2046 */
2047 function painterTestInProgressURLRequest() { 2047 function painterTestInProgressURLRequest() {
2048 var testCase = {}; 2048 var testCase = {};
2049 testCase.tickOffset = '1337911098446'; 2049 testCase.tickOffset = '1337911098446';
2050 2050
2051 testCase.logEntries = [ 2051 testCase.logEntries = [
2052 { 2052 {
2053 'params': { 2053 'params': {
2054 'load_flags': 136446208, 2054 'load_flags': 68222976,
2055 'load_state': LoadState.READING_RESPONSE, 2055 'load_state': LoadState.READING_RESPONSE,
2056 'method': 'GET', 2056 'method': 'GET',
2057 'url': 'http://www.MagicPonyShopper.com' 2057 'url': 'http://www.MagicPonyShopper.com'
2058 }, 2058 },
2059 'phase': EventPhase.PHASE_BEGIN, 2059 'phase': EventPhase.PHASE_BEGIN,
2060 'source': { 2060 'source': {
2061 'id': 318, 2061 'id': 318,
2062 'type': EventSourceType.URL_REQUEST 2062 'type': EventSourceType.URL_REQUEST
2063 }, 2063 },
2064 'time': '953675548', 2064 'time': '953675548',
(...skipping 23 matching lines...) Expand all
2088 'id': 318, 2088 'id': 318,
2089 'type': EventSourceType.URL_REQUEST 2089 'type': EventSourceType.URL_REQUEST
2090 }, 2090 },
2091 'time': '953675923', 2091 'time': '953675923',
2092 'type': EventType.REQUEST_ALIVE 2092 'type': EventType.REQUEST_ALIVE
2093 } 2093 }
2094 ]; 2094 ];
2095 2095
2096 testCase.expectedText = 2096 testCase.expectedText =
2097 't=1338864773994 [st= 0] +REQUEST_ALIVE [dt=375]\n' + 2097 't=1338864773994 [st= 0] +REQUEST_ALIVE [dt=375]\n' +
2098 ' --> load_flags = 136446208 ' + 2098 ' --> load_flags = 68222976 ' +
2099 '(ENABLE_LOAD_TIMING | MAIN_FRAME | MAYBE_USER_GESTURE ' + 2099 '(MAIN_FRAME | MAYBE_USER_GESTURE ' +
2100 '| VERIFY_EV_CERT)\n' + 2100 '| VERIFY_EV_CERT)\n' +
2101 ' --> load_state = ' + LoadState.READING_RESPONSE + 2101 ' --> load_state = ' + LoadState.READING_RESPONSE +
2102 ' (READING_RESPONSE)\n' + 2102 ' (READING_RESPONSE)\n' +
2103 ' --> method = "GET"\n' + 2103 ' --> method = "GET"\n' +
2104 ' --> url = "http://www.MagicPonyShopper.com"\n' + 2104 ' --> url = "http://www.MagicPonyShopper.com"\n' +
2105 't=1338864774145 [st=151] -HTTP_STREAM_REQUEST\n' + 2105 't=1338864774145 [st=151] -HTTP_STREAM_REQUEST\n' +
2106 't=1338864774151 [st=157] -URL_REQUEST_START_JOB\n' + 2106 't=1338864774151 [st=157] -URL_REQUEST_START_JOB\n' +
2107 't=1338864774369 [st=375] -REQUEST_ALIVE'; 2107 't=1338864774369 [st=375] -REQUEST_ALIVE';
2108 2108
2109 return testCase; 2109 return testCase;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
2151 2151
2152 testCase.expectedText = 2152 testCase.expectedText =
2153 't= 2 [st= 0] +REQUEST_ALIVE [dt=789+]\n' + 2153 't= 2 [st= 0] +REQUEST_ALIVE [dt=789+]\n' +
2154 't=152 [st=150] HTTP_STREAM_REQUEST [dt=1]\n' + 2154 't=152 [st=150] HTTP_STREAM_REQUEST [dt=1]\n' +
2155 't=791 [st=789]'; 2155 't=791 [st=789]';
2156 2156
2157 return testCase; 2157 return testCase;
2158 } 2158 }
2159 2159
2160 })(); // Anonymous namespace 2160 })(); // Anonymous namespace
OLDNEW
« no previous file with comments | « no previous file | content/browser/loader/resource_dispatcher_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698