Index: third_party/WebKit/LayoutTests/external/wpt/clear-site-data/navigation.https.html |
diff --git a/third_party/WebKit/LayoutTests/external/wpt/clear-site-data/navigation.html b/third_party/WebKit/LayoutTests/external/wpt/clear-site-data/navigation.https.html |
similarity index 55% |
rename from third_party/WebKit/LayoutTests/external/wpt/clear-site-data/navigation.html |
rename to third_party/WebKit/LayoutTests/external/wpt/clear-site-data/navigation.https.html |
index cd0f83e17f02567522624968d1ac62f029d126eb..761ebddcdcdd4c9851c023d714e45d006490cf6e 100644 |
--- a/third_party/WebKit/LayoutTests/external/wpt/clear-site-data/navigation.html |
+++ b/third_party/WebKit/LayoutTests/external/wpt/clear-site-data/navigation.https.html |
@@ -11,11 +11,17 @@ |
/** Ensures that all datatypes are nonempty. */ |
function populateDatatypes() { |
return Promise.all(TestUtils.DATATYPES.map(function(datatype) { |
- return datatype.add().then(datatype.isEmpty().then(function(isEmpty) { |
- assert_false( |
- isEmpty, |
- datatype.name + " has to be nonempty before the test starts."); |
- })); |
+ return new Promise(function(resolve, reject) { |
+ datatype.add().then(function() { |
+ datatype.isEmpty().then(function(isEmpty) { |
+ assert_false( |
+ isEmpty, |
+ datatype.name + |
+ " has to be nonempty before the test starts."); |
+ resolve(); |
+ }); |
+ }); |
+ }); |
})); |
} |
@@ -37,7 +43,7 @@ |
report[datatype.name], |
datatype.name + " should NOT have been cleared."); |
} |
- }) |
+ }); |
} |
TestUtils.COMBINATIONS.forEach(function(combination) { |
@@ -46,19 +52,24 @@ |
combination.map(function(e) { return e.name; }).join(", "); |
promise_test(function(test) { |
- return populateDatatypes() |
- .then(function() { |
- // Navigate to a resource with a Clear-Site-Data header in an |
- // iframe, then verify that the correct types have been deleted. |
- return new Promise(function(resolve, reject) { |
- window.addEventListener("message", resolve); |
- var iframe = document.createElement("iframe"); |
- iframe.src = TestUtils.getClearSiteDataUrl(combination); |
- document.body.appendChild(iframe); |
- }).then(function(messageEvent) { |
- verifyDatatypes(combination, messageEvent.data); |
+ TestUtils.bustCache(); |
+ return new Promise(function(resolve_test, reject_test) { |
+ populateDatatypes() |
+ .then(function() { |
+ // Navigate to a resource with a Clear-Site-Data header in |
+ // an iframe, then verify that the correct types have been |
+ // deleted. |
+ return new Promise(function(resolve, reject) { |
+ window.addEventListener("message", resolve); |
+ var iframe = document.createElement("iframe"); |
+ iframe.src = TestUtils.getClearSiteDataUrl(combination); |
+ document.body.appendChild(iframe); |
+ }).then(function(messageEvent) { |
+ verifyDatatypes(combination, messageEvent.data); |
+ resolve_test(); |
+ }); |
}); |
- }); |
+ }); |
}, test_name); |
}); |
</script> |