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

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

Issue 715583007: Various webview cleanup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix. Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | extensions/renderer/resources/guest_view/web_view.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var util = {}; 5 var util = {};
6 var embedder = {}; 6 var embedder = {};
7 embedder.baseGuestURL = ''; 7 embedder.baseGuestURL = '';
8 embedder.emptyGuestURL = ''; 8 embedder.emptyGuestURL = '';
9 embedder.windowOpenGuestURL = ''; 9 embedder.windowOpenGuestURL = '';
10 embedder.noReferrerGuestURL = ''; 10 embedder.noReferrerGuestURL = '';
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 }; 743 };
744 webview.addEventListener('loadstop', loadstopHandler); 744 webview.addEventListener('loadstop', loadstopHandler);
745 745
746 webview.setAttribute('src', 'data:text/html,<html><body>guest</body></html>'); 746 webview.setAttribute('src', 'data:text/html,<html><body>guest</body></html>');
747 } 747 }
748 748
749 function testExecuteScriptFail() { 749 function testExecuteScriptFail() {
750 var webview = document.createElement('webview'); 750 var webview = document.createElement('webview');
751 document.body.appendChild(webview); 751 document.body.appendChild(webview);
752 setTimeout(function() { 752 setTimeout(function() {
753 try {
754 webview.executeScript( 753 webview.executeScript(
755 {code:'document.body.style.backgroundColor = "red";'}, 754 {code:'document.body.style.backgroundColor = "red";'},
756 function(results) { 755 function(results) {
757 embedder.test.fail(); 756 embedder.test.fail();
758 }); 757 });
759 } catch (e) { 758 setTimeout(function() {
760 embedder.test.succeed(); 759 embedder.test.succeed();
761 } 760 }, 0);
762 }, 0); 761 }, 0);
763 } 762 }
764 763
765 function testExecuteScript() { 764 function testExecuteScript() {
766 var webview = document.createElement('webview'); 765 var webview = document.createElement('webview');
767 webview.setAttribute('partition', arguments.callee.name); 766 webview.setAttribute('partition', arguments.callee.name);
768 webview.addEventListener('loadstop', function() { 767 webview.addEventListener('loadstop', function() {
769 webview.executeScript( 768 webview.executeScript(
770 {code:'document.body.style.backgroundColor = "red";'}, 769 {code:'document.body.style.backgroundColor = "red";'},
771 function(results) { 770 function(results) {
(...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after
2060 'testFindAPI_findupdate': testFindAPI, 2059 'testFindAPI_findupdate': testFindAPI,
2061 'testLoadDataAPI': testLoadDataAPI 2060 'testLoadDataAPI': testLoadDataAPI
2062 }; 2061 };
2063 2062
2064 onload = function() { 2063 onload = function() {
2065 chrome.test.getConfig(function(config) { 2064 chrome.test.getConfig(function(config) {
2066 embedder.setUp_(config); 2065 embedder.setUp_(config);
2067 chrome.test.sendMessage("Launched"); 2066 chrome.test.sendMessage("Launched");
2068 }); 2067 });
2069 }; 2068 };
OLDNEW
« no previous file with comments | « no previous file | extensions/renderer/resources/guest_view/web_view.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698