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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/cache/xmlhttprequest-onload-event-for-successful-revalidation.html

Issue 2210473002: Mark ResourceClient/ImageResourceObserver finished just before notifying (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reflect comments 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/cache/xmlhttprequest-onload-event-for-successful-revalidation.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/cache/xmlhttprequest-onload-event-for-successful-revalidation.html b/third_party/WebKit/LayoutTests/http/tests/cache/xmlhttprequest-onload-event-for-successful-revalidation.html
new file mode 100644
index 0000000000000000000000000000000000000000..1841052dd3ffeed7b27e7d4221a05974aad4de38
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/cache/xmlhttprequest-onload-event-for-successful-revalidation.html
@@ -0,0 +1,26 @@
+<html>
+<head>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script>
+async_test(function(t) {
+ const url = 'resources/etag.php?' + Math.floor(100000000 * Math.random());
+ const xhr1 = new XMLHttpRequest();
+ xhr1.onload = function() {
+ assert_equals(xhr1.status, 200);
+
+ const xhr2 = new XMLHttpRequest();
+ xhr2.onload = function() {
+ assert_equals(xhr2.status, 200);
+ t.done();
+ };
+ xhr2.open("GET", url, true);
+ xhr2.send();
+ };
+
+ xhr1.open("GET", url, true);
+ xhr1.send();
+}, "onload event must be invoked for successful revalidation when XHR's " +
+ "onload handler initiates a new XHR to the same URL.");
+</script>
+</head>

Powered by Google App Engine
This is Rietveld 408576698