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

Unified Diff: chrome/test/data/extensions/webui/receives_extension_options_on_close.js

Issue 490783002: Handle closing web contents in ExtensionOptionsGuest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add tests for detecting onclose event in WebUI Created 6 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
« no previous file with comments | « chrome/test/data/extensions/api_test/extension_options/close_self/options.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/webui/receives_extension_options_on_close.js
diff --git a/chrome/test/data/extensions/webui/receives_extension_options_on_close.js b/chrome/test/data/extensions/webui/receives_extension_options_on_close.js
new file mode 100644
index 0000000000000000000000000000000000000000..ed881f69107c94800157162cc1fe4dafc70df867
--- /dev/null
+++ b/chrome/test/data/extensions/webui/receives_extension_options_on_close.js
@@ -0,0 +1,23 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// out/Debug/browser_tests
+// --gtest_filter=ExtensionWebUITest.ReceivesExtensionOptionsOnClose
+if (!chrome || !chrome.test || !chrome.test.sendMessage) {
+ console.error('chrome.test.sendMessage is unavailable on ' +
+ document.location.href);
+ domAutomationController.send(false);
+ return;
+}
+
+chrome.test.sendMessage('ready', function(reply) {
+ var extensionoptions = document.createElement('extensionoptions');
+ extensionoptions.onclose = function() {
+ chrome.test.sendMessage('onclose received');
+ }
not at google - send to devlin 2014/08/21 19:05:18 ;
ericzeng 2014/08/21 19:07:53 Done.
+ extensionoptions.setAttribute('extension', reply);
+ document.body.appendChild(extensionoptions);
+});
+
+domAutomationController.send(true);
« no previous file with comments | « chrome/test/data/extensions/api_test/extension_options/close_self/options.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698