| 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,
|
|
|