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

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

Issue 60273002: <webview>: Cleanup tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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 | « chrome/test/data/extensions/platform_apps/web_view/media_access/allow/embedder.js ('k') | no next file » | 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 webview.style.height = '200px'; 49 webview.style.height = '200px';
50 var urlDummy = 'data:text/html,<body>Initial dummy guest</body>'; 50 var urlDummy = 'data:text/html,<body>Initial dummy guest</body>';
51 webview.setAttribute('src', urlDummy); 51 webview.setAttribute('src', urlDummy);
52 webview.setAttribute('partition', partitionName); 52 webview.setAttribute('partition', partitionName);
53 document.body.appendChild(webview); 53 document.body.appendChild(webview);
54 return webview; 54 return webview;
55 }; 55 };
56 56
57 embedder.test = {}; 57 embedder.test = {};
58 embedder.test.succeed = function() { 58 embedder.test.succeed = function() {
59 chrome.test.sendMessage('DoneShimTest.PASSED'); 59 chrome.test.sendMessage('TEST_PASSED');
60 }; 60 };
61 61
62 embedder.test.fail = function() { 62 embedder.test.fail = function() {
63 chrome.test.sendMessage('DoneShimTest.FAILED'); 63 chrome.test.sendMessage('TEST_FAILED');
64 }; 64 };
65 65
66 embedder.test.assertEq = function(a, b) { 66 embedder.test.assertEq = function(a, b) {
67 if (a != b) { 67 if (a != b) {
68 console.log('assertion failed: ' + a + ' != ' + b); 68 console.log('assertion failed: ' + a + ' != ' + b);
69 embedder.test.fail(); 69 embedder.test.fail();
70 } 70 }
71 }; 71 };
72 72
73 embedder.test.assertTrue = function(condition) { 73 embedder.test.assertTrue = function(condition) {
(...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after
1189 'testRemoveWebviewAfterNavigation': testRemoveWebviewAfterNavigation, 1189 'testRemoveWebviewAfterNavigation': testRemoveWebviewAfterNavigation,
1190 'testResizeWebviewResizesContent': testResizeWebviewResizesContent 1190 'testResizeWebviewResizesContent': testResizeWebviewResizesContent
1191 }; 1191 };
1192 1192
1193 onload = function() { 1193 onload = function() {
1194 chrome.test.getConfig(function(config) { 1194 chrome.test.getConfig(function(config) {
1195 embedder.setUp_(config); 1195 embedder.setUp_(config);
1196 chrome.test.sendMessage("Launched"); 1196 chrome.test.sendMessage("Launched");
1197 }); 1197 });
1198 }; 1198 };
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/platform_apps/web_view/media_access/allow/embedder.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698