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

Unified Diff: LayoutTests/http/tests/serviceworker/chromium/frame-removed.html

Issue 1308723003: DOMWindow::navigator should return navigator w/o frame when detached. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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: LayoutTests/http/tests/serviceworker/chromium/frame-removed.html
diff --git a/LayoutTests/http/tests/serviceworker/chromium/frame-removed.html b/LayoutTests/http/tests/serviceworker/chromium/frame-removed.html
new file mode 100644
index 0000000000000000000000000000000000000000..036454dcd1c8a961ae737f8dffeb34a8969df7e3
--- /dev/null
+++ b/LayoutTests/http/tests/serviceworker/chromium/frame-removed.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>navigator.serviceWorker should return null when frame is removed</title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+</head>
+<body>
+ <iframe id="subframe" src="about:blank"></iframe>
+<script>
+test(function(t) {
+ var iframe = document.querySelector("#subframe");
+ var f = iframe.contentWindow.Function;
+ function get_navigator() {
+ return f("return navigator")();
+ }
+ iframe.remove();
+ assert_equals(get_navigator().serviceWorker, null);
+ });
+done();
+</script>
+
+</body>
+</html>
« no previous file with comments | « LayoutTests/http/tests/serviceworker/chromium/frame-detached-by-navigation.html ('k') | Source/core/frame/LocalDOMWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698