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

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: review #20 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 <h1>random</h1>
tkent 2016/12/14 22:59:43 Is this necessary?
Takashi Toyoshima 2016/12/15 04:45:32 Oops, this should be moved into resource/location-
3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script>
5 <script>
6
7 async_test(t => {
8 let testWindow = null;
9 let messageCount = 0;
10
11 // Test will run on testWindow that is opened below.
12 // This page just received messages to confirm if tests run expectedly.
13 const checkReady = e => {
14 t.step(() => {
15 // Will receive "READY" twice because of a reload, then receive "PASS".
16 assert_equals(e.data, "READY", "received message is " + e.data);
17 messageCount++;
18
19 if (messageCount == 2) {
20 window.removeEventListener("message", checkReady, false);
21 window.addEventListener("message", e => {
22 assert_equals(e.data, "PASS", "received message is " + e.data);
23 t.done();
24 }, { once: true });
25 }
26
27 // Send back "START" message for "READY".
28 assert_class_string(testWindow, "Window", "testWindow is invalid");
29 testWindow.postMessage("START", location.origin);
30 });
31 };
32 window.addEventListener("message", checkReady, false);
33
34 // Start a test in a dedicated window because we can not track navigations
35 // within a test harness.
36 t.step(() => {
37 testWindow = open("./resources/location-reload-window.html", "testWindow");
38 assert_class_string(testWindow, "Window", "window.open() failed");
39 });
40 }, "Test location.reload() cache behaviors");
41 </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