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

Side by Side Diff: LayoutTests/fast/loader/resource-request-callbacks.html

Issue 1288323006: Remove willRequestResource callback, it is unused outside of tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove some experiments I accidentally included Created 5 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 <script>
6 window.jsTestIsAsync = true;
7 if (window.testRunner) {
8 testRunner.dumpAsText();
9 testRunner.dumpResourceRequestCallbacks();
10 } else {
11 document.write("This test cannot run without a testRunner");
12 }
13
14 function requestMoreResources() {
15 document.getElementById("img-changing").src = "../images/resources/mu.png";
16
17 var createdImage = document.createElement("img");
18 createdImage.id = "img-created";
19 createdImage.src = "../images/resources/oval.png";
20 document.getElementById("images").appendChild(createdImage);
21
22 document.getElementById("with-background").style.backgroundImage = "url(../i mages/resources/palatted-color-png-gamma-one-color-profile.png)";
23 // Force a style recalc so the background image starts loading.
24 getComputedStyle(document.getElementById("with-background"));
25
26 document.getElementById("more-images").innerHTML = "<img id='img-created-2' src='../images/resources/png_per_row_alpha.png'>";
27
28 var createdScript = document.createElement("script");
29 createdScript.id = "script-created";
30 createdScript.src = "../loader/resources/empty-script.js";
31 document.head.appendChild(createdScript);
32
33 setTimeout(finishTest, 0);
34 }
35
36 function finishTest() {
37 testPassed("");
38 finishJSTest();
39 }
40 </script>
41 <style>
42 #with-background
43 {
44 background-image:url("../images/resources/lenna.png");
45 }
46 body
47 {
48 cursor:url("../events/resources/greenbox-hotspot35-4.cur"), pointer;
49 }
50 @font-face
51 {
52 font-family: custom_font;
53 src: url("../../resources/Ahem.ttf");
54 }
55 p
56 {
57 font-family: custom_font;
58 }
59 </style>
60 </head>
61 <body onload="requestMoreResources()">
62 <div id="with-background">
63 <p>
64 This test checks that the correct callbacks for resource requests are
65 invoked. It passes if you see the callbacks for 11 resources.
66 </p>
67 </div>
68 <div id="images">
69 <img id="img-normal" src="../images/resources/dice.png" />
70 <img id="img-changing" src="../images/resources/dice.png" />
71 <img id="img-fail" />
72 <img id="img-not-there" src="not-existing.png" />
73 </div>
74 <div id="more-images">
75 </div>
76 <div id="console"></div>
77 </body>
78 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698