summaryrefslogtreecommitdiffstats
path: root/ppapi/tests/extensions/background_keepalive/background.js
diff options
context:
space:
mode:
authorckocagil@chromium.org <ckocagil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-04 22:30:11 +0000
committerckocagil@chromium.org <ckocagil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-04 22:30:11 +0000
commit0139a62b7ab43f46a372405d701fd3634a037b31 (patch)
tree0c659dcc9420d534dcdba8118cc4e0991409b07a /ppapi/tests/extensions/background_keepalive/background.js
parent465b7a80238d8192081fdcf6fc7e39203cd16c2b (diff)
downloadchromium_src-0139a62b7ab43f46a372405d701fd3634a037b31.zip
chromium_src-0139a62b7ab43f46a372405d701fd3634a037b31.tar.gz
chromium_src-0139a62b7ab43f46a372405d701fd3634a037b31.tar.bz2
Revert of https://codereview.chromium.org/112663007/
Reason for revert: Broke XP bots: http://build.chromium.org/p/chromium.win/builders/XP%20Tests%20%282%29/builds/32520 TBR=yzshen@chromium.org,scheib@chromium.org NOTREECHECKS=true NOTRY=true BUG=298339 Review URL: https://codereview.chromium.org/124313005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243034 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/tests/extensions/background_keepalive/background.js')
-rw-r--r--ppapi/tests/extensions/background_keepalive/background.js41
1 files changed, 0 insertions, 41 deletions
diff --git a/ppapi/tests/extensions/background_keepalive/background.js b/ppapi/tests/extensions/background_keepalive/background.js
deleted file mode 100644
index 6b9c259..0000000
--- a/ppapi/tests/extensions/background_keepalive/background.js
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2014 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.
-
-var NaClModulesExpected = 0;
-var NaClModulesLoaded = 0;
-
-// Indicate load success.
-function moduleDidLoad() {
- NaClModulesLoaded++;
- if (NaClModulesLoaded == NaClModulesExpected)
- chrome.test.sendMessage("nacl_modules_loaded", handleChromeTestMessage);
-}
-
-var handleChromeTestMessage = function (message) {
- NaClModules = document.querySelectorAll('embed');
- for (var i = 0; i < NaClModules.length; i++) {
- NaClModules[i].postMessage(message);
- }
-}
-
-function handleNaclMessage(message_event) {
- console.log("handleNaclMessage: " + message_event.data);
-}
-
-function createNaClEmbed() {
- NaClModulesExpected++;
-
- var listener = document.createElement("div");
- listener.addEventListener("load", moduleDidLoad, true);
- listener.addEventListener("message", handleNaclMessage, true);
- listener.innerHTML = '<embed' +
- ' src="ppapi_tests_extensions_background_keepalive.nmf"' +
- ' type="application/x-nacl" />';
- document.body.appendChild(listener);
-}
-
-// Create 2 embeds to verify that we can handle more than one.
-createNaClEmbed();
-createNaClEmbed();
-