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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/scripts-with-same-source-url.html

Issue 1409223006: DevTools: replace content provider when re-adding into network project (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Same with isLiveEdit flag in a scriptParsed. Created 5 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
(Empty)
1 <html>
2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/debugger-test.js"></script>
5 <script>
6 function injectScript(value)
7 {
8 eval("function foo() { return " + value + "; } //# sourceURL=MyScript.js");
9 }
10
11 function test()
12 {
13 InspectorTest.evaluateInPage("injectScript(1);");
14 InspectorTest.evaluateInPage("injectScript(2);");
15
16 WebInspector.workspace.addEventListener(WebInspector.Workspace.Events.UISour ceCodeAdded, reportAdded);
17 WebInspector.workspace.addEventListener(WebInspector.Workspace.Events.UISour ceCodeRemoved, reportRemoved);
18
19 var iteration = 0;
20
21 function reportAdded(event)
22 {
23 if (event.data.originURL() !== "MyScript.js")
24 return;
25 InspectorTest.addResult("Added: " + event.data.originURL() + " to " + ev ent.data.project().type());
26 if (event.data.project().type() !== "network")
27 return;
28 event.data.requestContent(function(it, content) {
29 InspectorTest.addResult("Content: " + content);
30 if (it)
31 InspectorTest.completeTest();
32 }.bind(null, iteration++));
33 }
34
35 function reportRemoved(event)
36 {
37 if (event.data.originURL() !== "MyScript.js")
38 return;
39 InspectorTest.addResult("Removed: " + event.data.originURL() + " from " + event.data.project().type());
40 }
41 }
42
43 </script>
44 </head>
45
46 <body onload="runTest()">
47 <p>
48 Tests that script is replaced with the newer version when the names match.
49 </p>
50
51 </body>
52 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698