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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector-protocol/inspector-protocol-test.js

Issue 2274233002: [Devtools] Fix reload behavior when devtools is open (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: new methods Created 4 years, 3 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/LayoutTests/http/tests/inspector-protocol/reload-memory-cache.html » ('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) 2012 Samsung Electronics. All rights reserved. 2 * Copyright (C) 2012 Samsung Electronics. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 { 106 {
107 testRunner.evaluateInWebInspector(++lastFrontendEvalId, script); 107 testRunner.evaluateInWebInspector(++lastFrontendEvalId, script);
108 } 108 }
109 109
110 function navigateProtocolTest(url) 110 function navigateProtocolTest(url)
111 { 111 {
112 url += (url.indexOf("?") === -1 ? "?" : "&") + reloadParam + lastFrontendEva lId; 112 url += (url.indexOf("?") === -1 ? "?" : "&") + reloadParam + lastFrontendEva lId;
113 window.location.replace(url); 113 window.location.replace(url);
114 } 114 }
115 115
116 function prepareForReload()
117 {
118 window.location += "#" + reloadParam + lastFrontendEvalId;
119 }
120
116 function openInspector() 121 function openInspector()
117 { 122 {
118 var scriptTags = document.getElementsByTagName("script"); 123 var scriptTags = document.getElementsByTagName("script");
119 var scriptUrlBasePath = ""; 124 var scriptUrlBasePath = "";
120 for (var i = 0; i < scriptTags.length; ++i) { 125 for (var i = 0; i < scriptTags.length; ++i) {
121 var index = scriptTags[i].src.lastIndexOf("/inspector-protocol-test.js") ; 126 var index = scriptTags[i].src.lastIndexOf("/inspector-protocol-test.js") ;
122 if (index > -1 ) { 127 if (index > -1 ) {
123 scriptUrlBasePath = scriptTags[i].src.slice(0, index); 128 scriptUrlBasePath = scriptTags[i].src.slice(0, index);
124 break; 129 break;
125 } 130 }
(...skipping 10 matching lines...) Expand all
136 continue; 141 continue;
137 initializers += "(" + window[symbol].toString() + ")();\n"; 142 initializers += "(" + window[symbol].toString() + ")();\n";
138 } 143 }
139 evaluateInFrontend(initializers + "(" + testFunction.toString() +")();") ; 144 evaluateInFrontend(initializers + "(" + testFunction.toString() +")();") ;
140 return; 145 return;
141 } 146 }
142 // Kill waiting process if failed to send. 147 // Kill waiting process if failed to send.
143 alert("Failed to send test function"); 148 alert("Failed to send test function");
144 testRunner.notifyDone(); 149 testRunner.notifyDone();
145 } 150 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector-protocol/reload-memory-cache.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698