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

Unified Diff: LayoutTests/http/tests/serviceworker/fetch-event-client-attribute.html

Issue 1102363002: Add Client Attribute to FetchEvent- Blink Side. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 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/http/tests/serviceworker/fetch-event-client-attribute.html
diff --git a/LayoutTests/http/tests/serviceworker/fetch-event-client-attribute.html b/LayoutTests/http/tests/serviceworker/fetch-event-client-attribute.html
new file mode 100644
index 0000000000000000000000000000000000000000..5551e9bd5f8b018cf04ae8f05e534fa84d584793
--- /dev/null
+++ b/LayoutTests/http/tests/serviceworker/fetch-event-client-attribute.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script src="resources/test-helpers.js"></script>
+<body>
+<script>
+var worker = 'resources/fetch-event-client-attribute-test-worker.js';
+
+function test() {
jsbell 2015/05/05 17:45:42 Please do not override the `test` function provide
Paritosh Kumar 2015/05/06 11:42:36 Ohh sorry for noise, this was useless method.
+ window.onmessage = function(e) {assert_equals(e.data.actual, e.data.expected)}
+}
+
+async_test(function(t) {
jsbell 2015/05/05 17:45:42 You should be able to use service_worker_test() to
Paritosh Kumar 2015/05/06 11:42:36 Using primise_test, as do not have an appropriate
+ var scope = 'resources/simple.html';
+ service_worker_unregister_and_register(t, worker, scope)
+ .then(function(reg) {
+ return wait_for_state(t, reg.installing, 'activated');
+ })
+ .then(function() { return with_iframe(scope); })
+ .then(function(frame) {
+
+ assert_equals(frame.contentDocument.body.textContent, "top-level", "frameType should be Top-Level");
+ frame.remove();
+ return service_worker_unregister_and_done(t, scope);
+ })
+ .catch(unreached_rejection(t));
+ }, 'Service Worker responds to fetch event with client frameType');
+
+</script>
+</body>

Powered by Google App Engine
This is Rietveld 408576698