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

Unified Diff: chrome/test/data/extensions/platform_apps/ad_view/ad_network_loaded/chrometest.js

Issue 12463015: Enable <adview> tag for packaged apps. (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Merge fix. Created 7 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/ad_view/ad_network_loaded/chrometest.js
diff --git a/chrome/test/data/extensions/platform_apps/ad_view/ad_network_loaded/chrometest.js b/chrome/test/data/extensions/platform_apps/ad_view/ad_network_loaded/chrometest.js
new file mode 100644
index 0000000000000000000000000000000000000000..f4f4f596ca8ce6c35ee7a6b047221e267cfce6e7
--- /dev/null
+++ b/chrome/test/data/extensions/platform_apps/ad_view/ad_network_loaded/chrometest.js
@@ -0,0 +1,25 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+chrome.test.getConfig(function(config) {
+ var guestURL = 'http://localhost:' + config.testServer.port +
+ '/files/extensions/platform_apps/ad_view/ad_network/testsdk.html';
+
+ var adview = document.getElementsByTagName("adview")[0];
+
+ adview.addEventListener("loadcommit", function() {
+ adview.contentWindow.postMessage({
+ message: "onloadcommit",
+ data: "data"
+ }, "*");
+ })
+
+ adview.setAttribute("src", guestURL);
+
+ window.addEventListener("message", function(event) {
+ if (event.data.message == "onloadcommit-ack") {
+ chrome.test.sendMessage("ad-network-loaded");
+ }
+ })
+});

Powered by Google App Engine
This is Rietveld 408576698