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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/navigation-timing/test_document_readiness_exist.html

Issue 2676573004: Import wpt@6010f54a979d242f657b284bae53c2b218c533f4 (Closed)
Patch Set: Update test expectations and baselines. Created 3 years, 10 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 <html>
3 <head>
4 <meta charset="utf-8" />
5 <title>document.readyState values exist during a navigation</title>
6 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
7 <link rel="help" href="http://www.w3.org/TR/html5/dom.html#resource-metadata -management"/>
8 <script src="/resources/testharness.js"></script>
9 <script src="/resources/testharnessreport.js"></script>
10 <script>
11 setup({ explicit_done: true });
12 var has_loading = (document.readyState == "loading");
13 var has_interactive = (document.readyState == "interactive");
14 var has_complete = (document.readyState == "complete");
15
16 document.onreadystatechange = function()
17 {
18 if (document.readyState == "loading")
19 {
20 has_loading = true;
21 }
22 if (document.readyState == "interactive")
23 {
24 has_interactive = true;
25 }
26 if (document.readyState = "complete")
27 {
28 has_complete = true;
29 }
30 };
31
32 function onload_test()
33 {
34 test(function () { assert_true(has_loading); }, "Document readiness has loading state.");
35 test(function () { assert_true(has_interactive); }, "Document readin ess has interactive state.");
36 test(function () { assert_true(has_complete); }, "Document readiness has complete state.");
37 done();
38 }
39 </script>
40
41 </head>
42 <body onload="onload_test();">
43 <h1>Description</h1>
44 <p>This test validates that the "loading", "interactive" and "complete"
45 document.readyState states are available during a navigation.</p>
46 <p>Refresh this page to guarantee all readyState phases.</p>
47 <div id="log"></div>
48 </body>
49 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698