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: LayoutTests/storage/quota/storagequota-query-info.html

Issue 669353002: Fix broken Promise-related layout tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@return-rejected
Patch Set: Created 6 years, 2 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: LayoutTests/storage/quota/storagequota-query-info.html
diff --git a/LayoutTests/storage/quota/storagequota-query-info.html b/LayoutTests/storage/quota/storagequota-query-info.html
index 79c368591d37c5a270043cec61fc6238379a24da..983ee4d7c5446755188536b4980b8de3b8f20fae 100644
--- a/LayoutTests/storage/quota/storagequota-query-info.html
+++ b/LayoutTests/storage/quota/storagequota-query-info.html
@@ -46,14 +46,20 @@ function runQueryPersistentTest() {
function runQueryUnknownTest() {
debug("* Querying about unknown storage.");
- shouldThrow("navigator.storageQuota.queryInfo('unknown')");
- runNextTest();
+ navigator.storageQuota.queryInfo('unknown').then(function() {
+ testFailed('resolved unexpectedly');
+ }, function(e) {
+ testPassed('rejected as expected: ' + e);
+ }).then(runNextTest);
}
function runQueryWithMissingArgumentTest() {
debug("* Querying with missing storage type.");
- shouldThrow("navigator.storageQuota.queryInfo()");
- runNextTest();
+ navigator.storageQuota.queryInfo().then(function() {
+ testFailed('resolved unexpectedly');
+ }, function(e) {
+ testPassed('rejected as expected: ' + e);
+ }).then(runNextTest);
}
// End of test body functions ---------------------------------------------

Powered by Google App Engine
This is Rietveld 408576698