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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/suborigins/resources/fetch-resource.php

Issue 2370843003: Suborigin LayoutTest formatting and refactoring (Closed)
Patch Set: Created 4 years, 3 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/security/suborigins/resources/fetch-resource.php
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/suborigins/resources/fetch-resource.php b/third_party/WebKit/LayoutTests/http/tests/security/suborigins/resources/fetch-resource.php
index 4039ea02989d1cf98bb068dc12b76bd4aee1559e..e80e3451a57af70951bc9f24db94f1f3e466ab97 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/suborigins/resources/fetch-resource.php
+++ b/third_party/WebKit/LayoutTests/http/tests/security/suborigins/resources/fetch-resource.php
@@ -12,11 +12,19 @@ var resource_url = '<?php echo($_GET["resource"]); ?>'
var is_mem_cached = window.internals.isLoadingFromMemoryCache(resource_url);
fetch(resource_url, {mode: 'no-cors'})
-.then(function(response) {
- window.parent.postMessage({'type': 'response', 'is_mem_cached': is_mem_cached, 'id': id}, '*');
-})
-.catch(function(e) {
- window.parent.postMessage({'type': 'error', 'is_mem_cached': is_mem_cached, 'id': id}, '*')
-});
+ .then(function(response) {
+ window.parent.postMessage({
+ 'type': 'response',
+ 'is_mem_cached': is_mem_cached,
+ 'id': id
+ }, '*');
+ })
+ .catch(function(e) {
+ window.parent.postMessage({
+ 'type': 'error',
+ 'is_mem_cached': is_mem_cached,
+ 'id': id
+ }, '*');
+ });
</script>
</html>

Powered by Google App Engine
This is Rietveld 408576698