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

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

Issue 27408004: <webview>: Resolve relative paths as chrome-extension: URLs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't update src attribute with resolved URL. Created 7 years, 2 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 ceb8c3c1bb620ddf864aa22efe9eb81d0c4583f7..3651ddd50dd96a40093b2369b8807e6c8fb13924 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
@@ -316,6 +316,23 @@ function testChromeExtensionURL() {
document.body.appendChild(webview);
}
+// This test verifies that the loadstop event fires when loading a webview
+// accessible resource from a partition that is privileged if the src URL
+// is not fully qualified.
+function testChromeExtensionRelativePath() {
+ var webview = document.createElement('webview');
+ // foobar is a privileged partition according to the manifest file.
Charlie Reis 2013/10/18 17:37:55 Hmm, I'm still uncomfortable with these being call
Fady Samuel 2013/10/25 21:10:31 Agreed. I'm supportive of changing the name.
+ webview.partition = 'foobar';
+ webview.addEventListener('loadabort', function(e) {
+ embedder.test.fail();
+ });
+ webview.addEventListener('loadstop', function(e) {
+ embedder.test.succeed();
+ });
+ webview.setAttribute('src', 'guest.html');
+ document.body.appendChild(webview);
+}
+
function testWebRequestAPIExistence() {
var apiPropertiesToCheck = [
'onBeforeRequest',
@@ -1114,6 +1131,7 @@ embedder.test.testList = {
'testAutosizeWithPartialAttributes': testAutosizeWithPartialAttributes,
'testAPIMethodExistence': testAPIMethodExistence,
'testChromeExtensionURL': testChromeExtensionURL,
+ 'testChromeExtensionRelativePath': testChromeExtensionRelativePath,
'testWebRequestAPIExistence': testWebRequestAPIExistence,
'testEventName': testEventName,
'testOnEventProperties': testOnEventProperties,

Powered by Google App Engine
This is Rietveld 408576698