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
3 // found in the LICENSE file.
5 function callTestInvokeDefault(plugin) {
6 if (plugin.testInvokeDefault) {
7 plugin.testInvokeDefault(function(str) {
8 window.domAutomationController.send(true);
13 // Try again in 100 ms.
14 window.setTimeout(callTestInvokeDefault.bind(null, plugin), 100);
17 function testPluginWorks() {
18 if (!navigator.mimeTypes['application/x-extension-test']) {
19 window.domAutomationController.send(false);
23 var plug = document.getElementById("plugin");
25 window.domAutomationController.send(false);
28 callTestInvokeDefault(plug);