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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/resource-tree/cached-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 addScriptAndRunTest()
19 {
20 if (window.testRunner)
21 testRunner.waitUntilDone();
22 addScript().then(() => runTest());
23 }
24
25 function test()
26 {
27 var resource = InspectorTest.resourceTreeModel.resourceForURL("http://127.0. 0.1:8000/inspector/resource-tree/resources/script-with-constant-last-modified.ph p");
28 if (!resource) {
29 InspectorTest.addResult("ERROR: Failed to find resource.");
30 InspectorTest.completeTest();
31 return;
32 }
33 InspectorTest.addResult("Last modified: " + (resource.lastModified() ? resou rce.lastModified().toISOString() : null));
34 InspectorTest.addResult("Content size: " + resource.contentSize());
35
36 InspectorTest.completeTest();
37 }
38 </script>
39 </head>
40 <body onload="addScriptAndRunTest()">
41 <p>Verify that cached resource has metadata.</p>
42 </body>
43 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698