Clarify and update GN build flags docs.
[chromium-blink-merge.git] / chrome / test / data / is_search_provider_installed_with_exception.html
blobefeb50fcba9bd94c36bda91f614a332d834aef9f
1 <html>
2 <body>
3 <p>Test IsProviderInstalled.<p>
4 <div id=result>
5 </div>
6 <script>
7 var passedAll = true;
9 function log(message) {
10 document.getElementById("result").innerHTML += message + "<br>";
13 function logPassed(message) {
14 log("PASS: " + message);
17 function logFailed(message) {
18 passedAll = false;
19 log("FAIL: " + message);
22 function writeResult() {
23 if (passedAll) {
24 logPassed("Everything passed.");
25 document.title = "OK";
26 } else {
27 logFailed("At least one test failed.");
28 document.title = "FAIL";
32 function MyObject() {
35 try {
36 MyObject.prototype.toString = function() { throw "test"; }
37 var object = new MyObject();
39 // Verify the search provider state for the current page.
40 var installed = window.external.IsSearchProviderInstalled(object)
41 writeResult();
42 } catch (e) {
43 logFailed("An exception occurred. Name: " + e.name + " Message: " +
44 e.message);
45 writeResult();
47 </script>
48 </body>
49 </html>