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

Unified Diff: third_party/WebKit/LayoutTests/fast/forms/calendar-picker/week-picker-close-no-crash.html

Issue 2798863002: PagePopupController: handle frame-detached window usage. (Closed)
Patch Set: add test Created 3 years, 8 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/V8PagePopupControllerBinding.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/forms/calendar-picker/week-picker-close-no-crash.html
diff --git a/third_party/WebKit/LayoutTests/fast/forms/calendar-picker/week-picker-close-no-crash.html b/third_party/WebKit/LayoutTests/fast/forms/calendar-picker/week-picker-close-no-crash.html
new file mode 100644
index 0000000000000000000000000000000000000000..a24eab1f4854d1529f9dc1250079fec5a196e9bb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/forms/calendar-picker/week-picker-close-no-crash.html
@@ -0,0 +1,31 @@
+<!doctype html>
+<html>
+<head>
+<script src=../../../resources/testharness.js></script>
+<script src=../../../resources/testharnessreport.js></script>
+<script src=../resources/picker-common.js></script>
+</head>
+<body>
+<input type=week id=week>
+<script>
+if (window.testRunner) {
+ testRunner.waitUntilDone();
+ testRunner.dumpAsText();
+}
+var test = async_test('Accessing popup window controller after detach should not crash.');
+
+function noCrashOnDetach() {
+ // Controller not accessible on a detached/closed window.
+ assert_equals(popupWindow.pagePopupController, null);
+ test.done();
+}
+
+test.step(() => {
+ openPicker(document.getElementById('week'), () => {
+ setTimeout(noCrashOnDetach);
+ popupWindow.close();
+ });
+});
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/V8PagePopupControllerBinding.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698