chromium/chrome/test/data/extensions/api_test/service_worker/web_accessible_resources/iframe_src/iframe.js

// Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

window.onmessage = function(e) {
  if (e.data == 'ping') {
    e.source.postMessage('FROM_EXTENSION_RESOURCE', '*');
  }
};