Elim cr-checkbox
[chromium-blink-merge.git] / chrome / test / data / extensions / uitest / plugins / test.js
blob10d5cd0f94024b766d5e0f2c99484850078e5875
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);
9 });
10 return;
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);
20 return;
23 var plug = document.getElementById("plugin");
24 if (!plug) {
25 window.domAutomationController.send(false);
26 return;
28 callTestInvokeDefault(plug);