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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/resource-tree/resource-metadata.html

Issue 2413233003: DevTools: introduce WI.Resource.contentSize() and WI.Resource.lastModified() (Closed)
Patch Set: add tests Created 4 years, 2 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
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="../inspector-test.js"></script>
4 <script src="../network-test.js"></script>
5 <script>
6 function addScript()
7 {
8 var fulfill;
9 var promise = new Promise(x => fulfill = x);
10 var script = document.createElement("script");
11 script.type = "text/javascript";
12 script.src = "resources/script-with-constant-last-modified.php";
13 script.onload = fulfill;
14 document.body.appendChild(script);
15 return promise;
16 }
17
18 function test()
19 {
20 InspectorTest.evaluateInPageAsync("addScript()").then(step2);
21
22 function step2()
23 {
24 var resource = InspectorTest.resourceTreeModel.resourceForURL("http://12 7.0.0.1:8000/inspector/resource-tree/resources/script-with-constant-last-modifie d.php");
25 if (!resource) {
26 InspectorTest.addResult("ERROR: Failed to find resource.");
27 InspectorTest.completeTest();
28 return;
29 }
30 InspectorTest.addResult("Last modified: " + (resource.lastModified() ? r esource.lastModified().toISOString() : null));
31 InspectorTest.addResult("Content size: " + resource.contentSize());
32
33 InspectorTest.completeTest();
34 }
35 }
36 </script>
37 </head>
38 <body onload="runTest()">
39 <p>Verify that dynamically added resource has metadata.</p>
40 </body>
41 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698