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

Unified Diff: chrome/test/data/extensions/platform_apps/web_view/shim/main.js

Issue 584713002: Browser Plugin: Remove dependency on NPAPI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_content_window
Patch Set: Updated histograms.xml Created 6 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
« no previous file with comments | « chrome/browser/apps/web_view_browsertest.cc ('k') | content/browser/browser_plugin/browser_plugin_guest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/platform_apps/web_view/shim/main.js
diff --git a/chrome/test/data/extensions/platform_apps/web_view/shim/main.js b/chrome/test/data/extensions/platform_apps/web_view/shim/main.js
index d6688bcafba088092ff4a2f31e0060587f7f3785..e0e0ca104f8159f31f4676eff7ccb8eb0ec72473 100644
--- a/chrome/test/data/extensions/platform_apps/web_view/shim/main.js
+++ b/chrome/test/data/extensions/platform_apps/web_view/shim/main.js
@@ -93,6 +93,26 @@ embedder.test.assertFalse = function(condition) {
// Tests begin.
+// This test verifies that the allowtransparency property cannot be changed
+// once set. The attribute can only be deleted.
+function testAllowTransparencyAttribute() {
+ var webview = document.createElement('webview');
+ webview.src = 'data:text/html,webview test';
+ webview.allowtransparency = true;
+
+ webview.addEventListener('loadstop', function(e) {
+ embedder.test.assertTrue(webview.hasAttribute('allowtransparency'));
+ webview.allowtransparency = false;
+ embedder.test.assertTrue(webview.allowtransparency);
+ embedder.test.assertTrue(webview.hasAttribute('allowtransparency'));
+ webview.removeAttribute('allowtransparency');
+ embedder.test.assertFalse(webview.allowtransparency);
+ embedder.test.succeed();
+ });
+
+ document.body.appendChild(webview);
+}
+
// This test verifies that a lengthy page with autosize enabled will report
// the correct height in the sizechanged event.
function testAutosizeHeight() {
@@ -1808,6 +1828,7 @@ function testFindAPI_findupdate() {
};
embedder.test.testList = {
+ 'testAllowTransparencyAttribute': testAllowTransparencyAttribute,
'testAutosizeHeight': testAutosizeHeight,
'testAutosizeAfterNavigation': testAutosizeAfterNavigation,
'testAutosizeBeforeNavigation': testAutosizeBeforeNavigation,
« no previous file with comments | « chrome/browser/apps/web_view_browsertest.cc ('k') | content/browser/browser_plugin/browser_plugin_guest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698