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

Side by Side Diff: chrome/test/data/extensions/uitest/plugins/test.js

Issue 1862513003: Remove NPAPI from browser and utility (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 function callTestInvokeDefault(plugin) {
6 if (plugin.testInvokeDefault) {
7 plugin.testInvokeDefault(function(str) {
8 window.domAutomationController.send(true);
9 });
10 return;
11 }
12
13 // Try again in 100 ms.
14 window.setTimeout(callTestInvokeDefault.bind(null, plugin), 100);
15 }
16
17 function testPluginWorks() {
18 if (!navigator.mimeTypes['application/x-extension-test']) {
19 window.domAutomationController.send(false);
20 return;
21 }
22
23 var plug = document.getElementById("plugin");
24 if (!plug) {
25 window.domAutomationController.send(false);
26 return;
27 }
28 callTestInvokeDefault(plug);
29 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698