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

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

Issue 1015443002: Defer setting "internalinstanceid" so that pending (and destroyed) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clean up a bit Created 5 years, 9 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: 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 624ff5c5702650a96945ceb3f6196fbf7f78d93d..31d1c37ffd0a7bf020f2b00eb9c6700df50f7e15 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
@@ -1238,6 +1238,29 @@ function testDeclarativeWebRequestAPISendMessage() {
document.body.appendChild(webview);
}
+// This test verifies that setting a <webview>'s style.display = 'block' does
+// not throw and attach error.
+function testDisplayBlock() {
+ var webview = new WebView();
+ webview.onloadstop = function(e) {
+ LOG('webview.onloadstop');
+ window.console.error = function() {
+ // If we see an error, that means attach failed.
+ embedder.test.fail();
+ };
+ webview.style.display = 'block';
+ embedder.test.assertTrue(webview.getProcessId() > 0);
+
+ webview.onloadstop = function(e) {
+ LOG('Second webview.onloadstop');
+ embedder.test.succeed();
+ };
+ webview.src = 'data:text/html,<body>Second load</body>';
+ }
+ webview.src = 'about:blank';
+ document.body.appendChild(webview);
+}
+
// This test verifies that the WebRequest API onBeforeRequest event fires on
// clients*.google.com URLs.
function testWebRequestAPIGoogleProperty() {
@@ -2127,6 +2150,7 @@ embedder.test.testList = {
'testDeclarativeWebRequestAPI': testDeclarativeWebRequestAPI,
'testDeclarativeWebRequestAPISendMessage':
testDeclarativeWebRequestAPISendMessage,
+ 'testDisplayBlock': testDisplayBlock,
'testWebRequestAPI': testWebRequestAPI,
'testWebRequestAPIWithHeaders': testWebRequestAPIWithHeaders,
'testWebRequestAPIGoogleProperty': testWebRequestAPIGoogleProperty,
« no previous file with comments | « chrome/browser/apps/guest_view/web_view_browsertest.cc ('k') | content/renderer/browser_plugin/browser_plugin.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698