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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/preload/memcache_eviction_nopreload.html

Issue 2174563003: Clear all preloads when document is detached (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix issues inside clearPreloads and add tests Created 4 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4 <body>
5 <script>
6 var t = async_test('Test that preloaded resources get evicted from MemoryCache w hen preload is not used');
Charlie Harrison 2016/08/04 18:10:25 Update text here (no preloads).
Yoav Weiss 2016/08/04 20:26:14 done
7 var action;
8 var loadTimestampWithXHR = t.step_func(function() {
9 var xhr = new XMLHttpRequest;
10 xhr.withCredentials = true;
11 xhr.open("GET", "resources/timestamp.php");
12 xhr.send();
13 xhr.onload = function() {
14 action(xhr.responseText);
15 };
16 });
17
18 var writeAndReload = t.step_func(function(text) {
19 sessionStorage.timestamp = text;
20 document.location.reload(true);
21 });
22
23 var compare = t.step_func(function(text) {
24 assert_true(sessionStorage.timestamp != text);
25 t.done();
26 });
27
28 if (!sessionStorage.timestamp) {
29 action = writeAndReload;
30 } else {
31 action = compare;
32 }
33 loadTimestampWithXHR();
34 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698