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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/cache/location-reload.html

Issue 2555963003: FasterLocationReload: use ReloadMainResource for JS exposed reloads (Closed)
Patch Set: test Created 4 years 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/cache/resources/location-reload-window.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCYUPE html>
2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4 <script>
5
6 async_test(t => {
7 let testWindow = null;
8 let messageCount = 0;
9
10 // Test will run on testWindow that is opened below.
11 // This page just received messages to confirm if tests run expectedly.
12 const checkReady = e => {
13 t.step(() => {
14 // Will receive "READY" twice because of a reload, then receive "PASS".
15 assert_equals(e.data, "READY", "received message is " + e.data);
16 messageCount++;
17
18 if (messageCount == 2) {
19 window.removeEventListener("message", checkReady, false);
20 window.addEventListener("message", e => {
21 assert_equals(e.data, "PASS", "received message is " + e.data);
22 t.done();
23 }, { once: true });
24 }
25
26 // Send back "START" message for "READY".
27 assert_class_string(testWindow, "Window", "testWindow is invalid");
28 testWindow.postMessage("START", location.origin);
29 });
30 };
31 window.addEventListener("message", checkReady, false);
32
33 // Start a test in a dedicated window because we can not track navigations
34 // within a test harness.
35 t.step(() => {
36 testWindow = open("./resources/location-reload-window.html", "testWindow");
37 assert_class_string(testWindow, "Window", "window.open() failed");
38 });
39 }, "Test location.reload() cache behaviors");
40 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/cache/resources/location-reload-window.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698